Paper 1.9.4 Update

This commit is contained in:
Aikar
2016-05-11 22:07:46 -04:00
parent 324bde1f10
commit 34fcd8ccc2
62 changed files with 209 additions and 1262 deletions

View File

@@ -43,15 +43,27 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
} else {
iblockdata = iblockdata.set(BlockFlowing.LEVEL, Integer.valueOf(i1));
@@ -0,0 +0,0 @@ public class BlockFlowing extends BlockFluids {
}
+ // Paper start
/**
* Paper - Get flow speed. Throttle if its water and flowing adjacent to lava
*/
@@ -0,0 +0,0 @@ public class BlockFlowing extends BlockFluids {
}
return super.a(world);
}
+
+ private int getFluidLevel(IBlockAccess iblockaccess, BlockPosition blockposition) {
+ return iblockaccess.getType(blockposition).getMaterial() == this.material ? iblockaccess.getType(blockposition).get(BlockFluids.LEVEL) : -1;
+ }
+
+ /**
+ * Paper - Data check method for fast draining
+ */
+ public int getData(World world, BlockPosition position) {
+ int data = this.c((IBlockAccess) world, position);
+ int data = this.getFluidLevel((IBlockAccess) world, position);
+ return data < 8 ? data : 0;
+ }
+
@@ -94,5 +106,6 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
+ }
+ return result;
+ }
+ // Paper end
}
--