- 75
- 1
- 0
Как исправить чтобы вылет изза ID Слотов перестал появляться, и еще когда навожу на слот получаю белый фон.
SlotCustom
Код:
for (int j = 0; j < 9; ++j)
//for (int j = 0; j < Количество слотов не больше 9 иначе краш клиента; ++j)
{
//this.addSlotToContainer(new Slot(this.tileEntity, j, 8 + j * 16, 0));
//this.addSlotToContainer(new Slot(this.tileEntity, j, 8 + j * 16, 16));
// 7
this.addSlotToContainer(new SlotCustom(te, 1001, 9, 7));
this.addSlotToContainer(new SlotCustom(te, 1002, 27, 7));
this.addSlotToContainer(new SlotCustom(te, 1003, 45, 7));
this.addSlotToContainer(new SlotCustom(te, 1004, 63, 7));
this.addSlotToContainer(new SlotCustom(te, 1005, 81, 7));
this.addSlotToContainer(new SlotCustom(te, 1006, 99, 7));
this.addSlotToContainer(new SlotCustom(te, 1008, 117, 7));
this.addSlotToContainer(new SlotCustom(te, 1009, 135, 7));
this.addSlotToContainer(new SlotCustom(te, 1010, 153, 7));
this.addSlotToContainer(new SlotCustom(te, 1011, 171, 7));
this.addSlotToContainer(new SlotCustom(te, 1012, 189, 7));
// 25
this.addSlotToContainer(new SlotCustom(te, 1013, 9, 25));
this.addSlotToContainer(new SlotCustom(te, 1014, 27, 25));
this.addSlotToContainer(new SlotCustom(te, 1015, 45, 25));
this.addSlotToContainer(new SlotCustom(te, 1016, 63, 25));
this.addSlotToContainer(new SlotCustom(te, 1017, 81, 25));
this.addSlotToContainer(new SlotCustom(te, 1018, 99, 25));
this.addSlotToContainer(new SlotCustom(te, 1019, 117, 25));
this.addSlotToContainer(new SlotCustom(te, 1020, 135, 25));
this.addSlotToContainer(new SlotCustom(te, 1021, 153, 25));
this.addSlotToContainer(new SlotCustom(te, 1022, 171, 25));
this.addSlotToContainer(new SlotCustom(te, 1023, 189, 25));
//43
this.addSlotToContainer(new SlotCustom(te, 1024, 9, 43));
this.addSlotToContainer(new SlotCustom(te, 1025, 27, 43));
this.addSlotToContainer(new SlotCustom(te, 1026, 45, 43));
this.addSlotToContainer(new SlotCustom(te, 1027, 63, 43));
this.addSlotToContainer(new SlotCustom(te, 1028, 81, 43));
this.addSlotToContainer(new SlotCustom(te, 1029, 99, 43));
this.addSlotToContainer(new SlotCustom(te, 1030, 117, 43));
this.addSlotToContainer(new SlotCustom(te, 1031, 135, 43));
this.addSlotToContainer(new SlotCustom(te, 1032, 153, 43));
this.addSlotToContainer(new SlotCustom(te, 1033, 171, 43));
this.addSlotToContainer(new SlotCustom(te, 1034, 189, 43));
//61
this.addSlotToContainer(new SlotCustom(te, 1035, 9, 61));
this.addSlotToContainer(new SlotCustom(te, 1036, 27, 61));
this.addSlotToContainer(new SlotCustom(te, 1037, 45, 61));
this.addSlotToContainer(new SlotCustom(te, 1038, 63, 61));
this.addSlotToContainer(new SlotCustom(te, 1039, 81, 61));
this.addSlotToContainer(new SlotCustom(te, 1040, 99, 61));
this.addSlotToContainer(new SlotCustom(te, 1041, 117, 61));
this.addSlotToContainer(new SlotCustom(te, 1042, 135, 61));
this.addSlotToContainer(new SlotCustom(te, 1043, 153, 61));
this.addSlotToContainer(new SlotCustom(te, 1044, 171, 61));
this.addSlotToContainer(new SlotCustom(te, 1045, 189, 61));
//this.addSlotToContainer(new Slot(this.tileEntity, j, 8 + j * Растояние между слотами, высота));
}
this.bindPlayerInventory(inventoryPlayer);
}
Код:
public class SlotCustom extends Slot
{
public SlotCustom(IInventory Inventory, int id, int x, int y) {
super(Inventory, id, x, y);
}
@Override
public boolean isItemValid (ItemStack par1ItemStack)
{
return true;
}
@Override
public int getSlotStackLimit()
{
return 64;
}
}