mirror of
https://github.com/barkeser2002/CatServer.git
synced 2026-09-25 01:39:52 +03:00
44 lines
1.4 KiB
Diff
44 lines
1.4 KiB
Diff
--- ../src-base/minecraft/net/minecraft/block/BlockBanner.java
|
|
+++ ../src-work/minecraft/net/minecraft/block/BlockBanner.java
|
|
@@ -90,16 +90,9 @@
|
|
|
|
public void dropBlockAsItemWithChance(World worldIn, BlockPos pos, IBlockState state, float chance, int fortune)
|
|
{
|
|
- ItemStack itemstack = this.getTileDataItemStack(worldIn, pos);
|
|
-
|
|
- if (itemstack.isEmpty())
|
|
{
|
|
super.dropBlockAsItemWithChance(worldIn, pos, state, chance, fortune);
|
|
}
|
|
- else
|
|
- {
|
|
- spawnAsEntity(worldIn, pos, itemstack);
|
|
- }
|
|
}
|
|
|
|
public boolean canPlaceBlockAt(World worldIn, BlockPos pos)
|
|
@@ -126,6 +119,23 @@
|
|
return BlockFaceShape.UNDEFINED;
|
|
}
|
|
|
|
+ @Override
|
|
+ public void getDrops(net.minecraft.util.NonNullList<ItemStack> drops, IBlockAccess world, BlockPos pos, IBlockState state, int fortune)
|
|
+ {
|
|
+ TileEntity te = world.getTileEntity(pos);
|
|
+
|
|
+ if (te instanceof TileEntityBanner)
|
|
+ {
|
|
+ TileEntityBanner tileentitybanner = (TileEntityBanner)te;
|
|
+ ItemStack itemstack = tileentitybanner.getItem();
|
|
+ drops.add(itemstack);
|
|
+ }
|
|
+ else
|
|
+ {
|
|
+ drops.add(new ItemStack(Items.BANNER, 1, 0));
|
|
+ }
|
|
+ }
|
|
+
|
|
public static class BlockBannerHanging extends BlockBanner
|
|
{
|
|
protected static final AxisAlignedBB NORTH_AABB = new AxisAlignedBB(0.0D, 0.0D, 0.875D, 1.0D, 0.78125D, 1.0D);
|