3
0
Mirror von https://github.com/PaperMC/Paper.git synchronisiert 2024-11-15 04:20:04 +01:00

few fixes to make it actually run

Dieser Commit ist enthalten in:
MiniDigger 2021-06-12 02:22:53 +02:00
Ursprung 7ea73d48d4
Commit a22a0e56ef
4 geänderte Dateien mit 28 neuen und 12 gelöschten Zeilen

Datei anzeigen

@ -74,3 +74,7 @@ c net/minecraft/world/entity/projectile/EntityTippedArrow net/minecraft/world/en
# p 1 entry
# p 2 context
# m (Lcom/google/gson/JsonObject;Lnet/minecraft/world/level/storage/loot/entries/LootEntryAbstract;Lcom/google/gson/JsonSerializationContext;)V serializeType serializeCustom
# missed mapping?
c net/minecraft/world/level/block/MultifaceBlock net/minecraft/world/level/block/MultifaceBlock
m (Lnet/minecraft/world/level/block/state/IBlockData;Lnet/minecraft/world/level/IBlockAccess;Lnet/minecraft/core/BlockPosition;Lnet/minecraft/core/EnumDirection;)Lnet/minecraft/world/level/block/state/IBlockData; c getStateForPlacement

Datei anzeigen

@ -17,12 +17,17 @@ index 67fb370cad6924895a6b27052dbd5c1767e3f0c9..3e05459f27c4c5697ae65da504d67a6a
/.project
diff --git a/build.gradle.kts b/build.gradle.kts
new file mode 100644
index 0000000000000000000000000000000000000000..fddf2f440356425d948f40dcf9d9853a374ddc8e
index 0000000000000000000000000000000000000000..b038528ba5ab9790a6bdb1c51ff072f9b8a64bf8
--- /dev/null
+++ b/build.gradle.kts
@@ -0,0 +1,72 @@
@@ -0,0 +1,84 @@
+import com.github.jengelman.gradle.plugins.shadow.transformers.AppendingTransformer
+import java.time.Instant
+import com.github.jengelman.gradle.plugins.shadow.transformers.Log4j2PluginsCacheFileTransformer
+import com.github.jengelman.gradle.plugins.shadow.transformers.Transformer
+import org.gradle.api.file.FileTreeElement
+import shadow.org.apache.logging.log4j.core.config.plugins.processor.PluginProcessor.PLUGIN_CACHE_FILE
+import java.util.Date
+import java.text.SimpleDateFormat
+
+plugins {
+ java
@ -62,7 +67,7 @@ index 0000000000000000000000000000000000000000..fddf2f440356425d948f40dcf9d9853a
+ attributes(mapOf(
+ "Main-Class" to "org.bukkit.craftbukkit.Main",
+ "Implementation-Title" to "CraftBukkit",
+ "Implementation-Vendor" to Instant.now().epochSecond,
+ "Implementation-Vendor" to SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss'Z'").format(Date()), // Paper
+ "Specification-Title" to "Bukkit",
+ "Specification-Version" to project.version,
+ "Specification-Vendor" to "Bukkit Team"
@ -88,8 +93,15 @@ index 0000000000000000000000000000000000000000..fddf2f440356425d948f40dcf9d9853a
+ transform(AppendingTransformer::class.java) {
+ resource = "META-INF/services/java.sql.Driver"
+ }
+ transform(ModifiedLog4j2PluginsCacheFileTransformer::class.java)
+}
+
+tasks.test {
+ exclude("org/bukkit/craftbukkit/inventory/ItemStack*Test.class")
+}
+
+class ModifiedLog4j2PluginsCacheFileTransformer : Transformer by Log4j2PluginsCacheFileTransformer() {
+ override fun canTransformResource(element: FileTreeElement): Boolean {
+ return PLUGIN_CACHE_FILE == element.name || element.name == "Log4j2Plugins.dat"
+ }
+}

Datei anzeigen

@ -5,10 +5,10 @@ Subject: [PATCH] Build system changes
diff --git a/build.gradle.kts b/build.gradle.kts
index fddf2f440356425d948f40dcf9d9853a374ddc8e..32fee49011b630407d6fd1c66838a833a706741a 100644
index b038528ba5ab9790a6bdb1c51ff072f9b8a64bf8..25fa56d26bd88e4647b4c25ad6783ff90a05b2c4 100644
--- a/build.gradle.kts
+++ b/build.gradle.kts
@@ -15,21 +15,24 @@ repositories {
@@ -20,21 +20,24 @@ repositories {
dependencies {
implementation(project(":Paper-API"))
implementation("jline:jline:2.12.1")
@ -37,8 +37,8 @@ index fddf2f440356425d948f40dcf9d9853a374ddc8e..32fee49011b630407d6fd1c66838a833
testImplementation("junit:junit:4.13.1")
testImplementation("org.hamcrest:hamcrest-library:1.3")
}
@@ -42,7 +45,8 @@ tasks.jar {
"Implementation-Vendor" to Instant.now().epochSecond,
@@ -47,7 +50,8 @@ tasks.jar {
"Implementation-Vendor" to SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss'Z'").format(Date()), // Paper
"Specification-Title" to "Bukkit",
"Specification-Version" to project.version,
- "Specification-Vendor" to "Bukkit Team"
@ -47,7 +47,7 @@ index fddf2f440356425d948f40dcf9d9853a374ddc8e..32fee49011b630407d6fd1c66838a833
))
for (tld in listOf("net", "com", "org")) {
attributes(mapOf(
@@ -54,7 +58,7 @@ tasks.jar {
@@ -59,7 +63,7 @@ tasks.jar {
tasks.shadowJar {
listOf(

Datei anzeigen

@ -2271,7 +2271,7 @@ index 8ba68f03c1dd87826185808e9e7080647a55c2dd..4a1c6217e7d04880f577d5d47d77f641
public static long getEpochMillis() {
diff --git a/src/main/java/net/minecraft/core/BlockPos.java b/src/main/java/net/minecraft/core/BlockPos.java
index 3cf71f85da94bcda5d4527b5f3e18d959c6c4634..9322a516df45c4a4cb83acf8e5f6792f219ae183 100644
index 3cf71f85da94bcda5d4527b5f3e18d959c6c4634..c2309751e3798874eee6b469129121c2e317fbc3 100644
--- a/src/main/java/net/minecraft/core/BlockPos.java
+++ b/src/main/java/net/minecraft/core/BlockPos.java
@@ -104,6 +104,7 @@ public class BlockPos extends Vec3i {
@ -2302,7 +2302,7 @@ index 3cf71f85da94bcda5d4527b5f3e18d959c6c4634..9322a516df45c4a4cb83acf8e5f6792f
}
}
+ /* // Paper start - comment out useless overrides @Override
+ // Paper start - comment out useless overrides @Override - TODO figure out why this is suddenly important to keep
@Override
public BlockPos.MutableBlockPos setX(int i) {
super.setX(i);
@ -2310,7 +2310,7 @@ index 3cf71f85da94bcda5d4527b5f3e18d959c6c4634..9322a516df45c4a4cb83acf8e5f6792f
super.setZ(i);
return this;
}
+ */ // Paper end
+ // Paper end
@Override
public BlockPos immutable() {