summaryrefslogtreecommitdiffstats
path: root/src/main/java/net/minecraft/server/BlockStationary.java
diff options
context:
space:
mode:
authorThinkofdeath <thinkofdeath@spigotmc.org>2014-11-26 08:32:16 +1100
committermd_5 <git@md-5.net>2014-11-28 17:16:30 +1100
commit24557bc2b37deb6a0edf497d547471832457b1dd (patch)
treec560572889a3b0b34964a0cddb35dc87fda3c914 /src/main/java/net/minecraft/server/BlockStationary.java
parenta4805dbd77da057cc1ea0bf344379bc6e53ca1f6 (diff)
downloadcraftbukkit-24557bc2b37deb6a0edf497d547471832457b1dd.tar
craftbukkit-24557bc2b37deb6a0edf497d547471832457b1dd.tar.gz
craftbukkit-24557bc2b37deb6a0edf497d547471832457b1dd.tar.lz
craftbukkit-24557bc2b37deb6a0edf497d547471832457b1dd.tar.xz
craftbukkit-24557bc2b37deb6a0edf497d547471832457b1dd.zip
Update to Minecraft 1.8
For more information please see http://www.spigotmc.org/
Diffstat (limited to 'src/main/java/net/minecraft/server/BlockStationary.java')
-rw-r--r--src/main/java/net/minecraft/server/BlockStationary.java93
1 files changed, 0 insertions, 93 deletions
diff --git a/src/main/java/net/minecraft/server/BlockStationary.java b/src/main/java/net/minecraft/server/BlockStationary.java
deleted file mode 100644
index 51b9604a..00000000
--- a/src/main/java/net/minecraft/server/BlockStationary.java
+++ /dev/null
@@ -1,93 +0,0 @@
-package net.minecraft.server;
-
-import java.util.Random;
-
-import org.bukkit.craftbukkit.event.CraftEventFactory; // CraftBukkit
-
-public class BlockStationary extends BlockFluids {
-
- protected BlockStationary(Material material) {
- super(material);
- this.a(false);
- if (material == Material.LAVA) {
- this.a(true);
- }
- }
-
- public void doPhysics(World world, int i, int j, int k, Block block) {
- super.doPhysics(world, i, j, k, block);
- if (world.getType(i, j, k) == this) {
- this.n(world, i, j, k);
- }
- }
-
- private void n(World world, int i, int j, int k) {
- int l = world.getData(i, j, k);
-
- world.setTypeAndData(i, j, k, Block.getById(Block.getId(this) - 1), l, 2);
- world.a(i, j, k, Block.getById(Block.getId(this) - 1), this.a(world));
- }
-
- public void a(World world, int i, int j, int k, Random random) {
- if (this.material == Material.LAVA) {
- int l = random.nextInt(3);
-
- int i1;
-
- // CraftBukkit start - Prevent lava putting something on fire, remember igniter block coords
- int x = i;
- int y = j;
- int z = k;
- // CraftBukkit end
-
- for (i1 = 0; i1 < l; ++i1) {
- i += random.nextInt(3) - 1;
- ++j;
- k += random.nextInt(3) - 1;
- Block block = world.getType(i, j, k);
-
- if (block.material == Material.AIR) {
- if (this.o(world, i - 1, j, k) || this.o(world, i + 1, j, k) || this.o(world, i, j, k - 1) || this.o(world, i, j, k + 1) || this.o(world, i, j - 1, k) || this.o(world, i, j + 1, k)) {
- // CraftBukkit start - Prevent lava putting something on fire
- if (world.getType(i, j, k) != Blocks.FIRE) {
- if (CraftEventFactory.callBlockIgniteEvent(world, i, j, k, x, y, z).isCancelled()) {
- continue;
- }
- }
- // CraftBukkit end
-
- world.setTypeUpdate(i, j, k, Blocks.FIRE);
- return;
- }
- } else if (block.material.isSolid()) {
- return;
- }
- }
-
- if (l == 0) {
- i1 = i;
- int j1 = k;
-
- for (int k1 = 0; k1 < 3; ++k1) {
- i = i1 + random.nextInt(3) - 1;
- k = j1 + random.nextInt(3) - 1;
- if (world.isEmpty(i, j + 1, k) && this.o(world, i, j, k)) {
- // CraftBukkit start - Prevent lava putting something on fire
- if (world.getType(i, j + 1, k) != Blocks.FIRE) {
- if (CraftEventFactory.callBlockIgniteEvent(world, i, j + 1, k, x, y, z).isCancelled()) {
- continue;
- }
- }
- // CraftBukkit end
-
- world.setTypeUpdate(i, j + 1, k, Blocks.FIRE);
- }
- }
- }
- }
- }
-
- private boolean o(World world, int i, int j, int k) {
- return world.getType(i, j, k).getMaterial().isBurnable();
- }
-}