Revert "Fixed Teleposers"

This reverts commit da9866ac8f.
This commit is contained in:
Arcaratus 2015-05-11 19:05:14 -04:00
parent da9866ac8f
commit 307184fb85
15 changed files with 116 additions and 78 deletions

View file

@ -23,6 +23,7 @@ public class TECrucible extends TEInventory
public int ticksRemaining = 0;
public int minValue = 0;
public int maxValue = 0;
public float incrementValue = 0;
public int state = 0; //0 is when it gives off gray particles, 1 is when it gives off white particles (player can't use this incense anymore), 2 is the normal colour of the incense, 3 means no particles (it is out)
@ -59,6 +60,8 @@ public class TECrucible extends TEInventory
minValue = incense.getMinLevel(stack);
maxValue = incense.getMaxLevel(stack);
incrementValue = incense.getTickRate(stack);
stack.stackSize--;
if(stack.stackSize <= 0)
{
@ -78,7 +81,7 @@ public class TECrucible extends TEInventory
for(EntityPlayer player : playerList)
{
if(ticksRemaining > 0 && PlayerSacrificeHandler.incrementIncense(player, minValue, maxValue))
if(ticksRemaining > 0 && PlayerSacrificeHandler.incrementIncense(player, minValue, maxValue, incrementValue))
{
ticksRemaining--;
if(state != 2)

View file

@ -1,6 +1,5 @@
package WayofTime.alchemicalWizardry.common.tileEntity.container;
import WayofTime.alchemicalWizardry.common.items.TelepositionFocus;
import WayofTime.alchemicalWizardry.common.tileEntity.TETeleposer;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.entity.player.InventoryPlayer;
@ -15,7 +14,7 @@ public class ContainerTeleposer extends Container
public ContainerTeleposer(InventoryPlayer inventoryPlayer, TETeleposer te)
{
tileEntity = te;
addSlotToContainer(new Slot(tileEntity, 0, 80, 15));
addSlotToContainer(new Slot(tileEntity, 0, 80, 67));
bindPlayerInventory(inventoryPlayer);
}
@ -31,13 +30,13 @@ public class ContainerTeleposer extends Container
{
for (int j = 0; j < 9; j++)
{
addSlotToContainer(new Slot(inventoryPlayer, j + i * 9 + 9, 8 + j * 18, 39 + i * 18));
addSlotToContainer(new Slot(inventoryPlayer, j + i * 9 + 9, 8 + j * 18, 140 + i * 18));
}
}
for (int i = 0; i < 9; i++)
{
addSlotToContainer(new Slot(inventoryPlayer, i, 8 + i * 18, 97));
addSlotToContainer(new Slot(inventoryPlayer, i, 8 + i * 18, 198));
}
}
@ -46,27 +45,30 @@ public class ContainerTeleposer extends Container
{
ItemStack stack = null;
Slot slotObject = (Slot) inventorySlots.get(slot);
int slots = inventorySlots.size();
if (slotObject != null && slotObject.getHasStack())
{
ItemStack stackInSlot = slotObject.getStack();
stack = stackInSlot.copy();
System.out.println("Slots: " + slots);
if (stack.getItem() instanceof TelepositionFocus)
if (slot == 7)
{
if (slot <= slots)
{
if (!this.mergeItemStack(stackInSlot, 0, slots, false))
{
return null;
}
}
else if (!this.mergeItemStack(stackInSlot, slots, 36 + slots, false))
if (!this.mergeItemStack(stackInSlot, 7, 35, true))
{
return null;
}
slotObject.onSlotChange(stackInSlot, stack);
}
if (slot < 1)
{
if (!this.mergeItemStack(stackInSlot, 7, 35, true))
{
return null;
}
}
else if (!this.mergeItemStack(stackInSlot, 0, 0, false))
{
return null;
}
if (stackInSlot.stackSize == 0)

View file

@ -62,15 +62,13 @@ public class ContainerWritingTable extends Container
{
return null;
}
}
else if (stack.getItem() instanceof IBloodOrb)
} else if (stack.getItem() instanceof IBloodOrb)
{
if (!this.mergeItemStack(stackInSlot, 0, 1, false))
{
return null;
}
}
else if (!this.mergeItemStack(stackInSlot, 1, 6, false))
} else if (!this.mergeItemStack(stackInSlot, 1, 6, false))
{
return null;
}

View file

@ -15,16 +15,16 @@ public class GuiTeleposer extends GuiContainer
{
super(new ContainerTeleposer(inventoryPlayer, tileEntity));
xSize = 176;
ySize = 121;
ySize = 222;
}
@Override
protected void drawGuiContainerForegroundLayer(int param1, int param2)
{
//the parameters for drawString are: string, x, y, color
fontRendererObj.drawString("Teleposer", 64, 5, 4210752);
fontRendererObj.drawString("Teleposer", 8, 6, 4210752);
//draws "Inventory" or your regional equivalent
fontRendererObj.drawString(StatCollector.translateToLocal("container.inventory"), 8, 29, 4210752);
fontRendererObj.drawString(StatCollector.translateToLocal("container.inventory"), 8, 130, 4210752);
}
@Override
@ -37,5 +37,6 @@ public class GuiTeleposer extends GuiContainer
int x = (width - xSize) / 2;
int y = (height - ySize) / 2;
this.drawTexturedModalRect(x, y, 0, 0, xSize, ySize);
GuiBrewingStand d;
}
}