use of io.izzel.arclight.common.bridge.inventory.container.LecternContainerBridge in project Arclight by IzzelAliz.
the class ContainerTypeMixin method arclight$replaceLectern.
@Inject(method = "register", cancellable = true, at = @At("HEAD"))
private static <T extends Container> void arclight$replaceLectern(String key, ContainerType.IFactory<T> factory, CallbackInfoReturnable<ContainerType<T>> cir) {
if (key.equals("lectern")) {
cir.setReturnValue(Registry.register(Registry.MENU, key, new ContainerType<>((i, inv) -> {
LecternContainer container = new LecternContainer(i);
((LecternContainerBridge) container).bridge$setPlayerInventory(inv);
return (T) container;
})));
}
}
use of io.izzel.arclight.common.bridge.inventory.container.LecternContainerBridge in project Arclight by IzzelAliz.
the class LecternTileEntityMixin method createMenu.
/**
* @author IzzelAliz
* @reason
*/
@Overwrite
public Container createMenu(int i, PlayerInventory playerInventory, PlayerEntity entity) {
LecternContainer container = new LecternContainer(i, this.inventory, this.field_214049_b);
((LecternContainerBridge) container).bridge$setPlayerInventory(playerInventory);
return container;
}
Aggregations