mirror of
https://github.com/PaperMC/Paper.git
synced 2025-01-10 03:52:45 +01:00
Don't allow liquids to flow into unloaded chunks
By: Thinkofdeath <thinkofdeath@spigotmc.org>
This commit is contained in:
parent
4a37ed5f42
commit
1ec9efe31c
1 changed files with 13 additions and 7 deletions
|
@ -1,5 +1,5 @@
|
||||||
--- /home/matt/mc-dev-private//net/minecraft/server/BlockFlowing.java 2015-02-26 22:40:22.127608144 +0000
|
--- /home/matt/mc-dev-private//net/minecraft/server/BlockFlowing.java 2015-04-01 17:20:36.772751379 +0100
|
||||||
+++ src/main/java/net/minecraft/server/BlockFlowing.java 2015-02-26 22:40:22.127608144 +0000
|
+++ src/main/java/net/minecraft/server/BlockFlowing.java 2015-04-01 17:20:36.772751379 +0100
|
||||||
@@ -5,6 +5,11 @@
|
@@ -5,6 +5,11 @@
|
||||||
import java.util.Random;
|
import java.util.Random;
|
||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
|
@ -12,20 +12,18 @@
|
||||||
public class BlockFlowing extends BlockFluids {
|
public class BlockFlowing extends BlockFluids {
|
||||||
|
|
||||||
int a;
|
int a;
|
||||||
@@ -18,7 +23,12 @@
|
@@ -18,6 +23,11 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
public void b(World world, BlockPosition blockposition, IBlockData iblockdata, Random random) {
|
public void b(World world, BlockPosition blockposition, IBlockData iblockdata, Random random) {
|
||||||
- int i = ((Integer) iblockdata.get(BlockFlowing.LEVEL)).intValue();
|
|
||||||
+ // CraftBukkit start
|
+ // CraftBukkit start
|
||||||
+ org.bukkit.World bworld = world.getWorld();
|
+ org.bukkit.World bworld = world.getWorld();
|
||||||
+ org.bukkit.Server server = world.getServer();
|
+ org.bukkit.Server server = world.getServer();
|
||||||
+ org.bukkit.block.Block source = bworld == null ? null : bworld.getBlockAt(blockposition.getX(), blockposition.getY(), blockposition.getZ());
|
+ org.bukkit.block.Block source = bworld == null ? null : bworld.getBlockAt(blockposition.getX(), blockposition.getY(), blockposition.getZ());
|
||||||
+ // CraftBukkit end
|
+ // CraftBukkit end
|
||||||
+ int i = ((Integer) iblockdata.get(LEVEL)).intValue();
|
int i = ((Integer) iblockdata.get(BlockFlowing.LEVEL)).intValue();
|
||||||
byte b0 = 1;
|
byte b0 = 1;
|
||||||
|
|
||||||
if (this.material == Material.LAVA && !world.worldProvider.n()) {
|
|
||||||
@@ -88,6 +98,12 @@
|
@@ -88,6 +98,12 @@
|
||||||
IBlockData iblockdata2 = world.getType(blockposition.down());
|
IBlockData iblockdata2 = world.getType(blockposition.down());
|
||||||
|
|
||||||
|
@ -48,7 +46,7 @@
|
||||||
} else if (i >= 0 && (i == 0 || this.g(world, blockposition.down(), iblockdata2))) {
|
} else if (i >= 0 && (i == 0 || this.g(world, blockposition.down(), iblockdata2))) {
|
||||||
Set set = this.f(world, blockposition);
|
Set set = this.f(world, blockposition);
|
||||||
|
|
||||||
@@ -116,7 +134,16 @@
|
@@ -116,14 +134,23 @@
|
||||||
while (iterator1.hasNext()) {
|
while (iterator1.hasNext()) {
|
||||||
EnumDirection enumdirection1 = (EnumDirection) iterator1.next();
|
EnumDirection enumdirection1 = (EnumDirection) iterator1.next();
|
||||||
|
|
||||||
|
@ -66,3 +64,11 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
private void flow(World world, BlockPosition blockposition, IBlockData iblockdata, int i) {
|
||||||
|
- if (this.h(world, blockposition, iblockdata)) {
|
||||||
|
+ if (world.isLoaded(blockposition) && this.h(world, blockposition, iblockdata)) { // CraftBukkit - add isLoaded check
|
||||||
|
if (iblockdata.getBlock() != Blocks.AIR) {
|
||||||
|
if (this.material == Material.LAVA) {
|
||||||
|
this.fizz(world, blockposition);
|
||||||
|
|
Loading…
Reference in a new issue