mirror of
https://github.com/MinecraftForge/MinecraftForge.git
synced 2026-11-26 23:13:15 +00:00
26 lines
1.8 KiB
Diff
26 lines
1.8 KiB
Diff
--- a/net/minecraft/block/BlockIce.java
|
|
+++ b/net/minecraft/block/BlockIce.java
|
|
@@ -34,8 +34,10 @@
|
|
public void func_180657_a(World p_180657_1_, EntityPlayer p_180657_2_, BlockPos p_180657_3_, IBlockState p_180657_4_, @Nullable TileEntity p_180657_5_, ItemStack p_180657_6_) {
|
|
p_180657_2_.func_71029_a(StatList.field_188065_ae.func_199076_b(this));
|
|
p_180657_2_.func_71020_j(0.005F);
|
|
- if (this.func_149700_E() && EnchantmentHelper.func_77506_a(Enchantments.field_185306_r, p_180657_6_) > 0) {
|
|
- func_180635_a(p_180657_1_, p_180657_3_, this.func_180643_i(p_180657_4_));
|
|
+ if (this.canSilkHarvest(p_180657_4_, p_180657_1_, p_180657_3_, p_180657_2_) && EnchantmentHelper.func_77506_a(Enchantments.field_185306_r, p_180657_6_) > 0) {
|
|
+ net.minecraft.util.NonNullList<ItemStack> items = net.minecraft.util.NonNullList.func_193580_a(ItemStack.field_190927_a, func_180643_i(p_180657_4_));
|
|
+ net.minecraftforge.event.ForgeEventFactory.fireBlockHarvesting(items, p_180657_1_, p_180657_3_, p_180657_4_, 0, 1.0f, true, p_180657_2_);
|
|
+ items.stream().filter(e -> !e.func_190926_b()).forEach(e -> func_180635_a(p_180657_1_, p_180657_3_, e));
|
|
} else {
|
|
if (p_180657_1_.field_73011_w.func_177500_n()) {
|
|
p_180657_1_.func_175698_g(p_180657_3_);
|
|
@@ -43,7 +45,9 @@
|
|
}
|
|
|
|
int i = EnchantmentHelper.func_77506_a(Enchantments.field_185308_t, p_180657_6_);
|
|
+ harvesters.set(p_180657_2_);
|
|
p_180657_4_.func_196949_c(p_180657_1_, p_180657_3_, i);
|
|
+ harvesters.set(null);
|
|
Material material = p_180657_1_.func_180495_p(p_180657_3_.func_177977_b()).func_185904_a();
|
|
if (material.func_76230_c() || material.func_76224_d()) {
|
|
p_180657_1_.func_175656_a(p_180657_3_, Blocks.field_150355_j.func_176223_P());
|