19 lines
862 B
Java
19 lines
862 B
Java
package com.kasetoatz.doubleenderchest.mixin;
|
|
|
|
import net.minecraft.block.EnderChestBlock;
|
|
import net.minecraft.screen.GenericContainerScreenHandler;
|
|
import net.minecraft.screen.ScreenHandlerFactory;
|
|
import org.spongepowered.asm.mixin.Mixin;
|
|
import org.spongepowered.asm.mixin.injection.At;
|
|
import org.spongepowered.asm.mixin.injection.ModifyArg;
|
|
|
|
@Mixin(EnderChestBlock.class)
|
|
public class EnderChestBlockMixin
|
|
{
|
|
@ModifyArg(method="onUse", at=@At(value="INVOKE", target="Lnet/minecraft/screen/SimpleNamedScreenHandlerFactory;<init>(Lnet/minecraft/screen/ScreenHandlerFactory;Lnet/minecraft/text/Text;)V", ordinal=0))
|
|
public ScreenHandlerFactory size(ScreenHandlerFactory original)
|
|
{
|
|
return (syncId, playerInventory, player) -> GenericContainerScreenHandler.createGeneric9x6(syncId, playerInventory, player.getEnderChestInventory());
|
|
}
|
|
}
|