summaryrefslogtreecommitdiffstats
path: root/src/main/java/net/minecraft/server/BlockMobSpawner.java
blob: c32db8f6ec7089f8f173d452612ebc7d52b2c2e3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
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(int i, Random random, int j) {
        return null;
    }

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

    public void dropNaturally(World world, int i, int j, int k, int l, float f, int i1) {
        super.dropNaturally(world, i, j, k, l, f, i1);
        /* CraftBukkit start - Delegate to getExpDrop
        int j1 = 15 + world.random.nextInt(15) + world.random.nextInt(15);

        this.dropExperience(world, i, j, k, j1)*/
    }

    public int getExpDrop(World world, int data, int enchantmentLevel) {
        int j1 = 15 + world.random.nextInt(15) + world.random.nextInt(15);

        return j1;
        // CraftBukkit end
    }

    public boolean c() {
        return false;
    }
}