Restore portal fix

This commit is contained in:
Aikar 2018-08-12 02:14:31 -04:00
parent 4bb44d2fcb
commit 646ddfd6f9
No known key found for this signature in database
GPG Key ID: 401ADFC9891FAAFE
1 changed files with 7 additions and 7 deletions

View File

@ -1,11 +1,11 @@
From cb5d0df8f262c31ce24f9cd39a70d2974420b95f Mon Sep 17 00:00:00 2001 From 0e37166c412ab13ae4514136d1313cf404909ef7 Mon Sep 17 00:00:00 2001
From: MiniDigger <admin@minidigger.me> From: MiniDigger <admin@minidigger.me>
Date: Sun, 18 Mar 2018 15:44:44 +0100 Date: Sun, 18 Mar 2018 15:44:44 +0100
Subject: [PATCH] Call PortalCreateEvent for exit portals 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 diff --git a/src/main/java/net/minecraft/server/PortalTravelAgent.java b/src/main/java/net/minecraft/server/PortalTravelAgent.java
index 402d8d7d63..7444f4621e 100644 index 402d8d7d..72b85bf6 100644
--- a/src/main/java/net/minecraft/server/PortalTravelAgent.java --- a/src/main/java/net/minecraft/server/PortalTravelAgent.java
+++ b/src/main/java/net/minecraft/server/PortalTravelAgent.java +++ b/src/main/java/net/minecraft/server/PortalTravelAgent.java
@@ -48,6 +48,9 @@ public class PortalTravelAgent { @@ -48,6 +48,9 @@ public class PortalTravelAgent {
@ -25,7 +25,7 @@ index 402d8d7d63..7444f4621e 100644
- this.world.setTypeUpdate(new BlockPosition(k1, l1, i2), flag2 ? Blocks.OBSIDIAN.getBlockData() : Blocks.AIR.getBlockData()); - this.world.setTypeUpdate(new BlockPosition(k1, l1, i2), flag2 ? Blocks.OBSIDIAN.getBlockData() : Blocks.AIR.getBlockData());
+ // Paper start + // Paper start
+ BlockPosition pos = new BlockPosition(k1, l1, i2); + BlockPosition pos = new BlockPosition(k1, l1, i2);
+ nmsBlocks.putIfAbsent(pos, flag2 ? Blocks.OBSIDIAN.getBlockData() : Blocks.AIR.getBlockData()); + nmsBlocks.put(pos, flag2 ? Blocks.OBSIDIAN.getBlockData() : Blocks.AIR.getBlockData());
+ bukkitBlocks.add(this.world.getWorld().getBlockAt(pos.getX(), pos.getY(), pos.getZ())); + bukkitBlocks.add(this.world.getWorld().getBlockAt(pos.getX(), pos.getY(), pos.getZ()));
+ // Paper end + // Paper end
} }
@ -60,7 +60,7 @@ index 402d8d7d63..7444f4621e 100644
- this.world.setTypeUpdate(blockposition_mutableblockposition, flag1 ? Blocks.OBSIDIAN.getBlockData() : Blocks.AIR.getBlockData()); - this.world.setTypeUpdate(blockposition_mutableblockposition, flag1 ? Blocks.OBSIDIAN.getBlockData() : Blocks.AIR.getBlockData());
+ // Paper start + // Paper start
+ BlockPosition pos = new BlockPosition(j3, k3, l3); + BlockPosition pos = new BlockPosition(j3, k3, l3);
+ nmsBlocks.putIfAbsent(pos, flag1 ? Blocks.OBSIDIAN.getBlockData() : Blocks.AIR.getBlockData()); + nmsBlocks.put(pos, flag1 ? Blocks.OBSIDIAN.getBlockData() : Blocks.AIR.getBlockData());
+ bukkitBlocks.add(this.world.getWorld().getBlockAt(pos.getX(), pos.getY(), pos.getZ())); + bukkitBlocks.add(this.world.getWorld().getBlockAt(pos.getX(), pos.getY(), pos.getZ()));
+ // Paper end + // Paper end
} }
@ -73,7 +73,7 @@ index 402d8d7d63..7444f4621e 100644
- this.world.setTypeAndData(blockposition_mutableblockposition, Blocks.OBSIDIAN.getBlockData(), 3); - this.world.setTypeAndData(blockposition_mutableblockposition, Blocks.OBSIDIAN.getBlockData(), 3);
+ // Paper start + // Paper start
+ BlockPosition pos = new BlockPosition(blockposition_mutableblockposition.getX(), blockposition_mutableblockposition.getY(), blockposition_mutableblockposition.getZ()); + BlockPosition pos = new BlockPosition(blockposition_mutableblockposition.getX(), blockposition_mutableblockposition.getY(), blockposition_mutableblockposition.getZ());
+ nmsBlocks.putIfAbsent(pos, Blocks.OBSIDIAN.getBlockData()); + nmsBlocks.put(pos, Blocks.OBSIDIAN.getBlockData());
+ bukkitBlocks.add(this.world.getWorld().getBlockAt(pos.getX(), pos.getY(), pos.getZ())); + bukkitBlocks.add(this.world.getWorld().getBlockAt(pos.getX(), pos.getY(), pos.getZ()));
+ // Paper end + // Paper end
} }
@ -87,7 +87,7 @@ index 402d8d7d63..7444f4621e 100644
+ +
+ // Paper start + // Paper start
+ BlockPosition pos = new BlockPosition(blockposition_mutableblockposition.getX(), blockposition_mutableblockposition.getY(), blockposition_mutableblockposition.getZ()); + BlockPosition pos = new BlockPosition(blockposition_mutableblockposition.getX(), blockposition_mutableblockposition.getY(), blockposition_mutableblockposition.getZ());
+ nmsBlocks.putIfAbsent(pos, iblockdata); + nmsBlocks.put(pos, iblockdata);
+ bukkitBlocks.add(this.world.getWorld().getBlockAt(pos.getX(), pos.getY(), pos.getZ())); + bukkitBlocks.add(this.world.getWorld().getBlockAt(pos.getX(), pos.getY(), pos.getZ()));
+ // Paper end + // Paper end
} }
@ -104,5 +104,5 @@ index 402d8d7d63..7444f4621e 100644
} }
-- --
2.18.0 2.18.0.windows.1