All Downloads are FREE. Search and download functionalities are using the official Maven repository.

net.minecraft.server.BlockMobSpawner Maven / Gradle / Ivy

There is a newer version: 2.4.0
Show newest version
package net.minecraft.server;

import java.util.Random;

public class BlockMobSpawner extends BlockContainer {

  protected BlockMobSpawner() {
    super(Material.STONE);
  }

  public TileEntity a(World world, int i) {
    return new TileEntityMobSpawner();
  }

  public Item getDropType(IBlockData iblockdata, Random random, int i) {
    return null;
  }

  public int a(Random random) {
    return 0;
  }

  public void dropNaturally(World world, BlockPosition blockposition, IBlockData iblockdata, float f, int i) {
    super.dropNaturally(world, blockposition, iblockdata, f, i);
        /* CraftBukkit start - Delegate to getExpDrop
        int j = 15 + world.random.nextInt(15) + world.random.nextInt(15);

        this.dropExperience(world, blockposition, j);
        */
  }

  @Override
  public int getExpDrop(World world, IBlockData iblockdata, int enchantmentLevel) {

    return 15 + world.random.nextInt(15) + world.random.nextInt(15);
    // CraftBukkit end
  }

  public boolean c() {
    return false;
  }

  public int b() {
    return 3;
  }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy