mirror of
https://github.com/PaperMC/Paper.git
synced 2024-10-30 07:19:58 +01:00
117 lines
6.4 KiB
Diff
117 lines
6.4 KiB
Diff
From 1b41bf7f810b3bd6c90db0a7c4ee15776bc6f832 Mon Sep 17 00:00:00 2001
|
|
From: Aikar <aikar@aikar.co>
|
|
Date: Wed, 30 Mar 2016 19:36:20 -0400
|
|
Subject: [PATCH] MC Dev fixes
|
|
|
|
|
|
diff --git a/src/main/java/com/destroystokyo/paper/PaperCommand.java b/src/main/java/com/destroystokyo/paper/PaperCommand.java
|
|
index e8f7b7292..a0ebc1eaa 100644
|
|
--- a/src/main/java/com/destroystokyo/paper/PaperCommand.java
|
|
+++ b/src/main/java/com/destroystokyo/paper/PaperCommand.java
|
|
@@ -234,4 +234,5 @@ public class PaperCommand extends Command {
|
|
|
|
Command.broadcastCommandMessage(sender, ChatColor.GREEN + "Paper config reload complete.");
|
|
}
|
|
+
|
|
}
|
|
diff --git a/src/main/java/net/minecraft/server/BlockPosition.java b/src/main/java/net/minecraft/server/BlockPosition.java
|
|
index 002da2a19..121a137f3 100644
|
|
--- a/src/main/java/net/minecraft/server/BlockPosition.java
|
|
+++ b/src/main/java/net/minecraft/server/BlockPosition.java
|
|
@@ -150,7 +150,7 @@ public class BlockPosition extends BaseBlockPosition {
|
|
return a(Math.min(blockposition.getX(), blockposition1.getX()), Math.min(blockposition.getY(), blockposition1.getY()), Math.min(blockposition.getZ(), blockposition1.getZ()), Math.max(blockposition.getX(), blockposition1.getX()), Math.max(blockposition.getY(), blockposition1.getY()), Math.max(blockposition.getZ(), blockposition1.getZ()));
|
|
}
|
|
|
|
- public static Iterable<BlockPosition> a(int i, int j, int k, int l, int i1, int j1) {
|
|
+ public static Iterable<BlockPosition> a(int x0, int y0, int z0, int l, int i1, int j1) {
|
|
return () -> {
|
|
return new AbstractIterator() {
|
|
private boolean g = true;
|
|
@@ -161,21 +161,21 @@ public class BlockPosition extends BaseBlockPosition {
|
|
protected BlockPosition a() {
|
|
if (this.g) {
|
|
this.g = false;
|
|
- this.h = i;
|
|
- this.i = j;
|
|
- this.j = k;
|
|
- return new BlockPosition(i, j, k);
|
|
+ this.h = x0;
|
|
+ this.i = y0;
|
|
+ this.j = z0;
|
|
+ return new BlockPosition(x0, y0, z0);
|
|
} else if (this.h == l && this.i == i1 && this.j == j1) {
|
|
return (BlockPosition) this.endOfData();
|
|
} else {
|
|
if (this.h < l) {
|
|
++this.h;
|
|
} else if (this.i < i1) {
|
|
- this.h = i;
|
|
+ this.h = x0;
|
|
++this.i;
|
|
} else if (this.j < j1) {
|
|
- this.h = i;
|
|
- this.i = j;
|
|
+ this.h = x0;
|
|
+ this.i = y0;
|
|
++this.j;
|
|
}
|
|
|
|
diff --git a/src/main/java/net/minecraft/server/DefinedStructure.java b/src/main/java/net/minecraft/server/DefinedStructure.java
|
|
index 65910508f..15c7cc170 100644
|
|
--- a/src/main/java/net/minecraft/server/DefinedStructure.java
|
|
+++ b/src/main/java/net/minecraft/server/DefinedStructure.java
|
|
@@ -88,7 +88,7 @@ public class DefinedStructure {
|
|
}
|
|
|
|
private void a(World world, BlockPosition blockposition, BlockPosition blockposition1) {
|
|
- List list = world.a(Entity.class, new AxisAlignedBB(blockposition, blockposition1), (entity) -> {
|
|
+ List list = world.a(Entity.class, new AxisAlignedBB(blockposition, blockposition1),(Predicate<? super Entity>) (entity) -> { // Paper - decompile fix
|
|
return !(entity instanceof EntityHuman);
|
|
});
|
|
|
|
@@ -285,21 +285,24 @@ public class DefinedStructure {
|
|
voxelshapebitset.a(blockposition3.getX() - i2, blockposition3.getY() - j2, blockposition3.getZ() - l1, true, true);
|
|
}
|
|
|
|
- voxelshapebitset.a((enumdirection, i, j, k) -> {
|
|
- BlockPosition blockposition = new BlockPosition(l + i, i1 + j, j1 + k);
|
|
- BlockPosition blockposition1 = blockposition.shift(enumdirection);
|
|
- IBlockData iblockdata = generatoraccess.getType(blockposition);
|
|
+ // Paper start - decompile fixes
|
|
+ int finalL = l1;
|
|
+ voxelshapebitset.a((enumdirection, i_, j_, k_) -> {
|
|
+ BlockPosition innerBlockposition = new BlockPosition(i2 + i_, j2 + j_, finalL + k_);
|
|
+ BlockPosition blockposition1 = innerBlockposition.shift(enumdirection);
|
|
+ IBlockData iblockdata = generatoraccess.getType(innerBlockposition);
|
|
IBlockData iblockdata1 = generatoraccess.getType(blockposition1);
|
|
- IBlockData iblockdata2 = iblockdata.updateState(enumdirection, iblockdata1, generatoraccess, blockposition, blockposition1);
|
|
+ IBlockData iblockdata2 = iblockdata.updateState(enumdirection, iblockdata1, generatoraccess, innerBlockposition, blockposition1);
|
|
|
|
if (iblockdata != iblockdata2) {
|
|
- generatoraccess.setTypeAndData(blockposition, iblockdata2, k1 & -2 | 16);
|
|
+ generatoraccess.setTypeAndData(innerBlockposition, iblockdata2, i & -2 | 16);
|
|
}
|
|
|
|
- IBlockData iblockdata3 = iblockdata1.updateState(enumdirection.opposite(), iblockdata2, generatoraccess, blockposition1, blockposition);
|
|
+ IBlockData iblockdata3 = iblockdata1.updateState(enumdirection.opposite(), iblockdata2, generatoraccess, blockposition1, innerBlockposition);
|
|
|
|
if (iblockdata1 != iblockdata3) {
|
|
- generatoraccess.setTypeAndData(blockposition1, iblockdata3, k1 & -2 | 16);
|
|
+ generatoraccess.setTypeAndData(blockposition1, iblockdata3, i & -2 | 16);
|
|
+ // Paper end - decompile fixes
|
|
}
|
|
|
|
});
|
|
@@ -734,7 +737,7 @@ public class DefinedStructure {
|
|
public IBlockData a(int i) {
|
|
IBlockData iblockdata = (IBlockData) this.b.fromId(i);
|
|
|
|
- return iblockdata == null ? DefinedStructure.a.a : iblockdata;
|
|
+ return iblockdata == null ? a : iblockdata; // Paper - decompile error - Blocks.AIR.getBlockData()
|
|
}
|
|
|
|
public Iterator<IBlockData> iterator() {
|
|
--
|
|
2.17.1
|
|
|