Skip to content

Commit

Permalink
Initial
Browse files Browse the repository at this point in the history
  • Loading branch information
PaulBGD committed Oct 31, 2020
0 parents commit 34e477b
Show file tree
Hide file tree
Showing 20 changed files with 1,606 additions and 0 deletions.
38 changes: 38 additions & 0 deletions .github/workflows/airplanelite.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
name: Build main

on: [push]

jobs:
build:

runs-on: ubuntu-latest

strategy:
matrix:
java: [11, 8]

steps:
- uses: actions/[email protected]

- name: Set up JDK ${{ matrix.java }}
uses: actions/[email protected]
with:
java-version: ${{ matrix.java }}

- uses: actions/[email protected]
with:
path: ~/.m2/repository
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
restore-keys: ${{ runner.os }}-maven-

- name: Patch AirplaneLite
run: |
git config --global user.email "[email protected]"
git config --global user.name "Your Name"
git submodule update --init --recursive
./airplane.sh jar
- uses: actions/upload-artifact@v2
with:
name: Airplane-JDK${{ matrix.java }}
path: launcher-airplanelite.jar
5 changes: 5 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
AirplaneLite-API
AirplaneLite-Server
mc-dev
current-tuinity
launcher-airplanelite.jar
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[submodule "Tuinity"]
path = Tuinity
url = [email protected]:Spottedleaf/Tuinity.git
621 changes: 621 additions & 0 deletions PATCHES-LICENSE

Large diffs are not rendered by default.

9 changes: 9 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# Airplane Lite

Another performance Tuinity fork.

## License

Patches are licensed under GPL-3.0.
All other files are licensed under MIT.

1 change: 1 addition & 0 deletions Tuinity
Submodule Tuinity added at 576e2c
135 changes: 135 additions & 0 deletions airplane.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,135 @@
#!/usr/bin/env bash

