mirror of
https://github.com/PaperMC/Paper.git
synced 2025-07-31 20:22:05 -07:00
Fix tests
This commit is contained in:
@@ -0,0 +1,11 @@
|
||||
--- a/net/minecraft/gametest/framework/GameTestInfo.java
|
||||
+++ b/net/minecraft/gametest/framework/GameTestInfo.java
|
||||
@@ -241,7 +_,7 @@
|
||||
AABB structureBounds = this.getStructureBounds();
|
||||
List<Entity> entitiesOfClass = this.getLevel()
|
||||
.getEntitiesOfClass(Entity.class, structureBounds.inflate(1.0), entity -> !(entity instanceof Player));
|
||||
- entitiesOfClass.forEach(entity -> entity.remove(Entity.RemovalReason.DISCARDED));
|
||||
+ entitiesOfClass.forEach(entity -> entity.remove(Entity.RemovalReason.DISCARDED, org.bukkit.event.entity.EntityRemoveEvent.Cause.DISCARD)); // Paper
|
||||
}
|
||||
}
|
||||
|
@@ -0,0 +1,11 @@
|
||||
--- a/net/minecraft/gametest/framework/StructureUtils.java
|
||||
+++ b/net/minecraft/gametest/framework/StructureUtils.java
|
||||
@@ -187,7 +_,7 @@
|
||||
level.clearBlockEvents(boundingBox1);
|
||||
AABB aabb = AABB.of(boundingBox1);
|
||||
List<Entity> entitiesOfClass = level.getEntitiesOfClass(Entity.class, aabb, entity -> !(entity instanceof Player));
|
||||
- entitiesOfClass.forEach(Entity::discard);
|
||||
+ entitiesOfClass.forEach(entity -> entity.discard(org.bukkit.event.entity.EntityRemoveEvent.Cause.DISCARD)); // Paper
|
||||
}
|
||||
|
||||
public static BlockPos getTransformedFarCorner(BlockPos pos, Vec3i offset, Rotation rotation) {
|
@@ -0,0 +1,11 @@
|
||||
--- a/net/minecraft/gametest/framework/TestCommand.java
|
||||
+++ b/net/minecraft/gametest/framework/TestCommand.java
|
||||
@@ -278,7 +_,7 @@
|
||||
}
|
||||
|
||||
private static int resetGameTestInfo(GameTestInfo gameTestInfo) {
|
||||
- gameTestInfo.getLevel().getEntities(null, gameTestInfo.getStructureBounds()).stream().forEach(entity -> entity.remove(Entity.RemovalReason.DISCARDED));
|
||||
+ gameTestInfo.getLevel().getEntities(null, gameTestInfo.getStructureBounds()).stream().forEach(entity -> entity.remove(Entity.RemovalReason.DISCARDED, org.bukkit.event.entity.EntityRemoveEvent.Cause.DISCARD)); // Paper
|
||||
gameTestInfo.getStructureBlockEntity().placeStructure(gameTestInfo.getLevel());
|
||||
StructureUtils.removeBarriers(gameTestInfo.getStructureBounds(), gameTestInfo.getLevel());
|
||||
say(gameTestInfo.getLevel(), "Reset succeded for: " + gameTestInfo.getTestName(), ChatFormatting.GREEN);
|
Reference in New Issue
Block a user