data improvements

This commit is contained in:
Tahg
2011-09-26 03:07:06 -04:00
parent b7c43fbff1
commit d226e551ae
13 changed files with 399 additions and 17 deletions

View File

@@ -0,0 +1,44 @@
package net.minecraft.server;
import java.util.Random;
public class BlockMobSpawner extends BlockContainer {
protected BlockMobSpawner(int i, int j) {
super(i, j, Material.STONE);
}
public TileEntity a_() {
return new TileEntityMobSpawner();
}
public int a(int i, Random random) {
return Block.MOB_SPAWNER.id; // CraftBukkit
}
public int a(Random random) {
return 1; // CraftBukkit
}
// CraftBukkit start
public void dropNaturally(World world, int i, int j, int k, int l, float f) {
TileEntity entity = world.getTileEntity(i, j, k);
if (entity instanceof TileEntityMobSpawner) {
super.dropNaturally(world, i, j, k, ((TileEntityMobSpawner) entity).getId(), f);
}
}
public void remove(World world, int i, int j, int k) {
dropNaturally(world, i, j, k, 0, 1.0f);
super.remove(world, i, j, k);
}
protected int a_(int i) {
return i;
}
// CraftBukkit end
public boolean a() {
return false;
}
}