mirror of
https://github.com/MinecraftForge/MinecraftForge.git
synced 2026-11-12 16:27:47 +00:00
This commit is contained in:
1 parent
a8734e368d
commit
72f037b0fa
13 files changed
+77
-100
No files matched your search
@@ -91,7 +91,7 @@
|
||||
}
|
||||
|
||||
public final void func_176226_b(World p_176226_1_, BlockPos p_176226_2_, IBlockState p_176226_3_, int p_176226_4_)
|
||||
@@ -568,20 +565,17 @@
|
||||
@@ -568,20 +565,16 @@
|
||||
|
||||
public void func_180653_a(World p_180653_1_, BlockPos p_180653_2_, IBlockState p_180653_3_, float p_180653_4_, int p_180653_5_)
|
||||
{
|
||||
@@ -99,12 +99,11 @@
|
||||
+ if (!p_180653_1_.field_72995_K && !p_180653_1_.restoringBlockSnapshots) // do not drop items while restoring blockstates, prevents item dupe
|
||||
{
|
||||
- int i = this.func_149679_a(p_180653_5_, p_180653_1_.field_73012_v);
|
||||
+ List<ItemStack> items = NonNullList.func_191196_a();
|
||||
+ items.addAll(getDrops(p_180653_1_, p_180653_2_, p_180653_3_, p_180653_5_));
|
||||
+ p_180653_4_ = net.minecraftforge.event.ForgeEventFactory.fireBlockHarvesting(items, p_180653_1_, p_180653_2_, p_180653_3_, p_180653_5_, p_180653_4_, false, harvesters.get());
|
||||
+ List<ItemStack> drops = getDrops(p_180653_1_, p_180653_2_, p_180653_3_, p_180653_5_); // use the old method until it gets removed, for backward compatibility
|
||||
+ p_180653_4_ = net.minecraftforge.event.ForgeEventFactory.fireBlockHarvesting(drops, p_180653_1_, p_180653_2_, p_180653_3_, p_180653_5_, p_180653_4_, false, harvesters.get());
|
||||
|
||||
- for (int j = 0; j < i; ++j)
|
||||
+ for (ItemStack item : items)
|
||||
+ for (ItemStack drop : drops)
|
||||
{
|
||||
if (p_180653_1_.field_73012_v.nextFloat() <= p_180653_4_)
|
||||
{
|
||||
@@ -114,11 +113,11 @@
|
||||
- {
|
||||
- func_180635_a(p_180653_1_, p_180653_2_, new ItemStack(item, 1, this.func_180651_a(p_180653_3_)));
|
||||
- }
|
||||
+ func_180635_a(p_180653_1_, p_180653_2_, item);
|
||||
+ func_180635_a(p_180653_1_, p_180653_2_, drop);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -589,8 +583,13 @@
|
||||
@@ -589,8 +582,13 @@
|
||||
|
||||
public static void func_180635_a(World p_180635_0_, BlockPos p_180635_1_, ItemStack p_180635_2_)
|
||||
{
|
||||
@@ -133,7 +132,7 @@
|
||||
float f = 0.5F;
|
||||
double d0 = (double)(p_180635_0_.field_73012_v.nextFloat() * 0.5F) + 0.25D;
|
||||
double d1 = (double)(p_180635_0_.field_73012_v.nextFloat() * 0.5F) + 0.25D;
|
||||
@@ -619,6 +618,7 @@
|
||||
@@ -619,6 +617,7 @@
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -141,7 +140,7 @@
|
||||
public float func_149638_a(Entity p_149638_1_)
|
||||
{
|
||||
return this.field_149781_w / 5.0F;
|
||||
@@ -657,7 +657,7 @@
|
||||
@@ -657,7 +656,7 @@
|
||||
|
||||
public boolean func_176196_c(World p_176196_1_, BlockPos p_176196_2_)
|
||||
{
|
||||
@@ -150,7 +149,7 @@
|
||||
}
|
||||
|
||||
public boolean func_180639_a(World p_180639_1_, BlockPos p_180639_2_, IBlockState p_180639_3_, EntityPlayer p_180639_4_, EnumHand p_180639_5_, EnumFacing p_180639_6_, float p_180639_7_, float p_180639_8_, float p_180639_9_)
|
||||
@@ -669,6 +669,8 @@
|
||||
@@ -669,6 +668,8 @@
|
||||
{
|
||||
}
|
||||
|
||||
@@ -159,7 +158,7 @@
|
||||
public IBlockState func_180642_a(World p_180642_1_, BlockPos p_180642_2_, EnumFacing p_180642_3_, float p_180642_4_, float p_180642_5_, float p_180642_6_, int p_180642_7_, EntityLivingBase p_180642_8_)
|
||||
{
|
||||
return this.func_176203_a(p_180642_7_);
|
||||
@@ -710,21 +712,35 @@
|
||||
@@ -710,21 +711,35 @@
|
||||
p_180657_2_.func_71029_a(StatList.func_188055_a(this));
|
||||
p_180657_2_.func_71020_j(0.005F);
|
||||
|
||||
@@ -198,7 +197,7 @@
|
||||
}
|
||||
|
||||
protected ItemStack func_180643_i(IBlockState p_180643_1_)
|
||||
@@ -810,6 +826,7 @@
|
||||
@@ -810,6 +825,7 @@
|
||||
p_176216_2_.field_70181_x = 0.0D;
|
||||
}
|
||||
|
||||
@@ -206,7 +205,7 @@
|
||||
public ItemStack func_185473_a(World p_185473_1_, BlockPos p_185473_2_, IBlockState p_185473_3_)
|
||||
{
|
||||
return new ItemStack(Item.func_150898_a(this), 1, this.func_180651_a(p_185473_3_));
|
||||
@@ -921,6 +938,7 @@
|
||||
@@ -921,6 +937,7 @@
|
||||
}
|
||||
}
|
||||
|
||||
@@ -214,7 +213,7 @@
|
||||
public SoundType func_185467_w()
|
||||
{
|
||||
return this.field_149762_H;
|
||||
@@ -936,6 +954,1216 @@
|
||||
@@ -936,6 +953,1218 @@
|
||||
{
|
||||
}
|
||||
|
||||
@@ -525,30 +524,38 @@
|
||||
+ }
|
||||
+
|
||||
+ /**
|
||||
+ * This returns a complete list of items dropped from this block.
|
||||
+ * @deprecated use {@link #getDrops(NonNullList, IBlockAccess, BlockPos, IBlockState, int)}
|
||||
+ */
|
||||
+ @Deprecated
|
||||
+ public List<ItemStack> getDrops(IBlockAccess world, BlockPos pos, IBlockState state, int fortune)
|
||||
+ {
|
||||
+ NonNullList<ItemStack> ret = NonNullList.func_191196_a();
|
||||
+ getDrops(ret, world, pos, state, fortune);
|
||||
+ return ret;
|
||||
+ }
|
||||
+
|
||||
+ /**
|
||||
+ * This gets a complete list of items dropped from this block.
|
||||
+ *
|
||||
+ * @param drops add all items this block drops to this drops list
|
||||
+ * @param world The current world
|
||||
+ * @param pos Block position in world
|
||||
+ * @param state Current state
|
||||
+ * @param fortune Breakers fortune level
|
||||
+ * @return A ArrayList containing all items this block drops
|
||||
+ */
|
||||
+ public List<ItemStack> getDrops(IBlockAccess world, BlockPos pos, IBlockState state, int fortune)
|
||||
+ public void getDrops(NonNullList<ItemStack> drops, IBlockAccess world, BlockPos pos, IBlockState state, int fortune)
|
||||
+ {
|
||||
+ List<ItemStack> ret = new java.util.ArrayList<ItemStack>();
|
||||
+
|
||||
+ Random rand = world instanceof World ? ((World)world).field_73012_v : RANDOM;
|
||||
+
|
||||
+ int count = quantityDropped(state, fortune, rand);
|
||||
+ for(int i = 0; i < count; i++)
|
||||
+ for (int i = 0; i < count; i++)
|
||||
+ {
|
||||
+ Item item = this.func_180660_a(state, rand, fortune);
|
||||
+ if (item != Items.field_190931_a)
|
||||
+ {
|
||||
+ ret.add(new ItemStack(item, 1, this.func_180651_a(state)));
|
||||
+ drops.add(new ItemStack(item, 1, this.func_180651_a(state)));
|
||||
+ }
|
||||
+ }
|
||||
+ return ret;
|
||||
+ }
|
||||
+
|
||||
+ /**
|
||||
@@ -1335,21 +1342,15 @@
|
||||
+ return func_180664_k() == layer;
|
||||
+ }
|
||||
+ // For Internal use only to capture droped items inside getDrops
|
||||
+ protected static ThreadLocal<Boolean> captureDrops = new ThreadLocal<Boolean>()
|
||||
+ {
|
||||
+ @Override protected Boolean initialValue() { return false; }
|
||||
+ };
|
||||
+ protected static ThreadLocal<List<ItemStack>> capturedDrops = new ThreadLocal<List<ItemStack>>()
|
||||
+ {
|
||||
+ @Override protected List<ItemStack> initialValue() { return new java.util.ArrayList<ItemStack>(); }
|
||||
+ };
|
||||
+ protected List<ItemStack> captureDrops(boolean start)
|
||||
+ protected static ThreadLocal<Boolean> captureDrops = ThreadLocal.withInitial(() -> false);
|
||||
+ protected static ThreadLocal<NonNullList<ItemStack>> capturedDrops = ThreadLocal.withInitial(NonNullList::func_191196_a);
|
||||
+ protected NonNullList<ItemStack> captureDrops(boolean start)
|
||||
+ {
|
||||
+ if (start)
|
||||
+ {
|
||||
+ captureDrops.set(true);
|
||||
+ capturedDrops.get().clear();
|
||||
+ return java.util.Collections.emptyList();
|
||||
+ return NonNullList.func_191196_a();
|
||||
+ }
|
||||
+ else
|
||||
+ {
|
||||
@@ -1431,7 +1432,7 @@
|
||||
public static void func_149671_p()
|
||||
{
|
||||
func_176215_a(0, field_176230_a, (new BlockAir()).func_149663_c("air"));
|
||||
@@ -1247,14 +2475,7 @@
|
||||
@@ -1247,14 +2476,7 @@
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@@ -17,27 +17,25 @@
|
||||
}
|
||||
|
||||
public boolean func_176196_c(World p_176196_1_, BlockPos p_176196_2_)
|
||||
@@ -126,6 +119,25 @@
|
||||
@@ -126,6 +119,23 @@
|
||||
return BlockFaceShape.UNDEFINED;
|
||||
}
|
||||
|
||||
+ @Override
|
||||
+ public java.util.List<ItemStack> getDrops(IBlockAccess world, BlockPos pos, IBlockState state, int fortune)
|
||||
+ public void getDrops(net.minecraft.util.NonNullList<ItemStack> drops, IBlockAccess world, BlockPos pos, IBlockState state, int fortune)
|
||||
+ {
|
||||
+ TileEntity te = world.func_175625_s(pos);
|
||||
+
|
||||
+ java.util.List<ItemStack> ret = new java.util.ArrayList<ItemStack>();
|
||||
+ if (te instanceof TileEntityBanner)
|
||||
+ {
|
||||
+ TileEntityBanner tileentitybanner = (TileEntityBanner)te;
|
||||
+ ItemStack itemstack = tileentitybanner.func_190615_l();
|
||||
+ ret.add(itemstack);
|
||||
+ drops.add(itemstack);
|
||||
+ }
|
||||
+ else
|
||||
+ {
|
||||
+ ret.add(new ItemStack(Items.field_179564_cE, 1, 0));
|
||||
+ drops.add(new ItemStack(Items.field_179564_cE, 1, 0));
|
||||
+ }
|
||||
+ return ret;
|
||||
+ }
|
||||
+
|
||||
public static class BlockBannerHanging extends BlockBanner
|
||||
|
||||
@@ -26,21 +26,19 @@
|
||||
+ }
|
||||
+
|
||||
+ @Override
|
||||
+ public java.util.List<ItemStack> getDrops(IBlockAccess world, BlockPos pos, IBlockState state, int fortune)
|
||||
+ public void getDrops(net.minecraft.util.NonNullList<ItemStack> drops, IBlockAccess world, BlockPos pos, IBlockState state, int fortune)
|
||||
+ {
|
||||
+ java.util.List<ItemStack> dropped = super.getDrops(world, pos, state, fortune);
|
||||
+ super.getDrops(drops, world, pos, state, fortune);
|
||||
+ int i = ((Integer)state.func_177229_b(field_176501_a)).intValue();
|
||||
int j = 1;
|
||||
|
||||
if (i >= 2)
|
||||
@@ -142,8 +150,9 @@
|
||||
@@ -142,7 +150,7 @@
|
||||
|
||||
for (int k = 0; k < j; ++k)
|
||||
{
|
||||
- func_180635_a(p_180653_1_, p_180653_2_, new ItemStack(Items.field_151100_aR, 1, EnumDyeColor.BROWN.func_176767_b()));
|
||||
+ dropped.add(new ItemStack(Items.field_151100_aR, 1, EnumDyeColor.BROWN.func_176767_b()));
|
||||
+ drops.add(new ItemStack(Items.field_151100_aR, 1, EnumDyeColor.BROWN.func_176767_b()));
|
||||
}
|
||||
+ return dropped;
|
||||
}
|
||||
|
||||
public ItemStack func_185473_a(World p_185473_1_, BlockPos p_185473_2_, IBlockState p_185473_3_)
|
||||
@@ -36,14 +36,14 @@
|
||||
}
|
||||
|
||||
protected Item func_149866_i()
|
||||
@@ -174,11 +176,33 @@
|
||||
@@ -174,11 +176,32 @@
|
||||
return Items.field_151015_O;
|
||||
}
|
||||
|
||||
+ @Override
|
||||
+ public java.util.List<ItemStack> getDrops(net.minecraft.world.IBlockAccess world, BlockPos pos, IBlockState state, int fortune)
|
||||
+ public void getDrops(net.minecraft.util.NonNullList<ItemStack> drops, net.minecraft.world.IBlockAccess world, BlockPos pos, IBlockState state, int fortune)
|
||||
+ {
|
||||
+ java.util.List<ItemStack> ret = super.getDrops(world, pos, state, fortune);
|
||||
+ super.getDrops(drops, world, pos, state, fortune);
|
||||
+ int age = func_185527_x(state);
|
||||
+ Random rand = world instanceof World ? ((World)world).field_73012_v : new Random();
|
||||
+
|
||||
@@ -55,11 +55,10 @@
|
||||
+ {
|
||||
+ if (rand.nextInt(2 * func_185526_g()) <= age)
|
||||
+ {
|
||||
+ ret.add(new ItemStack(this.func_149866_i(), 1, 0));
|
||||
+ drops.add(new ItemStack(this.func_149866_i(), 1, 0));
|
||||
+ }
|
||||
+ }
|
||||
+ }
|
||||
+ return ret;
|
||||
+ }
|
||||
+
|
||||
public void func_180653_a(World p_180653_1_, BlockPos p_180653_2_, IBlockState p_180653_3_, float p_180653_4_, int p_180653_5_)
|
||||
|
||||
@@ -14,20 +14,19 @@
|
||||
super.func_180663_b(p_180663_1_, p_180663_2_, p_180663_3_);
|
||||
}
|
||||
|
||||
@@ -398,6 +391,31 @@
|
||||
@@ -398,6 +391,30 @@
|
||||
return BlockFaceShape.UNDEFINED;
|
||||
}
|
||||
|
||||
+
|
||||
+ /*============================FORGE START=====================================*/
|
||||
+ @Override
|
||||
+ public java.util.List<ItemStack> getDrops(IBlockAccess world, BlockPos pos, IBlockState state, int fortune)
|
||||
+ public void getDrops(net.minecraft.util.NonNullList<ItemStack> drops, IBlockAccess world, BlockPos pos, IBlockState state, int fortune)
|
||||
+ {
|
||||
+ java.util.List<ItemStack> ret = super.getDrops(world, pos, state, fortune);
|
||||
+ super.getDrops(drops, world, pos, state, fortune);
|
||||
+ TileEntityFlowerPot te = world.func_175625_s(pos) instanceof TileEntityFlowerPot ? (TileEntityFlowerPot)world.func_175625_s(pos) : null;
|
||||
+ if (te != null && te.func_145965_a() != null)
|
||||
+ ret.add(new ItemStack(te.func_145965_a(), 1, te.func_145966_b()));
|
||||
+ return ret;
|
||||
+ drops.add(new ItemStack(te.func_145965_a(), 1, te.func_145966_b()));
|
||||
+ }
|
||||
+ @Override
|
||||
+ public boolean removedByPlayer(IBlockState state, World world, BlockPos pos, EntityPlayer player, boolean willHarvest)
|
||||
|
||||
@@ -75,7 +75,7 @@
|
||||
}
|
||||
|
||||
protected void func_176234_a(World p_176234_1_, BlockPos p_176234_2_, IBlockState p_176234_3_, int p_176234_4_)
|
||||
@@ -274,6 +241,53 @@
|
||||
@@ -274,6 +241,51 @@
|
||||
|
||||
public abstract BlockPlanks.EnumType func_176233_b(int p_176233_1_);
|
||||
|
||||
@@ -92,9 +92,8 @@
|
||||
+ }
|
||||
+
|
||||
+ @Override
|
||||
+ public java.util.List<ItemStack> getDrops(IBlockAccess world, BlockPos pos, IBlockState state, int fortune)
|
||||
+ public void getDrops(net.minecraft.util.NonNullList<ItemStack> drops, IBlockAccess world, BlockPos pos, IBlockState state, int fortune)
|
||||
+ {
|
||||
+ java.util.List<ItemStack> ret = new java.util.ArrayList<ItemStack>();
|
||||
+ Random rand = world instanceof World ? ((World)world).field_73012_v : new Random();
|
||||
+ int chance = this.func_176232_d(state);
|
||||
+
|
||||
@@ -108,7 +107,7 @@
|
||||
+ {
|
||||
+ ItemStack drop = new ItemStack(func_180660_a(state, rand, fortune), 1, func_180651_a(state));
|
||||
+ if (!drop.func_190926_b())
|
||||
+ ret.add(drop);
|
||||
+ drops.add(drop);
|
||||
+ }
|
||||
+
|
||||
+ chance = 200;
|
||||
@@ -121,8 +120,7 @@
|
||||
+ this.captureDrops(true);
|
||||
+ if (world instanceof World)
|
||||
+ this.func_176234_a((World)world, pos, state, chance); // Dammet mojang
|
||||
+ ret.addAll(this.captureDrops(false));
|
||||
+ return ret;
|
||||
+ drops.addAll(this.captureDrops(false));
|
||||
+ }
|
||||
+
|
||||
+
|
||||
|
||||
@@ -32,14 +32,13 @@
|
||||
{
|
||||
int i = 1;
|
||||
|
||||
@@ -106,6 +109,26 @@
|
||||
@@ -106,6 +109,23 @@
|
||||
return ((Integer)p_176201_1_.func_177229_b(field_176486_a)).intValue();
|
||||
}
|
||||
|
||||
+ @Override
|
||||
+ public java.util.List<ItemStack> getDrops(net.minecraft.world.IBlockAccess world, BlockPos pos, IBlockState state, int fortune)
|
||||
+ public void getDrops(net.minecraft.util.NonNullList<ItemStack> drops, net.minecraft.world.IBlockAccess world, BlockPos pos, IBlockState state, int fortune)
|
||||
+ {
|
||||
+ java.util.List<ItemStack> ret = new java.util.ArrayList<ItemStack>();
|
||||
+ Random rand = world instanceof World ? ((World)world).field_73012_v : new Random();
|
||||
+ int count = 1;
|
||||
+
|
||||
@@ -50,10 +49,8 @@
|
||||
+
|
||||
+ for (int i = 0; i < count; i++)
|
||||
+ {
|
||||
+ ret.add(new ItemStack(Items.field_151075_bm));
|
||||
+ drops.add(new ItemStack(Items.field_151075_bm));
|
||||
+ }
|
||||
+
|
||||
+ return ret;
|
||||
+ }
|
||||
+
|
||||
protected BlockStateContainer func_180661_e()
|
||||
|
||||
@@ -17,20 +17,19 @@
|
||||
}
|
||||
|
||||
@Nullable
|
||||
@@ -210,6 +211,18 @@
|
||||
@@ -210,6 +211,17 @@
|
||||
return new BlockStateContainer(this, new IProperty[] {field_176426_a, field_176425_b});
|
||||
}
|
||||
|
||||
+ @Override
|
||||
+ public java.util.List<net.minecraft.item.ItemStack> getDrops(IBlockAccess world, BlockPos pos, IBlockState state, int fortune)
|
||||
+ public void getDrops(net.minecraft.util.NonNullList<net.minecraft.item.ItemStack> drops, IBlockAccess world, BlockPos pos, IBlockState state, int fortune)
|
||||
+ {
|
||||
+ TileEntityPiston tileentitypiston = this.func_185589_c(world, pos);
|
||||
+ if (tileentitypiston != null)
|
||||
+ {
|
||||
+ IBlockState pushed = tileentitypiston.func_174927_b();
|
||||
+ return pushed.func_177230_c().getDrops(world, pos, pushed, fortune);
|
||||
+ drops.addAll(pushed.func_177230_c().getDrops(world, pos, pushed, fortune)); // use the old method until it gets removed, for backward compatibility
|
||||
+ }
|
||||
+ return new java.util.ArrayList();
|
||||
+ }
|
||||
+
|
||||
public BlockFaceShape func_193383_a(IBlockAccess p_193383_1_, IBlockState p_193383_2_, BlockPos p_193383_3_, EnumFacing p_193383_4_)
|
||||
|
||||
@@ -9,17 +9,16 @@
|
||||
{
|
||||
if (this.func_185525_y(p_180653_3_) && p_180653_1_.field_73012_v.nextInt(50) == 0)
|
||||
{
|
||||
@@ -40,4 +40,13 @@
|
||||
@@ -40,4 +40,12 @@
|
||||
{
|
||||
return field_185534_a[((Integer)p_185496_1_.func_177229_b(this.func_185524_e())).intValue()];
|
||||
}
|
||||
+
|
||||
+ @Override
|
||||
+ public java.util.List<ItemStack> getDrops(net.minecraft.world.IBlockAccess world, BlockPos pos, IBlockState state, int fortune)
|
||||
+ public void getDrops(net.minecraft.util.NonNullList<ItemStack> drops, net.minecraft.world.IBlockAccess world, BlockPos pos, IBlockState state, int fortune)
|
||||
+ {
|
||||
+ java.util.List<ItemStack> ret = super.getDrops(world, pos, state, fortune);
|
||||
+ super.getDrops(drops, world, pos, state, fortune);
|
||||
+ if (this.func_185525_y(state) && RANDOM.nextInt(50) == 0)
|
||||
+ ret.add(new ItemStack(Items.field_151170_bI));
|
||||
+ return ret;
|
||||
+ drops.add(new ItemStack(Items.field_151170_bI));
|
||||
+ }
|
||||
}
|
||||
@@ -11,7 +11,7 @@
|
||||
public void func_176208_a(World p_176208_1_, BlockPos p_176208_2_, IBlockState p_176208_3_, EntityPlayer p_176208_4_)
|
||||
{
|
||||
if (p_176208_4_.field_71075_bZ.field_75098_d)
|
||||
@@ -139,13 +135,18 @@
|
||||
@@ -139,13 +135,17 @@
|
||||
p_176208_3_ = p_176208_3_.func_177226_a(field_176417_b, Boolean.valueOf(true));
|
||||
p_176208_1_.func_180501_a(p_176208_2_, p_176208_3_, 4);
|
||||
}
|
||||
@@ -25,13 +25,12 @@
|
||||
- if (!p_180663_1_.field_72995_K)
|
||||
+ super.func_180663_b(p_180663_1_, p_180663_2_, p_180663_3_);
|
||||
+ }
|
||||
+ public java.util.List<ItemStack> getDrops(IBlockAccess p_180663_1_, BlockPos p_180663_2_, IBlockState p_180663_3_, int fortune)
|
||||
+ public void getDrops(net.minecraft.util.NonNullList<ItemStack> drops, IBlockAccess p_180663_1_, BlockPos p_180663_2_, IBlockState p_180663_3_, int fortune)
|
||||
+ {
|
||||
+ java.util.List<ItemStack> ret = new java.util.ArrayList<ItemStack>();
|
||||
{
|
||||
if (!((Boolean)p_180663_3_.func_177229_b(field_176417_b)).booleanValue())
|
||||
{
|
||||
@@ -154,7 +155,7 @@
|
||||
@@ -154,7 +154,7 @@
|
||||
if (tileentity instanceof TileEntitySkull)
|
||||
{
|
||||
TileEntitySkull tileentityskull = (TileEntitySkull)tileentity;
|
||||
@@ -40,18 +39,16 @@
|
||||
|
||||
if (tileentityskull.func_145904_a() == 3 && tileentityskull.func_152108_a() != null)
|
||||
{
|
||||
@@ -164,12 +165,11 @@
|
||||
@@ -164,11 +164,9 @@
|
||||
itemstack.func_77978_p().func_74782_a("SkullOwner", nbttagcompound);
|
||||
}
|
||||
|
||||
- func_180635_a(p_180663_1_, p_180663_2_, itemstack);
|
||||
+ ret.add(itemstack);
|
||||
+ drops.add(itemstack);
|
||||
}
|
||||
}
|
||||
-
|
||||
- super.func_180663_b(p_180663_1_, p_180663_2_, p_180663_3_);
|
||||
}
|
||||
+ return ret;
|
||||
}
|
||||
|
||||
public Item func_180660_a(IBlockState p_180660_1_, Random p_180660_2_, int p_180660_3_)
|
||||
@@ -27,7 +27,7 @@
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -110,24 +112,29 @@
|
||||
@@ -110,20 +112,23 @@
|
||||
public void func_180653_a(World p_180653_1_, BlockPos p_180653_2_, IBlockState p_180653_3_, float p_180653_4_, int p_180653_5_)
|
||||
{
|
||||
super.func_180653_a(p_180653_1_, p_180653_2_, p_180653_3_, p_180653_4_, p_180653_5_);
|
||||
@@ -35,9 +35,8 @@
|
||||
|
||||
- if (!p_180653_1_.field_72995_K)
|
||||
+ @Override
|
||||
+ public java.util.List<ItemStack> getDrops(IBlockAccess world, BlockPos pos, IBlockState state, int fortune)
|
||||
+ public void getDrops(net.minecraft.util.NonNullList<ItemStack> drops, IBlockAccess world, BlockPos pos, IBlockState state, int fortune)
|
||||
+ {
|
||||
+ java.util.List<ItemStack> ret = new java.util.ArrayList<ItemStack>();
|
||||
{
|
||||
Item item = this.func_176481_j();
|
||||
|
||||
@@ -52,12 +51,7 @@
|
||||
+ if (RANDOM.nextInt(15) <= i)
|
||||
{
|
||||
- func_180635_a(p_180653_1_, p_180653_2_, new ItemStack(item));
|
||||
+ ret.add(new ItemStack(item));
|
||||
+ drops.add(new ItemStack(item));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
+ return ret;
|
||||
}
|
||||
|
||||
@Nullable
|
||||
@@ -27,7 +27,7 @@
|
||||
}
|
||||
|
||||
public int func_149679_a(int p_149679_1_, Random p_149679_2_)
|
||||
@@ -181,4 +181,21 @@
|
||||
@@ -181,4 +181,19 @@
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -39,13 +39,11 @@
|
||||
+ return NonNullList.func_191197_a(1, new ItemStack(Blocks.field_150329_H, 1, ((BlockTallGrass.EnumType)world.func_180495_p(pos).func_177229_b(field_176497_a)).func_177044_a()));
|
||||
+ }
|
||||
+ @Override
|
||||
+ public NonNullList<ItemStack> getDrops(IBlockAccess world, BlockPos pos, IBlockState state, int fortune)
|
||||
+ public void getDrops(NonNullList<ItemStack> drops, IBlockAccess world, BlockPos pos, IBlockState state, int fortune)
|
||||
+ {
|
||||
+ if (RANDOM.nextInt(8) != 0) return NonNullList.func_191196_a();
|
||||
+ if (RANDOM.nextInt(8) != 0) return;
|
||||
+ ItemStack seed = net.minecraftforge.common.ForgeHooks.getGrassSeed(RANDOM, fortune);
|
||||
+ if (!seed.func_190926_b())
|
||||
+ return NonNullList.func_191197_a(1, seed);
|
||||
+ else
|
||||
+ return NonNullList.func_191196_a();
|
||||
+ drops.add(seed);
|
||||
+ }
|
||||
}
|
||||
@@ -25,7 +25,7 @@ net/minecraft/world/chunk/storage/AnvilChunkLoader.loadEntities(Lnet/minecraft/w
|
||||
net/minecraft/world/gen/ChunkProviderServer.loadChunk(IILjava/lang/Runnable;)Lnet/minecraft/world/chunk/Chunk;=|p_186028_1_,p_186028_2_,runnable
|
||||
|
||||
net/minecraft/block/BlockFire.tryCatchFire(Lnet/minecraft/world/World;Lnet/minecraft/util/math/BlockPos;ILjava/util/Random;ILnet/minecraft/util/EnumFacing;)V=|p_176536_1_,p_176536_2_,p_176536_3_,p_176536_4_,p_176536_5_,face
|
||||
net/minecraft/block/BlockSkull.getDrops(Lnet/minecraft/world/IBlockAccess;Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/block/state/IBlockState;I)Ljava/util/List;=|p_180663_1_,p_180663_2_,p_180663_3_,fortune
|
||||
net/minecraft/block/BlockSkull.getDrops(Lnet/minecraft/util/NonNullList;Lnet/minecraft/world/IBlockAccess;Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/block/state/IBlockState;I)V=|drops,p_180663_1_,p_180663_2_,p_180663_3_,fortune
|
||||
net/minecraft/item/ItemDye.applyBonemeal(Lnet/minecraft/item/ItemStack;Lnet/minecraft/world/World;Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/entity/player/EntityPlayer;)Z=|p_179234_0_,p_179234_1_,p_179234_2_,player
|
||||
net/minecraft/item/ItemDye.applyBonemeal(Lnet/minecraft/item/ItemStack;Lnet/minecraft/world/World;Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/entity/player/EntityPlayer;Lnet/minecraft/util/EnumHand;)Z=|p_179234_0_,p_179234_1_,p_179234_2_,player,hand
|
||||
net/minecraft/server/management/ItemInWorldManager.removeBlock(Lnet/minecraft/util/math/BlockPos;Z)Z=|p_180235_1_,canHarvest
|
||||
|
||||
Reference in new issue
Block a user