--- ../src-base/minecraft/net/minecraft/tileentity/TileEntityHopper.java +++ ../src-work/minecraft/net/minecraft/tileentity/TileEntityHopper.java @@ -191,6 +191,7 @@ private boolean func_145883_k() { + if (net.minecraftforge.items.VanillaInventoryCodeHooks.insertHook(this)) { return true; } IInventory iinventory = this.func_145895_l(); if (iinventory == null) @@ -297,6 +298,8 @@ public static boolean func_145891_a(IHopper p_145891_0_) { + Boolean ret = net.minecraftforge.items.VanillaInventoryCodeHooks.extractHook(p_145891_0_); + if (ret != null) return ret; IInventory iinventory = func_145884_b(p_145891_0_); if (iinventory != null) @@ -396,6 +399,12 @@ } } + + protected net.minecraftforge.items.IItemHandler createUnSidedHandler() + { + return new net.minecraftforge.items.VanillaHopperItemHandler(this); + } + public static ItemStack func_174918_a(IInventory p_174918_0_, IInventory p_174918_1_, ItemStack p_174918_2_, @Nullable EnumFacing p_174918_3_) { if (p_174918_1_ instanceof ISidedInventory && p_174918_3_ != null) @@ -516,9 +525,10 @@ int j = MathHelper.func_76128_c(p_145893_3_); int k = MathHelper.func_76128_c(p_145893_5_); BlockPos blockpos = new BlockPos(i, j, k); - Block block = p_145893_0_.func_180495_p(blockpos).func_177230_c(); + net.minecraft.block.state.IBlockState state = p_145893_0_.func_180495_p(blockpos); + Block block = state.func_177230_c(); - if (block.func_149716_u()) + if (block.hasTileEntity(state)) { TileEntity tileentity = p_145893_0_.func_175625_s(blockpos); @@ -611,4 +621,6 @@ { return this.field_145900_a; } + + public long getLastUpdateTime() { return field_190578_g; } // Forge }