# exit immediately if a command exits with a non-zero status
set -e
# get base dir regardless of execution location
SOURCE="${BASH_SOURCE[0]}"
while [ -h "$SOURCE" ]; do # resolve $SOURCE until the file is no longer a symlink
DIR="$( cd -P "$( dirname "$SOURCE" )" && pwd )"
SOURCE="$(readlink "$SOURCE")"
[[ "$SOURCE" != /* ]] && SOURCE="$DIR/$SOURCE" # if $SOURCE was a relative symlink, we need to resolve it relative to the path where the symlink file was located
done
SOURCE=$([[ "$SOURCE" = /* ]] && echo "$SOURCE" || echo "$PWD/${SOURCE#./}")
basedir=$(dirname "$SOURCE")
. "$basedir"/scripts/init.sh

paperstash() {
STASHED=$(git stash)
}

paperunstash() {
if [[ "$STASHED" != "No local changes to save" ]] ; then
git stash pop
fi
}

case "$1" in
"rb" | "rbp" | "rebuild")
(
set -e
cd "$basedir"
scripts/rebuildpatches.sh "$basedir"
)
;;
"p" | "patch" | "apply")
(
set -e
cd "$basedir"
if [ "$2" != "fast" ]; then
scripts/upstream.sh
fi
scripts/apply.sh "$basedir"
)
;;
"b" | "bu" | "build")
(
basedir
mvn -N install
cd ${FORK_NAME}-API && mvn -e clean install
cd ../Tuinity/Paper/Paper-MojangAPI && mvn -e clean install
cd ../../../${FORK_NAME}-Server && mvn -e clean install
)
;;
"jar" | "paperclip")
(
basedir
cd "$basedir"
if [ "$2" != "fast" ]; then
scripts/upstream.sh
fi
./scripts/apply.sh "$basedir"
cd "$basedir"
mvn -N install
cd ${FORK_NAME}-API && mvn -e clean install
cd ../Tuinity/Paper/Paper-MojangAPI && mvn -e clean install
cd ../../../${FORK_NAME}-Server && mvn -e clean install
cd "$basedir"
./scripts/paperclip.sh
)
;;
"d" | "de" | "deploy")
(
basedir
mvn -N install
cd ${FORK_NAME}-API
mvn clean deploy && cd ../${FORK_NAME}-Server && mvn clean install
)
;;
"up" | "upstream")
(
cd "$basedir"
scripts/upstream.sh "$2"
)
;;
"r" | "root")
cd "$basedir"
;;
"a" | "api")
cd "$basedir/Tuinity-API"
;;
"s" | "server")
cd "$basedir/Tuinity-Server"
;;
"setup")
if [[ -f ~/.bashrc ]] ; then
NAME="ec"
if [[ ! -z "${2+x}" ]] ; then
NAME="$2"
fi
(grep "alias $NAME=" ~/.bashrc > /dev/null) && (sed -i "s|alias $NAME=.*|alias $NAME='. $SOURCE'|g" ~/.bashrc) || (echo "alias $NAME='. $SOURCE'" >> ~/.bashrc)
alias "$NAME=. $SOURCE"
echo "You can now just type '$NAME' at any time to access the paper tool."
fi
;;
*)
echo "Tuinity build tool command. This provides a variety of commands to build and manage the PaperMC build"
echo "environment. For all of the functionality of this command to be available, you must first run the"
echo "'setup' command. View below for details. For essential building and patching, you do not need to do the setup."
echo ""
echo " Normal commands:"
echo " * rb, rebuild | Rebuild patches, can be called from anywhere."
echo " * p, patch | Apply all patches to top of Paper without building it. Can be run from anywhere."
echo " * up, upstream | Build Paper upstream, pass arg up to update paper. Can be run from anywhere."
echo " * b, build | Build API and Server but no deploy. Can be ran anywhere."
echo " * d, deploy | Build and Deploy API jar and build Server. Can be ran anywhere."
echo ""
echo " These commands require the setup command before use:"
echo " * r, root | Change directory to the root of the project."
echo " * a. api | Move to the Paper-API directory."
echo " * s, server | Move to the Paper-Server directory."
echo " * e, edit | Use to edit a specific patch, give it the argument \"server\" or \"api\""
echo " | respectively to edit the correct project. Use the argument \"continue\" after"
echo " | the changes have been made to finish and rebuild patches. Can be called from anywhere."
echo ""
echo " * setup | Add an alias to .bashrc to allow full functionality of this script. Run as:"
echo " | . ./tuinity setup"
echo " | After you run this command you'll be able to just run 'tuinity' from anywhere."
echo " | The default name for the resulting alias is 'tuinity', you can give an argument to override"
echo " | this default, such as:"
echo " | . ./tuinity setup example"
echo " | Which will allow you to run 'example' instead."
;;
esac

unset -f paperstash
unset -f paperunstash
32 changes: 32 additions & 0 deletions patches/api/0001-Branding-Changes.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Paul Sauve <[email protected]>
Date: Sat, 31 Oct 2020 18:34:29 -0500
Subject: [PATCH] Branding Changes


diff --git a/pom.xml b/pom.xml
index 3b5dcb434f3357183859281941139a1c86d9cb1b..1f8cc1bece0a21865a1ec53cada7a45f55cd8668 100644
--- a/pom.xml
+++ b/pom.xml
@@ -3,17 +3,17 @@
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
- <groupId>com.tuinity</groupId>
- <artifactId>tuinity-parent</artifactId>
+ <groupId>gg.airplane</groupId>
+ <artifactId>airplanelite-parent</artifactId>
<version>dev-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>

- <artifactId>tuinity-api</artifactId>
+ <artifactId>airplanelite-api</artifactId>
<version>1.16.3-R0.1-SNAPSHOT</version>
<packaging>jar</packaging>

- <name>Tuinity-API</name>
+ <name>AirplaneLite-API</name>
<url>https://github.com/Spottedleaf/Tuinity</url>
<description>An enhanced plugin API for Minecraft servers.</description>

103 changes: 103 additions & 0 deletions patches/server/0001-Branding-Changes.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,103 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Paul Sauve <[email protected]>
Date: Sat, 31 Oct 2020 18:34:38 -0500
Subject: [PATCH] Branding Changes


diff --git a/pom.xml b/pom.xml
index 5e25ae55e44e31d232b088b7c3c39df69b0cc875..a9467c9cf66a4b8c5ee7e8e3c4118b8b495e8595 100644
--- a/pom.xml
+++ b/pom.xml
@@ -1,10 +1,10 @@
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
- <artifactId>tuinity</artifactId>
+ <artifactId>airplanelite</artifactId>
<packaging>jar</packaging>
<version>1.16.3-R0.1-SNAPSHOT</version>
- <name>Tuinity-Server</name>
+ <name>AirplaneLite-Server</name>
<url>https://github.com/Spottedleaf/Tuinity</url>

<properties>
@@ -18,16 +18,16 @@
</properties>

<parent>
- <groupId>com.tuinity</groupId>
- <artifactId>tuinity-parent</artifactId>
+ <groupId>gg.airplane</groupId>
+ <artifactId>airplanelite-parent</artifactId>
<version>dev-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>

<dependencies>
<dependency>
- <groupId>com.tuinity</groupId>
- <artifactId>tuinity-api</artifactId>
+ <groupId>gg.airplane</groupId>
+ <artifactId>airplanelite-api</artifactId>
<version>${project.version}</version>
<scope>compile</scope>
</dependency>
@@ -165,7 +165,7 @@

<!-- This builds a completely 'ready to start' jar with all dependencies inside -->
<build>
- <finalName>tuinity-${minecraft.version}</finalName>
+ <finalName>airplanelite-${minecraft.version}</finalName>
<defaultGoal>install</defaultGoal> <!-- Paper -->
<plugins>
<plugin>
@@ -173,7 +173,7 @@
<artifactId>gitdescribe-maven-plugin</artifactId>
<version>1.3</version>
<configuration>
- <outputPrefix>git-Tuinity-</outputPrefix> <!-- Tuinity -->
+ <outputPrefix>git-AirplaneLite-</outputPrefix> <!-- AirplaneLite -->
<scmDirectory>..</scmDirectory>
</configuration>
<executions>
diff --git a/src/main/java/com/destroystokyo/paper/PaperVersionFetcher.java b/src/main/java/com/destroystokyo/paper/PaperVersionFetcher.java
index 255bbd6e48b95c70fad02ba692c64c7579496827..1f90439dad440f212b78e746e003ac88f50357a4 100644
--- a/src/main/java/com/destroystokyo/paper/PaperVersionFetcher.java
+++ b/src/main/java/com/destroystokyo/paper/PaperVersionFetcher.java
@@ -24,8 +24,8 @@ public class PaperVersionFetcher implements VersionFetcher {
@Nonnull
@Override
public String getVersionMessage(@Nonnull String serverVersion) {
- String[] parts = serverVersion.substring("git-Tuinity-".length()).split("[-\\s]"); // Tuinity
- String updateMessage = getUpdateStatusMessage("Spottedleaf/Tuinity", GITHUB_BRANCH_NAME, parts[0]); // Tuinity
+ String[] parts = serverVersion.substring("git-AirplaneLite-".length()).split("[-\\s]"); // Tuinity
+ String updateMessage = getUpdateStatusMessage("TECHNOVE/AirplaneLite", GITHUB_BRANCH_NAME, parts[0]); // Tuinity
String history = getHistory();

return history != null ? history + "\n" + updateMessage : updateMessage;
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
index c5a8d6d3fb0e25b4a5913894eaa7dd6b4937fd5d..e8b56c5d5a276a1d648a77354562941c46dc2ec6 100644
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
@@ -1510,7 +1510,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
}

public String getServerModName() {
- return "Tuinity"; // Tuinity //Paper - Paper > // Spigot - Spigot > // CraftBukkit - cb > vanilla!
+ return "AirplaneLite"; // AirplaneL // Tuinity //Paper - Paper > // Spigot - Spigot > // CraftBukkit - cb > vanilla!
}

public CrashReport b(CrashReport crashreport) {
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
index 786ddcee7edaf32e8e996ab8dcd9cbf11c7f1719..df5ce359d6ff1882f7fcc1f789242b7fdab7e9b2 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
@@ -232,7 +232,7 @@ import javax.annotation.Nullable; // Paper
import javax.annotation.Nonnull; // Paper

public final class CraftServer implements Server {
- private final String serverName = "Tuinity"; // Paper // Tuinity
+ private final String serverName = "AirplaneLite"; // Paper // Tuinity // AirplaneL
private final String serverVersion;
private final String bukkitVersion = Versioning.getBukkitVersion();
private final Logger logger = Logger.getLogger("Minecraft");
Loading

0 comments on commit 34e477b

Please sign in to comment.