diff options
author | Alkalus <3060479+draknyte1@users.noreply.github.com> | 2018-05-23 09:30:03 +1000 |
---|---|---|
committer | Alkalus <3060479+draknyte1@users.noreply.github.com> | 2018-05-23 09:30:03 +1000 |
commit | a6de8b00edae274ce2d54ee5c80c649b1819b76e (patch) | |
tree | 6a2f8652d7b7c272a7335398bf0daf7a80094167 /src/Java/gtPlusPlus/xmod/thaumcraft/gui | |
parent | 167dc353f862fe969e8ace39fb2c3d62daccd4bc (diff) | |
download | GT5-Unofficial-a6de8b00edae274ce2d54ee5c80c649b1819b76e.tar.gz GT5-Unofficial-a6de8b00edae274ce2d54ee5c80c649b1819b76e.tar.bz2 GT5-Unofficial-a6de8b00edae274ce2d54ee5c80c649b1819b76e.zip |
$ Rewrote part of the Gradle build scrap.
- Removed lots of unused libs and classes, updated some others.
Diffstat (limited to 'src/Java/gtPlusPlus/xmod/thaumcraft/gui')
-rw-r--r-- | src/Java/gtPlusPlus/xmod/thaumcraft/gui/ContainerFastAlchemyFurnace.java | 145 | ||||
-rw-r--r-- | src/Java/gtPlusPlus/xmod/thaumcraft/gui/GuiFastAlchemyFurnace.java | 47 |
2 files changed, 0 insertions, 192 deletions
diff --git a/src/Java/gtPlusPlus/xmod/thaumcraft/gui/ContainerFastAlchemyFurnace.java b/src/Java/gtPlusPlus/xmod/thaumcraft/gui/ContainerFastAlchemyFurnace.java deleted file mode 100644 index 9689a3fa38..0000000000 --- a/src/Java/gtPlusPlus/xmod/thaumcraft/gui/ContainerFastAlchemyFurnace.java +++ /dev/null @@ -1,145 +0,0 @@ -package gtPlusPlus.xmod.thaumcraft.gui; - -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; - -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.entity.player.InventoryPlayer; -import net.minecraft.inventory.Container; -import net.minecraft.inventory.ICrafting; -import net.minecraft.inventory.Slot; -import net.minecraft.item.ItemStack; - -import gtPlusPlus.xmod.thaumcraft.common.tile.TileFastAlchemyFurnace; -import thaumcraft.api.aspects.AspectList; -import thaumcraft.common.container.SlotLimitedHasAspects; -import thaumcraft.common.lib.crafting.ThaumcraftCraftingManager; - -public class ContainerFastAlchemyFurnace extends Container { - private final TileFastAlchemyFurnace furnace; - private int lastCookTime; - private int lastBurnTime; - private int lastItemBurnTime; - private int lastVis; - private int lastSmelt; - - public ContainerFastAlchemyFurnace(final InventoryPlayer par1InventoryPlayer, final TileFastAlchemyFurnace tileEntity) { - this.furnace = tileEntity; - this.addSlotToContainer(new SlotLimitedHasAspects(tileEntity, 0, 80, 8)); - this.addSlotToContainer(new Slot(tileEntity, 1, 80, 48)); - for (int i = 0; i < 3; ++i) { - for (int j = 0; j < 9; ++j) { - this.addSlotToContainer( - new Slot(par1InventoryPlayer, j + (i * 9) + 9, 8 + (j * 18), 84 + (i * 18))); - } - } - for (int i = 0; i < 9; ++i) { - this.addSlotToContainer(new Slot(par1InventoryPlayer, i, 8 + (i * 18), 142)); - } - } - - @Override - public void addCraftingToCrafters(final ICrafting par1ICrafting) { - super.addCraftingToCrafters(par1ICrafting); - par1ICrafting.sendProgressBarUpdate(this, 0, this.furnace.furnaceCookTime); - par1ICrafting.sendProgressBarUpdate(this, 1, this.furnace.furnaceBurnTime); - par1ICrafting.sendProgressBarUpdate(this, 2, this.furnace.currentItemBurnTime); - par1ICrafting.sendProgressBarUpdate(this, 3, this.furnace.vis); - par1ICrafting.sendProgressBarUpdate(this, 4, this.furnace.smeltTime); - } - - @Override - public void detectAndSendChanges() { - super.detectAndSendChanges(); - for (int i = 0; i < this.crafters.size(); ++i) { - final ICrafting icrafting = (ICrafting) this.crafters.get(i); - if (this.lastCookTime != this.furnace.furnaceCookTime) { - icrafting.sendProgressBarUpdate(this, 0, this.furnace.furnaceCookTime); - } - if (this.lastBurnTime != this.furnace.furnaceBurnTime) { - icrafting.sendProgressBarUpdate(this, 1, this.furnace.furnaceBurnTime); - } - if (this.lastItemBurnTime != this.furnace.currentItemBurnTime) { - icrafting.sendProgressBarUpdate(this, 2, this.furnace.currentItemBurnTime); - } - if (this.lastVis != this.furnace.vis) { - icrafting.sendProgressBarUpdate(this, 3, this.furnace.vis); - } - if (this.lastSmelt != this.furnace.smeltTime) { - icrafting.sendProgressBarUpdate(this, 4, this.furnace.smeltTime); - } - } - this.lastCookTime = this.furnace.furnaceCookTime; - this.lastBurnTime = this.furnace.furnaceBurnTime; - this.lastItemBurnTime = this.furnace.currentItemBurnTime; - this.lastVis = this.furnace.vis; - this.lastSmelt = this.furnace.smeltTime; - } - - @Override - @SideOnly(Side.CLIENT) - public void updateProgressBar(final int par1, final int par2) { - if (par1 == 0) { - this.furnace.furnaceCookTime = par2; - } - if (par1 == 1) { - this.furnace.furnaceBurnTime = par2; - } - if (par1 == 2) { - this.furnace.currentItemBurnTime = par2; - } - if (par1 == 3) { - this.furnace.vis = par2; - } - if (par1 == 4) { - this.furnace.smeltTime = par2; - } - } - - @Override - public boolean canInteractWith(final EntityPlayer par1EntityPlayer) { - return this.furnace.isUseableByPlayer(par1EntityPlayer); - } - - @Override - public ItemStack transferStackInSlot(final EntityPlayer par1EntityPlayer, final int par2) { - ItemStack itemstack = null; - final Slot slot = (Slot) this.inventorySlots.get(par2); - if ((slot != null) && slot.getHasStack()) { - final ItemStack itemstack2 = slot.getStack(); - itemstack = itemstack2.copy(); - if ((par2 != 1) && (par2 != 0)) { - AspectList al = ThaumcraftCraftingManager.getObjectTags(itemstack2); - al = ThaumcraftCraftingManager.getBonusTags(itemstack2, al); - if (TileFastAlchemyFurnace.isItemFuel(itemstack2)) { - if (!this.mergeItemStack(itemstack2, 1, 2, false) - && !this.mergeItemStack(itemstack2, 0, 1, false)) { - return null; - } - } else if ((al != null) && (al.size() > 0)) { - if (!this.mergeItemStack(itemstack2, 0, 1, false)) { - return null; - } - } else if ((par2 >= 2) && (par2 < 29)) { - if (!this.mergeItemStack(itemstack2, 29, 38, false)) { - return null; - } - } else if ((par2 >= 29) && (par2 < 38) && !this.mergeItemStack(itemstack2, 2, 29, false)) { - return null; - } - } else if (!this.mergeItemStack(itemstack2, 2, 38, false)) { - return null; - } - if (itemstack2.stackSize == 0) { - slot.putStack((ItemStack) null); - } else { - slot.onSlotChanged(); - } - if (itemstack2.stackSize == itemstack.stackSize) { - return null; - } - slot.onPickupFromSlot(par1EntityPlayer, itemstack2); - } - return itemstack; - } -}
\ No newline at end of file diff --git a/src/Java/gtPlusPlus/xmod/thaumcraft/gui/GuiFastAlchemyFurnace.java b/src/Java/gtPlusPlus/xmod/thaumcraft/gui/GuiFastAlchemyFurnace.java deleted file mode 100644 index 0d8539e472..0000000000 --- a/src/Java/gtPlusPlus/xmod/thaumcraft/gui/GuiFastAlchemyFurnace.java +++ /dev/null @@ -1,47 +0,0 @@ -package gtPlusPlus.xmod.thaumcraft.gui; - -import org.lwjgl.opengl.GL11; - -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; - -import net.minecraft.client.gui.inventory.GuiContainer; -import net.minecraft.entity.player.InventoryPlayer; - -import gtPlusPlus.xmod.thaumcraft.common.tile.TileFastAlchemyFurnace; -import thaumcraft.client.lib.UtilsFX; - -@SideOnly(Side.CLIENT) -public class GuiFastAlchemyFurnace extends GuiContainer { - private final TileFastAlchemyFurnace furnaceInventory; - - public GuiFastAlchemyFurnace(final InventoryPlayer par1InventoryPlayer, - final TileFastAlchemyFurnace par2TileEntityFurnace) { - super(new ContainerFastAlchemyFurnace(par1InventoryPlayer, par2TileEntityFurnace)); - this.furnaceInventory = par2TileEntityFurnace; - } - - @Override - protected void drawGuiContainerForegroundLayer(final int par1, final int par2) { - } - - @Override - protected void drawGuiContainerBackgroundLayer(final float par1, final int par2, final int par3) { - GL11.glColor4f(1.0f, 1.0f, 1.0f, 1.0f); - UtilsFX.bindTexture("textures/gui/gui_alchemyfurnace.png"); - final int k = (this.width - this.xSize) / 2; - final int l = (this.height - this.ySize) / 2; - GL11.glEnable(3042); - this.drawTexturedModalRect(k, l, 0, 0, this.xSize, this.ySize); - if (this.furnaceInventory.isBurning()) { - final int i1 = this.furnaceInventory.getBurnTimeRemainingScaled(20); - this.drawTexturedModalRect(k + 80, (l + 26 + 20) - i1, 176, 20 - i1, 16, i1); - } - int i1 = this.furnaceInventory.getCookProgressScaled(46); - this.drawTexturedModalRect(k + 106, (l + 13 + 46) - i1, 216, 46 - i1, 9, i1); - i1 = this.furnaceInventory.getContentsScaled(48); - this.drawTexturedModalRect(k + 61, (l + 12 + 48) - i1, 200, 48 - i1, 8, i1); - this.drawTexturedModalRect(k + 60, l + 8, 232, 0, 10, 55); - GL11.glDisable(3042); - } -}
\ No newline at end of file |