|
|
@@ -11,6 +11,7 @@ import net.minecraft.entity.player.PlayerEntity;
|
|
|
import net.minecraft.entity.player.PlayerInventory;
|
|
|
import net.minecraft.inventory.CraftResultInventory;
|
|
|
import net.minecraft.inventory.IInventory;
|
|
|
+import net.minecraft.inventory.Inventory;
|
|
|
import net.minecraft.inventory.container.Container;
|
|
|
import net.minecraft.inventory.container.Slot;
|
|
|
import net.minecraft.item.ItemStack;
|
|
|
@@ -30,9 +31,9 @@ public class AnvilContainerRe extends Container {
|
|
|
private final PlayerEntity player;
|
|
|
public AnvilContainerRe(int id, PlayerInventory playerInventory) {
|
|
|
// 当从 Screen 渲染线程触发,就会从这里进行调用
|
|
|
- this(id, playerInventory, IWorldPosCallable.DUMMY, new AnvilTileEntity(RegMain.tileEntityPerfectAnvil.get()));
|
|
|
+ this(id, playerInventory, IWorldPosCallable.DUMMY, new Inventory(2));
|
|
|
}
|
|
|
- public AnvilContainerRe(int id, PlayerInventory playerInventory, IWorldPosCallable worldPosCallable, AnvilTileEntity tileEntity) {
|
|
|
+ public AnvilContainerRe(int id, PlayerInventory playerInventory, IWorldPosCallable worldPosCallable, IInventory tileEntity) {
|
|
|
super(RegMain.containerAnvil.get(), id);
|
|
|
this.worldPosCallable = worldPosCallable;
|
|
|
this.player = playerInventory.player;
|
|
|
@@ -42,7 +43,7 @@ public class AnvilContainerRe extends Container {
|
|
|
}
|
|
|
|
|
|
// 输入与输出物品槽
|
|
|
- public AnvilTileEntity inputInventory;
|
|
|
+ public IInventory inputInventory;
|
|
|
public final CraftResultInventory outputInventory = new CraftResultInventory();
|
|
|
|
|
|
// 构造页面槽位
|