aboutsummaryrefslogtreecommitdiffhomepage
path: root/patches
diff options
context:
space:
mode:
authorJake Potrebic <[email protected]>2023-06-08 17:25:21 -0700
committerJake Potrebic <[email protected]>2023-06-08 17:26:05 -0700
commit59060aaec3c134036ff6975a8f1df7d7a5b09d0c (patch)
tree5163d3989785babe8a16e934b4d4d76be15b8414 /patches
parent9d428792c4982e08a63fc8ccbc04d9b06afd994c (diff)
downloadPaper-59060aaec3c134036ff6975a8f1df7d7a5b09d0c.tar.gz
Paper-59060aaec3c134036ff6975a8f1df7d7a5b09d0c.zip
fix some failing tests
Diffstat (limited to 'patches')
-rw-r--r--patches/server/0539-Add-StructuresLocateEvent.patch4
-rw-r--r--patches/server/0728-Fix-upstreams-block-state-factories.patch14
2 files changed, 14 insertions, 4 deletions
diff --git a/patches/server/0539-Add-StructuresLocateEvent.patch b/patches/server/0539-Add-StructuresLocateEvent.patch
index f7bb5440db..6486f1c83a 100644
--- a/patches/server/0539-Add-StructuresLocateEvent.patch
+++ b/patches/server/0539-Add-StructuresLocateEvent.patch
@@ -93,7 +93,7 @@ index 8e1a6206eafdf4160aef280710f0912a0664536f..15abd319ac51a97cdb07da85e815ea93
}
diff --git a/src/test/java/io/papermc/paper/world/structure/ConfiguredStructureTest.java b/src/test/java/io/papermc/paper/world/structure/ConfiguredStructureTest.java
new file mode 100644
-index 0000000000000000000000000000000000000000..0d5306abdc72f139acdf3038ec155f853e371e7f
+index 0000000000000000000000000000000000000000..102b99691b53f5e3c14999d3c281b0301b9665d5
--- /dev/null
+++ b/src/test/java/io/papermc/paper/world/structure/ConfiguredStructureTest.java
@@ -0,0 +1,96 @@
@@ -159,7 +159,7 @@ index 0000000000000000000000000000000000000000..0d5306abdc72f139acdf3038ec155f85
+ for (Structure feature : structureRegistry) {
+ final ResourceLocation key = structureRegistry.getKey(feature);
+ assertNotNull("Missing built-in registry key", key);
-+ if (key.equals(BuiltinStructures.ANCIENT_CITY.location())) {
++ if (key.equals(BuiltinStructures.ANCIENT_CITY.location()) || key.equals(BuiltinStructures.TRAIL_RUINS.location())) {
+ continue; // TODO remove when upstream adds "jigsaw" StructureType
+ }
+ if (DEFAULT_CONFIGURED_STRUCTURES.get(CraftNamespacedKey.fromMinecraft(key)) == null) {
diff --git a/patches/server/0728-Fix-upstreams-block-state-factories.patch b/patches/server/0728-Fix-upstreams-block-state-factories.patch
index 368a1b54ee..4085b1a658 100644
--- a/patches/server/0728-Fix-upstreams-block-state-factories.patch
+++ b/patches/server/0728-Fix-upstreams-block-state-factories.patch
@@ -399,18 +399,28 @@ index 17e1131c79ad140c0803a914621ce7924f0f2a6d..dc8e173ff40c164bf6149db4caedf0ee
return factory.createBlockState(world, blockPosition, blockData, tileEntity);
}
diff --git a/src/test/java/org/bukkit/craftbukkit/block/BlockStateTest.java b/src/test/java/org/bukkit/craftbukkit/block/BlockStateTest.java
-index a6dbd1919bce5b5092666372f4cc31d2e2190c42..04710abbfb50eaa6e3e4d96fca5f0355f940a452 100644
+index a6dbd1919bce5b5092666372f4cc31d2e2190c42..3cdc3bdba201afb45b7121c0792d585194c90a14 100644
--- a/src/test/java/org/bukkit/craftbukkit/block/BlockStateTest.java
+++ b/src/test/java/org/bukkit/craftbukkit/block/BlockStateTest.java
-@@ -45,4 +45,11 @@ public class BlockStateTest extends AbstractTestingBase {
+@@ -10,6 +10,7 @@ import net.minecraft.core.registries.BuiltInRegistries;
+ 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 org.bukkit.Material;
+ import org.bukkit.craftbukkit.util.CraftMagicNumbers;
+ import org.bukkit.support.AbstractTestingBase;
+@@ -45,4 +46,13 @@ public class BlockStateTest extends AbstractTestingBase {
}
}
}
+
++ // Paper start
+ @Test
+ public void testBlockEntityTypes() {
+ for (var blockEntityType : BuiltInRegistries.BLOCK_ENTITY_TYPE) {
+ org.junit.Assert.assertNotNull(CraftBlockStates.getBlockStateType(blockEntityType));
+ }
+ }
++ // Paper end
}