mirror of
https://github.com/PaperMC/Paper.git
synced 2024-12-01 20:50:41 +01:00
fix some failing tests
This commit is contained in:
parent
9d428792c4
commit
59060aaec3
2 changed files with 14 additions and 4 deletions
|
@ -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) {
|
||||
|
|
|
@ -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
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue