3
0
Mirror von https://github.com/PaperMC/Paper.git synchronisiert 2024-12-23 23:00:08 +01:00
Paper/nms-patches/DefinedStructure.patch
2020-06-25 10:00:00 +10:00

48 Zeilen
2.1 KiB
Diff

--- a/net/minecraft/server/DefinedStructure.java
+++ b/net/minecraft/server/DefinedStructure.java
@@ -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 @@
}
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);
});
@@ -430,11 +430,13 @@
}
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) {
@@ -869,7 +871,7 @@
public IBlockData a(int i) {
IBlockData iblockdata = (IBlockData) this.b.fromId(i);
- return iblockdata == null ? DefinedStructure.b.a : iblockdata;
+ return iblockdata == null ? a : iblockdata; // CraftBukkit - decompile error
}
public Iterator<IBlockData> iterator() {