It compiles

This commit is contained in:
Spottedleaf
2019-05-06 12:30:27 -07:00
parent 1fa1246a1e
commit b64ce880b7
36 changed files with 225 additions and 79 deletions

View File

@@ -19,7 +19,7 @@ Aside from making the obvious class/function renames and obfhelpers I didn't nee
Just added Bukkit's event system and took a few liberties with dead code and comment misspellings.
diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
index ad793ffa3..ef882b897 100644
index ad793ffa38..ef882b897f 100644
--- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
+++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
@@ -0,0 +0,0 @@ public class PaperWorldConfig {
@@ -39,7 +39,7 @@ index ad793ffa3..ef882b897 100644
}
diff --git a/src/main/java/com/destroystokyo/paper/util/RedstoneWireTurbo.java b/src/main/java/com/destroystokyo/paper/util/RedstoneWireTurbo.java
new file mode 100644
index 000000000..21d9d6d7e
index 0000000000..cf5661f1c5
--- /dev/null
+++ b/src/main/java/com/destroystokyo/paper/util/RedstoneWireTurbo.java
@@ -0,0 +0,0 @@
@@ -58,6 +58,8 @@ index 000000000..21d9d6d7e
+import net.minecraft.server.BlockPosition;
+import net.minecraft.server.BlockRedstoneWire;
+import net.minecraft.server.IBlockData;
+import net.minecraft.server.Items;
+import net.minecraft.server.ItemStack;
+import net.minecraft.server.World;
+
+/**
@@ -365,7 +367,7 @@ index 000000000..21d9d6d7e
+ // be replicated here.
+ if (!wire.canPlace(null, worldIn, pos)) {
+ // Pop off the redstone dust
+ oldState.dropNaturally(worldIn, pos, 0);
+ Block.a(worldIn, pos, new ItemStack(Items.REDSTONE)); // TODO
+ worldIn.setAir(pos);
+
+ // Mark this position as not being redstone wire
@@ -888,7 +890,7 @@ index 000000000..21d9d6d7e
+ // position directly above the node being calculated is always
+ // at index 1.
+ UpdateNode center_up = upd.neighbor_nodes[1];
+ boolean center_up_is_cube = center_up.currentState.isOccluding();
+ boolean center_up_is_cube = center_up.currentState.isOccluding(worldIn, center_up.self); // TODO
+
+ for (int m = 0; m < 4; m++) {
+ // Get the neighbor array index of each of the four cardinal
@@ -902,7 +904,7 @@ index 000000000..21d9d6d7e
+
+ // Also check the positions above and below the cardinal
+ // neighbors
+ boolean neighbor_is_cube = neighbor.currentState.isOccluding();
+ boolean neighbor_is_cube = neighbor.currentState.isOccluding(worldIn, neighbor.self); // TODO
+ if (!neighbor_is_cube) {
+ UpdateNode neighbor_down = upd.neighbor_nodes[rs_neighbors_dn[m]];
+ l = getMaxCurrentStrength(neighbor_down, l);
@@ -954,7 +956,7 @@ index 000000000..21d9d6d7e
+ }
+}
diff --git a/src/main/java/net/minecraft/server/BlockRedstoneWire.java b/src/main/java/net/minecraft/server/BlockRedstoneWire.java
index da903f74b..aa35e0d06 100644
index da903f74b6..aa35e0d061 100644
--- a/src/main/java/net/minecraft/server/BlockRedstoneWire.java
+++ b/src/main/java/net/minecraft/server/BlockRedstoneWire.java
@@ -0,0 +0,0 @@
@@ -1122,7 +1124,7 @@ index da903f74b..aa35e0d06 100644
c(iblockdata, world, blockposition);
world.a(blockposition, false);
diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java
index 136727c28..326165468 100644
index 2278c7c4ab..4531adc268 100644
--- a/src/main/java/net/minecraft/server/World.java
+++ b/src/main/java/net/minecraft/server/World.java
@@ -0,0 +0,0 @@ public abstract class World implements IIBlockAccess, GeneratorAccess, AutoClose