NOT FINISHED! 1.13 pre-7 - Holy moley, more patches!
Really, don't touch! may harm your cat!
This commit is contained in:
@@ -5,7 +5,7 @@ Subject: [PATCH] Call PortalCreateEvent for exit portals
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/PortalTravelAgent.java b/src/main/java/net/minecraft/server/PortalTravelAgent.java
|
||||
index f49729796..42e4b2d01 100644
|
||||
index 402d8d7d6..f36373450 100644
|
||||
--- a/src/main/java/net/minecraft/server/PortalTravelAgent.java
|
||||
+++ b/src/main/java/net/minecraft/server/PortalTravelAgent.java
|
||||
@@ -0,0 +0,0 @@ package net.minecraft.server;
|
||||
@@ -26,6 +26,13 @@ index f49729796..42e4b2d01 100644
|
||||
import org.bukkit.util.Vector;
|
||||
// CraftBukkit end
|
||||
|
||||
public class PortalTravelAgent {
|
||||
|
||||
- private static final BlockPortal a = (BlockPortal) Blocks.NETHER_PORTAL;
|
||||
+ private static final BlockPortal a = (BlockPortal) Blocks.NETHER_PORTAL; private static final BlockPortal PORTAL_BLOCK = a; // Paper - OBFHELPER
|
||||
public final WorldServer world; // Paper - private -> public
|
||||
private final Random c;
|
||||
private final Long2ObjectMap<PortalTravelAgent.ChunkCoordinatesPortal> d = new Long2ObjectOpenHashMap(4096);
|
||||
@@ -0,0 +0,0 @@ public class PortalTravelAgent {
|
||||
byte b0 = 1;
|
||||
byte b1 = 0;
|
||||
@@ -68,13 +75,14 @@ index f49729796..42e4b2d01 100644
|
||||
+ Map<BlockPosition, IBlockData> nmsBlocks = new HashMap<>(); // Paper
|
||||
+
|
||||
if (d0 < 0.0D) {
|
||||
i1 = MathHelper.clamp(i1, 70, this.world.ab() - 10);
|
||||
i1 = MathHelper.clamp(i1, 70, this.world.aa() - 10);
|
||||
j5 = i1;
|
||||
@@ -0,0 +0,0 @@ public class PortalTravelAgent {
|
||||
l3 = j2 + (l2 - 1) * l5 - k2 * k5;
|
||||
boolean flag1 = i3 < 0;
|
||||
|
||||
- this.world.setTypeUpdate(new BlockPosition(j3, k3, l3), flag1 ? Blocks.OBSIDIAN.getBlockData() : Blocks.AIR.getBlockData());
|
||||
- blockposition_mutableblockposition.c(j3, k3, l3);
|
||||
- this.world.setTypeUpdate(blockposition_mutableblockposition, flag1 ? Blocks.OBSIDIAN.getBlockData() : Blocks.AIR.getBlockData());
|
||||
+ // Paper start
|
||||
+ BlockPosition pos = new BlockPosition(j3, k3, l3);
|
||||
+ nmsBlocks.putIfAbsent(pos, flag1 ? Blocks.OBSIDIAN.getBlockData() : Blocks.AIR.getBlockData());
|
||||
@@ -84,19 +92,29 @@ index f49729796..42e4b2d01 100644
|
||||
}
|
||||
}
|
||||
@@ -0,0 +0,0 @@ public class PortalTravelAgent {
|
||||
i4 = j2 + (i3 - 1) * l5;
|
||||
boolean flag2 = i3 == 0 || i3 == 3 || j3 == -1 || j3 == 3;
|
||||
|
||||
- this.world.setTypeAndData(new BlockPosition(k3, l3, i4), flag2 ? Blocks.OBSIDIAN.getBlockData() : iblockdata, 2);
|
||||
for (l2 = -1; l2 < 4; ++l2) {
|
||||
if (k2 == -1 || k2 == 2 || l2 == -1 || l2 == 3) {
|
||||
blockposition_mutableblockposition.c(i5 + k2 * k5, j5 + l2, j2 + k2 * l5);
|
||||
- this.world.setTypeAndData(blockposition_mutableblockposition, Blocks.OBSIDIAN.getBlockData(), 3);
|
||||
+ // Paper start
|
||||
+ BlockPosition pos = new BlockPosition(k3, l3, i4);
|
||||
+ nmsBlocks.putIfAbsent(pos, flag2 ? Blocks.OBSIDIAN.getBlockData() : iblockdata);
|
||||
+ BlockPosition pos = new BlockPosition(blockposition_mutableblockposition.getX(), blockposition_mutableblockposition.getY(), blockposition_mutableblockposition.getZ());
|
||||
+ nmsBlocks.putIfAbsent(pos, Blocks.OBSIDIAN.getBlockData());
|
||||
+ bukkitBlocks.add(this.world.getWorld().getBlockAt(pos.getX(), pos.getY(), pos.getZ()));
|
||||
+ // Paper end
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +0,0 @@ public class PortalTravelAgent {
|
||||
for (l2 = 0; l2 < 2; ++l2) {
|
||||
for (i3 = 0; i3 < 3; ++i3) {
|
||||
blockposition_mutableblockposition.c(i5 + l2 * k5, j5 + i3, j2 + l2 * l5);
|
||||
- this.world.setTypeAndData(blockposition_mutableblockposition, iblockdata, 18);
|
||||
+
|
||||
+ // Paper start
|
||||
+ BlockPosition pos = new BlockPosition(blockposition_mutableblockposition.getX(), blockposition_mutableblockposition.getY(), blockposition_mutableblockposition.getZ());
|
||||
+ nmsBlocks.putIfAbsent(pos, PORTAL_BLOCK.getBlockData());
|
||||
+ bukkitBlocks.add(this.world.getWorld().getBlockAt(pos.getX(), pos.getY(), pos.getZ()));
|
||||
+ // paper end
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user