Search in sources :

Example 1 with ComposterBlock

use of net.minecraft.block.ComposterBlock in project Arclight by IzzelAliz.

the class ComposterBlockMixin method arclight$newEmpty.

@SuppressWarnings("UnresolvedMixinReference")
@Redirect(method = "createInventory", at = @At(value = "NEW", target = "()Lnet/minecraft/block/ComposterBlock$EmptyInventory;"))
public ComposterBlock.EmptyInventory arclight$newEmpty(BlockState blockState, IWorld world, BlockPos blockPos) {
    ComposterBlock.EmptyInventory inventory = new ComposterBlock.EmptyInventory();
    ((IInventoryBridge) inventory).setOwner(new CraftBlockInventoryHolder(world, blockPos, inventory));
    return inventory;
}
Also used : ComposterBlock(net.minecraft.block.ComposterBlock) IInventoryBridge(io.izzel.arclight.common.bridge.inventory.IInventoryBridge) CraftBlockInventoryHolder(org.bukkit.craftbukkit.v.inventory.CraftBlockInventoryHolder) Redirect(org.spongepowered.asm.mixin.injection.Redirect)

Aggregations

IInventoryBridge (io.izzel.arclight.common.bridge.inventory.IInventoryBridge)1 ComposterBlock (net.minecraft.block.ComposterBlock)1 CraftBlockInventoryHolder (org.bukkit.craftbukkit.v.inventory.CraftBlockInventoryHolder)1 Redirect (org.spongepowered.asm.mixin.injection.Redirect)1