mirror of
https://github.com/KAMKEEL/CustomNPC-Plus.git
synced 2026-11-19 06:09:05 +00:00
Proper Reformating
This commit is contained in:
1 parent
ce75880aba
commit
180d257024
1179 files changed
+59847
-61583
No files matched your search
@@ -7,85 +7,65 @@ import net.minecraft.item.ItemStack;
|
||||
import noppes.npcs.entity.EntityNPCInterface;
|
||||
import noppes.npcs.roles.RoleFollower;
|
||||
|
||||
public class ContainerNPCFollowerSetup extends Container
|
||||
{
|
||||
private RoleFollower role;
|
||||
public class ContainerNPCFollowerSetup extends Container {
|
||||
private RoleFollower role;
|
||||
|
||||
public ContainerNPCFollowerSetup(EntityNPCInterface npc,EntityPlayer player)
|
||||
{
|
||||
public ContainerNPCFollowerSetup(EntityNPCInterface npc, EntityPlayer player) {
|
||||
role = (RoleFollower) npc.roleInterface;
|
||||
|
||||
for(int i1 = 0; i1 < 3; i1++)
|
||||
addSlotToContainer(new Slot(role.inventory, i1, 44, 39 + i1 * 25));
|
||||
|
||||
for(int i1 = 0; i1 < 3; i1++)
|
||||
{
|
||||
for(int l1 = 0; l1 < 9; l1++)
|
||||
{
|
||||
addSlotToContainer(new Slot(player.inventory, l1 + i1 * 9 + 9, 8 + l1 * 18, 113 + i1 * 18));
|
||||
|
||||
for (int i1 = 0; i1 < 3; i1++)
|
||||
addSlotToContainer(new Slot(role.inventory, i1, 44, 39 + i1 * 25));
|
||||
|
||||
for (int i1 = 0; i1 < 3; i1++) {
|
||||
for (int l1 = 0; l1 < 9; l1++) {
|
||||
addSlotToContainer(new Slot(player.inventory, l1 + i1 * 9 + 9, 8 + l1 * 18, 113 + i1 * 18));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
for(int j1 = 0; j1 < 9; j1++)
|
||||
{
|
||||
addSlotToContainer(new Slot(player.inventory, j1, 8 + j1 * 18, 171));
|
||||
for (int j1 = 0; j1 < 9; j1++) {
|
||||
addSlotToContainer(new Slot(player.inventory, j1, 8 + j1 * 18, 171));
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public ItemStack transferStackInSlot(EntityPlayer par1EntityPlayer, int i)
|
||||
{
|
||||
public ItemStack transferStackInSlot(EntityPlayer par1EntityPlayer, int i) {
|
||||
ItemStack itemstack = null;
|
||||
Slot slot = (Slot)inventorySlots.get(i);
|
||||
if(slot != null && slot.getHasStack())
|
||||
{
|
||||
Slot slot = (Slot) inventorySlots.get(i);
|
||||
if (slot != null && slot.getHasStack()) {
|
||||
ItemStack itemstack1 = slot.getStack();
|
||||
itemstack = itemstack1.copy();
|
||||
if(i >= 0 && i < 3)
|
||||
{
|
||||
if(!mergeItemStack(itemstack1, 3, 38, true))
|
||||
{
|
||||
if (i >= 0 && i < 3) {
|
||||
if (!mergeItemStack(itemstack1, 3, 38, true)) {
|
||||
return null;
|
||||
}
|
||||
} else
|
||||
if(i >= 3 && i < 30)
|
||||
{
|
||||
if(!mergeItemStack(itemstack1, 30, 38, false))
|
||||
{
|
||||
} else if (i >= 3 && i < 30) {
|
||||
if (!mergeItemStack(itemstack1, 30, 38, false)) {
|
||||
return null;
|
||||
}
|
||||
} else
|
||||
if(i >= 30 && i < 38)
|
||||
{
|
||||
if(!mergeItemStack(itemstack1, 3, 29, false))
|
||||
{
|
||||
} else if (i >= 30 && i < 38) {
|
||||
if (!mergeItemStack(itemstack1, 3, 29, false)) {
|
||||
return null;
|
||||
}
|
||||
} else
|
||||
if(!mergeItemStack(itemstack1, 3, 38, false))
|
||||
{
|
||||
} else if (!mergeItemStack(itemstack1, 3, 38, false)) {
|
||||
return null;
|
||||
}
|
||||
if(itemstack1.stackSize == 0)
|
||||
{
|
||||
if (itemstack1.stackSize == 0) {
|
||||
slot.putStack(null);
|
||||
} else
|
||||
{
|
||||
} else {
|
||||
slot.onSlotChanged();
|
||||
}
|
||||
if(itemstack1.stackSize != itemstack.stackSize)
|
||||
{
|
||||
if (itemstack1.stackSize != itemstack.stackSize) {
|
||||
slot.onPickupFromSlot(par1EntityPlayer, itemstack1);
|
||||
} else
|
||||
{
|
||||
} else {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
return itemstack;
|
||||
}
|
||||
@Override
|
||||
public boolean canInteractWith(EntityPlayer entityplayer) {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canInteractWith(EntityPlayer entityplayer) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user