3
0
Mirror von https://github.com/PaperMC/Paper.git synchronisiert 2024-12-18 12:30:06 +01:00

Patching patches

Dieser Commit ist enthalten in:
Nassim Jahnke 2022-12-07 19:32:25 +01:00
Ursprung 4d6f28bab3
Commit 0edb5458e5
Es konnte kein GPG-Schlüssel zu dieser Signatur gefunden werden
GPG-Schlüssel-ID: 6BE3B555EBC5982B
56 geänderte Dateien mit 611 neuen und 456 gelöschten Zeilen

Datei anzeigen

@ -196,10 +196,10 @@ index 0000000000000000000000000000000000000000..dde9d36bf6212196caa18f3c9c535aec
+}
diff --git a/src/main/java/ca/spottedleaf/dataconverter/minecraft/MCVersionRegistry.java b/src/main/java/ca/spottedleaf/dataconverter/minecraft/MCVersionRegistry.java
new file mode 100644
index 0000000000000000000000000000000000000000..b6817eef740b4dd0ebc00857085f7f01e6d2b7aa
index 0000000000000000000000000000000000000000..5ec18e5890541a9570cd08059ef3d8ec9a1aa6f9
--- /dev/null
+++ b/src/main/java/ca/spottedleaf/dataconverter/minecraft/MCVersionRegistry.java
@@ -0,0 +1,363 @@
@@ -0,0 +1,366 @@
+package ca.spottedleaf.dataconverter.minecraft;
+
+import ca.spottedleaf.dataconverter.converters.DataConverter;
@ -401,8 +401,11 @@ index 0000000000000000000000000000000000000000..b6817eef740b4dd0ebc00857085f7f01
+ 3093,
+ 3094,
+ 3097,
+ 3108
+ // All up to 1.19.1-pre2
+ 3108,
+ 3201,
+ 3209,
+ 3214
+ // All up to 1.19.3-rc1
+ };
+ Arrays.sort(converterVersions);
+
@ -565,10 +568,10 @@ index 0000000000000000000000000000000000000000..b6817eef740b4dd0ebc00857085f7f01
+}
diff --git a/src/main/java/ca/spottedleaf/dataconverter/minecraft/MCVersions.java b/src/main/java/ca/spottedleaf/dataconverter/minecraft/MCVersions.java
new file mode 100644
index 0000000000000000000000000000000000000000..51f869ba58b3f113017a3c32f68896b6d572dc7b
index 0000000000000000000000000000000000000000..3294e185c725c03645b9c237e3526db0e87c43e5
--- /dev/null
+++ b/src/main/java/ca/spottedleaf/dataconverter/minecraft/MCVersions.java
@@ -0,0 +1,423 @@
@@ -0,0 +1,432 @@
+package ca.spottedleaf.dataconverter.minecraft;
+
+@SuppressWarnings("unused")
@ -991,6 +994,15 @@ index 0000000000000000000000000000000000000000..51f869ba58b3f113017a3c32f68896b6
+ public static final int V1_19_1_PRE1 = 3107;
+ public static final int V1_19_1_RC1 = 3109;
+ public static final int V1_19_1_PRE2 = 3110;
+ public static final int V22W42A = 3205;
+ public static final int V22W43A = 3206;
+ public static final int V22W44A = 3207;
+ public static final int V22W45A = 3208;
+ public static final int V22W46A = 3210;
+ public static final int V1_19_3_PRE1 = 3211;
+ public static final int V1_19_3_PRE2 = 3212;
+ public static final int V1_19_3_PRE3 = 3213;
+ public static final int V1_19_3_RC1 = 3215;
+}
diff --git a/src/main/java/ca/spottedleaf/dataconverter/minecraft/converters/advancements/ConverterAbstractAdvancementsRename.java b/src/main/java/ca/spottedleaf/dataconverter/minecraft/converters/advancements/ConverterAbstractAdvancementsRename.java
new file mode 100644
@ -5809,10 +5821,10 @@ index 0000000000000000000000000000000000000000..21176b8b96be6cb93d3dc1a74ae9f53f
+}
diff --git a/src/main/java/ca/spottedleaf/dataconverter/minecraft/converters/itemstack/ConverterFlattenSpawnEgg.java b/src/main/java/ca/spottedleaf/dataconverter/minecraft/converters/itemstack/ConverterFlattenSpawnEgg.java
new file mode 100644
index 0000000000000000000000000000000000000000..d88b12e6b9e381ba614dc04599a44e472a37ca03
index 0000000000000000000000000000000000000000..4fa31e40b0a6f571a853299b4e242de921ccbda0
--- /dev/null
+++ b/src/main/java/ca/spottedleaf/dataconverter/minecraft/converters/itemstack/ConverterFlattenSpawnEgg.java
@@ -0,0 +1,83 @@
@@ -0,0 +1,87 @@
+package ca.spottedleaf.dataconverter.minecraft.converters.itemstack;
+
+import ca.spottedleaf.dataconverter.converters.DataConverter;
@ -5838,8 +5850,10 @@ index 0000000000000000000000000000000000000000..d88b12e6b9e381ba614dc04599a44e47
+ ENTITY_ID_TO_NEW_EGG_ID.put("minecraft:evocation_illager", "minecraft:evocation_illager_spawn_egg");
+ ENTITY_ID_TO_NEW_EGG_ID.put("minecraft:ghast", "minecraft:ghast_spawn_egg");
+ ENTITY_ID_TO_NEW_EGG_ID.put("minecraft:guardian", "minecraft:guardian_spawn_egg");
+ ENTITY_ID_TO_NEW_EGG_ID.put("minecraft:ender_dragon", "minecraft:ender_dragon_spawn_egg");
+ ENTITY_ID_TO_NEW_EGG_ID.put("minecraft:horse", "minecraft:horse_spawn_egg");
+ ENTITY_ID_TO_NEW_EGG_ID.put("minecraft:husk", "minecraft:husk_spawn_egg");
+ ENTITY_ID_TO_NEW_EGG_ID.put("minecraft:iron_golem", "minecraft:iron_golem_spawn_egg");
+ ENTITY_ID_TO_NEW_EGG_ID.put("minecraft:llama", "minecraft:llama_spawn_egg");
+ ENTITY_ID_TO_NEW_EGG_ID.put("minecraft:magma_cube", "minecraft:magma_cube_spawn_egg");
+ ENTITY_ID_TO_NEW_EGG_ID.put("minecraft:mooshroom", "minecraft:mooshroom_spawn_egg");
@ -5856,6 +5870,7 @@ index 0000000000000000000000000000000000000000..d88b12e6b9e381ba614dc04599a44e47
+ ENTITY_ID_TO_NEW_EGG_ID.put("minecraft:skeleton", "minecraft:skeleton_spawn_egg");
+ ENTITY_ID_TO_NEW_EGG_ID.put("minecraft:skeleton_horse", "minecraft:skeleton_horse_spawn_egg");
+ ENTITY_ID_TO_NEW_EGG_ID.put("minecraft:slime", "minecraft:slime_spawn_egg");
+ ENTITY_ID_TO_NEW_EGG_ID.put("minecraft:snow_golem", "minecraft:snow_golem_spawn_egg");
+ ENTITY_ID_TO_NEW_EGG_ID.put("minecraft:spider", "minecraft:spider_spawn_egg");
+ ENTITY_ID_TO_NEW_EGG_ID.put("minecraft:squid", "minecraft:squid_spawn_egg");
+ ENTITY_ID_TO_NEW_EGG_ID.put("minecraft:stray", "minecraft:stray_spawn_egg");
@ -5864,6 +5879,7 @@ index 0000000000000000000000000000000000000000..d88b12e6b9e381ba614dc04599a44e47
+ ENTITY_ID_TO_NEW_EGG_ID.put("minecraft:villager", "minecraft:villager_spawn_egg");
+ ENTITY_ID_TO_NEW_EGG_ID.put("minecraft:vindication_illager", "minecraft:vindication_illager_spawn_egg");
+ ENTITY_ID_TO_NEW_EGG_ID.put("minecraft:witch", "minecraft:witch_spawn_egg");
+ ENTITY_ID_TO_NEW_EGG_ID.put("minecraft:wither", "minecraft:wither_spawn_egg");
+ ENTITY_ID_TO_NEW_EGG_ID.put("minecraft:wither_skeleton", "minecraft:wither_skeleton_spawn_egg");
+ ENTITY_ID_TO_NEW_EGG_ID.put("minecraft:wolf", "minecraft:wolf_spawn_egg");
+ ENTITY_ID_TO_NEW_EGG_ID.put("minecraft:zombie", "minecraft:zombie_spawn_egg");
@ -5872,8 +5888,8 @@ index 0000000000000000000000000000000000000000..d88b12e6b9e381ba614dc04599a44e47
+ ENTITY_ID_TO_NEW_EGG_ID.put("minecraft:zombie_villager", "minecraft:zombie_villager_spawn_egg");
+ }
+
+ public ConverterFlattenSpawnEgg() {
+ super(MCVersions.V17W47A,5);
+ public ConverterFlattenSpawnEgg(final int version, final int versionStep) {
+ super(version, versionStep);
+ }
+
+ @Override
@ -6553,10 +6569,10 @@ index 0000000000000000000000000000000000000000..76a6e3efa5c69150e8f5e0063cb6357b
+}
diff --git a/src/main/java/ca/spottedleaf/dataconverter/minecraft/datatypes/MCTypeRegistry.java b/src/main/java/ca/spottedleaf/dataconverter/minecraft/datatypes/MCTypeRegistry.java
new file mode 100644
index 0000000000000000000000000000000000000000..602c210df505613482bb4b1bbb782c0d8d6a32c8
index 0000000000000000000000000000000000000000..d4be142e862a8f114e9cca6bd64b7be205e2b0b1
--- /dev/null
+++ b/src/main/java/ca/spottedleaf/dataconverter/minecraft/datatypes/MCTypeRegistry.java
@@ -0,0 +1,236 @@
@@ -0,0 +1,242 @@
+package ca.spottedleaf.dataconverter.minecraft.datatypes;
+
+import ca.spottedleaf.dataconverter.minecraft.versions.*;
@ -6789,6 +6805,12 @@ index 0000000000000000000000000000000000000000..602c210df505613482bb4b1bbb782c0d
+ V3094.register();
+ V3097.register();
+ V3108.register();
+ V3201.register();
+ // V3202 registers a simple tile entity
+ // V3203 registers a simple entity
+ // V3204 registers a simple tile entity
+ V3209.register();
+ V3214.register();
+ }
+
+ private MCTypeRegistry() {}
@ -7119,7 +7141,7 @@ index 0000000000000000000000000000000000000000..7e8f42eb57c12c885a1c17eafab1c9d9
+}
diff --git a/src/main/java/ca/spottedleaf/dataconverter/minecraft/versions/V101.java b/src/main/java/ca/spottedleaf/dataconverter/minecraft/versions/V101.java
new file mode 100644
index 0000000000000000000000000000000000000000..bcdca74d1ca7265afaa3fc0f6913ddfb07800377
index 0000000000000000000000000000000000000000..98fbbf59ca00dbf58982d93f561f7d5f5b81951f
--- /dev/null
+++ b/src/main/java/ca/spottedleaf/dataconverter/minecraft/versions/V101.java
@@ -0,0 +1,73 @@
@ -7151,7 +7173,7 @@ index 0000000000000000000000000000000000000000..bcdca74d1ca7265afaa3fc0f6913ddfb
+ if (textString.charAt(0) == '"' && textString.charAt(textString.length() - 1) == '"'
+ || textString.charAt(0) == '{' && textString.charAt(textString.length() - 1) == '}') {
+ try {
+ component = GsonHelper.fromJson(BlockEntitySignTextStrictJsonFix.GSON, textString, Component.class, true);
+ component = GsonHelper.fromNullableJson(BlockEntitySignTextStrictJsonFix.GSON, textString, Component.class, true);
+ if (component == null) {
+ component = CommonComponents.EMPTY;
+ }
@ -8300,7 +8322,7 @@ index 0000000000000000000000000000000000000000..711222cd33ee557b7f3d1f6ae73ad45d
+}
diff --git a/src/main/java/ca/spottedleaf/dataconverter/minecraft/versions/V1451.java b/src/main/java/ca/spottedleaf/dataconverter/minecraft/versions/V1451.java
new file mode 100644
index 0000000000000000000000000000000000000000..a1f270f55617e1608bf7821951fa589e611b6f7d
index 0000000000000000000000000000000000000000..b88616e5af3b9f213bd7ee514ab191a468c61be7
--- /dev/null
+++ b/src/main/java/ca/spottedleaf/dataconverter/minecraft/versions/V1451.java
@@ -0,0 +1,512 @@
@ -8448,7 +8470,7 @@ index 0000000000000000000000000000000000000000..a1f270f55617e1608bf7821951fa589e
+ MCTypeRegistry.ITEM_STACK.addStructureConverter(new ConverterFlattenItemStack());
+
+ // V5
+ MCTypeRegistry.ITEM_STACK.addConverterForId("minecraft:spawn_egg", new ConverterFlattenSpawnEgg());
+ MCTypeRegistry.ITEM_STACK.addConverterForId("minecraft:spawn_egg", new ConverterFlattenSpawnEgg(VERSION, 5));
+ /* This datafixer has been disabled because the collar colour handler did not change from 1.12 -> 1.13 at all.
+ // So clearly somebody fucked up. This fixes wolf colours incorrectly converting between versions
+ MCTypeRegistry.ENTITY.addConverterForId("minecraft:wolf", new DataConverter<>(VERSION, 5) {
@ -10822,10 +10844,10 @@ index 0000000000000000000000000000000000000000..7dbc6ac66a29d3b5e4df5d0105c8fc03
+}
diff --git a/src/main/java/ca/spottedleaf/dataconverter/minecraft/versions/V1514.java b/src/main/java/ca/spottedleaf/dataconverter/minecraft/versions/V1514.java
new file mode 100644
index 0000000000000000000000000000000000000000..86be7a09d19ca94a30186e69655dc164344ae74d
index 0000000000000000000000000000000000000000..952598369cb8e5fd567544853bae4f4f7778f6d5
--- /dev/null
+++ b/src/main/java/ca/spottedleaf/dataconverter/minecraft/versions/V1514.java
@@ -0,0 +1,69 @@
@@ -0,0 +1,68 @@
+package ca.spottedleaf.dataconverter.minecraft.versions;
+
+import ca.spottedleaf.dataconverter.converters.DataConverter;
@ -10833,7 +10855,6 @@ index 0000000000000000000000000000000000000000..86be7a09d19ca94a30186e69655dc164
+import ca.spottedleaf.dataconverter.minecraft.datatypes.MCTypeRegistry;
+import ca.spottedleaf.dataconverter.types.MapType;
+import net.minecraft.network.chat.Component;
+import net.minecraft.world.scores.criteria.ObjectiveCriteria;
+
+public final class V1514 {
+
@ -10875,8 +10896,8 @@ index 0000000000000000000000000000000000000000..86be7a09d19ca94a30186e69655dc164
+ });
+
+ MCTypeRegistry.OBJECTIVE.addStructureConverter(new DataConverter<>(VERSION) {
+ private static ObjectiveCriteria.RenderType getRenderType(String string) {
+ return string.equals("health") ? ObjectiveCriteria.RenderType.HEARTS : ObjectiveCriteria.RenderType.INTEGER;
+ private static String getRenderType(String string) {
+ return string.equals("health") ? "hearts" : "integer";
+ }
+
+ @Override
@ -10888,7 +10909,7 @@ index 0000000000000000000000000000000000000000..86be7a09d19ca94a30186e69655dc164
+
+ final String criteriaName = data.getString("CriteriaName", "");
+
+ data.setString("RenderType", getRenderType(criteriaName).getId());
+ data.setString("RenderType", getRenderType(criteriaName));
+
+ return null;
+ }
@ -11044,7 +11065,7 @@ index 0000000000000000000000000000000000000000..7b304031e1e8af120c6535e599c2ee4f
+}
diff --git a/src/main/java/ca/spottedleaf/dataconverter/minecraft/versions/V165.java b/src/main/java/ca/spottedleaf/dataconverter/minecraft/versions/V165.java
new file mode 100644
index 0000000000000000000000000000000000000000..18c84de9e6015a40c189134cc5aaee84267f2669
index 0000000000000000000000000000000000000000..20eebfbbf913c92886a21fa4790c64cca8d8ba88
--- /dev/null
+++ b/src/main/java/ca/spottedleaf/dataconverter/minecraft/versions/V165.java
@@ -0,0 +1,79 @@
@ -11088,7 +11109,7 @@ index 0000000000000000000000000000000000000000..18c84de9e6015a40c189134cc5aaee84
+ if (!"null".equals(page) && !StringUtils.isEmpty(page)) {
+ if (page.charAt(0) == '"' && page.charAt(page.length() - 1) == '"' || page.charAt(0) == '{' && page.charAt(page.length() - 1) == '}') {
+ try {
+ component = GsonHelper.fromJson(BlockEntitySignTextStrictJsonFix.GSON, page, Component.class, true);
+ component = GsonHelper.fromNullableJson(BlockEntitySignTextStrictJsonFix.GSON, page, Component.class, true);
+ if (component == null) {
+ component = CommonComponents.EMPTY;
+ }
@ -17668,6 +17689,101 @@ index 0000000000000000000000000000000000000000..381b49f2c50d46e52f7f9c8f6baede4e
+ });
+ }
+}
diff --git a/src/main/java/ca/spottedleaf/dataconverter/minecraft/versions/V3201.java b/src/main/java/ca/spottedleaf/dataconverter/minecraft/versions/V3201.java
new file mode 100644
index 0000000000000000000000000000000000000000..24f661419cd08caa4f6d8b3ea66f0d484d07b5b9
--- /dev/null
+++ b/src/main/java/ca/spottedleaf/dataconverter/minecraft/versions/V3201.java
@@ -0,0 +1,33 @@
+package ca.spottedleaf.dataconverter.minecraft.versions;
+
+import ca.spottedleaf.dataconverter.converters.DataConverter;
+import ca.spottedleaf.dataconverter.minecraft.MCVersions;
+import ca.spottedleaf.dataconverter.minecraft.datatypes.MCTypeRegistry;
+import ca.spottedleaf.dataconverter.types.MapType;
+
+public final class V3201 {
+
+ private static final int VERSION = MCVersions.V1_19_2 + 81;
+
+ public static void register() {
+ MCTypeRegistry.OPTIONS.addStructureConverter(new DataConverter<>(VERSION) {
+ private static void fixList(final MapType<String> data, final String target) {
+ if (data == null) {
+ return;
+ }
+ final String curr = data.getString(target);
+ if (curr == null) {
+ return;
+ }
+ data.setString(target, curr.replace("\"programer_art\"", "\"programmer_art\""));
+ }
+
+ @Override
+ public MapType<String> convert(final MapType<String> data, final long sourceVersion, final long toVersion) {
+ fixList(data, "resourcePacks");
+ fixList(data, "incompatibleResourcePacks");
+ return null;
+ }
+ });
+ }
+}
diff --git a/src/main/java/ca/spottedleaf/dataconverter/minecraft/versions/V3209.java b/src/main/java/ca/spottedleaf/dataconverter/minecraft/versions/V3209.java
new file mode 100644
index 0000000000000000000000000000000000000000..f3a109ff01a96a750967e8becdc2a3e20b71b6dd
--- /dev/null
+++ b/src/main/java/ca/spottedleaf/dataconverter/minecraft/versions/V3209.java
@@ -0,0 +1,16 @@
+package ca.spottedleaf.dataconverter.minecraft.versions;
+
+import ca.spottedleaf.dataconverter.minecraft.MCVersions;
+import ca.spottedleaf.dataconverter.minecraft.converters.itemstack.ConverterFlattenSpawnEgg;
+import ca.spottedleaf.dataconverter.minecraft.datatypes.MCTypeRegistry;
+
+public final class V3209 {
+
+ private static final int VERSION = MCVersions.V22W45A + 1;
+
+ public static void register() {
+ // Note: This converter reads entity id from its sub data, but we need no breakpoint because entity ids are not
+ // remapped this version
+ MCTypeRegistry.ITEM_STACK.addConverterForId("minecraft:pig_spawn_egg", new ConverterFlattenSpawnEgg(VERSION, 0));
+ }
+}
diff --git a/src/main/java/ca/spottedleaf/dataconverter/minecraft/versions/V3214.java b/src/main/java/ca/spottedleaf/dataconverter/minecraft/versions/V3214.java
new file mode 100644
index 0000000000000000000000000000000000000000..b01ae34d2e238f217eb8de8b2d3502e959b5b3a7
--- /dev/null
+++ b/src/main/java/ca/spottedleaf/dataconverter/minecraft/versions/V3214.java
@@ -0,0 +1,28 @@
+package ca.spottedleaf.dataconverter.minecraft.versions;
+
+import ca.spottedleaf.dataconverter.converters.DataConverter;
+import ca.spottedleaf.dataconverter.minecraft.MCVersions;
+import ca.spottedleaf.dataconverter.minecraft.datatypes.MCTypeRegistry;
+import ca.spottedleaf.dataconverter.types.MapType;
+
+public final class V3214 {
+
+ private static final int VERSION = MCVersions.V1_19_3_PRE3 + 1;
+
+ public static void register() {
+ MCTypeRegistry.OPTIONS.addStructureConverter(new DataConverter<>(VERSION) {
+ @Override
+ public MapType<String> convert(final MapType<String> data, final long sourceVersion, final long toVersion) {
+ final String value = data.getString("ao");
+
+ if ("0".equals(value)) {
+ data.setString("ao", "false");
+ } else if ("1".equals(value) || "2".equals(value)) {
+ data.setString("ao", "true");
+ }
+
+ return null;
+ }
+ });
+ }
+}
diff --git a/src/main/java/ca/spottedleaf/dataconverter/minecraft/versions/V501.java b/src/main/java/ca/spottedleaf/dataconverter/minecraft/versions/V501.java
new file mode 100644
index 0000000000000000000000000000000000000000..6ab2bf99d72983fc2742a1f6f2f7fa671611526d
@ -17998,10 +18114,10 @@ index 0000000000000000000000000000000000000000..88d9c0fcd88ccfd6d6b46ae050914079
+}
diff --git a/src/main/java/ca/spottedleaf/dataconverter/minecraft/versions/V704.java b/src/main/java/ca/spottedleaf/dataconverter/minecraft/versions/V704.java
new file mode 100644
index 0000000000000000000000000000000000000000..0185fd60943dfb53c9d0707f1ff879658230d488
index 0000000000000000000000000000000000000000..1b7e01593952390fcbe86e672050a4c37a73e44e
--- /dev/null
+++ b/src/main/java/ca/spottedleaf/dataconverter/minecraft/versions/V704.java
@@ -0,0 +1,341 @@
@@ -0,0 +1,383 @@
+package ca.spottedleaf.dataconverter.minecraft.versions;
+
+import ca.spottedleaf.dataconverter.converters.DataConverter;
@ -18015,12 +18131,19 @@ index 0000000000000000000000000000000000000000..0185fd60943dfb53c9d0707f1ff87965
+import ca.spottedleaf.dataconverter.types.ObjectType;
+import ca.spottedleaf.dataconverter.types.MapType;
+import com.mojang.logging.LogUtils;
+import net.minecraft.core.BlockPos;
+import net.minecraft.core.Registry;
+import net.minecraft.core.registries.BuiltInRegistries;
+import net.minecraft.world.item.BlockItem;
+import net.minecraft.world.item.Item;
+import net.minecraft.world.level.block.Block;
+import net.minecraft.world.level.block.EntityBlock;
+import net.minecraft.world.level.block.entity.BlockEntity;
+import net.minecraft.world.level.block.entity.BlockEntityType;
+import net.minecraft.world.level.block.state.BlockState;
+import org.slf4j.Logger;
+import java.util.HashMap;
+import java.util.LinkedHashMap;
+import java.util.Map;
+
+public final class V704 {
@ -18161,23 +18284,58 @@ index 0000000000000000000000000000000000000000..0185fd60943dfb53c9d0707f1ff87965
+ ITEM_ID_TO_TILE_ENTITY_ID.put("minecraft:sculk_catalyst", "minecraft:sculk_catalyst");
+ ITEM_ID_TO_TILE_ENTITY_ID.put("minecraft:mangrove_sign", "minecraft:sign");
+ ITEM_ID_TO_TILE_ENTITY_ID.put("minecraft:sculk_shrieker", "minecraft:sculk_shrieker");
+ ITEM_ID_TO_TILE_ENTITY_ID.put("minecraft:chiseled_bookshelf", "minecraft:chiseled_bookshelf");
+ ITEM_ID_TO_TILE_ENTITY_ID.put("minecraft:bamboo_sign", "minecraft:sign");
+ ITEM_ID_TO_TILE_ENTITY_ID.put("minecraft:oak_hanging_sign", "minecraft:sign");
+ ITEM_ID_TO_TILE_ENTITY_ID.put("minecraft:spruce_hanging_sign", "minecraft:sign");
+ ITEM_ID_TO_TILE_ENTITY_ID.put("minecraft:birch_hanging_sign", "minecraft:sign");
+ ITEM_ID_TO_TILE_ENTITY_ID.put("minecraft:jungle_hanging_sign", "minecraft:sign");
+ ITEM_ID_TO_TILE_ENTITY_ID.put("minecraft:acacia_hanging_sign", "minecraft:sign");
+ ITEM_ID_TO_TILE_ENTITY_ID.put("minecraft:dark_oak_hanging_sign", "minecraft:sign");
+ ITEM_ID_TO_TILE_ENTITY_ID.put("minecraft:mangrove_hanging_sign", "minecraft:sign");
+ ITEM_ID_TO_TILE_ENTITY_ID.put("minecraft:bamboo_hanging_sign", "minecraft:sign");
+ ITEM_ID_TO_TILE_ENTITY_ID.put("minecraft:crimson_hanging_sign", "minecraft:sign");
+ ITEM_ID_TO_TILE_ENTITY_ID.put("minecraft:warped_hanging_sign", "minecraft:sign");
+ ITEM_ID_TO_TILE_ENTITY_ID.put("minecraft:piglin_head", "minecraft:skull");
+ }
+
+ // This class is responsible for also integrity checking the item id to tile id map here, we just use the item registry to figure it out
+
+ static {
+ for (final Item item : Registry.ITEM) {
+ for (final Item item : BuiltInRegistries.ITEM) {
+ if (!(item instanceof BlockItem)) {
+ continue;
+ }
+
+ if (!(((BlockItem)item).getBlock() instanceof EntityBlock)) {
+ if (!(((BlockItem)item).getBlock() instanceof EntityBlock entityBlock)) {
+ continue;
+ }
+
+ final String itemName = Registry.ITEM.getKey(item).toString();
+ if (!ITEM_ID_TO_TILE_ENTITY_ID.containsKey(itemName)) {
+ String possibleId;
+ try {
+ final BlockEntity entity = entityBlock.newBlockEntity(new BlockPos(0, 0, 0), ((Block)entityBlock).defaultBlockState());
+ if (entity != null) {
+ possibleId = BlockEntityType.getKey(entity.getType()).toString();
+ } else {
+ possibleId = null;
+ }
+ } catch (final Throwable th) {
+ possibleId = null;
+ }
+
+ final String itemName = BuiltInRegistries.ITEM.getKey(item).toString();
+ final String mappedTo = ITEM_ID_TO_TILE_ENTITY_ID.get(itemName);
+ if (mappedTo == null) {
+ LOGGER.error("Item id " + itemName + " does not contain tile mapping! (V704)");
+ } else if (possibleId != null && !mappedTo.equals(possibleId)) {
+ final boolean chestCase = mappedTo.equals("minecraft:chest") && possibleId.equals("minecraft:trapped_chest");
+ final boolean signCase = mappedTo.equals("minecraft:sign") && possibleId.equals("minecraft:hanging_sign");
+ // save data is identical for the chest and sign case, so we don't care
+ // it's also important to note that there is no versioning for this map, so it is possible
+ // that mapping them correctly could cause issues converting old data
+ if (!chestCase && !signCase) {
+ LOGGER.error("Item id " + itemName + " is mapped to the wrong tile entity! Mapped to: " + mappedTo + ", expected: " + possibleId);
+ }
+ }
+ }
+ }
@ -22720,10 +22878,10 @@ index 6701d07886325e33f45ac894bfaa1c5b91afad9d..5631345dee84001be1053fbf92def683
for(int l = this.levelHeightAccessor.getMinSection(); l < this.levelHeightAccessor.getMaxSection(); ++l) {
diff --git a/src/main/java/net/minecraft/world/level/levelgen/structure/StructureCheck.java b/src/main/java/net/minecraft/world/level/levelgen/structure/StructureCheck.java
index 963ad3ce1ef83888ae1537ff01accdbb5b04ffa1..a7cba5b828a586d7435bda4d512af68684244682 100644
index 874f7ea643d27eec47d51a10ad472af7e8ec402e..4761aa772bc34dd66547dd4dd561c2e04c3229ad 100644
--- a/src/main/java/net/minecraft/world/level/levelgen/structure/StructureCheck.java
+++ b/src/main/java/net/minecraft/world/level/levelgen/structure/StructureCheck.java
@@ -115,7 +115,7 @@ public class StructureCheck {
@@ -116,7 +116,7 @@ public class StructureCheck {
CompoundTag compoundTag2;
try {

Datei anzeigen

@ -4485,18 +4485,18 @@ index 74d1ae0104e8d0795df50f00317fd860de4f112e..a7feddc31da0870faa3d32a7108282e9
private final DebugBuffer<ChunkHolder.ChunkSaveDebug> chunkToSaveHistory;
public int oldTicketLevel;
diff --git a/src/main/java/net/minecraft/server/level/ChunkMap.java b/src/main/java/net/minecraft/server/level/ChunkMap.java
index 44f12777f115ca4d465bc603e1e23932e102efb2..4f8346d25187153ce9c9b61b897a65bd2ed62e65 100644
index fc5965f8f2ac21a8465285e5933d8490b015568d..ecb5a18874509341dd691b290ea7d1f8c17e0bd7 100644
--- a/src/main/java/net/minecraft/server/level/ChunkMap.java
+++ b/src/main/java/net/minecraft/server/level/ChunkMap.java
@@ -128,7 +128,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
@@ -131,7 +131,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
private final LongSet entitiesInLevel;
public final ServerLevel level;
private final ThreadedLevelLightEngine lightEngine;
- private final BlockableEventLoop<Runnable> mainThreadExecutor;
+ public final BlockableEventLoop<Runnable> mainThreadExecutor; // Paper - public
public ChunkGenerator generator;
private RandomState randomState;
public final Supplier<DimensionDataStorage> overworldDataStorage;
private final RandomState randomState;
private final ChunkGeneratorStructureState chunkGeneratorState;
diff --git a/src/main/java/net/minecraft/server/level/DistanceManager.java b/src/main/java/net/minecraft/server/level/DistanceManager.java
index fbe62a31ab199d83a1db0a4e0b1a813824e6f2c2..d38ad1b1eee92a6dbd2b79b4fcdb8959cdb4007d 100644
--- a/src/main/java/net/minecraft/server/level/DistanceManager.java
@ -4820,18 +4820,18 @@ index 0d536d72ac918fbd403397ff369d10143ee9c204..6051e5f272838ef23276a90e21c2fc82
public static <T> TicketType<T> create(String name, Comparator<T> argumentComparator) {
return new TicketType<>(name, argumentComparator, 0L);
diff --git a/src/main/java/net/minecraft/world/level/block/state/BlockBehaviour.java b/src/main/java/net/minecraft/world/level/block/state/BlockBehaviour.java
index f0bd06ab32e99c188510b3c3fa41f1737ab4fe78..51ac731cf49e6d2cd574e48f26c4b151e9014826 100644
index aa2f76ff47699f23474f2e409ef9b773e48d50b8..5bba39a066ede470cebc92724735c86ecfd4239d 100644
--- a/src/main/java/net/minecraft/world/level/block/state/BlockBehaviour.java
+++ b/src/main/java/net/minecraft/world/level/block/state/BlockBehaviour.java
@@ -694,6 +694,7 @@ public abstract class BlockBehaviour {
this.hasPostProcess = blockbase_info.hasPostProcess;
@@ -726,6 +726,7 @@ public abstract class BlockBehaviour implements FeatureElement {
this.emissiveRendering = blockbase_info.emissiveRendering;
this.offsetType = (BlockBehaviour.OffsetType) blockbase_info.offsetType.apply(this.asState());
this.spawnParticlesOnBreak = blockbase_info.spawnParticlesOnBreak;
+ this.conditionallyFullOpaque = this.isOpaque() & this.isTransparentOnSomeFaces(); // Paper
}
// Paper start
@@ -702,12 +703,25 @@ public abstract class BlockBehaviour {
@@ -734,6 +735,18 @@ public abstract class BlockBehaviour implements FeatureElement {
return this.shapeExceedsCube;
}
// Paper end
@ -4849,7 +4849,8 @@ index f0bd06ab32e99c188510b3c3fa41f1737ab4fe78..51ac731cf49e6d2cd574e48f26c4b151
+ // Paper end - starlight
public void initCache() {
if (!this.getBlock().hasDynamicShape()) {
this.fluidState = ((Block) this.owner).getFluidState(this.asState());
@@ -742,6 +755,7 @@ public abstract class BlockBehaviour implements FeatureElement {
this.cache = new BlockBehaviour.BlockStateBase.Cache(this.asState());
}
this.shapeExceedsCube = this.cache == null || this.cache.largeCollisionShape; // Paper - moved from actual method to here
@ -4858,7 +4859,7 @@ index f0bd06ab32e99c188510b3c3fa41f1737ab4fe78..51ac731cf49e6d2cd574e48f26c4b151
}
diff --git a/src/main/java/net/minecraft/world/level/chunk/ChunkAccess.java b/src/main/java/net/minecraft/world/level/chunk/ChunkAccess.java
index fabc7df600c89b01d97a76eb0b1206a32407b906..0e787d877901dfcea714b0e14e9fc4358ee30bbe 100644
index 3fdbb777d4722596cc4df79b2d4d7b9c553580fd..1b7496cec0ba5a95615a069e3168bd46308d0b40 100644
--- a/src/main/java/net/minecraft/world/level/chunk/ChunkAccess.java
+++ b/src/main/java/net/minecraft/world/level/chunk/ChunkAccess.java
@@ -81,6 +81,47 @@ public abstract class ChunkAccess implements BlockGetter, BiomeManager.NoiseBiom
@ -4910,10 +4911,10 @@ index fabc7df600c89b01d97a76eb0b1206a32407b906..0e787d877901dfcea714b0e14e9fc435
public ChunkAccess(ChunkPos pos, UpgradeData upgradeData, LevelHeightAccessor heightLimitView, Registry<Biome> biome, long inhabitedTime, @Nullable LevelChunkSection[] sectionArrayInitializer, @Nullable BlendingData blendingData) {
this.locX = pos.x; this.locZ = pos.z; // Paper - reduce need for field lookups
diff --git a/src/main/java/net/minecraft/world/level/chunk/ChunkStatus.java b/src/main/java/net/minecraft/world/level/chunk/ChunkStatus.java
index 441d46635caedfae3cb2f46d30b8d9ae95636e7b..e6240f891e396d91e31b02fdf3084be77e9d6697 100644
index f4aab0bf544ef5c889c02e41389b1656cf1e4932..bf66cdb94daa6657e9415adfa16d16983b258ee3 100644
--- a/src/main/java/net/minecraft/world/level/chunk/ChunkStatus.java
+++ b/src/main/java/net/minecraft/world/level/chunk/ChunkStatus.java
@@ -292,6 +292,17 @@ public class ChunkStatus {
@@ -293,6 +293,17 @@ public class ChunkStatus {
return this.chunkType;
}
@ -4929,7 +4930,7 @@ index 441d46635caedfae3cb2f46d30b8d9ae95636e7b..e6240f891e396d91e31b02fdf3084be7
+ }
+ // Paper end
public static ChunkStatus byName(String id) {
return (ChunkStatus) Registry.CHUNK_STATUS.get(ResourceLocation.tryParse(id));
return (ChunkStatus) BuiltInRegistries.CHUNK_STATUS.get(ResourceLocation.tryParse(id));
}
diff --git a/src/main/java/net/minecraft/world/level/chunk/EmptyLevelChunk.java b/src/main/java/net/minecraft/world/level/chunk/EmptyLevelChunk.java
index 587cc435a58d28e14e88860c8348425101334eda..2eb92dde607d7c8968cb07c6f3c24e1c45e9990f 100644
@ -4977,7 +4978,7 @@ index 587cc435a58d28e14e88860c8348425101334eda..2eb92dde607d7c8968cb07c6f3c24e1c
public BlockState getBlockState(BlockPos pos) {
return Blocks.VOID_AIR.defaultBlockState();
diff --git a/src/main/java/net/minecraft/world/level/chunk/ImposterProtoChunk.java b/src/main/java/net/minecraft/world/level/chunk/ImposterProtoChunk.java
index 3dff0f7c3ccd04a67b2153e402d801de2341e520..ac5dff35e2df23b8790bbe65c40acc6a3c77e6ac 100644
index 80b98e6667f1a0c21d019c58a8a0d4cc5b0f48e1..8033c8741a0f73919a357893652592b317bfb417 100644
--- a/src/main/java/net/minecraft/world/level/chunk/ImposterProtoChunk.java
+++ b/src/main/java/net/minecraft/world/level/chunk/ImposterProtoChunk.java
@@ -31,6 +31,48 @@ public class ImposterProtoChunk extends ProtoChunk {
@ -5027,16 +5028,18 @@ index 3dff0f7c3ccd04a67b2153e402d801de2341e520..ac5dff35e2df23b8790bbe65c40acc6a
+ // Paper end - rewrite light engine
+
public ImposterProtoChunk(LevelChunk wrapped, boolean bl) {
super(wrapped.getPos(), UpgradeData.EMPTY, wrapped.levelHeightAccessor, wrapped.getLevel().registryAccess().registryOrThrow(Registry.BIOME_REGISTRY), wrapped.getBlendingData());
super(wrapped.getPos(), UpgradeData.EMPTY, wrapped.levelHeightAccessor, wrapped.getLevel().registryAccess().registryOrThrow(Registries.BIOME), wrapped.getBlendingData());
this.wrapped = wrapped;
diff --git a/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java b/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java
index 1c6f51c227a0b6da81eeb817f996789645a547db..a6e364f88abcf1a6afcdd85b340ae8d62b753e4f 100644
index 49f091183111958ebd3fb56964fc5d728c16755c..6f99f4acfdac5516dac07a6c9af220eed5c5358e 100644
--- a/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java
+++ b/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java
@@ -93,6 +93,10 @@ public class LevelChunk extends ChunkAccess {
@@ -92,7 +92,11 @@ public class LevelChunk extends ChunkAccess {
}
public LevelChunk(Level world, ChunkPos pos, UpgradeData upgradeData, LevelChunkTicks<Block> blockTickScheduler, LevelChunkTicks<Fluid> fluidTickScheduler, long inhabitedTime, @Nullable LevelChunkSection[] sectionArrayInitializer, @Nullable LevelChunk.PostLoadProcessor entityLoader, @Nullable BlendingData blendingData) {
super(pos, upgradeData, world, world.registryAccess().registryOrThrow(Registry.BIOME_REGISTRY), inhabitedTime, sectionArrayInitializer, blendingData);
- super(pos, upgradeData, world, world.registryAccess().registryOrThrow(Registries.BIOME), inhabitedTime, sectionArrayInitializer, blendingData);
+ super(pos, upgradeData, world, world.registryAccess().registryOrThrow(Registries.BIOME)), inhabitedTime, sectionArrayInitializer, blendingData);
+ // Paper start - rewrite light engine
+ this.setBlockNibbles(ca.spottedleaf.starlight.common.light.StarLightEngine.getFilledEmptyLight(world));
+ this.setSkyNibbles(ca.spottedleaf.starlight.common.light.StarLightEngine.getFilledEmptyLight(world));
@ -5058,7 +5061,7 @@ index 1c6f51c227a0b6da81eeb817f996789645a547db..a6e364f88abcf1a6afcdd85b340ae8d6
while (iterator.hasNext()) {
diff --git a/src/main/java/net/minecraft/world/level/chunk/PalettedContainer.java b/src/main/java/net/minecraft/world/level/chunk/PalettedContainer.java
index 78e20871e4bd8d92c4475f797a55733c68f6aeb4..33eecdac9d844af2f70aad97c4788b138dab8896 100644
index 7798cbbae6b72d64e6129cebf1f66696f21e15f9..e310b018004c8d7edbfec877f06671d17f7e47fd 100644
--- a/src/main/java/net/minecraft/world/level/chunk/PalettedContainer.java
+++ b/src/main/java/net/minecraft/world/level/chunk/PalettedContainer.java
@@ -142,7 +142,7 @@ public class PalettedContainer<T> implements PaletteResize<T>, PalettedContainer
@ -5088,10 +5091,10 @@ index 92a64c49b1c7227a5b34488ea15d3d8adb0f9c80..0b67858f8d6689b34816f9556f3424af
this.fluidTicks = fluidTickScheduler;
}
diff --git a/src/main/java/net/minecraft/world/level/chunk/storage/ChunkSerializer.java b/src/main/java/net/minecraft/world/level/chunk/storage/ChunkSerializer.java
index 6c844a826892c5f31d5afb9ead56d4cff3ab5968..8da52553a9465bf88a0c22fd987a4d8ae63d2f5a 100644
index 6fdd5c92ab069896e3921faa042cbdb3c29d0538..942f8db571cf87d0e9614bdc7dd9525068cf1001 100644
--- a/src/main/java/net/minecraft/world/level/chunk/storage/ChunkSerializer.java
+++ b/src/main/java/net/minecraft/world/level/chunk/storage/ChunkSerializer.java
@@ -82,6 +82,14 @@ public class ChunkSerializer {
@@ -84,6 +84,14 @@ public class ChunkSerializer {
public static final String BLOCK_LIGHT_TAG = "BlockLight";
public static final String SKY_LIGHT_TAG = "SkyLight";
@ -5106,7 +5109,7 @@ index 6c844a826892c5f31d5afb9ead56d4cff3ab5968..8da52553a9465bf88a0c22fd987a4d8a
public ChunkSerializer() {}
public static ProtoChunk read(ServerLevel world, PoiManager poiStorage, ChunkPos chunkPos, CompoundTag nbt) {
@@ -92,13 +100,20 @@ public class ChunkSerializer {
@@ -94,13 +102,20 @@ public class ChunkSerializer {
}
UpgradeData chunkconverter = nbt.contains("UpgradeData", 10) ? new UpgradeData(nbt.getCompound("UpgradeData"), world) : UpgradeData.EMPTY;
@ -5117,7 +5120,8 @@ index 6c844a826892c5f31d5afb9ead56d4cff3ab5968..8da52553a9465bf88a0c22fd987a4d8a
LevelChunkSection[] achunksection = new LevelChunkSection[i];
boolean flag1 = world.dimensionType().hasSkyLight();
ServerChunkCache chunkproviderserver = world.getChunkSource();
LevelLightEngine lightengine = chunkproviderserver.getLightEngine();
- LevelLightEngine lightengine = chunkproviderserver.getLightEngine();
+ LevelLightEngine lightengine = chunkproviderserver.getLightEngine();;
+ // Paper start
+ ca.spottedleaf.starlight.common.light.SWMRNibbleArray[] blockNibbles = ca.spottedleaf.starlight.common.light.StarLightEngine.getFilledEmptyLight(world);
+ ca.spottedleaf.starlight.common.light.SWMRNibbleArray[] skyNibbles = ca.spottedleaf.starlight.common.light.StarLightEngine.getFilledEmptyLight(world);
@ -5125,10 +5129,10 @@ index 6c844a826892c5f31d5afb9ead56d4cff3ab5968..8da52553a9465bf88a0c22fd987a4d8a
+ final int maxSection = io.papermc.paper.util.WorldUtil.getMaxLightSection(world);
+ boolean canReadSky = world.dimensionType().hasSkyLight();
+ // Paper end
Registry<Biome> iregistry = world.registryAccess().registryOrThrow(Registry.BIOME_REGISTRY);
Registry<Biome> iregistry = world.registryAccess().registryOrThrow(Registries.BIOME);
Codec<PalettedContainer<Holder<Biome>>> codec = ChunkSerializer.makeBiomeCodecRW(iregistry); // CraftBukkit - read/write
boolean flag2 = false;
@@ -106,7 +121,7 @@ public class ChunkSerializer {
@@ -108,7 +123,7 @@ public class ChunkSerializer {
DataResult dataresult;
for (int j = 0; j < nbttaglist.size(); ++j) {
@ -5137,7 +5141,7 @@ index 6c844a826892c5f31d5afb9ead56d4cff3ab5968..8da52553a9465bf88a0c22fd987a4d8a
byte b0 = nbttagcompound1.getByte("Y");
int k = world.getSectionIndexFromSectionY(b0);
@@ -147,19 +162,39 @@ public class ChunkSerializer {
@@ -149,19 +164,39 @@ public class ChunkSerializer {
boolean flag3 = nbttagcompound1.contains("BlockLight", 7);
boolean flag4 = flag1 && nbttagcompound1.contains("SkyLight", 7);
@ -5185,7 +5189,7 @@ index 6c844a826892c5f31d5afb9ead56d4cff3ab5968..8da52553a9465bf88a0c22fd987a4d8a
}
}
@@ -188,6 +223,8 @@ public class ChunkSerializer {
@@ -190,6 +225,8 @@ public class ChunkSerializer {
}, chunkPos);
object1 = new LevelChunk(world.getLevel(), chunkPos, chunkconverter, levelchunkticks, levelchunkticks1, l, achunksection, ChunkSerializer.postLoadChunk(world, nbt), blendingdata);
@ -5193,9 +5197,9 @@ index 6c844a826892c5f31d5afb9ead56d4cff3ab5968..8da52553a9465bf88a0c22fd987a4d8a
+ ((LevelChunk)object1).setSkyNibbles(skyNibbles); // Paper - replace light impl
} else {
ProtoChunkTicks<Block> protochunkticklist = ProtoChunkTicks.load(nbt.getList("block_ticks", 10), (s) -> {
return Registry.BLOCK.getOptional(ResourceLocation.tryParse(s));
@@ -196,6 +233,8 @@ public class ChunkSerializer {
return Registry.FLUID.getOptional(ResourceLocation.tryParse(s));
return BuiltInRegistries.BLOCK.getOptional(ResourceLocation.tryParse(s));
@@ -198,6 +235,8 @@ public class ChunkSerializer {
return BuiltInRegistries.FLUID.getOptional(ResourceLocation.tryParse(s));
}, chunkPos);
ProtoChunk protochunk = new ProtoChunk(chunkPos, chunkconverter, achunksection, protochunkticklist, protochunkticklist1, world, iregistry, blendingdata);
+ protochunk.setBlockNibbles(blockNibbles); // Paper - replace light impl
@ -5203,7 +5207,7 @@ index 6c844a826892c5f31d5afb9ead56d4cff3ab5968..8da52553a9465bf88a0c22fd987a4d8a
object1 = protochunk;
protochunk.setInhabitedTime(l);
@@ -336,6 +375,12 @@ public class ChunkSerializer {
@@ -342,6 +381,12 @@ public class ChunkSerializer {
// CraftBukkit end
public static CompoundTag write(ServerLevel world, ChunkAccess chunk) {
@ -5216,7 +5220,7 @@ index 6c844a826892c5f31d5afb9ead56d4cff3ab5968..8da52553a9465bf88a0c22fd987a4d8a
ChunkPos chunkcoordintpair = chunk.getPos();
CompoundTag nbttagcompound = new CompoundTag();
@@ -386,11 +431,14 @@ public class ChunkSerializer {
@@ -392,11 +437,14 @@ public class ChunkSerializer {
for (int i = lightenginethreaded.getMinLightSection(); i < lightenginethreaded.getMaxLightSection(); ++i) {
int j = chunk.getSectionIndexFromSectionY(i);
boolean flag1 = j >= 0 && j < achunksection.length;
@ -5235,7 +5239,7 @@ index 6c844a826892c5f31d5afb9ead56d4cff3ab5968..8da52553a9465bf88a0c22fd987a4d8a
if (flag1) {
LevelChunkSection chunksection = achunksection[j];
@@ -405,13 +453,27 @@ public class ChunkSerializer {
@@ -411,13 +459,27 @@ public class ChunkSerializer {
nbttagcompound1.put("biomes", (Tag) dataresult1.getOrThrow(false, logger1::error));
}
@ -5267,7 +5271,7 @@ index 6c844a826892c5f31d5afb9ead56d4cff3ab5968..8da52553a9465bf88a0c22fd987a4d8a
if (!nbttagcompound1.isEmpty()) {
nbttagcompound1.putByte("Y", (byte) i);
@@ -422,7 +484,8 @@ public class ChunkSerializer {
@@ -428,7 +490,8 @@ public class ChunkSerializer {
nbttagcompound.put("sections", nbttaglist);
if (flag) {
@ -5277,7 +5281,7 @@ index 6c844a826892c5f31d5afb9ead56d4cff3ab5968..8da52553a9465bf88a0c22fd987a4d8a
}
ListTag nbttaglist1 = new ListTag();
@@ -497,6 +560,17 @@ public class ChunkSerializer {
@@ -503,6 +566,17 @@ public class ChunkSerializer {
}));
}

Datei anzeigen

@ -7,10 +7,10 @@ Subject: [PATCH] Add command line option to load extra plugin jars not in the
ex: java -jar paperclip.jar nogui -add-plugin=/path/to/plugin.jar -add-plugin=/path/to/another/plugin_jar.jar
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
index 2103081cf6a8db00d78618340eef514082fede6e..6723b52fd9306b0f9e3f1d0eadcbfd76d383beee 100644
index 241e328dda2f9d32a16bbb47f4848af33d8d7b45..1e8f5b6b74c469a77238b2798fe1d0897a7c6fb3 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
@@ -405,10 +405,15 @@ public final class CraftServer implements Server {
@@ -418,10 +418,15 @@ public final class CraftServer implements Server {
public void loadPlugins() {
this.pluginManager.registerInterface(JavaPluginLoader.class);
@ -29,7 +29,7 @@ index 2103081cf6a8db00d78618340eef514082fede6e..6723b52fd9306b0f9e3f1d0eadcbfd76
for (Plugin plugin : plugins) {
try {
String message = String.format("Loading %s", plugin.getDescription().getFullName());
@@ -423,6 +428,35 @@ public final class CraftServer implements Server {
@@ -436,6 +441,35 @@ public final class CraftServer implements Server {
}
}
@ -66,7 +66,7 @@ index 2103081cf6a8db00d78618340eef514082fede6e..6723b52fd9306b0f9e3f1d0eadcbfd76
if (type == PluginLoadOrder.STARTUP) {
this.helpMap.clear();
diff --git a/src/main/java/org/bukkit/craftbukkit/Main.java b/src/main/java/org/bukkit/craftbukkit/Main.java
index e15bf67ed9463052c474a56e2ed9da45a710505e..ef0bbec06981afa13384fb75067599eaa1a87e33 100644
index e2cf043fb35ae8474bf1f6ba2cc2505566973cfe..44b30d0f297af5eb4ace4160a0c601ff824632f6 100644
--- a/src/main/java/org/bukkit/craftbukkit/Main.java
+++ b/src/main/java/org/bukkit/craftbukkit/Main.java
@@ -149,6 +149,12 @@ public class Main {

Datei anzeigen

@ -6,11 +6,11 @@ Subject: [PATCH] Configurable cactus bamboo and reed growth heights
Bamboo - Both the minimum fully-grown heights and the maximum are configurable
- Machine_Maker
diff --git a/src/main/java/net/minecraft/world/level/block/BambooBlock.java b/src/main/java/net/minecraft/world/level/block/BambooBlock.java
index 3a6894c3cdee0d55f0546cda50c824ea5e95bfe0..2db8fd4fb03642fce2c7eca9c6b189f38d5cbf4a 100644
--- a/src/main/java/net/minecraft/world/level/block/BambooBlock.java
+++ b/src/main/java/net/minecraft/world/level/block/BambooBlock.java
@@ -130,7 +130,7 @@ public class BambooBlock extends Block implements BonemealableBlock {
diff --git a/src/main/java/net/minecraft/world/level/block/BambooStalkBlock.java b/src/main/java/net/minecraft/world/level/block/BambooStalkBlock.java
index 0d05ad9c0b5043e58d639041cfe3fb7a27f373a3..a5d391af2c6b733d653188f4aeeec2afffd96adf 100644
--- a/src/main/java/net/minecraft/world/level/block/BambooStalkBlock.java
+++ b/src/main/java/net/minecraft/world/level/block/BambooStalkBlock.java
@@ -130,7 +130,7 @@ public class BambooStalkBlock extends Block implements BonemealableBlock {
if (random.nextFloat() < (world.spigotConfig.bambooModifier / (100.0f * 3)) && world.isEmptyBlock(pos.above()) && world.getRawBrightness(pos.above(), 0) >= 9) { // Spigot - SPIGOT-7159: Better modifier resolution
int i = this.getHeightBelowUpToMax(world, pos) + 1;
@ -19,34 +19,34 @@ index 3a6894c3cdee0d55f0546cda50c824ea5e95bfe0..2db8fd4fb03642fce2c7eca9c6b189f3
this.growBamboo(state, world, pos, random, i);
}
}
@@ -161,7 +161,7 @@ public class BambooBlock extends Block implements BonemealableBlock {
@@ -161,7 +161,7 @@ public class BambooStalkBlock extends Block implements BonemealableBlock {
int i = this.getHeightAboveUpToMax(world, pos);
int j = this.getHeightBelowUpToMax(world, pos);
- return i + j + 1 < 16 && (Integer) world.getBlockState(pos.above(i)).getValue(BambooBlock.STAGE) != 1;
+ return i + j + 1 < ((Level) world).paperConfig().maxGrowthHeight.bamboo.max && (Integer) world.getBlockState(pos.above(i)).getValue(BambooBlock.STAGE) != 1; // Paper
- return i + j + 1 < 16 && (Integer) world.getBlockState(pos.above(i)).getValue(BambooStalkBlock.STAGE) != 1;
+ return i + j + 1 < ((Level) world).paperConfig().maxGrowthHeight.bamboo.max && (Integer) world.getBlockState(pos.above(i)).getValue(BambooStalkBlock.STAGE) != 1; // Paper
}
@Override
@@ -180,7 +180,7 @@ public class BambooBlock extends Block implements BonemealableBlock {
@@ -180,7 +180,7 @@ public class BambooStalkBlock extends Block implements BonemealableBlock {
BlockPos blockposition1 = pos.above(i);
BlockState iblockdata1 = world.getBlockState(blockposition1);
- if (k >= 16 || !iblockdata1.is(Blocks.BAMBOO) || (Integer) iblockdata1.getValue(BambooBlock.STAGE) == 1 || !world.isEmptyBlock(blockposition1.above())) { // CraftBukkit - If the BlockSpreadEvent was cancelled, we have no bamboo here
+ if (k >= world.paperConfig().maxGrowthHeight.bamboo.max || !iblockdata1.is(Blocks.BAMBOO) || (Integer) iblockdata1.getValue(BambooBlock.STAGE) == 1 || !world.isEmptyBlock(blockposition1.above())) { // CraftBukkit - If the BlockSpreadEvent was cancelled, we have no bamboo here // Paper - Configurable cactus bamboo and reed growth heights
- if (k >= 16 || !iblockdata1.is(Blocks.BAMBOO) || (Integer) iblockdata1.getValue(BambooStalkBlock.STAGE) == 1 || !world.isEmptyBlock(blockposition1.above())) { // CraftBukkit - If the BlockSpreadEvent was cancelled, we have no bamboo here
+ if (k >= world.paperConfig().maxGrowthHeight.bamboo.max || !iblockdata1.is(Blocks.BAMBOO) || (Integer) iblockdata1.getValue(BambooStalkBlock.STAGE) == 1 || !world.isEmptyBlock(blockposition1.above())) { // CraftBukkit - If the BlockSpreadEvent was cancelled, we have no bamboo here // Paper - Configurable cactus bamboo and reed growth heights
return;
}
@@ -221,7 +221,7 @@ public class BambooBlock extends Block implements BonemealableBlock {
@@ -221,7 +221,7 @@ public class BambooStalkBlock extends Block implements BonemealableBlock {
}
int j = (Integer) state.getValue(BambooBlock.AGE) != 1 && !iblockdata2.is(Blocks.BAMBOO) ? 0 : 1;
int j = (Integer) state.getValue(BambooStalkBlock.AGE) != 1 && !iblockdata2.is(Blocks.BAMBOO) ? 0 : 1;
- int k = (height < 11 || random.nextFloat() >= 0.25F) && height != 15 ? 0 : 1;
+ int k = (height < world.paperConfig().maxGrowthHeight.bamboo.min || random.nextFloat() >= 0.25F) && height != (world.paperConfig().maxGrowthHeight.bamboo.max - 1) ? 0 : 1; // Paper
// CraftBukkit start
if (org.bukkit.craftbukkit.event.CraftEventFactory.handleBlockSpreadEvent(world, pos, pos.above(), (BlockState) ((BlockState) ((BlockState) this.defaultBlockState().setValue(BambooBlock.AGE, j)).setValue(BambooBlock.LEAVES, blockpropertybamboosize)).setValue(BambooBlock.STAGE, k), 3)) {
@@ -236,7 +236,7 @@ public class BambooBlock extends Block implements BonemealableBlock {
if (org.bukkit.craftbukkit.event.CraftEventFactory.handleBlockSpreadEvent(world, pos, pos.above(), (BlockState) ((BlockState) ((BlockState) this.defaultBlockState().setValue(BambooStalkBlock.AGE, j)).setValue(BambooStalkBlock.LEAVES, blockpropertybamboosize)).setValue(BambooStalkBlock.STAGE, k), 3)) {
@@ -236,7 +236,7 @@ public class BambooStalkBlock extends Block implements BonemealableBlock {
protected int getHeightAboveUpToMax(BlockGetter world, BlockPos pos) {
int i;
@ -55,7 +55,7 @@ index 3a6894c3cdee0d55f0546cda50c824ea5e95bfe0..2db8fd4fb03642fce2c7eca9c6b189f3
;
}
@@ -246,7 +246,7 @@ public class BambooBlock extends Block implements BonemealableBlock {
@@ -246,7 +246,7 @@ public class BambooStalkBlock extends Block implements BonemealableBlock {
protected int getHeightBelowUpToMax(BlockGetter world, BlockPos pos) {
int i;

Datei anzeigen

@ -5,7 +5,7 @@ Subject: [PATCH] Configurable baby zombie movement speed
diff --git a/src/main/java/net/minecraft/world/entity/monster/Zombie.java b/src/main/java/net/minecraft/world/entity/monster/Zombie.java
index ee91459775aada8cc2e5c4403436b11c15e8e674..1b48576beca178af14bfab297bd427b5f5bdaf42 100644
index 251487682550af7492068bd461bf0c61760de0fa..8ea60d388fff4a6368652ff96f648e5880053a2b 100644
--- a/src/main/java/net/minecraft/world/entity/monster/Zombie.java
+++ b/src/main/java/net/minecraft/world/entity/monster/Zombie.java
@@ -77,6 +77,7 @@ public class Zombie extends Monster {
@ -16,7 +16,7 @@ index ee91459775aada8cc2e5c4403436b11c15e8e674..1b48576beca178af14bfab297bd427b5
private static final EntityDataAccessor<Boolean> DATA_BABY_ID = SynchedEntityData.defineId(Zombie.class, EntityDataSerializers.BOOLEAN);
private static final EntityDataAccessor<Integer> DATA_SPECIAL_TYPE_ID = SynchedEntityData.defineId(Zombie.class, EntityDataSerializers.INT);
public static final EntityDataAccessor<Boolean> DATA_DROWNED_CONVERSION_ID = SynchedEntityData.defineId(Zombie.class, EntityDataSerializers.BOOLEAN);
@@ -184,9 +185,9 @@ public class Zombie extends Monster {
@@ -185,9 +186,9 @@ public class Zombie extends Monster {
if (this.level != null && !this.level.isClientSide) {
AttributeInstance attributemodifiable = this.getAttribute(Attributes.MOVEMENT_SPEED);

Datei anzeigen

@ -5,10 +5,10 @@ Subject: [PATCH] Configurable fishing time ranges
diff --git a/src/main/java/net/minecraft/world/entity/projectile/FishingHook.java b/src/main/java/net/minecraft/world/entity/projectile/FishingHook.java
index 792d85ea46d392a27ac89c42e037dc90d33fad7f..00fe96650e4d973e97b46968297f55f4c3674629 100644
index 41a3e97cda5e12658c69fc8f097250d1f2f5fdea..354fed07a1c8d88c97350be11388925e5bf82f9e 100644
--- a/src/main/java/net/minecraft/world/entity/projectile/FishingHook.java
+++ b/src/main/java/net/minecraft/world/entity/projectile/FishingHook.java
@@ -85,6 +85,10 @@ public class FishingHook extends Projectile {
@@ -86,6 +86,10 @@ public class FishingHook extends Projectile {
this.noCulling = true;
this.luck = Math.max(0, luckOfTheSeaLevel);
this.lureSpeed = Math.max(0, lureLevel);
@ -19,7 +19,7 @@ index 792d85ea46d392a27ac89c42e037dc90d33fad7f..00fe96650e4d973e97b46968297f55f4
}
public FishingHook(EntityType<? extends FishingHook> type, Level world) {
@@ -400,7 +404,7 @@ public class FishingHook extends Projectile {
@@ -401,7 +405,7 @@ public class FishingHook extends Projectile {
} else {
// CraftBukkit start - logic to modify fishing wait time
this.timeUntilLured = Mth.nextInt(this.random, this.minWaitTime, this.maxWaitTime);

Datei anzeigen

@ -5,7 +5,7 @@ Subject: [PATCH] Allow nerfed mobs to jump and take water damage
diff --git a/src/main/java/net/minecraft/world/entity/Mob.java b/src/main/java/net/minecraft/world/entity/Mob.java
index c3357f65d3c5cec3446326b8a68750ee2cc27b9a..ecb86bb87468cdef07e47df9308e6548cf987fe4 100644
index 10949455cc92ed6cb537fd7f148714c7ade4e360..c4b28340d62a89d6f896357c93fd933fe6cd934b 100644
--- a/src/main/java/net/minecraft/world/entity/Mob.java
+++ b/src/main/java/net/minecraft/world/entity/Mob.java
@@ -110,6 +110,7 @@ public abstract class Mob extends LivingEntity {
@ -16,7 +16,7 @@ index c3357f65d3c5cec3446326b8a68750ee2cc27b9a..ecb86bb87468cdef07e47df9308e6548
public GoalSelector targetSelector;
@Nullable
private LivingEntity target;
@@ -818,7 +819,17 @@ public abstract class Mob extends LivingEntity {
@@ -836,7 +837,17 @@ public abstract class Mob extends LivingEntity {
@Override
protected final void serverAiStep() {
++this.noActionTime;

Datei anzeigen

@ -5,10 +5,10 @@ Subject: [PATCH] Add configurable despawn distances for living entities
diff --git a/src/main/java/net/minecraft/world/entity/Mob.java b/src/main/java/net/minecraft/world/entity/Mob.java
index ecb86bb87468cdef07e47df9308e6548cf987fe4..a27082368913e5c6dc926bd197f3b135a633f30d 100644
index c4b28340d62a89d6f896357c93fd933fe6cd934b..99218eac34374a4d13451cfec15006c3bf0d755f 100644
--- a/src/main/java/net/minecraft/world/entity/Mob.java
+++ b/src/main/java/net/minecraft/world/entity/Mob.java
@@ -794,14 +794,14 @@ public abstract class Mob extends LivingEntity {
@@ -812,14 +812,14 @@ public abstract class Mob extends LivingEntity {
if (entityhuman != null) {
double d0 = entityhuman.distanceToSqr((Entity) this);

Datei anzeigen

@ -5,10 +5,10 @@ Subject: [PATCH] Allow for toggling of spawn chunks
diff --git a/src/main/java/net/minecraft/world/level/Level.java b/src/main/java/net/minecraft/world/level/Level.java
index c12e2ecaea13597f56254e3ab7fd83bff129ddd3..e4dfaec6a1efa7bb44c843a283dd3c3d3a4e199c 100644
index bcbbb266302cbd1ac3b0b42fac58d09737357dd3..409f8440773ef09aecf8f2fd70004d0592f4bbe2 100644
--- a/src/main/java/net/minecraft/world/level/Level.java
+++ b/src/main/java/net/minecraft/world/level/Level.java
@@ -253,6 +253,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
@@ -256,6 +256,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
});
// CraftBukkit end
timings = new co.aikar.timings.WorldTimingsHandler(this); // Paper - code below can generate new world and access timings

Datei anzeigen

@ -6,10 +6,10 @@ Subject: [PATCH] Drop falling block and tnt entities at the specified height
Co-authored-by: Jake Potrebic <jake.m.potrebic@gmail.com>
diff --git a/src/main/java/net/minecraft/world/entity/item/FallingBlockEntity.java b/src/main/java/net/minecraft/world/entity/item/FallingBlockEntity.java
index 7e1594e8df4fd09cd1aecbc5f3784797b04a8337..ba5f365cc0ae9773e63ff58ad0a8f8bb4087889a 100644
index c186ea200e196ff97a9bbe78d4e550ccba2d40ac..c125564cfca5c4a616e11b334a9ec7929ebea496 100644
--- a/src/main/java/net/minecraft/world/entity/item/FallingBlockEntity.java
+++ b/src/main/java/net/minecraft/world/entity/item/FallingBlockEntity.java
@@ -137,6 +137,17 @@ public class FallingBlockEntity extends Entity {
@@ -139,6 +139,17 @@ public class FallingBlockEntity extends Entity {
}
this.move(MoverType.SELF, this.getDeltaMovement());
@ -28,10 +28,10 @@ index 7e1594e8df4fd09cd1aecbc5f3784797b04a8337..ba5f365cc0ae9773e63ff58ad0a8f8bb
BlockPos blockposition = this.blockPosition();
boolean flag = this.blockState.getBlock() instanceof ConcretePowderBlock;
diff --git a/src/main/java/net/minecraft/world/entity/item/PrimedTnt.java b/src/main/java/net/minecraft/world/entity/item/PrimedTnt.java
index e24b46820394c5f220d5bf7c4e763ef95ff9e9ab..54a8548e8d3ddee049d3fed41332c94e368ba2c4 100644
index dd3eee50509f5388e78e0908e83925c43ab20628..43ec4bc45a3e553fbbf47aaf613f6e0aad2319cf 100644
--- a/src/main/java/net/minecraft/world/entity/item/PrimedTnt.java
+++ b/src/main/java/net/minecraft/world/entity/item/PrimedTnt.java
@@ -68,6 +68,12 @@ public class PrimedTnt extends Entity {
@@ -65,6 +65,12 @@ public class PrimedTnt extends Entity {
}
this.move(MoverType.SELF, this.getDeltaMovement());
@ -45,10 +45,10 @@ index e24b46820394c5f220d5bf7c4e763ef95ff9e9ab..54a8548e8d3ddee049d3fed41332c94e
if (this.onGround) {
this.setDeltaMovement(this.getDeltaMovement().multiply(0.7D, -0.5D, 0.7D));
diff --git a/src/main/java/net/minecraft/world/entity/vehicle/MinecartTNT.java b/src/main/java/net/minecraft/world/entity/vehicle/MinecartTNT.java
index 5b31c85d3bb5bcbd966d69c129e3caea14148821..beb542b2f810da9fb8379056b4d16c2b98717f28 100644
index 4740e39f39bd9b652db8ec3861cee36652310fa8..8443ddd751b3eae3c834aa957ea01b09306c9373 100644
--- a/src/main/java/net/minecraft/world/entity/vehicle/MinecartTNT.java
+++ b/src/main/java/net/minecraft/world/entity/vehicle/MinecartTNT.java
@@ -50,6 +50,12 @@ public class MinecartTNT extends AbstractMinecart {
@@ -52,6 +52,12 @@ public class MinecartTNT extends AbstractMinecart {
public void tick() {
super.tick();
if (this.fuse > 0) {

Datei anzeigen

@ -6,10 +6,10 @@ Subject: [PATCH] Show 'Paper' in client crashes, server lists, and Mojang
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
index 0d2114be30df99c5b50f82def97b0a44e797e573..2c78c2aebedef02fe66fe0c352d586b80f66144d 100644
index 11fd961b2b522920ceb5cde7dbf5cc197044836a..7e313778c44c2b06543c95b5687c2dd841b5216a 100644
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
@@ -1426,7 +1426,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
@@ -1433,7 +1433,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
@DontObfuscate
public String getServerModName() {
@ -19,10 +19,10 @@ index 0d2114be30df99c5b50f82def97b0a44e797e573..2c78c2aebedef02fe66fe0c352d586b8
public SystemReport fillSystemReport(SystemReport details) {
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
index 6723b52fd9306b0f9e3f1d0eadcbfd76d383beee..92a4deb9202fd20143b8890e781b4116e3706dd8 100644
index 1e8f5b6b74c469a77238b2798fe1d0897a7c6fb3..8ab757b46191811dd49e34e96199ccb38ef5cb2b 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
@@ -246,7 +246,7 @@ import org.yaml.snakeyaml.error.MarkedYAMLException;
@@ -259,7 +259,7 @@ import org.yaml.snakeyaml.error.MarkedYAMLException;
import net.md_5.bungee.api.chat.BaseComponent; // Spigot
public final class CraftServer implements Server {
@ -32,11 +32,11 @@ index 6723b52fd9306b0f9e3f1d0eadcbfd76d383beee..92a4deb9202fd20143b8890e781b4116
private final String bukkitVersion = Versioning.getBukkitVersion();
private final Logger logger = Logger.getLogger("Minecraft");
diff --git a/src/main/java/org/bukkit/craftbukkit/Main.java b/src/main/java/org/bukkit/craftbukkit/Main.java
index ef0bbec06981afa13384fb75067599eaa1a87e33..dbdb2a30c5dbe4f02bc1d1a8ce7294d25e1749d4 100644
index 44b30d0f297af5eb4ace4160a0c601ff824632f6..76487bb730f7915f4eac4b3f2394e02436e527cd 100644
--- a/src/main/java/org/bukkit/craftbukkit/Main.java
+++ b/src/main/java/org/bukkit/craftbukkit/Main.java
@@ -223,12 +223,25 @@ public class Main {
deadline.add(Calendar.DAY_OF_YEAR, -28);
deadline.add(Calendar.DAY_OF_YEAR, -3);
if (buildDate.before(deadline.getTime())) {
System.err.println("*** Error, this build is outdated ***");
- System.err.println("*** Please download a new build as per instructions from https://www.spigotmc.org/go/outdated-spigot ***");

Datei anzeigen

@ -140,10 +140,10 @@ index 0000000000000000000000000000000000000000..351159bbdb0c8045f4983f54dee34430
+ }
+}
diff --git a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
index a3b303c2593b3f06b40ec827592a349431d0aaf9..53eb440f1e2f9f9bbf2e67027414a3756d70cb6a 100644
index c25f893ef1215a22c8bfa575e4711b9c92a25f0b..176d5bdc5bf048940ceb46dd0a69d9fb7d39821f 100644
--- a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
+++ b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
@@ -426,6 +426,11 @@ public final class CraftMagicNumbers implements UnsafeValues {
@@ -424,6 +424,11 @@ public final class CraftMagicNumbers implements UnsafeValues {
public String getTimingsServerName() {
return io.papermc.paper.configuration.GlobalConfiguration.get().timings.serverName;
}

Datei anzeigen

@ -201,10 +201,10 @@ index 0000000000000000000000000000000000000000..aac3f66cb23d260729c2a48d8710a9de
+ }
+}
diff --git a/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java b/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
index 48745f950a35ead81abb3f4cb56f4a3397c74cac..528bf80bdd786b13b3c46eaf922bf6870865f040 100644
index 8318af4db5fa7242b5cb2ae50fd08174017d6f7d..18f7d73fd8a780753e2249a9fec6bb335ebfdeed 100644
--- a/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
+++ b/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
@@ -194,6 +194,7 @@ public class DedicatedServer extends MinecraftServer implements ServerInterface
@@ -189,6 +189,7 @@ public class DedicatedServer extends MinecraftServer implements ServerInterface
paperConfigurations.initializeWorldDefaultsConfiguration();
io.papermc.paper.command.PaperCommands.registerCommands(this);
com.destroystokyo.paper.Metrics.PaperMetrics.startMetrics();

Datei anzeigen

@ -21,10 +21,10 @@ index 5c3b11f738c1ea19981cc878aa6c2323497391a0..6fd874a83a248e6a7d427d18d11fc608
public static Predicate<Entity> withinDistance(double x, double y, double z, double max) {
double d4 = max * max;
diff --git a/src/main/java/net/minecraft/world/entity/Mob.java b/src/main/java/net/minecraft/world/entity/Mob.java
index a27082368913e5c6dc926bd197f3b135a633f30d..d315d9e0e6724e210924ec5814545e8c52ba2d8b 100644
index 99218eac34374a4d13451cfec15006c3bf0d755f..bb7c459c126be789bb12d08a569fe344e08914b8 100644
--- a/src/main/java/net/minecraft/world/entity/Mob.java
+++ b/src/main/java/net/minecraft/world/entity/Mob.java
@@ -790,7 +790,7 @@ public abstract class Mob extends LivingEntity {
@@ -808,7 +808,7 @@ public abstract class Mob extends LivingEntity {
if (this.level.getDifficulty() == Difficulty.PEACEFUL && this.shouldDespawnInPeaceful()) {
this.discard();
} else if (!this.isPersistenceRequired() && !this.requiresCustomPersistence()) {
@ -34,10 +34,10 @@ index a27082368913e5c6dc926bd197f3b135a633f30d..d315d9e0e6724e210924ec5814545e8c
if (entityhuman != null) {
double d0 = entityhuman.distanceToSqr((Entity) this);
diff --git a/src/main/java/net/minecraft/world/entity/animal/horse/SkeletonTrapGoal.java b/src/main/java/net/minecraft/world/entity/animal/horse/SkeletonTrapGoal.java
index 114352b9e8aeea7c728b6b58047e38e2530401a9..43e481377ba1596e740eacefd21d9664b7807883 100644
index e368478dba01a9b11adf23ed64bed61c73a78a28..17fda4857f74d2994525262472700e7788dec383 100644
--- a/src/main/java/net/minecraft/world/entity/animal/horse/SkeletonTrapGoal.java
+++ b/src/main/java/net/minecraft/world/entity/animal/horse/SkeletonTrapGoal.java
@@ -24,7 +24,7 @@ public class SkeletonTrapGoal extends Goal {
@@ -25,7 +25,7 @@ public class SkeletonTrapGoal extends Goal {
@Override
public boolean canUse() {
@ -60,10 +60,10 @@ index 87f66fd33e404367d924137b2d8aac3b06937f43..2dcda3b03796655da443e1b3dd68c6f6
return false;
}
diff --git a/src/main/java/net/minecraft/world/entity/monster/Zombie.java b/src/main/java/net/minecraft/world/entity/monster/Zombie.java
index 1b48576beca178af14bfab297bd427b5f5bdaf42..d3ca0706e8dc3160d2100d23788dd3d501b29215 100644
index 8ea60d388fff4a6368652ff96f648e5880053a2b..8ecbb64f9db9346757c5597404489496a0945508 100644
--- a/src/main/java/net/minecraft/world/entity/monster/Zombie.java
+++ b/src/main/java/net/minecraft/world/entity/monster/Zombie.java
@@ -324,7 +324,7 @@ public class Zombie extends Monster {
@@ -325,7 +325,7 @@ public class Zombie extends Monster {
if (NaturalSpawner.isSpawnPositionOk(entitypositiontypes_surface, this.level, blockposition, entitytypes) && SpawnPlacements.checkSpawnRules(entitytypes, worldserver, MobSpawnType.REINFORCEMENT, blockposition, this.level.random)) {
entityzombie.setPos((double) i1, (double) j1, (double) k1);
@ -73,10 +73,10 @@ index 1b48576beca178af14bfab297bd427b5f5bdaf42..d3ca0706e8dc3160d2100d23788dd3d5
entityzombie.finalizeSpawn(worldserver, this.level.getCurrentDifficultyAt(entityzombie.blockPosition()), MobSpawnType.REINFORCEMENT, (SpawnGroupData) null, (CompoundTag) null);
worldserver.addFreshEntityWithPassengers(entityzombie, CreatureSpawnEvent.SpawnReason.REINFORCEMENTS); // CraftBukkit
diff --git a/src/main/java/net/minecraft/world/entity/player/Player.java b/src/main/java/net/minecraft/world/entity/player/Player.java
index 1883c6a4a6a58b25913eaed40786ea67785bad37..4751fea5e7319600422c4fb3e40026a36db85a6a 100644
index dbe7588d4ea992155e3ff3b7d31af04181b01521..08c76c56e493f01bc159312aef512886631682f3 100644
--- a/src/main/java/net/minecraft/world/entity/player/Player.java
+++ b/src/main/java/net/minecraft/world/entity/player/Player.java
@@ -184,6 +184,9 @@ public abstract class Player extends LivingEntity {
@@ -179,6 +179,9 @@ public abstract class Player extends LivingEntity {
private Optional<GlobalPos> lastDeathLocation;
@Nullable
public FishingHook fishing;
@ -87,10 +87,10 @@ index 1883c6a4a6a58b25913eaed40786ea67785bad37..4751fea5e7319600422c4fb3e40026a3
// CraftBukkit start
public boolean fauxSleeping;
diff --git a/src/main/java/net/minecraft/world/level/BaseSpawner.java b/src/main/java/net/minecraft/world/level/BaseSpawner.java
index ab22310d5ab4ad7014b88080cbd44a2881002b55..b0ac72a69e13f2376aa4c66d9a1f5a01b480785c 100644
index 068d01c749a86954915fdad1b7499720613e5af3..d172f4e00b064c6c8fb5b1f6b0b68fd44a6efb62 100644
--- a/src/main/java/net/minecraft/world/level/BaseSpawner.java
+++ b/src/main/java/net/minecraft/world/level/BaseSpawner.java
@@ -51,7 +51,7 @@ public abstract class BaseSpawner {
@@ -54,7 +54,7 @@ public abstract class BaseSpawner {
}
public boolean isNearPlayer(Level world, BlockPos pos) {
@ -100,7 +100,7 @@ index ab22310d5ab4ad7014b88080cbd44a2881002b55..b0ac72a69e13f2376aa4c66d9a1f5a01
public void clientTick(Level world, BlockPos pos) {
diff --git a/src/main/java/net/minecraft/world/level/EntityGetter.java b/src/main/java/net/minecraft/world/level/EntityGetter.java
index f62e4e36dd26bde067e4787fd0da1440b15a57fa..abd74c6502e07857e0f64c5f99534b68975acd69 100644
index be6e3e21ad62da01e5e2dd78e300cbc8efdbeb42..ea98625fe7c00743b8df74a24e6d4b75df4189a5 100644
--- a/src/main/java/net/minecraft/world/level/EntityGetter.java
+++ b/src/main/java/net/minecraft/world/level/EntityGetter.java
@@ -82,6 +82,11 @@ public interface EntityGetter {
@ -137,10 +137,10 @@ index f62e4e36dd26bde067e4787fd0da1440b15a57fa..abd74c6502e07857e0f64c5f99534b68
for(Player player : this.players()) {
if (EntitySelector.NO_SPECTATORS.test(player) && EntitySelector.LIVING_ENTITY_STILL_ALIVE.test(player)) {
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
index 6708c2c88251f4e5f623cd785c14b2d3ed2d3de0..182881c867e68e59e89f56f8dc66001b0d2b3add 100644
index af45674e2aff3756813834e866a0e4f9e4b361f5..524e57251951d719eed227d779e3c420a9f38787 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
@@ -2084,8 +2084,20 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
@@ -2086,8 +2086,20 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
@Override
public String getLocale() {
return this.getHandle().locale;

Datei anzeigen

@ -12,10 +12,10 @@ Previous implementation did not calculate TPS correctly.
Switch to a realistic rolling average and factor in std deviation as an extra reporting variable
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
index 2c78c2aebedef02fe66fe0c352d586b80f66144d..0955b4e0ee33a26c5bfee744242cdc24aebccb20 100644
index 7e313778c44c2b06543c95b5687c2dd841b5216a..4aad7d7de77f82db9d442fbe709cdd52dced895e 100644
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
@@ -270,7 +270,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
@@ -281,7 +281,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
public org.bukkit.command.ConsoleCommandSender console;
public org.bukkit.command.RemoteConsoleCommandSender remoteConsole;
public ConsoleReader reader;
@ -24,7 +24,7 @@ index 2c78c2aebedef02fe66fe0c352d586b80f66144d..0955b4e0ee33a26c5bfee744242cdc24
public java.util.Queue<Runnable> processQueue = new java.util.concurrent.ConcurrentLinkedQueue<Runnable>();
public int autosavePeriod;
public Commands vanillaCommandDispatcher;
@@ -279,7 +279,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
@@ -290,7 +290,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
// Spigot start
public static final int TPS = 20;
public static final int TICK_TIME = 1000000000 / MinecraftServer.TPS;
@ -33,7 +33,7 @@ index 2c78c2aebedef02fe66fe0c352d586b80f66144d..0955b4e0ee33a26c5bfee744242cdc24
public final double[] recentTps = new double[ 3 ];
// Spigot end
public final io.papermc.paper.configuration.PaperConfigurations paperConfigurations;
@@ -945,6 +945,57 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
@@ -953,6 +953,57 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
{
return ( avg * exp ) + ( tps * ( 1 - exp ) );
}
@ -91,7 +91,7 @@ index 2c78c2aebedef02fe66fe0c352d586b80f66144d..0955b4e0ee33a26c5bfee744242cdc24
// Spigot End
public static volatile RuntimeException chunkSystemCrash; // Paper - rewrite chunk system
@@ -964,7 +1015,8 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
@@ -971,7 +1022,8 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
// Spigot start
Arrays.fill( recentTps, 20 );
@ -101,7 +101,7 @@ index 2c78c2aebedef02fe66fe0c352d586b80f66144d..0955b4e0ee33a26c5bfee744242cdc24
while (this.running) {
// Paper start - rewrite chunk system
// guarantee that nothing can stop the server from halting if it can at least still tick
@@ -972,7 +1024,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
@@ -979,7 +1031,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
throw this.chunkSystemCrash;
}
// Paper end - rewrite chunk system
@ -110,7 +110,7 @@ index 2c78c2aebedef02fe66fe0c352d586b80f66144d..0955b4e0ee33a26c5bfee744242cdc24
if (i > 5000L && this.nextTickTime - this.lastOverloadWarning >= 30000L) { // CraftBukkit
long j = i / 50L;
@@ -984,12 +1036,18 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
@@ -991,12 +1043,18 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
}
++MinecraftServer.currentTickLong; // Paper
@ -134,7 +134,7 @@ index 2c78c2aebedef02fe66fe0c352d586b80f66144d..0955b4e0ee33a26c5bfee744242cdc24
tickSection = curTime;
}
// Spigot end
@@ -999,7 +1057,8 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
@@ -1006,7 +1064,8 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
this.debugCommandProfiler = new MinecraftServer.TimeProfiler(Util.getNanos(), this.tickCount);
}
@ -145,10 +145,10 @@ index 2c78c2aebedef02fe66fe0c352d586b80f66144d..0955b4e0ee33a26c5bfee744242cdc24
this.startMetricsRecordingTick();
this.profiler.push("tick");
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
index 92a4deb9202fd20143b8890e781b4116e3706dd8..58f3ee6c47313b5c3b093a03b1b759e9fb0207ee 100644
index 8ab757b46191811dd49e34e96199ccb38ef5cb2b..40c9b6ca9a5b23f11b5b51b6357141d01c20d50e 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
@@ -2409,6 +2409,17 @@ public final class CraftServer implements Server {
@@ -2433,6 +2433,17 @@ public final class CraftServer implements Server {
return CraftMagicNumbers.INSTANCE;
}

Datei anzeigen

@ -5,10 +5,10 @@ Subject: [PATCH] Only refresh abilities if needed
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
index 182881c867e68e59e89f56f8dc66001b0d2b3add..8e6e7c5960b9273e816d7275b8a3058024190f5a 100644
index 524e57251951d719eed227d779e3c420a9f38787..99b61f733551af788aaadd74dbcd4c40521e294e 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
@@ -1753,12 +1753,13 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
@@ -1755,12 +1755,13 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
@Override
public void setFlying(boolean value) {

Datei anzeigen

@ -5,10 +5,10 @@ Subject: [PATCH] Entity Origin API
diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
index 0d49f73d779b9e44c20ba923d5390acdb4bc81d4..3693c34e8a68b9a7c480b655dedc2230182e6bd9 100644
index 1fb159167321e9ac2b8e4a895914d21042ba1894..168c79aa8d43bddc60f9e18d3c2c8b1cb6a26e66 100644
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
@@ -2235,6 +2235,15 @@ public class ServerLevel extends Level implements WorldGenLevel {
@@ -2216,6 +2216,15 @@ public class ServerLevel extends Level implements WorldGenLevel {
entity.updateDynamicGameEventListener(DynamicGameEventListener::add);
entity.valid = true; // CraftBukkit
@ -25,7 +25,7 @@ index 0d49f73d779b9e44c20ba923d5390acdb4bc81d4..3693c34e8a68b9a7c480b655dedc2230
public void onTrackingEnd(Entity entity) {
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
index 1a2ee5824c6af6b548e7006d583b73f4eba0f64a..ab2671c21f2f44973fb2507b178ac8e1e03bc8dc 100644
index 0cd735648314872e98e310627247b9ad425ab64d..5cf04b209ae3fa6c52ad45e726343418d0de311f 100644
--- a/src/main/java/net/minecraft/world/entity/Entity.java
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
@@ -304,7 +304,27 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
@ -56,7 +56,7 @@ index 1a2ee5824c6af6b548e7006d583b73f4eba0f64a..ab2671c21f2f44973fb2507b178ac8e1
public float getBukkitYaw() {
return this.yRot;
}
@@ -1913,6 +1933,15 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
@@ -1928,6 +1948,15 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
this.bukkitEntity.storeBukkitValues(nbt);
}
// CraftBukkit end
@ -72,7 +72,7 @@ index 1a2ee5824c6af6b548e7006d583b73f4eba0f64a..ab2671c21f2f44973fb2507b178ac8e1
return nbt;
} catch (Throwable throwable) {
CrashReport crashreport = CrashReport.forThrowable(throwable, "Saving entity NBT");
@@ -2039,6 +2068,20 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
@@ -2054,6 +2083,20 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
}
// CraftBukkit end
@ -94,10 +94,10 @@ index 1a2ee5824c6af6b548e7006d583b73f4eba0f64a..ab2671c21f2f44973fb2507b178ac8e1
CrashReport crashreport = CrashReport.forThrowable(throwable, "Loading entity NBT");
CrashReportCategory crashreportsystemdetails = crashreport.addCategory("Entity being loaded");
diff --git a/src/main/java/net/minecraft/world/entity/item/FallingBlockEntity.java b/src/main/java/net/minecraft/world/entity/item/FallingBlockEntity.java
index ba5f365cc0ae9773e63ff58ad0a8f8bb4087889a..9ef526b3da1185f32257b8fb2fa79ff281855713 100644
index c125564cfca5c4a616e11b334a9ec7929ebea496..561b8d6fcf4d511fb026bcc2c02054e56589d0b7 100644
--- a/src/main/java/net/minecraft/world/entity/item/FallingBlockEntity.java
+++ b/src/main/java/net/minecraft/world/entity/item/FallingBlockEntity.java
@@ -337,6 +337,14 @@ public class FallingBlockEntity extends Entity {
@@ -339,6 +339,14 @@ public class FallingBlockEntity extends Entity {
this.blockState = Blocks.SAND.defaultBlockState();
}
@ -113,10 +113,10 @@ index ba5f365cc0ae9773e63ff58ad0a8f8bb4087889a..9ef526b3da1185f32257b8fb2fa79ff2
public void setHurtsEntities(float fallHurtAmount, int fallHurtMax) {
diff --git a/src/main/java/net/minecraft/world/entity/item/PrimedTnt.java b/src/main/java/net/minecraft/world/entity/item/PrimedTnt.java
index 54a8548e8d3ddee049d3fed41332c94e368ba2c4..7a2ec239cd59b95dfd87ab1164d17bad23c4e558 100644
index 43ec4bc45a3e553fbbf47aaf613f6e0aad2319cf..aa0dfd08aefbb9363ec96080432f0f75d71b0b95 100644
--- a/src/main/java/net/minecraft/world/entity/item/PrimedTnt.java
+++ b/src/main/java/net/minecraft/world/entity/item/PrimedTnt.java
@@ -120,6 +120,14 @@ public class PrimedTnt extends Entity {
@@ -117,6 +117,14 @@ public class PrimedTnt extends Entity {
@Override
protected void readAdditionalSaveData(CompoundTag nbt) {
this.setFuse(nbt.getShort("Fuse"));
@ -132,10 +132,10 @@ index 54a8548e8d3ddee049d3fed41332c94e368ba2c4..7a2ec239cd59b95dfd87ab1164d17bad
@Nullable
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
index dfae0888684cbf3e6b2fc3201c78fa10c67628a1..ddd0fde5c9065cc35b3bcf81defb119f5b0608d6 100644
index 55bf95017d58bb61f9c6af27335c88421c74c4aa..62c2780b165a520e85f17fdf5c0d1c29b7579ebc 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
@@ -1215,5 +1215,20 @@ public abstract class CraftEntity implements org.bukkit.entity.Entity {
@@ -1217,5 +1217,20 @@ public abstract class CraftEntity implements org.bukkit.entity.Entity {
return ret;
}

Datei anzeigen

@ -5,10 +5,10 @@ Subject: [PATCH] Prevent tile entity and entity crashes
diff --git a/src/main/java/net/minecraft/world/level/Level.java b/src/main/java/net/minecraft/world/level/Level.java
index e4dfaec6a1efa7bb44c843a283dd3c3d3a4e199c..4c4dff95b88c4f228c9e0eb51613ed1094bec8a5 100644
index 409f8440773ef09aecf8f2fd70004d0592f4bbe2..461c04a97eaa77264896ce3a5268d22f9385131c 100644
--- a/src/main/java/net/minecraft/world/level/Level.java
+++ b/src/main/java/net/minecraft/world/level/Level.java
@@ -703,11 +703,11 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
@@ -728,11 +728,11 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
try {
tickConsumer.accept(entity);
} catch (Throwable throwable) {
@ -26,7 +26,7 @@ index e4dfaec6a1efa7bb44c843a283dd3c3d3a4e199c..4c4dff95b88c4f228c9e0eb51613ed10
}
diff --git a/src/main/java/net/minecraft/world/level/block/entity/BlockEntity.java b/src/main/java/net/minecraft/world/level/block/entity/BlockEntity.java
index be08224c8107aab3e9a3645a20977dd14bfff782..c518704386f14cd033307dd976455c35760d7236 100644
index b300d12e9e00519028b53aca9c3fb01f589eaa91..63acd109a79ed752a05df3d4f1b99309297c2055 100644
--- a/src/main/java/net/minecraft/world/level/block/entity/BlockEntity.java
+++ b/src/main/java/net/minecraft/world/level/block/entity/BlockEntity.java
@@ -213,7 +213,12 @@ public abstract class BlockEntity {
@ -44,10 +44,10 @@ index be08224c8107aab3e9a3645a20977dd14bfff782..c518704386f14cd033307dd976455c35
}
}
diff --git a/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java b/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java
index 9f5f7510e7a28471088c44fa9b1f94c374b2d29e..f9980a781f02e10c1c96deaa39cfecbf4deedff9 100644
index 652da141c3ae19c4de790dea1477f9c3f4c0dee1..d11a715dccaaf2a2faeef8af9ff6e5f1914416cb 100644
--- a/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java
+++ b/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java
@@ -1186,11 +1186,11 @@ public class LevelChunk extends ChunkAccess {
@@ -1184,11 +1184,11 @@ public class LevelChunk extends ChunkAccess {
gameprofilerfiller.pop();
} catch (Throwable throwable) {

Datei anzeigen

@ -6,7 +6,7 @@ Subject: [PATCH] Configurable top of nether void damage
Co-authored-by: Jake Potrebic <jake.m.potrebic@gmail.com>
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
index ab2671c21f2f44973fb2507b178ac8e1e03bc8dc..3273b29bdd37a5dac5c8a1be38f514bdbdffbeeb 100644
index 5cf04b209ae3fa6c52ad45e726343418d0de311f..128dd4749590905fdfa85907d33adc4e4dbe6c33 100644
--- a/src/main/java/net/minecraft/world/entity/Entity.java
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
@@ -705,7 +705,11 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
@ -23,7 +23,7 @@ index ab2671c21f2f44973fb2507b178ac8e1e03bc8dc..3273b29bdd37a5dac5c8a1be38f514bd
}
diff --git a/src/main/java/net/minecraft/world/level/portal/PortalForcer.java b/src/main/java/net/minecraft/world/level/portal/PortalForcer.java
index bb05ea288432ece497957c3503c3435655ce8997..f9cddc20563c2d44fdb1f91ae2b2f9b2321e4d81 100644
index 98cdf291a5d0248091891ad30104adef708eec55..ff57611088eabfb7e2db8fcf6344b1551b17b87b 100644
--- a/src/main/java/net/minecraft/world/level/portal/PortalForcer.java
+++ b/src/main/java/net/minecraft/world/level/portal/PortalForcer.java
@@ -55,7 +55,7 @@ public class PortalForcer {

Datei anzeigen

@ -5,10 +5,10 @@ Subject: [PATCH] Configurable end credits
diff --git a/src/main/java/net/minecraft/server/level/ServerPlayer.java b/src/main/java/net/minecraft/server/level/ServerPlayer.java
index d7e66a9669c67bf7d619bf69dc49daed42b3e83a..54dc00f521e7f7b4cb86b2653ac1d0058dcbb03b 100644
index 72f9e0eedb142cb37f0cab85208d491c4918235e..38f40851a5927a2f71fb3126d554770ff6cb1107 100644
--- a/src/main/java/net/minecraft/server/level/ServerPlayer.java
+++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java
@@ -989,6 +989,7 @@ public class ServerPlayer extends Player {
@@ -1011,6 +1011,7 @@ public class ServerPlayer extends Player {
this.unRide();
this.getLevel().removePlayerImmediately(this, Entity.RemovalReason.CHANGED_DIMENSION);
if (!this.wonGame) {

Datei anzeigen

@ -5,10 +5,10 @@ Subject: [PATCH] Fix lag from explosions processing dead entities
diff --git a/src/main/java/net/minecraft/world/level/Explosion.java b/src/main/java/net/minecraft/world/level/Explosion.java
index 2d4122eeee91dd857b2b4abeb5e9b3be19af6f4a..292571fc9fa999d3b92e0fdd56d07ebfb4ae7402 100644
index e0efb6ad5f25522bd395018b85df00dda33a443a..77dc0b310f48471c1ca1dc95bf01c5e24f1ed6d8 100644
--- a/src/main/java/net/minecraft/world/level/Explosion.java
+++ b/src/main/java/net/minecraft/world/level/Explosion.java
@@ -206,7 +206,7 @@ public class Explosion {
@@ -202,7 +202,7 @@ public class Explosion {
int i1 = Mth.floor(this.y + (double) f2 + 1.0D);
int j1 = Mth.floor(this.z - (double) f2 - 1.0D);
int k1 = Mth.floor(this.z + (double) f2 + 1.0D);

Datei anzeigen

@ -10,10 +10,10 @@ This patch adds a per-tick cache that is used for storing and retrieving
an entity's exposure during an explosion.
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
index 0955b4e0ee33a26c5bfee744242cdc24aebccb20..093ac159fcc34de9901395ad9450372efdf7cb5b 100644
index 4aad7d7de77f82db9d442fbe709cdd52dced895e..8989d13eb6ee94a1dbbe986cfcf0755faaa4e85c 100644
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
@@ -1389,6 +1389,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
@@ -1396,6 +1396,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
this.profiler.pop();
this.profiler.pop();
@ -22,10 +22,10 @@ index 0955b4e0ee33a26c5bfee744242cdc24aebccb20..093ac159fcc34de9901395ad9450372e
this.profiler.popPush("connection");
diff --git a/src/main/java/net/minecraft/world/level/Explosion.java b/src/main/java/net/minecraft/world/level/Explosion.java
index 292571fc9fa999d3b92e0fdd56d07ebfb4ae7402..db7a025cd064c898e33037133b65eecc3702542d 100644
index 77dc0b310f48471c1ca1dc95bf01c5e24f1ed6d8..cce7344c1062e2c9c621e547fdd119c61d2cc4f5 100644
--- a/src/main/java/net/minecraft/world/level/Explosion.java
+++ b/src/main/java/net/minecraft/world/level/Explosion.java
@@ -225,7 +225,7 @@ public class Explosion {
@@ -221,7 +221,7 @@ public class Explosion {
d8 /= d11;
d9 /= d11;
d10 /= d11;
@ -34,7 +34,7 @@ index 292571fc9fa999d3b92e0fdd56d07ebfb4ae7402..db7a025cd064c898e33037133b65eecc
double d13 = (1.0D - d7) * d12;
// CraftBukkit start
@@ -470,4 +470,84 @@ public class Explosion {
@@ -490,4 +490,84 @@ public class Explosion {
private BlockInteraction() {}
}
@ -120,10 +120,10 @@ index 292571fc9fa999d3b92e0fdd56d07ebfb4ae7402..db7a025cd064c898e33037133b65eecc
+ // Paper end
}
diff --git a/src/main/java/net/minecraft/world/level/Level.java b/src/main/java/net/minecraft/world/level/Level.java
index 4c4dff95b88c4f228c9e0eb51613ed1094bec8a5..2439c5e1eae1582196b1d2103b1ebd22140f3fc1 100644
index 461c04a97eaa77264896ce3a5268d22f9385131c..4aed75843c794a3a8dbf5e66135b6792cc7d3d8b 100644
--- a/src/main/java/net/minecraft/world/level/Level.java
+++ b/src/main/java/net/minecraft/world/level/Level.java
@@ -161,6 +161,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
@@ -164,6 +164,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
private org.spigotmc.TickLimiter entityLimiter;
private org.spigotmc.TickLimiter tileLimiter;
private int tileTickPosition;

Datei anzeigen

@ -5,10 +5,10 @@ Subject: [PATCH] Disable explosion knockback
diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java
index 4cbd068bbb19eec3a702bc9067ac4f106ddf00e1..1738512d977f60c4021c01a5fce642f62d7e4c74 100644
index c6ce813f7ea6c4dcbd45e9d8c55f56c29dc3ea53..7e4f95e04a880ecb459228c90be462cbbec14620 100644
--- a/src/main/java/net/minecraft/world/entity/LivingEntity.java
+++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java
@@ -1399,6 +1399,7 @@ public abstract class LivingEntity extends Entity {
@@ -1400,6 +1400,7 @@ public abstract class LivingEntity extends Entity {
}
}
@ -16,7 +16,7 @@ index 4cbd068bbb19eec3a702bc9067ac4f106ddf00e1..1738512d977f60c4021c01a5fce642f6
if (flag1) {
if (flag) {
this.level.broadcastEntityEvent(this, (byte) 29);
@@ -1419,6 +1420,7 @@ public abstract class LivingEntity extends Entity {
@@ -1420,6 +1421,7 @@ public abstract class LivingEntity extends Entity {
b0 = 2;
}
@ -24,7 +24,7 @@ index 4cbd068bbb19eec3a702bc9067ac4f106ddf00e1..1738512d977f60c4021c01a5fce642f6
this.level.broadcastEntityEvent(this, b0);
}
@@ -1442,6 +1444,7 @@ public abstract class LivingEntity extends Entity {
@@ -1443,6 +1445,7 @@ public abstract class LivingEntity extends Entity {
}
}
@ -33,10 +33,10 @@ index 4cbd068bbb19eec3a702bc9067ac4f106ddf00e1..1738512d977f60c4021c01a5fce642f6
if (!this.checkTotemDeathProtection(source)) {
SoundEvent soundeffect = this.getDeathSound();
diff --git a/src/main/java/net/minecraft/world/level/Explosion.java b/src/main/java/net/minecraft/world/level/Explosion.java
index db7a025cd064c898e33037133b65eecc3702542d..af9645a3ef9dab1134977b30937f15fa3fa27a95 100644
index cce7344c1062e2c9c621e547fdd119c61d2cc4f5..9f7a35e00b5edca6b2d99d3ed60cde8e1aeac4eb 100644
--- a/src/main/java/net/minecraft/world/level/Explosion.java
+++ b/src/main/java/net/minecraft/world/level/Explosion.java
@@ -260,14 +260,14 @@ public class Explosion {
@@ -256,14 +256,14 @@ public class Explosion {
double d14 = d13;
if (entity instanceof LivingEntity) {

Datei anzeigen

@ -5,10 +5,10 @@ Subject: [PATCH] Disable thunder
diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
index 3693c34e8a68b9a7c480b655dedc2230182e6bd9..290e28c8cc3d020d11842ccfd09b23fb0fc2cba2 100644
index 168c79aa8d43bddc60f9e18d3c2c8b1cb6a26e66..54fb658d05273408e0b8577199abeba7ff6481b8 100644
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
@@ -692,7 +692,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
@@ -693,7 +693,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
gameprofilerfiller.push("thunder");
BlockPos blockposition;

Datei anzeigen

@ -5,13 +5,13 @@ Subject: [PATCH] Disable ice and snow
diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
index 290e28c8cc3d020d11842ccfd09b23fb0fc2cba2..29e432e9bea9da307c96d42d9b45d1c3a3161fa1 100644
index 54fb658d05273408e0b8577199abeba7ff6481b8..2ad216a533dedb180ea10d9072ce25ebe0283b1a 100644
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
@@ -716,7 +716,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
}
@@ -723,7 +723,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
gameprofilerfiller.popPush("iceandsnow");
int l;
- if (this.random.nextInt(16) == 0) {
+ if (!this.paperConfig().environment.disableIceAndSnow && this.random.nextInt(16) == 0) { // Paper - Disable ice and snow
blockposition = this.getHeightmapPos(Heightmap.Types.MOTION_BLOCKING, this.getBlockRandomPos(j, 0, k, 15));

Datei anzeigen

@ -5,10 +5,10 @@ Subject: [PATCH] Configurable mob spawner tick rate
diff --git a/src/main/java/net/minecraft/world/level/BaseSpawner.java b/src/main/java/net/minecraft/world/level/BaseSpawner.java
index b0ac72a69e13f2376aa4c66d9a1f5a01b480785c..02ee392c810d96d05f5ad27b1d75fa06dd28ee4c 100644
index d172f4e00b064c6c8fb5b1f6b0b68fd44a6efb62..cf9a0addcbec3f78a541fad85697961ed8ec884b 100644
--- a/src/main/java/net/minecraft/world/level/BaseSpawner.java
+++ b/src/main/java/net/minecraft/world/level/BaseSpawner.java
@@ -42,6 +42,7 @@ public abstract class BaseSpawner {
@@ -45,6 +45,7 @@ public abstract class BaseSpawner {
public int maxNearbyEntities = 6;
public int requiredPlayerRange = 16;
public int spawnRange = 4;
@ -16,7 +16,7 @@ index b0ac72a69e13f2376aa4c66d9a1f5a01b480785c..02ee392c810d96d05f5ad27b1d75fa06
public BaseSpawner() {}
@@ -76,13 +77,18 @@ public abstract class BaseSpawner {
@@ -79,13 +80,18 @@ public abstract class BaseSpawner {
}
public void serverTick(ServerLevel world, BlockPos pos) {
@ -36,8 +36,8 @@ index b0ac72a69e13f2376aa4c66d9a1f5a01b480785c..02ee392c810d96d05f5ad27b1d75fa06
+ this.spawnDelay -= tickDelay; // Paper
} else {
boolean flag = false;
@@ -148,8 +154,7 @@ public abstract class BaseSpawner {
RandomSource randomsource = world.getRandom();
@@ -152,8 +158,7 @@ public abstract class BaseSpawner {
((Mob) entity).finalizeSpawn(world, world.getCurrentDifficultyAt(entity.blockPosition()), MobSpawnType.SPAWNER, (SpawnGroupData) null, (CompoundTag) null);
}
// Spigot Start

Datei anzeigen

@ -5,10 +5,10 @@ Subject: [PATCH] Implement PlayerLocaleChangeEvent
diff --git a/src/main/java/net/minecraft/server/level/ServerPlayer.java b/src/main/java/net/minecraft/server/level/ServerPlayer.java
index 54dc00f521e7f7b4cb86b2653ac1d0058dcbb03b..0590fb50330b5387a25e7fc7139e04586999efc6 100644
index 38f40851a5927a2f71fb3126d554770ff6cb1107..fe1cf92644809b9aed5f74235166a21771893b72 100644
--- a/src/main/java/net/minecraft/server/level/ServerPlayer.java
+++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java
@@ -1763,7 +1763,7 @@ public class ServerPlayer extends Player {
@@ -1787,7 +1787,7 @@ public class ServerPlayer extends Player {
return s;
}
@ -17,7 +17,7 @@ index 54dc00f521e7f7b4cb86b2653ac1d0058dcbb03b..0590fb50330b5387a25e7fc7139e0458
public java.util.Locale adventure$locale = java.util.Locale.US; // Paper
public void updateOptions(ServerboundClientInformationPacket packet) {
// CraftBukkit start
@@ -1771,9 +1771,10 @@ public class ServerPlayer extends Player {
@@ -1795,9 +1795,10 @@ public class ServerPlayer extends Player {
PlayerChangedMainHandEvent event = new PlayerChangedMainHandEvent(this.getBukkitEntity(), getMainArm() == HumanoidArm.LEFT ? MainHand.LEFT : MainHand.RIGHT);
this.server.server.getPluginManager().callEvent(event);
}
@ -30,10 +30,10 @@ index 54dc00f521e7f7b4cb86b2653ac1d0058dcbb03b..0590fb50330b5387a25e7fc7139e0458
this.locale = packet.language;
// Paper start
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
index 8e6e7c5960b9273e816d7275b8a3058024190f5a..3be63b51511fd12f295e1f07549f281246ee2dc0 100644
index 99b61f733551af788aaadd74dbcd4c40521e294e..30bbfb2bf6aeaf311453ccdd72eeee43ae89b972 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
@@ -2084,8 +2084,10 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
@@ -2086,8 +2086,10 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
@Override
public String getLocale() {

Datei anzeigen

@ -5,10 +5,10 @@ Subject: [PATCH] Add BeaconEffectEvent
diff --git a/src/main/java/net/minecraft/world/level/block/entity/BeaconBlockEntity.java b/src/main/java/net/minecraft/world/level/block/entity/BeaconBlockEntity.java
index 26275e888d09ee4bdbe305be9a56f749a8f4db4a..0c699c08ef85ca3339ada5c869b571581092a11d 100644
index e1a720afaf9f3d843065ed1e8e4ce71019a0fea2..3a17c143de499d81109ae7d6e9fe18718139c5b7 100644
--- a/src/main/java/net/minecraft/world/level/block/entity/BeaconBlockEntity.java
+++ b/src/main/java/net/minecraft/world/level/block/entity/BeaconBlockEntity.java
@@ -40,6 +40,10 @@ import net.minecraft.world.phys.AABB;
@@ -41,6 +41,10 @@ import net.minecraft.world.phys.AABB;
import org.bukkit.craftbukkit.potion.CraftPotionUtil;
import org.bukkit.potion.PotionEffect;
// CraftBukkit end
@ -17,9 +17,9 @@ index 26275e888d09ee4bdbe305be9a56f749a8f4db4a..0c699c08ef85ca3339ada5c869b57158
+import com.destroystokyo.paper.event.block.BeaconEffectEvent;
+// Paper end
public class BeaconBlockEntity extends BlockEntity implements MenuProvider {
public class BeaconBlockEntity extends BlockEntity implements MenuProvider, Nameable {
@@ -278,15 +282,23 @@ public class BeaconBlockEntity extends BlockEntity implements MenuProvider {
@@ -280,15 +284,23 @@ public class BeaconBlockEntity extends BlockEntity implements MenuProvider, Name
}
}
@ -47,7 +47,7 @@ index 26275e888d09ee4bdbe305be9a56f749a8f4db4a..0c699c08ef85ca3339ada5c869b57158
}
}
}
@@ -309,10 +321,10 @@ public class BeaconBlockEntity extends BlockEntity implements MenuProvider {
@@ -311,10 +323,10 @@ public class BeaconBlockEntity extends BlockEntity implements MenuProvider, Name
int j = BeaconBlockEntity.getLevel(beaconLevel);
List list = BeaconBlockEntity.getHumansInRange(world, pos, beaconLevel);

Datei anzeigen

@ -5,10 +5,10 @@ Subject: [PATCH] Configurable container update tick rate
diff --git a/src/main/java/net/minecraft/server/level/ServerPlayer.java b/src/main/java/net/minecraft/server/level/ServerPlayer.java
index 0590fb50330b5387a25e7fc7139e04586999efc6..3cea2ceb5d30329aa84f6659330eea075387fe18 100644
index fe1cf92644809b9aed5f74235166a21771893b72..91380d37ddd0c03301618849ea8fd9a72c333ae5 100644
--- a/src/main/java/net/minecraft/server/level/ServerPlayer.java
+++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java
@@ -228,6 +228,7 @@ public class ServerPlayer extends Player {
@@ -233,6 +233,7 @@ public class ServerPlayer extends Player {
private int containerCounter;
public int latency;
public boolean wonGame;
@ -16,7 +16,7 @@ index 0590fb50330b5387a25e7fc7139e04586999efc6..3cea2ceb5d30329aa84f6659330eea07
// CraftBukkit start
public String displayName;
@@ -601,7 +602,12 @@ public class ServerPlayer extends Player {
@@ -623,7 +624,12 @@ public class ServerPlayer extends Player {
--this.invulnerableTime;
}

Datei anzeigen

@ -5,10 +5,10 @@ Subject: [PATCH] Use UserCache for player heads
diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaSkull.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaSkull.java
index af284ff9b38341b9fdeec93febc7aea36ba2c9a7..07a6bac294273c94f2f7353aa0514ced24c4a93e 100644
index a07d4639a9cd932f241784d3a127b9824c26f4a1..70a683529534e1f82c35350accbfeeb5ae4ceb6b 100644
--- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaSkull.java
+++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaSkull.java
@@ -167,7 +167,13 @@ class CraftMetaSkull extends CraftMetaItem implements SkullMeta {
@@ -169,7 +169,13 @@ class CraftMetaSkull extends CraftMetaItem implements SkullMeta {
if (name == null) {
this.setProfile(null);
} else {

Datei anzeigen

@ -5,10 +5,10 @@ Subject: [PATCH] Disable spigot tick limiters
diff --git a/src/main/java/net/minecraft/world/level/Level.java b/src/main/java/net/minecraft/world/level/Level.java
index 2439c5e1eae1582196b1d2103b1ebd22140f3fc1..1473664f94f228abd81b8c654d105b8a76cc49e9 100644
index 4aed75843c794a3a8dbf5e66135b6792cc7d3d8b..a36da18ac1ea613f1a77ce2fbb70d5cb05563714 100644
--- a/src/main/java/net/minecraft/world/level/Level.java
+++ b/src/main/java/net/minecraft/world/level/Level.java
@@ -669,9 +669,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
@@ -694,9 +694,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
// Spigot start
// Iterator iterator = this.blockEntityTickers.iterator();
int tilesThisCycle = 0;

Datei anzeigen

@ -12,10 +12,10 @@ improve setPosition to use raw
public net.minecraft.world.entity.Entity setRot(FF)V
diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java
index e56635fe18e6264c8813834d3eb435ea6e4fffc9..1357b444cf2efbd7f6a1918709b9743d230f1fd5 100644
index 5463b07b24a4572bd9e83b6694fa0162d4911f7b..ae492b5c184896864bb6cc7429dfd701d560ae06 100644
--- a/src/main/java/net/minecraft/server/players/PlayerList.java
+++ b/src/main/java/net/minecraft/server/players/PlayerList.java
@@ -223,7 +223,7 @@ public abstract class PlayerList {
@@ -229,7 +229,7 @@ public abstract class PlayerList {
// Spigot start - spawn location event
Player spawnPlayer = player.getBukkitEntity();
@ -24,7 +24,7 @@ index e56635fe18e6264c8813834d3eb435ea6e4fffc9..1357b444cf2efbd7f6a1918709b9743d
this.cserver.getPluginManager().callEvent(ev);
Location loc = ev.getSpawnLocation();
@@ -231,7 +231,10 @@ public abstract class PlayerList {
@@ -237,7 +237,10 @@ public abstract class PlayerList {
player.spawnIn(worldserver1);
player.gameMode.setLevel((ServerLevel) player.level);

Datei anzeigen

@ -21,10 +21,10 @@ character.
Co-authored-by: Jake Potrebic <jake.m.potrebic@gmail.com>
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
index 1742efe86fe2017e58513f9a63e4b63579327f04..2be965faaed8ca25fc01d6ca1f496f7e41e6b7a0 100644
index 06d221dcc4091032016c85143cf3432a988780c0..580f126ad3681306bfff24c1e19dab39a6d4e888 100644
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
@@ -2038,7 +2038,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
@@ -2040,7 +2040,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
return true;
}
@ -33,16 +33,16 @@ index 1742efe86fe2017e58513f9a63e4b63579327f04..2be965faaed8ca25fc01d6ca1f496f7e
for (int i = 0; i < message.length(); ++i) {
if (!SharedConstants.isAllowedChatCharacter(message.charAt(i))) {
return true;
@@ -2055,7 +2055,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
@@ -2057,7 +2057,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
}
OutgoingPlayerChatMessage outgoing = OutgoingPlayerChatMessage.create(original);
OutgoingChatMessage outgoing = OutgoingChatMessage.create(original);
- if (!async && s.startsWith("/")) {
+ if (false && !async && s.startsWith("/")) { // Paper - don't handle commands in chat logic
this.handleCommand(s);
} else if (this.player.getChatVisibility() == ChatVisiblity.SYSTEM) {
// Do nothing, this is coming from a plugin
@@ -2158,7 +2158,29 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
@@ -2147,7 +2147,29 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
}
}
@ -74,10 +74,10 @@ index 1742efe86fe2017e58513f9a63e4b63579327f04..2be965faaed8ca25fc01d6ca1f496f7e
if ( org.spigotmc.SpigotConfig.logCommands ) // Spigot
this.LOGGER.info(this.player.getScoreboardName() + " issued server command: " + s);
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
index 58f3ee6c47313b5c3b093a03b1b759e9fb0207ee..524338428265f27aa33774a23b53c24212d98ae2 100644
index 40c9b6ca9a5b23f11b5b51b6357141d01c20d50e..b000fef0907a4259b42c320ff831857810cc572d 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
@@ -863,6 +863,28 @@ public final class CraftServer implements Server {
@@ -876,6 +876,28 @@ public final class CraftServer implements Server {
Validate.notNull(commandLine, "CommandLine cannot be null");
org.spigotmc.AsyncCatcher.catchOp("command dispatch"); // Spigot
@ -107,14 +107,14 @@ index 58f3ee6c47313b5c3b093a03b1b759e9fb0207ee..524338428265f27aa33774a23b53c242
return true;
}
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
index 3be63b51511fd12f295e1f07549f281246ee2dc0..55c9d229356e3eb75419f7630cfafdd8f883a5e0 100644
index 30bbfb2bf6aeaf311453ccdd72eeee43ae89b972..e13af07709acdbe5060e2959f6762fcffa65fd05 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
@@ -502,7 +502,19 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
@@ -504,7 +504,19 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
public void chat(String msg) {
if (this.getHandle().connection == null) return;
- this.getHandle().connection.chat(msg, PlayerChatMessage.system(new ChatMessageContent(msg)), false);
- this.getHandle().connection.chat(msg, PlayerChatMessage.system(msg), false);
+ // Paper start - improve chat handling
+ if (ServerGamePacketListenerImpl.isChatMessageIllegal(msg)) {
+ this.getHandle().connection.disconnect(Component.translatable("multiplayer.disconnect.illegal_characters"), org.bukkit.event.player.PlayerKickEvent.Cause.ILLEGAL_CHARACTERS);
@ -124,7 +124,7 @@ index 3be63b51511fd12f295e1f07549f281246ee2dc0..55c9d229356e3eb75419f7630cfafdd8
+ } else {
+ // TODO text filtering
+ // TODO chat decorating
+ this.getHandle().connection.chat(msg, PlayerChatMessage.system(new net.minecraft.network.chat.ChatMessageContent(msg)), false);
+ this.getHandle().connection.chat(msg, PlayerChatMessage.system(msg), false);
+ }
+ }
+ // Paper end

Datei anzeigen

@ -5,10 +5,10 @@ Subject: [PATCH] All chunks are slime spawn chunks toggle
diff --git a/src/main/java/net/minecraft/world/entity/monster/Slime.java b/src/main/java/net/minecraft/world/entity/monster/Slime.java
index a62f88048d8243f5b98834988c049471114c4199..7b95d18fb5edbd1575f6be92bfcbb3e0d7f691c8 100644
index 64c4b88f0a64436c126cf32d6e289b3876af8dfb..85abd62434cbe3beb63f61262504372b971d9684 100644
--- a/src/main/java/net/minecraft/world/entity/monster/Slime.java
+++ b/src/main/java/net/minecraft/world/entity/monster/Slime.java
@@ -316,7 +316,7 @@ public class Slime extends Mob implements Enemy {
@@ -318,7 +318,7 @@ public class Slime extends Mob implements Enemy {
}
ChunkPos chunkcoordintpair = new ChunkPos(pos);
@ -18,10 +18,10 @@ index a62f88048d8243f5b98834988c049471114c4199..7b95d18fb5edbd1575f6be92bfcbb3e0
if (random.nextInt(10) == 0 && flag && pos.getY() < 40) {
return checkMobSpawnRules(type, world, spawnReason, pos, random);
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftChunk.java b/src/main/java/org/bukkit/craftbukkit/CraftChunk.java
index 29465d24b6c9160fcd6293006dcc26bcfbeb5e10..fd50cc4cfc976a9dee82d4f6ad457bba18065614 100644
index cda6277a3a8eefc80de00ffc98687ce0afca7bf2..46b1cce7d482adea911b71f3e3623ac0574a85ae 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftChunk.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftChunk.java
@@ -176,7 +176,7 @@ public class CraftChunk implements Chunk {
@@ -177,7 +177,7 @@ public class CraftChunk implements Chunk {
@Override
public boolean isSlimeChunk() {
// 987234911L is deterimined in EntitySlime when seeing if a slime can spawn in a chunk

Datei anzeigen

@ -5,10 +5,10 @@ Subject: [PATCH] Expose server CommandMap
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
index 524338428265f27aa33774a23b53c24212d98ae2..458c9ce406421f77c9a196f9081f2f36e7e675ea 100644
index b000fef0907a4259b42c320ff831857810cc572d..d73c97e0d762e49b2ef757671cb52c68511f9ff6 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
@@ -1983,6 +1983,7 @@ public final class CraftServer implements Server {
@@ -2007,6 +2007,7 @@ public final class CraftServer implements Server {
return this.helpMap;
}

Datei anzeigen

@ -5,10 +5,10 @@ Subject: [PATCH] Ensure inv drag is in bounds
diff --git a/src/main/java/net/minecraft/world/inventory/AbstractContainerMenu.java b/src/main/java/net/minecraft/world/inventory/AbstractContainerMenu.java
index 333cbbf6f7761d619a1e41f9a08d7fcf0abf44f9..66261330157cef50dfabb7f92e9ece6dcd280951 100644
index f15415ff5fb099a048fe0f898e15bc4303a47ef5..f7976bd9561601a6ce1d5b4874b08bba9754d753 100644
--- a/src/main/java/net/minecraft/world/inventory/AbstractContainerMenu.java
+++ b/src/main/java/net/minecraft/world/inventory/AbstractContainerMenu.java
@@ -416,7 +416,7 @@ public abstract class AbstractContainerMenu {
@@ -417,7 +417,7 @@ public abstract class AbstractContainerMenu {
this.resetQuickCraft();
}
} else if (this.quickcraftStatus == 1) {

Datei anzeigen

@ -5,10 +5,10 @@ Subject: [PATCH] Player Tab List and Title APIs
diff --git a/src/main/java/net/minecraft/network/FriendlyByteBuf.java b/src/main/java/net/minecraft/network/FriendlyByteBuf.java
index 42514a0c7066dc79050c0496d6463528b593f9e4..70631b3fe080320dfea0d1a4deb23e87448da250 100644
index e5ef4acbc74f3ef50ed8e162d3b2a7ae881a4b7a..76914b08c17a62a117319d458a6693070fc46348 100644
--- a/src/main/java/net/minecraft/network/FriendlyByteBuf.java
+++ b/src/main/java/net/minecraft/network/FriendlyByteBuf.java
@@ -439,6 +439,11 @@ public class FriendlyByteBuf extends ByteBuf {
@@ -501,6 +501,11 @@ public class FriendlyByteBuf extends ByteBuf {
public FriendlyByteBuf writeComponent(final net.kyori.adventure.text.Component component) {
return this.writeUtf(PaperAdventure.asJsonString(component, this.adventure$locale), 262144);
}
@ -63,7 +63,7 @@ index bd808eb312ade7122973a47f4b96505829511da5..bf0f9cab7c66c089f35b851e799ba4a4
// Paper end
buf.writeComponent(this.text);
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
index 55c9d229356e3eb75419f7630cfafdd8f883a5e0..a4452324892c37c92e8e0c7cee1fdeda50e9d81b 100644
index e13af07709acdbe5060e2959f6762fcffa65fd05..d7177eb9c3cf65cacc90752215d591058b8106b8 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
@@ -1,5 +1,6 @@
@ -73,7 +73,7 @@ index 55c9d229356e3eb75419f7630cfafdd8f883a5e0..a4452324892c37c92e8e0c7cee1fdeda
import com.google.common.base.Preconditions;
import com.google.common.collect.ImmutableSet;
import com.google.common.io.BaseEncoding;
@@ -348,6 +349,100 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
@@ -350,6 +351,100 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
}
}

Datei anzeigen

@ -5,10 +5,10 @@ Subject: [PATCH] Add configurable portal search radius
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
index 3273b29bdd37a5dac5c8a1be38f514bdbdffbeeb..dc29c677e21a71b5ba1a48c7aea8acadc2689c77 100644
index 128dd4749590905fdfa85907d33adc4e4dbe6c33..575ce3bb03c7eef215e71d238a46aa1cc8510f89 100644
--- a/src/main/java/net/minecraft/world/entity/Entity.java
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
@@ -3003,7 +3003,13 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
@@ -3029,7 +3029,13 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
double d0 = DimensionType.getTeleportationScale(this.level.dimensionType(), destination.dimensionType());
BlockPos blockposition = worldborder.clampToBounds(this.getX() * d0, this.getY(), this.getZ() * d0);
// CraftBukkit start
@ -24,7 +24,7 @@ index 3273b29bdd37a5dac5c8a1be38f514bdbdffbeeb..dc29c677e21a71b5ba1a48c7aea8acad
return null;
}
diff --git a/src/main/java/net/minecraft/world/level/portal/PortalForcer.java b/src/main/java/net/minecraft/world/level/portal/PortalForcer.java
index f9cddc20563c2d44fdb1f91ae2b2f9b2321e4d81..953a1dfd71605ac123133dc1d4e8133a33884f4a 100644
index ff57611088eabfb7e2db8fcf6344b1551b17b87b..d1c7eba29c64a6dbf55d3062ced9769eecb548ed 100644
--- a/src/main/java/net/minecraft/world/level/portal/PortalForcer.java
+++ b/src/main/java/net/minecraft/world/level/portal/PortalForcer.java
@@ -43,7 +43,7 @@ public class PortalForcer {

Datei anzeigen

@ -5,10 +5,10 @@ Subject: [PATCH] Add velocity warnings
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
index 458c9ce406421f77c9a196f9081f2f36e7e675ea..b8763c6f938319d4712222ecab3ebc132071597b 100644
index d73c97e0d762e49b2ef757671cb52c68511f9ff6..37c1e4b31c06b9bf48325a7d5f293020b00445b1 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
@@ -280,6 +280,7 @@ public final class CraftServer implements Server {
@@ -293,6 +293,7 @@ public final class CraftServer implements Server {
public boolean ignoreVanillaPermissions = false;
private final List<CraftPlayer> playerView;
public int reloadCount;
@ -17,10 +17,10 @@ index 458c9ce406421f77c9a196f9081f2f36e7e675ea..b8763c6f938319d4712222ecab3ebc13
static {
ConfigurationSerialization.registerClass(CraftOfflinePlayer.class);
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
index ddd0fde5c9065cc35b3bcf81defb119f5b0608d6..b9599f4f431098d63be98b5175890371103f8813 100644
index 62c2780b165a520e85f17fdf5c0d1c29b7579ebc..91c0354f554edbf2fc68748a8fbf182cd8d93de5 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
@@ -452,10 +452,40 @@ public abstract class CraftEntity implements org.bukkit.entity.Entity {
@@ -454,10 +454,40 @@ public abstract class CraftEntity implements org.bukkit.entity.Entity {
public void setVelocity(Vector velocity) {
Preconditions.checkArgument(velocity != null, "velocity");
velocity.checkFinite();

Datei anzeigen

@ -16,10 +16,10 @@ The wanted destination was on top of the emerald block however the player ended
This only is the case if the player is teleporting between worlds.
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
index a4452324892c37c92e8e0c7cee1fdeda50e9d81b..60850848e76d656d7b4e885c79dfe992108c8ad5 100644
index d7177eb9c3cf65cacc90752215d591058b8106b8..af4e9891da2584c791ce85f5eb6315a06fcc77e8 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
@@ -1129,7 +1129,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
@@ -1131,7 +1131,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
if (fromWorld == toWorld) {
entity.connection.teleport(to);
} else {

Datei anzeigen

@ -88,7 +88,7 @@ index c6fb4c33d7ea52b88d8fc0d90748cbab7387c565..fed09b886f4fa0006d160e5f2abb00df
}
diff --git a/src/main/java/net/minecraft/world/level/Level.java b/src/main/java/net/minecraft/world/level/Level.java
index 1473664f94f228abd81b8c654d105b8a76cc49e9..65fd3a3c1f0a55d034e6f91c4f222e6454e7166c 100644
index a36da18ac1ea613f1a77ce2fbb70d5cb05563714..86fc83f6ea7bbf445edf097b6ab501a09ec18e2b 100644
--- a/src/main/java/net/minecraft/world/level/Level.java
+++ b/src/main/java/net/minecraft/world/level/Level.java
@@ -1,5 +1,10 @@
@ -102,7 +102,7 @@ index 1473664f94f228abd81b8c654d105b8a76cc49e9..65fd3a3c1f0a55d034e6f91c4f222e64
import com.google.common.collect.Lists;
import com.mojang.serialization.Codec;
import java.io.IOException;
@@ -705,6 +710,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
@@ -730,6 +735,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
// Paper start - Prevent tile entity and entity crashes
final String msg = String.format("Entity threw exception at %s:%s,%s,%s", entity.level.getWorld().getName(), entity.getX(), entity.getY(), entity.getZ());
MinecraftServer.LOGGER.error(msg, throwable);
@ -111,18 +111,18 @@ index 1473664f94f228abd81b8c654d105b8a76cc49e9..65fd3a3c1f0a55d034e6f91c4f222e64
// Paper end
}
diff --git a/src/main/java/net/minecraft/world/level/NaturalSpawner.java b/src/main/java/net/minecraft/world/level/NaturalSpawner.java
index 8f097817e38798b8e985bcbb9b8c9bdae24ed692..287ea1d056556e106a23987eb9f1b42e81ce6262 100644
index 0e4f6893a2fce69782c4246c52e03926fe2df26f..5c58031279c0b74d2061c802e60b7bed50f27156 100644
--- a/src/main/java/net/minecraft/world/level/NaturalSpawner.java
+++ b/src/main/java/net/minecraft/world/level/NaturalSpawner.java
@@ -290,6 +290,7 @@ public final class NaturalSpawner {
}
@@ -291,6 +291,7 @@ public final class NaturalSpawner {
NaturalSpawner.LOGGER.warn("Can't spawn entity of type: {}", BuiltInRegistries.ENTITY_TYPE.getKey(type));
} catch (Exception exception) {
NaturalSpawner.LOGGER.warn("Failed to create mob", exception);
+ com.destroystokyo.paper.exception.ServerInternalException.reportInternalException(exception); // Paper
return null;
}
}
@@ -402,6 +403,7 @@ public final class NaturalSpawner {
return null;
@@ -404,6 +405,7 @@ public final class NaturalSpawner {
entity = biomesettingsmobs_c.type.create(world.getLevel());
} catch (Exception exception) {
NaturalSpawner.LOGGER.warn("Failed to create mob", exception);
@ -131,7 +131,7 @@ index 8f097817e38798b8e985bcbb9b8c9bdae24ed692..287ea1d056556e106a23987eb9f1b42e
}
diff --git a/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java b/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java
index f9980a781f02e10c1c96deaa39cfecbf4deedff9..ea2176501dfa773a1114f5db4e6dbe4c2d2c7abe 100644
index d11a715dccaaf2a2faeef8af9ff6e5f1914416cb..b78e89eed44a06bb8c7a8a62e561574d4dc4b2de 100644
--- a/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java
+++ b/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java
@@ -1,6 +1,7 @@
@ -163,7 +163,7 @@ index f9980a781f02e10c1c96deaa39cfecbf4deedff9..ea2176501dfa773a1114f5db4e6dbe4c
// CraftBukkit end
}
}
@@ -1189,6 +1196,7 @@ public class LevelChunk extends ChunkAccess {
@@ -1187,6 +1194,7 @@ public class LevelChunk extends ChunkAccess {
// Paper start - Prevent tile entity and entity crashes
final String msg = String.format("BlockEntity threw exception at %s:%s,%s,%s", LevelChunk.this.getLevel().getWorld().getName(), this.getPos().getX(), this.getPos().getY(), this.getPos().getZ());
net.minecraft.server.MinecraftServer.LOGGER.error(msg, throwable);
@ -191,18 +191,6 @@ index e68205fe7169c7c5b7c6fdada2ee97d86107ca97..aa8972fd1a1fade05d60ab69efb8ff24
if (filechannel != null) {
try {
filechannel.close();
diff --git a/src/main/java/net/minecraft/world/level/storage/DimensionDataStorage.java b/src/main/java/net/minecraft/world/level/storage/DimensionDataStorage.java
index 90061d0b2363a31eaea760c09243e5d35154665c..2513069f4ffe594857762ef51f1b9a078b8b1d17 100644
--- a/src/main/java/net/minecraft/world/level/storage/DimensionDataStorage.java
+++ b/src/main/java/net/minecraft/world/level/storage/DimensionDataStorage.java
@@ -120,6 +120,7 @@ public class DimensionDataStorage {
pushbackInputStream.close();
} catch (Throwable var15) {
+ com.destroystokyo.paper.exception.ServerInternalException.reportInternalException(var15); // Paper
try {
fileInputStream.close();
} catch (Throwable var10) {
diff --git a/src/main/java/org/bukkit/craftbukkit/scheduler/CraftScheduler.java b/src/main/java/org/bukkit/craftbukkit/scheduler/CraftScheduler.java
index 07c4d9cd5081378e1b903518f7174fca959cd9e3..dfc2789009fcaa08baa8054bdac915590b8701d6 100644
--- a/src/main/java/org/bukkit/craftbukkit/scheduler/CraftScheduler.java

Datei anzeigen

@ -11,10 +11,10 @@ So avoid looking up scoreboards and short circuit to the "not on a team"
logic which is most likely to be true.
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
index dc29c677e21a71b5ba1a48c7aea8acadc2689c77..70275d1db39c9809a5fc93cebb49beb32d616476 100644
index 575ce3bb03c7eef215e71d238a46aa1cc8510f89..98067f625b49d93fdd91af5114790848a2228ac0 100644
--- a/src/main/java/net/minecraft/world/entity/Entity.java
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
@@ -2641,6 +2641,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
@@ -2660,6 +2660,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
@Nullable
public Team getTeam() {
@ -23,10 +23,10 @@ index dc29c677e21a71b5ba1a48c7aea8acadc2689c77..70275d1db39c9809a5fc93cebb49beb3
}
diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java
index 1738512d977f60c4021c01a5fce642f62d7e4c74..17426b43a16887653a63c34128aa97785a23796c 100644
index 7e4f95e04a880ecb459228c90be462cbbec14620..eec1467eaaadaa66febc06e51372c5f602216fb5 100644
--- a/src/main/java/net/minecraft/world/entity/LivingEntity.java
+++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java
@@ -823,6 +823,7 @@ public abstract class LivingEntity extends Entity {
@@ -822,6 +822,7 @@ public abstract class LivingEntity extends Entity {
if (nbt.contains("Team", 8)) {
String s = nbt.getString("Team");
PlayerTeam scoreboardteam = this.level.getScoreboard().getPlayerTeam(s);

Datei anzeigen

@ -19,7 +19,7 @@ index aa8972fd1a1fade05d60ab69efb8ff24f344508a..ddcc212ba83d9365adb842b3d3ced64e
}
}
diff --git a/src/main/java/net/minecraft/world/level/chunk/storage/RegionFileStorage.java b/src/main/java/net/minecraft/world/level/chunk/storage/RegionFileStorage.java
index 45cec71b3b2f9444d7be7e5bf9fab166b28ea34d..ece0fd4b51d124be232e24d08f115b9267cb21cb 100644
index 18ef7025f7f4dc2a4aff85ca65ff5a2d35a1ef06..64e957650dafc9fc30fa997e7f7d3fd47cf60089 100644
--- a/src/main/java/net/minecraft/world/level/chunk/storage/RegionFileStorage.java
+++ b/src/main/java/net/minecraft/world/level/chunk/storage/RegionFileStorage.java
@@ -167,6 +167,7 @@ public class RegionFileStorage implements AutoCloseable {

Datei anzeigen

@ -5,10 +5,10 @@ Subject: [PATCH] Complete resource pack API
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
index 2be965faaed8ca25fc01d6ca1f496f7e41e6b7a0..5443c0008ae3bb0264dbfc1b2bb3921de306c1dd 100644
index 580f126ad3681306bfff24c1e19dab39a6d4e888..8f21a18d2ba6e9fc1c8d3076ca668c885a9ba19e 100644
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
@@ -1768,8 +1768,11 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
@@ -1764,8 +1764,11 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
ServerGamePacketListenerImpl.LOGGER.info("Disconnecting {} due to resource pack rejection", this.player.getName());
this.disconnect(Component.translatable("multiplayer.requiredTexturePrompt.disconnect"));
}
@ -23,10 +23,10 @@ index 2be965faaed8ca25fc01d6ca1f496f7e41e6b7a0..5443c0008ae3bb0264dbfc1b2bb3921d
@Override
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
index 60850848e76d656d7b4e885c79dfe992108c8ad5..15257f9236d0c32c1c74a15ce4e7decf4d9f2f91 100644
index af4e9891da2584c791ce85f5eb6315a06fcc77e8..921c00c2a5e7d3487c35ee27714ae6bb6666f86f 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
@@ -150,6 +150,7 @@ import org.bukkit.plugin.Plugin;
@@ -152,6 +152,7 @@ import org.bukkit.plugin.Plugin;
import org.bukkit.plugin.messaging.StandardMessenger;
import org.bukkit.profile.PlayerProfile;
import org.bukkit.scoreboard.Scoreboard;
@ -34,7 +34,7 @@ index 60850848e76d656d7b4e885c79dfe992108c8ad5..15257f9236d0c32c1c74a15ce4e7decf
import net.md_5.bungee.api.chat.BaseComponent; // Spigot
@@ -168,6 +169,10 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
@@ -170,6 +171,10 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
private double healthScale = 20;
private CraftWorldBorder clientWorldBorder = null;
private BorderChangeListener clientWorldBorderListener = this.createWorldBorderListener();
@ -45,7 +45,7 @@ index 60850848e76d656d7b4e885c79dfe992108c8ad5..15257f9236d0c32c1c74a15ce4e7decf
public CraftPlayer(CraftServer server, ServerPlayer entity) {
super(server, entity);
@@ -2206,6 +2211,45 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
@@ -2208,6 +2213,45 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
public boolean getAffectsSpawning() {
return this.getHandle().affectsSpawning;
}

Datei anzeigen

@ -16,10 +16,10 @@ modify that. Under the previous logic, plugins were unable (cleanly) override pe
A config option has been added for those who depend on the previous behavior, but I don't expect that.
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
index b8763c6f938319d4712222ecab3ebc132071597b..4d9a5297e53b1836e3ba438bae6b869f3822dd28 100644
index 37c1e4b31c06b9bf48325a7d5f293020b00445b1..f2e27681e095439ff0df027ec16796a464e34239 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
@@ -462,6 +462,7 @@ public final class CraftServer implements Server {
@@ -475,6 +475,7 @@ public final class CraftServer implements Server {
if (type == PluginLoadOrder.STARTUP) {
this.helpMap.clear();
this.helpMap.initializeGeneralTopics();
@ -27,7 +27,7 @@ index b8763c6f938319d4712222ecab3ebc132071597b..4d9a5297e53b1836e3ba438bae6b869f
}
Plugin[] plugins = this.pluginManager.getPlugins();
@@ -481,7 +482,7 @@ public final class CraftServer implements Server {
@@ -494,7 +495,7 @@ public final class CraftServer implements Server {
this.commandMap.registerServerAliases();
DefaultPermissions.registerCorePermissions();
CraftDefaultPermissions.registerCorePermissions();

Datei anzeigen

@ -6,10 +6,10 @@ Subject: [PATCH] Allow Reloading of Custom Permissions
https://github.com/PaperMC/Paper/issues/49
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
index 4d9a5297e53b1836e3ba438bae6b869f3822dd28..25373b05ab63e71294382c4b2a5b2658f98710a0 100644
index f2e27681e095439ff0df027ec16796a464e34239..c056df734deb0f9ad2e102075e941a7fdcd78195 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
@@ -2537,5 +2537,23 @@ public final class CraftServer implements Server {
@@ -2561,5 +2561,23 @@ public final class CraftServer implements Server {
}
return this.adventure$audiences;
}

Datei anzeigen

@ -7,10 +7,10 @@ Metadata is not meant to persist reload as things break badly with non primitive
This will remove metadata on reload so it does not crash everything if a plugin uses it.
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
index 25373b05ab63e71294382c4b2a5b2658f98710a0..943971ce16c0c39085f029ab5b57685dda1c6b0f 100644
index c056df734deb0f9ad2e102075e941a7fdcd78195..0b8f2a747b0e869dfd62ef463261941988d8dd16 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
@@ -950,8 +950,16 @@ public final class CraftServer implements Server {
@@ -963,8 +963,16 @@ public final class CraftServer implements Server {
world.spigotConfig.init(); // Spigot
}

Datei anzeigen

@ -18,10 +18,10 @@ For consistency, the old API methods now forward to use the
ItemMeta API equivalents, and should deprecate the old API's.
diff --git a/src/main/java/net/minecraft/world/item/ItemStack.java b/src/main/java/net/minecraft/world/item/ItemStack.java
index 1b83577ec8e78e20051f20a336e5cf3e7836c079..28a8ad5f42a5ba2e2a9d4c9a04a7add621b28e82 100644
index f53d8bb8078109f6ff89121261be46f1cccb2860..6ca9a5cf426befde4882d78df5fd8202b73ddbeb 100644
--- a/src/main/java/net/minecraft/world/item/ItemStack.java
+++ b/src/main/java/net/minecraft/world/item/ItemStack.java
@@ -151,6 +151,23 @@ public final class ItemStack {
@@ -155,6 +155,23 @@ public final class ItemStack {
return this.getItem().getTooltipImage(this);
}
@ -45,7 +45,7 @@ index 1b83577ec8e78e20051f20a336e5cf3e7836c079..28a8ad5f42a5ba2e2a9d4c9a04a7add6
public ItemStack(ItemLike item) {
this(item, 1);
}
@@ -202,6 +219,7 @@ public final class ItemStack {
@@ -206,6 +223,7 @@ public final class ItemStack {
// CraftBukkit start - make defensive copy as this data may be coming from the save thread
this.tag = nbttagcompound.getCompound("tag").copy();
// CraftBukkit end
@ -53,7 +53,7 @@ index 1b83577ec8e78e20051f20a336e5cf3e7836c079..28a8ad5f42a5ba2e2a9d4c9a04a7add6
this.getItem().verifyTagAfterLoad(this.tag);
}
@@ -772,6 +790,7 @@ public final class ItemStack {
@@ -779,6 +797,7 @@ public final class ItemStack {
public void setTag(@Nullable CompoundTag nbt) {
this.tag = nbt;
@ -61,7 +61,7 @@ index 1b83577ec8e78e20051f20a336e5cf3e7836c079..28a8ad5f42a5ba2e2a9d4c9a04a7add6
if (this.getItem().canBeDepleted()) {
this.setDamageValue(this.getDamageValue());
}
@@ -1061,6 +1080,7 @@ public final class ItemStack {
@@ -1072,6 +1091,7 @@ public final class ItemStack {
ListTag nbttaglist = this.tag.getList("Enchantments", 10);
nbttaglist.add(EnchantmentHelper.storeEnchantment(EnchantmentHelper.getEnchantmentId(enchantment), (byte) level));
@ -70,7 +70,7 @@ index 1b83577ec8e78e20051f20a336e5cf3e7836c079..28a8ad5f42a5ba2e2a9d4c9a04a7add6
public boolean isEnchanted() {
diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java
index 4b79b96579efbc4dd9a10e7183ed08b73b488794..c9093275d2b78b6e2f59e64efab0b4775ff0b43b 100644
index 416b6b3d78dec5a25a4ddb329552d03d1da183dd..be2e114ed21344c9336b920238d0ee575b8d342b 100644
--- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java
+++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java
@@ -6,7 +6,6 @@ import java.util.Map;