38 lines
1.2 KiB
Java
38 lines
1.2 KiB
Java
package net.minecraft.world.level.block;
|
|
|
|
import net.minecraft.world.item.ItemStack;
|
|
import net.minecraft.core.BlockPos;
|
|
import net.minecraft.world.level.Level;
|
|
import net.minecraft.world.level.block.state.BlockState;
|
|
import net.minecraft.world.level.block.entity.SpawnerBlockEntity;
|
|
import net.minecraft.world.level.block.entity.BlockEntity;
|
|
import net.minecraft.world.level.BlockGetter;
|
|
|
|
public class SpawnerBlock extends BaseEntityBlock {
|
|
protected SpawnerBlock(final Properties c) {
|
|
super(c);
|
|
}
|
|
|
|
@Override
|
|
public BlockEntity newBlockEntity(final BlockGetter bjd) {
|
|
return new SpawnerBlockEntity();
|
|
}
|
|
|
|
@Override
|
|
public void spawnAfterBreak(final BlockState byg, final Level bjt, final BlockPos fk, final ItemStack bek) {
|
|
super.spawnAfterBreak(byg, bjt, fk, bek);
|
|
final int integer6 = 15 + bjt.random.nextInt(15) + bjt.random.nextInt(15);
|
|
this.popExperience(bjt, fk, integer6);
|
|
}
|
|
|
|
@Override
|
|
public RenderShape getRenderShape(final BlockState byg) {
|
|
return RenderShape.MODEL;
|
|
}
|
|
|
|
@Override
|
|
public ItemStack getCloneItemStack(final BlockGetter bjd, final BlockPos fk, final BlockState byg) {
|
|
return ItemStack.EMPTY;
|
|
}
|
|
}
|