mirror of
https://github.com/GTNewHorizons/EnderCore.git
synced 2026-11-14 01:04:18 +00:00
Implement default handling for getPickBlock in BlockEnder
This commit is contained in:
1 parent
3ee59cc69e
commit
77daaed401
1 file changed
+11
@@ -12,6 +12,7 @@ import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.AxisAlignedBB;
|
||||
import net.minecraft.util.MovingObjectPosition;
|
||||
import net.minecraft.world.IBlockAccess;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
@@ -131,6 +132,16 @@ public abstract class BlockEnder extends Block {
|
||||
}
|
||||
return Lists.newArrayList(getNBTDrop(world, x, y, z, (TileEntityEnder) world.getTileEntity(x, y, z)));
|
||||
}
|
||||
|
||||
@Override
|
||||
public ItemStack getPickBlock(MovingObjectPosition target, World world, int x, int y, int z) {
|
||||
return getPickBlock(target, world, x, y, z, null);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ItemStack getPickBlock(MovingObjectPosition target, World world, int x, int y, int z, @Nullable EntityPlayer player) {
|
||||
return getNBTDrop(world, x, y, z, getTileEntityEio(world, x, y, z));
|
||||
}
|
||||
|
||||
public ItemStack getNBTDrop(World world, int x, int y, int z, TileEntityEnder te) {
|
||||
int meta = damageDropped(te.getBlockMetadata());
|
||||
|
||||
Reference in new issue
Block a user