PaperMC/nms-patches/DefinedStructure.patch

48 lines
2.1 KiB
Diff
Raw Normal View History

2019-04-23 04:00:00 +02:00
--- a/net/minecraft/server/DefinedStructure.java
+++ b/net/minecraft/server/DefinedStructure.java
2020-06-25 02:00:00 +02:00
@@ -98,7 +98,7 @@
}
private static List<DefinedStructure.BlockInfo> a(List<DefinedStructure.BlockInfo> list, List<DefinedStructure.BlockInfo> list1, List<DefinedStructure.BlockInfo> list2) {
- Comparator<DefinedStructure.BlockInfo> comparator = Comparator.comparingInt((definedstructure_blockinfo) -> {
+ Comparator<DefinedStructure.BlockInfo> comparator = Comparator.<DefinedStructure.BlockInfo>comparingInt((definedstructure_blockinfo) -> { // CraftBukkit - decompile error
return definedstructure_blockinfo.a.getY();
}).thenComparingInt((definedstructure_blockinfo) -> {
return definedstructure_blockinfo.a.getX();
@@ -118,7 +118,7 @@
2019-04-23 04:00:00 +02:00
}
private void a(World world, BlockPosition blockposition, BlockPosition blockposition1) {
- List<Entity> list = world.a(Entity.class, new AxisAlignedBB(blockposition, blockposition1), (entity) -> {
+ List<Entity> list = world.a(Entity.class, new AxisAlignedBB(blockposition, blockposition1), (java.util.function.Predicate) (entity) -> { // CraftBukkit - decompile error
return !(entity instanceof EntityHuman);
});
2020-06-25 02:00:00 +02:00
@@ -430,11 +430,13 @@
2019-04-23 04:00:00 +02:00
}
private static Optional<Entity> a(GeneratorAccess generatoraccess, NBTTagCompound nbttagcompound) {
- try {
+ // CraftBukkit start
+ // try {
return EntityTypes.a(nbttagcompound, generatoraccess.getMinecraftWorld());
- } catch (Exception exception) {
- return Optional.empty();
- }
+ // } catch (Exception exception) {
+ // return Optional.empty();
+ // }
+ // CraftBukkit end
}
public BlockPosition a(EnumBlockRotation enumblockrotation) {
2020-06-25 02:00:00 +02:00
@@ -869,7 +871,7 @@
2019-04-23 04:00:00 +02:00
public IBlockData a(int i) {
IBlockData iblockdata = (IBlockData) this.b.fromId(i);
2020-06-25 02:00:00 +02:00
- return iblockdata == null ? DefinedStructure.b.a : iblockdata;
2019-04-23 04:00:00 +02:00
+ return iblockdata == null ? a : iblockdata; // CraftBukkit - decompile error
}
public Iterator<IBlockData> iterator() {