mirror of
https://github.com/GTNewHorizons/EnderIO.git
synced 2026-11-15 17:45:08 +00:00
Compare commits
2
Commits
2.10.6
...
2.9.17-pre
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
c30062a011 | ||
|
|
d348e31425 |
No files matched your search
+10
-10
@@ -2,23 +2,23 @@
|
||||
|
||||
dependencies {
|
||||
api('com.github.GTNewHorizons:EnderCore:0.4.8:dev') {transitive = false}
|
||||
compileOnly('com.github.GTNewHorizons:ForestryMC:4.10.10:dev')
|
||||
compileOnly('com.github.GTNewHorizons:NotEnoughItems:2.7.48-GTNH:dev')
|
||||
api("com.github.GTNewHorizons:GTNHLib:0.6.25:dev")
|
||||
compileOnly('com.github.GTNewHorizons:BuildCraft:7.1.42:dev')
|
||||
compileOnly('com.github.GTNewHorizons:ForestryMC:4.10.11:dev')
|
||||
compileOnly('com.github.GTNewHorizons:NotEnoughItems:2.7.51-GTNH:dev')
|
||||
api("com.github.GTNewHorizons:GTNHLib:0.6.30:dev")
|
||||
compileOnly('com.github.GTNewHorizons:BuildCraft:7.1.43:dev')
|
||||
api('curse.maven:cofh-lib-220333:2388748') // https://www.curseforge.com/minecraft/mc-mods/cofh-lib/files/2388748
|
||||
shadowImplementation('cglib:cglib-nodep:3.3.0')
|
||||
api("com.github.GTNewHorizons:TinkersConstruct:1.13.28-GTNH:dev")
|
||||
api("com.github.GTNewHorizons:TinkersConstruct:1.13.33-GTNH:dev")
|
||||
|
||||
compileOnly('com.github.GTNewHorizons:waila:1.8.6:api') {transitive = false}
|
||||
compileOnly('com.github.GTNewHorizons:Applied-Energistics-2-Unofficial:rv3-beta-619-GTNH:api') {transitive = false}
|
||||
compileOnly('com.github.GTNewHorizons:waila:1.8.7:api') {transitive = false}
|
||||
compileOnly('com.github.GTNewHorizons:Applied-Energistics-2-Unofficial:rv3-beta-629-GTNH:api') {transitive = false}
|
||||
compileOnly('com.github.GTNewHorizons:Baubles:1.0.4:dev') {transitive = false}
|
||||
compileOnly('com.github.GTNewHorizons:GT5-Unofficial:5.09.51.312:dev') {transitive = false}
|
||||
compileOnly('com.github.GTNewHorizons:GT5-Unofficial:5.09.51.336:dev') {transitive = false}
|
||||
compileOnly("com.github.GTNewHorizons:ModularUI2:2.2.15-1.7.10:dev") {transitive = false}
|
||||
compileOnly('com.github.GTNewHorizons:Railcraft:9.16.30:dev') {transitive = false}
|
||||
compileOnly('com.github.GTNewHorizons:StorageDrawers:2.1.2-GTNH:api') {transitive = false}
|
||||
compileOnly('com.github.GTNewHorizons:Chisel:2.16.4-GTNH:dev') {transitive = false}
|
||||
compileOnly('com.github.GTNewHorizons:OpenComputers:1.11.15-GTNH:api') {transitive = false}
|
||||
compileOnly('com.github.GTNewHorizons:OpenComputers:1.11.16-GTNH:api') {transitive = false}
|
||||
compileOnly('curse.maven:minefactory-reloaded-66672:2366150') // https://www.curseforge.com/minecraft/mc-mods/minefactory-reloaded/files/2366150
|
||||
compileOnly('thaumcraft:Thaumcraft:1.7.10-4.2.3.5:dev')
|
||||
compileOnly('curse.maven:ee3-65509:2305023') // https://www.curseforge.com/minecraft/mc-mods/ee3/files/2305023
|
||||
@@ -26,5 +26,5 @@ dependencies {
|
||||
compileOnly(rfg.deobf('curse.maven:mekanism-268560:2475797')) // https://www.curseforge.com/minecraft/mc-mods/mekanism/files/2475797
|
||||
compileOnly(rfg.deobf('maven.modrinth:immibis-microblocks:59.1.2')) // https://modrinth.com/mod/immibis-microblocks/version/59.1.2
|
||||
|
||||
compileOnlyApi('com.github.GTNewHorizons:Angelica:1.0.0-beta43:api') {transitive = false}
|
||||
compileOnlyApi('com.github.GTNewHorizons:Angelica:1.0.0-beta45:api') {transitive = false}
|
||||
}
|
||||
+1
-1
@@ -80,7 +80,7 @@ apiPackage = api
|
||||
# Specify the configuration file for Forge's access transformers here. It must be placed into /src/main/resources/META-INF/
|
||||
# There can be multiple files in a space-separated list.
|
||||
# Example value: mymodid_at.cfg nei_at.cfg
|
||||
accessTransformersFile =
|
||||
accessTransformersFile = enderio_at.cfg
|
||||
|
||||
# Provides setup for Mixins if enabled. If you don't know what mixins are: Keep it disabled!
|
||||
usesMixins = false
|
||||
|
||||
@@ -23,7 +23,7 @@ public class GuiAlloySmelter extends GuiPoweredMachineBase<TileAlloySmelter> {
|
||||
private final IIconButton vanillaFurnaceButton;
|
||||
private final GuiToolTip vanillaFurnaceTooltip;
|
||||
|
||||
protected static final int SMELT_MODE_BUTTON_ID = 76;
|
||||
protected static final int SMELT_MODE_BUTTON_ID = 43;
|
||||
|
||||
public GuiAlloySmelter(InventoryPlayer par1InventoryPlayer, TileAlloySmelter furnaceInventory) {
|
||||
super(furnaceInventory, new ContainerAlloySmelter(par1InventoryPlayer, furnaceInventory), "alloySmelter");
|
||||
@@ -38,7 +38,7 @@ public class GuiAlloySmelter extends GuiPoweredMachineBase<TileAlloySmelter> {
|
||||
vanillaFurnaceButton.setSize(BUTTON_SIZE, BUTTON_SIZE);
|
||||
|
||||
vanillaFurnaceTooltip = new GuiToolTip(
|
||||
new Rectangle(xSize - 5 - BUTTON_SIZE, 62, BUTTON_SIZE, BUTTON_SIZE),
|
||||
new Rectangle(xSize - 5 - BUTTON_SIZE, 43, BUTTON_SIZE, BUTTON_SIZE),
|
||||
(String[]) null);
|
||||
|
||||
addProgressTooltip(55, 35, 14, 14);
|
||||
|
||||
@@ -93,11 +93,6 @@ public class GuiBuffer extends GuiPoweredMachineBase<TileBuffer> {
|
||||
PacketHandler.INSTANCE.sendToServer(new PacketBufferIO(getTileEntity(), lastInput, lastOutput));
|
||||
}
|
||||
|
||||
@Override
|
||||
protected boolean showRecipeButton() {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected boolean renderPowerBar() {
|
||||
return getTileEntity().hasPower();
|
||||
|
||||
@@ -67,11 +67,6 @@ public class GuiCrafter extends GuiPoweredMachineBase<TileCrafter> {
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
protected boolean showRecipeButton() {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public final int getXSize() {
|
||||
return 219;
|
||||
|
||||
@@ -7,34 +7,23 @@ import net.minecraft.entity.player.InventoryPlayer;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import com.enderio.core.client.gui.button.IconButton;
|
||||
|
||||
import crazypants.enderio.EnderIO;
|
||||
import crazypants.enderio.gui.GuiContainerBaseEIO;
|
||||
import crazypants.enderio.gui.IconEIO;
|
||||
|
||||
public class GuiEnchanter extends GuiContainerBaseEIO {
|
||||
|
||||
private TileEnchanter te;
|
||||
private ContainerEnchanter container;
|
||||
private IconButton recipeButton;
|
||||
|
||||
public GuiEnchanter(EntityPlayer player, InventoryPlayer inventory, TileEnchanter te) {
|
||||
super(new ContainerEnchanter(player, inventory, te), "enchanter");
|
||||
container = (ContainerEnchanter) inventorySlots;
|
||||
this.te = te;
|
||||
|
||||
recipeButton = new IconButton(this, 100, 154, 8, IconEIO.RECIPE);
|
||||
recipeButton.visible = false;
|
||||
recipeButton.setIconMargin(1, 1);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void initGui() {
|
||||
super.initGui();
|
||||
recipeButton.onGuiInit();
|
||||
recipeButton.visible = EnderIO.proxy.isNeiInstalled();
|
||||
((ContainerEnchanter) inventorySlots).createGhostSlots(getGhostSlots());
|
||||
container.createGhostSlots(getGhostSlots());
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -45,10 +34,6 @@ public class GuiEnchanter extends GuiContainerBaseEIO {
|
||||
int sy = (height - ySize) / 2;
|
||||
drawTexturedModalRect(sx, sy, 0, 0, this.xSize, this.ySize);
|
||||
|
||||
if (EnderIO.proxy.isNeiInstalled()) {
|
||||
IconEIO.map.render(IconEIO.RECIPE, sx + 155, sy + 8, 16, 16, 0, true);
|
||||
}
|
||||
|
||||
int curCost = te.getCurrentEnchantmentCost();
|
||||
if (curCost > 0) {
|
||||
GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
|
||||
|
||||
@@ -138,11 +138,6 @@ public class GuiFarmStation extends GuiPoweredMachineBase<TileFarmStation> {
|
||||
super.actionPerformed(b);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected boolean showRecipeButton() {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected String getPowerOutputLabel() {
|
||||
return EnderIO.lang.localize("farm.gui.baseUse");
|
||||
|
||||
-5
@@ -52,11 +52,6 @@ public class GuiCombustionGenerator extends GuiPoweredMachineBase<TileCombustion
|
||||
});
|
||||
}
|
||||
|
||||
@Override
|
||||
protected boolean showRecipeButton() {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void renderSlotHighlights(IoMode mode) {
|
||||
super.renderSlotHighlights(mode);
|
||||
|
||||
@@ -58,11 +58,6 @@ public class GuiStirlingGenerator extends GuiPoweredMachineBase<TileEntityStirli
|
||||
return fmt.format(args, new StringBuffer(), null).toString();
|
||||
}
|
||||
|
||||
@Override
|
||||
protected boolean showRecipeButton() {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected String formatProgressTooltip(int scaledProgress, float remaining) {
|
||||
int totalBurnTime = getTileEntity().totalBurnTime;
|
||||
|
||||
@@ -41,11 +41,6 @@ public class GuiZombieGenerator extends GuiPoweredMachineBase<TileZombieGenerato
|
||||
});
|
||||
}
|
||||
|
||||
@Override
|
||||
protected boolean showRecipeButton() {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void renderSlotHighlights(IoMode mode) {
|
||||
super.renderSlotHighlights(mode);
|
||||
|
||||
@@ -12,7 +12,6 @@ import net.minecraft.inventory.Slot;
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import com.enderio.core.api.common.util.IProgressTile;
|
||||
import com.enderio.core.client.gui.button.IconButton;
|
||||
import com.enderio.core.client.gui.button.ToggleButton;
|
||||
import com.enderio.core.client.gui.widget.GuiToolTip;
|
||||
import com.enderio.core.client.render.RenderUtil;
|
||||
@@ -22,7 +21,6 @@ import com.enderio.core.common.vecmath.Vector4f;
|
||||
|
||||
import crazypants.enderio.EnderIO;
|
||||
import crazypants.enderio.gui.GuiContainerBaseEIO;
|
||||
import crazypants.enderio.gui.IconEIO;
|
||||
import crazypants.enderio.gui.IoConfigRenderer.SelectedFace;
|
||||
import crazypants.enderio.gui.RedstoneModeButton;
|
||||
import crazypants.enderio.machine.AbstractMachineEntity;
|
||||
@@ -46,8 +44,6 @@ public abstract class GuiMachineBase<T extends AbstractMachineEntity> extends Gu
|
||||
|
||||
protected final GuiButtonIoConfig configB;
|
||||
|
||||
protected IconButton recipeButton;
|
||||
|
||||
protected List<GuiToolTip> progressTooltips;
|
||||
protected int lastProgressTooltipValue = -1;
|
||||
|
||||
@@ -66,11 +62,6 @@ public abstract class GuiMachineBase<T extends AbstractMachineEntity> extends Gu
|
||||
|
||||
y += 19;
|
||||
configB = new GuiButtonIoConfig(this, CONFIG_ID, x, y, machine, configOverlay);
|
||||
|
||||
y += 19;
|
||||
recipeButton = new IconButton(this, RECIPE_ID, x, y, IconEIO.RECIPE);
|
||||
recipeButton.visible = false;
|
||||
recipeButton.setIconMargin(1, 1);
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -78,11 +69,6 @@ public abstract class GuiMachineBase<T extends AbstractMachineEntity> extends Gu
|
||||
super.initGui();
|
||||
redstoneButton.onGuiInit();
|
||||
configB.onGuiInit();
|
||||
recipeButton.onGuiInit();
|
||||
}
|
||||
|
||||
protected boolean showRecipeButton() {
|
||||
return EnderIO.proxy.isNeiInstalled();
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -96,10 +82,6 @@ public abstract class GuiMachineBase<T extends AbstractMachineEntity> extends Gu
|
||||
guibutton.drawButton(mc, 0, 0);
|
||||
}
|
||||
|
||||
if (showRecipeButton()) {
|
||||
recipeButton.visible = true;
|
||||
}
|
||||
|
||||
super.drawGuiContainerBackgroundLayer(par1, par2, par3);
|
||||
|
||||
renderSlotHighlights();
|
||||
|
||||
@@ -536,11 +536,6 @@ public class GuiInventoryPanel extends GuiMachineBase<TileInventoryPanel> {
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
protected boolean showRecipeButton() {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getXSize() {
|
||||
return 280;
|
||||
|
||||
@@ -102,11 +102,6 @@ public class GuiKillerJoe extends GuiMachineBase<TileKillerJoe> {
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
protected boolean showRecipeButton() {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void renderSlotHighlights(IoMode mode) {
|
||||
super.renderSlotHighlights(mode);
|
||||
|
||||
@@ -76,8 +76,4 @@ public class GuiAttractor extends GuiPoweredMachineBase<TileAttractor> {
|
||||
ColorUtil.getRGB(Color.white));
|
||||
}
|
||||
|
||||
@Override
|
||||
protected boolean showRecipeButton() {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
@@ -75,8 +75,4 @@ public class GuiAversionObelisk extends GuiPoweredMachineBase<TileAversionObelis
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
protected boolean showRecipeButton() {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
@@ -113,11 +113,6 @@ public class GuiWeatherObelisk extends GuiPoweredMachineBase<TileWeatherObelisk>
|
||||
return WeatherTask.fromFluid(fs.getFluid());
|
||||
}
|
||||
|
||||
@Override
|
||||
protected boolean showRecipeButton() {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void drawGuiContainerBackgroundLayer(float par1, int par2, int par3) {
|
||||
bindGuiTexture();
|
||||
|
||||
@@ -157,8 +157,4 @@ public class GuiExperienceObelisk extends GuiMachineBase<TileExperienceObelisk>
|
||||
super.drawGuiContainerBackgroundLayer(par1, par2, par3);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected boolean showRecipeButton() {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
@@ -39,11 +39,6 @@ public class GuiPainter extends GuiPoweredMachineBase<TileEntityPainter> {
|
||||
super.drawGuiContainerBackgroundLayer(par1, par2, par3);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected boolean showRecipeButton() {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void renderSlotHighlight(int slot, Vector4f col) {
|
||||
if (getTileEntity().getSlotDefinition().isOutputSlot(slot)) {
|
||||
|
||||
@@ -132,8 +132,4 @@ public class GuiPoweredSpawner extends GuiPoweredMachineBase<TilePoweredSpawner>
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
protected boolean showRecipeButton() {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
@@ -112,11 +112,6 @@ public class GuiTank extends GuiMachineBase<TileTank> {
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
protected boolean showRecipeButton() {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void drawGuiContainerBackgroundLayer(float par1, int par2, int par3) {
|
||||
GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
|
||||
|
||||
@@ -51,11 +51,6 @@ public class GuiTransceiver extends GuiPoweredMachineBase<TileTransceiver> {
|
||||
generalTab.updatePowerBarTooltip(text);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected boolean showRecipeButton() {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getXSize() {
|
||||
return ContainerTransceiver.GUI_WIDTH;
|
||||
|
||||
@@ -11,14 +11,12 @@ import net.minecraftforge.oredict.OreDictionary;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import com.enderio.core.client.render.EnderWidget;
|
||||
import com.enderio.core.common.util.ItemUtil;
|
||||
|
||||
import codechicken.lib.gui.GuiDraw;
|
||||
import codechicken.nei.ItemList;
|
||||
import codechicken.nei.PositionedStack;
|
||||
import codechicken.nei.recipe.TemplateRecipeHandler;
|
||||
import crazypants.enderio.gui.IconEIO;
|
||||
import crazypants.enderio.machine.alloy.AlloyRecipeManager;
|
||||
import crazypants.enderio.machine.alloy.GuiAlloySmelter;
|
||||
import crazypants.enderio.machine.recipe.IRecipe;
|
||||
@@ -51,7 +49,7 @@ public class AlloySmelterRecipeHandler extends TemplateRecipeHandler {
|
||||
public void loadTransferRects() {
|
||||
transferRects.add(
|
||||
new TemplateRecipeHandler.RecipeTransferRect(
|
||||
new Rectangle(149, 32, 16, 16),
|
||||
new Rectangle(75, 23, 16, 16),
|
||||
"EnderIOAlloySmelter",
|
||||
new Object[0]));
|
||||
}
|
||||
@@ -117,10 +115,6 @@ public class AlloySmelterRecipeHandler extends TemplateRecipeHandler {
|
||||
AlloySmelterRecipe recipe = (AlloySmelterRecipe) arecipes.get(recipeIndex);
|
||||
String energyString = PowerDisplayUtil.formatPower(recipe.getEnergy()) + " " + PowerDisplayUtil.abrevation();
|
||||
GuiDraw.drawString(energyString, 100, 52, 0x808080, false);
|
||||
|
||||
int x = 149, y = 32;
|
||||
EnderWidget.map.render(EnderWidget.BUTTON, x, y, 16, 16, 0, true);
|
||||
IconEIO.map.render(IconEIO.RECIPE, x + 1, y + 1, 14, 14, 0, true);
|
||||
}
|
||||
|
||||
public List<ItemStack> getInputs(RecipeInput input) {
|
||||
|
||||
@@ -15,13 +15,10 @@ import net.minecraft.init.Items;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.StatCollector;
|
||||
|
||||
import com.enderio.core.client.render.EnderWidget;
|
||||
|
||||
import codechicken.lib.gui.GuiDraw;
|
||||
import codechicken.nei.PositionedStack;
|
||||
import codechicken.nei.recipe.TemplateRecipeHandler;
|
||||
import crazypants.enderio.gui.GuiContainerBaseEIO;
|
||||
import crazypants.enderio.gui.IconEIO;
|
||||
import crazypants.enderio.machine.enchanter.EnchanterRecipe;
|
||||
import crazypants.enderio.machine.enchanter.EnchanterRecipeManager;
|
||||
import crazypants.enderio.machine.enchanter.GuiEnchanter;
|
||||
@@ -54,7 +51,7 @@ public class EnchanterRecipeHandler extends TemplateRecipeHandler {
|
||||
public void loadTransferRects() {
|
||||
transferRects.add(
|
||||
new TemplateRecipeHandler.RecipeTransferRect(
|
||||
new Rectangle(149, -3, 16, 16),
|
||||
new Rectangle(96, 24, 22, 16),
|
||||
"EIOEnchanter",
|
||||
new Object[0]));
|
||||
}
|
||||
@@ -131,9 +128,6 @@ public class EnchanterRecipeHandler extends TemplateRecipeHandler {
|
||||
GuiDraw.drawStringC(s, 83, 46, 0x80FF20);
|
||||
}
|
||||
|
||||
int x = 149, y = -3;
|
||||
EnderWidget.map.render(EnderWidget.BUTTON, x, y, 16, 16, 0, true);
|
||||
IconEIO.map.render(IconEIO.RECIPE, x + 1, y + 1, 14, 14, 0, true);
|
||||
}
|
||||
|
||||
public List<ItemStack> getInputs(RecipeInput input) {
|
||||
|
||||
@@ -14,13 +14,10 @@ import net.minecraft.util.StatCollector;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import com.enderio.core.client.render.EnderWidget;
|
||||
|
||||
import codechicken.lib.gui.GuiDraw;
|
||||
import codechicken.nei.PositionedStack;
|
||||
import codechicken.nei.recipe.GuiRecipe;
|
||||
import codechicken.nei.recipe.TemplateRecipeHandler;
|
||||
import crazypants.enderio.gui.IconEIO;
|
||||
import crazypants.enderio.machine.crusher.CrusherRecipeManager;
|
||||
import crazypants.enderio.machine.crusher.GrindingBall;
|
||||
import crazypants.enderio.machine.crusher.GuiCrusher;
|
||||
@@ -61,7 +58,7 @@ public class SagMillRecipeHandler extends TemplateRecipeHandler {
|
||||
public void loadTransferRects() {
|
||||
transferRects.add(
|
||||
new TemplateRecipeHandler.RecipeTransferRect(
|
||||
new Rectangle(149, 32, 16, 16),
|
||||
new Rectangle(74, 21, 16, 22),
|
||||
"EnderIOSagMill",
|
||||
new Object[0]));
|
||||
}
|
||||
@@ -127,10 +124,6 @@ public class SagMillRecipeHandler extends TemplateRecipeHandler {
|
||||
MillRecipe recipe = (MillRecipe) arecipes.get(recipeIndex);
|
||||
String energyString = PowerDisplayUtil.formatPower(recipe.getEnergy()) + " " + PowerDisplayUtil.abrevation();
|
||||
GuiDraw.drawString(energyString, 96, 33, 0x808080, false);
|
||||
|
||||
int x = 149, y = 32;
|
||||
EnderWidget.map.render(EnderWidget.BUTTON, x, y, 16, 16, 0, true);
|
||||
IconEIO.map.render(IconEIO.RECIPE, x + 1, y + 1, 14, 14, 0, true);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -12,13 +12,10 @@ import net.minecraft.util.StatCollector;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import com.enderio.core.client.render.EnderWidget;
|
||||
|
||||
import codechicken.lib.gui.GuiDraw;
|
||||
import codechicken.nei.PositionedStack;
|
||||
import codechicken.nei.recipe.TemplateRecipeHandler;
|
||||
import crazypants.enderio.gui.GuiContainerBaseEIO;
|
||||
import crazypants.enderio.gui.IconEIO;
|
||||
import crazypants.enderio.machine.recipe.IRecipe;
|
||||
import crazypants.enderio.machine.recipe.RecipeInput;
|
||||
import crazypants.enderio.machine.slicensplice.ContainerSliceAndSplice;
|
||||
@@ -52,7 +49,7 @@ public class SliceAndSpliceRecipeHandler extends TemplateRecipeHandler {
|
||||
public void loadTransferRects() {
|
||||
transferRects.add(
|
||||
new TemplateRecipeHandler.RecipeTransferRect(
|
||||
new Rectangle(149, 32, 16, 16),
|
||||
new Rectangle(91, 38, 22, 16),
|
||||
"EnderIOSliceAndSplice",
|
||||
new Object[0]));
|
||||
}
|
||||
@@ -113,10 +110,6 @@ public class SliceAndSpliceRecipeHandler extends TemplateRecipeHandler {
|
||||
SliceAndSpliceRecipe recipe = (SliceAndSpliceRecipe) arecipes.get(recipeIndex);
|
||||
String energyString = PowerDisplayUtil.formatPower(recipe.getEnergy()) + " " + PowerDisplayUtil.abrevation();
|
||||
GuiDraw.drawString(energyString, 100, 57, 0x808080, false);
|
||||
|
||||
int x = 149, y = 32;
|
||||
EnderWidget.map.render(EnderWidget.BUTTON, x, y, 16, 16, 0, true);
|
||||
IconEIO.map.render(IconEIO.RECIPE, x + 1, y + 1, 14, 14, 0, true);
|
||||
}
|
||||
|
||||
public List<ItemStack> getInputs(RecipeInput input) {
|
||||
|
||||
@@ -13,15 +13,12 @@ import net.minecraft.util.StatCollector;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import com.enderio.core.client.render.EnderWidget;
|
||||
|
||||
import codechicken.lib.gui.GuiDraw;
|
||||
import codechicken.nei.PositionedStack;
|
||||
import codechicken.nei.recipe.TemplateRecipeHandler;
|
||||
import crazypants.enderio.EnderIO;
|
||||
import crazypants.enderio.ModObject;
|
||||
import crazypants.enderio.gui.GuiContainerBaseEIO;
|
||||
import crazypants.enderio.gui.IconEIO;
|
||||
import crazypants.enderio.machine.IMachineRecipe;
|
||||
import crazypants.enderio.machine.MachineRecipeRegistry;
|
||||
import crazypants.enderio.machine.soul.GuiSoulBinder;
|
||||
@@ -54,7 +51,7 @@ public class SoulBinderRecipeHandler extends TemplateRecipeHandler {
|
||||
public void loadTransferRects() {
|
||||
transferRects.add(
|
||||
new TemplateRecipeHandler.RecipeTransferRect(
|
||||
new Rectangle(149, 32, 16, 16),
|
||||
new Rectangle(70, 23, 22, 16),
|
||||
"EnderIOSoulBinder",
|
||||
new Object[0]));
|
||||
}
|
||||
@@ -142,10 +139,6 @@ public class SoulBinderRecipeHandler extends TemplateRecipeHandler {
|
||||
String s = I18n.format("container.repair.cost", new Object[] { Integer.valueOf(cost) });
|
||||
GuiDraw.drawStringC(s, 83, 55, 0x80FF20);
|
||||
}
|
||||
|
||||
int x = 149, y = 32;
|
||||
EnderWidget.map.render(EnderWidget.BUTTON, x, y, 16, 16, 0, true);
|
||||
IconEIO.map.render(IconEIO.RECIPE, x + 1, y + 1, 14, 14, 0, true);
|
||||
}
|
||||
|
||||
private static final ArrayList<PositionedStack> EMPTY_VIAL_OUTPUT = new ArrayList<PositionedStack>();
|
||||
|
||||
@@ -3,28 +3,32 @@ package crazypants.enderio.nei;
|
||||
import java.awt.Point;
|
||||
import java.awt.Rectangle;
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import net.minecraft.client.gui.inventory.GuiContainer;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.EnumChatFormatting;
|
||||
import net.minecraft.util.StatCollector;
|
||||
import net.minecraftforge.fluids.Fluid;
|
||||
import net.minecraftforge.fluids.FluidContainerRegistry;
|
||||
import net.minecraftforge.fluids.FluidStack;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import com.enderio.core.client.render.EnderWidget;
|
||||
import com.enderio.core.client.render.RenderUtil;
|
||||
import com.enderio.core.common.util.FluidUtil;
|
||||
|
||||
import codechicken.lib.gui.GuiDraw;
|
||||
import codechicken.nei.ItemStackMap;
|
||||
import codechicken.nei.PositionedStack;
|
||||
import codechicken.nei.recipe.GuiCraftingRecipe;
|
||||
import codechicken.nei.recipe.GuiRecipe;
|
||||
import codechicken.nei.recipe.GuiUsageRecipe;
|
||||
import codechicken.nei.recipe.TemplateRecipeHandler;
|
||||
import crazypants.enderio.fluid.Fluids;
|
||||
import crazypants.enderio.gui.GuiContainerBaseEIO;
|
||||
import crazypants.enderio.gui.IconEIO;
|
||||
import crazypants.enderio.machine.recipe.IRecipe;
|
||||
import crazypants.enderio.machine.recipe.RecipeInput;
|
||||
import crazypants.enderio.machine.vat.GuiVat;
|
||||
@@ -66,7 +70,7 @@ public class VatRecipeHandler extends TemplateRecipeHandler {
|
||||
public void loadTransferRects() {
|
||||
transferRects.add(
|
||||
new TemplateRecipeHandler.RecipeTransferRect(
|
||||
new Rectangle(149, 32, 16, 16),
|
||||
new Rectangle(76, 8, 16, 16),
|
||||
"EnderIOVat",
|
||||
new Object[0]));
|
||||
}
|
||||
@@ -157,8 +161,8 @@ public class VatRecipeHandler extends TemplateRecipeHandler {
|
||||
if (rec.inFluid != null && rec.inFluid.getFluid() != null) {
|
||||
RenderUtil.renderGuiTank(
|
||||
rec.inFluid,
|
||||
rec.inFluid.amount,
|
||||
rec.inFluid.amount,
|
||||
FluidContainerRegistry.BUCKET_VOLUME * 8,
|
||||
rec.getInputFluidAmount(),
|
||||
inTankBounds.x,
|
||||
inTankBounds.y,
|
||||
0,
|
||||
@@ -169,8 +173,8 @@ public class VatRecipeHandler extends TemplateRecipeHandler {
|
||||
if (rec.result != null && rec.result.getFluid() != null) {
|
||||
RenderUtil.renderGuiTank(
|
||||
rec.result,
|
||||
rec.result.amount,
|
||||
rec.result.amount,
|
||||
FluidContainerRegistry.BUCKET_VOLUME * 8,
|
||||
rec.getResultFluidAmount(),
|
||||
outTankBounds.x,
|
||||
outTankBounds.y,
|
||||
0,
|
||||
@@ -190,9 +194,6 @@ public class VatRecipeHandler extends TemplateRecipeHandler {
|
||||
GuiDraw.drawStringC(str, ps.relx + 8, ps.rely + 19, 0x808080, false);
|
||||
}
|
||||
|
||||
int x = 149, y = 32;
|
||||
EnderWidget.map.render(EnderWidget.BUTTON, x, y, 16, 16, 0, true);
|
||||
IconEIO.map.render(IconEIO.RECIPE, x + 1, y + 1, 14, 14, 0, true);
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -202,24 +203,19 @@ public class VatRecipeHandler extends TemplateRecipeHandler {
|
||||
|
||||
@Override
|
||||
public List<String> handleTooltip(GuiRecipe<?> gui, List<String> currenttip, int recipeIndex) {
|
||||
InnerVatRecipe rec = (InnerVatRecipe) arecipes.get(recipeIndex);
|
||||
Point pos = GuiDraw.getMousePosition();
|
||||
Point offset = gui.getRecipePosition(recipeIndex);
|
||||
Point relMouse = new Point(
|
||||
pos.x - ((gui.width - 176) / 2) - offset.x,
|
||||
pos.y - ((gui.height - 166) / 2) - offset.y);
|
||||
final InnerVatRecipe rec = (InnerVatRecipe) arecipes.get(recipeIndex);
|
||||
final Point pos = GuiDraw.getMousePosition();
|
||||
final Point offset = gui.getRecipePosition(recipeIndex);
|
||||
final Point relMouse = new Point(pos.x - gui.guiLeft - offset.x, pos.y - gui.guiTop - offset.y);
|
||||
|
||||
if (inTankBounds.contains(relMouse) || outTankBounds.contains(relMouse)) {
|
||||
if (inTankBounds.contains(relMouse)) {
|
||||
if (rec.inFluid != null && rec.inFluid.getFluid() != null) {
|
||||
currenttip.add(rec.inFluid.getFluid().getLocalizedName(rec.inFluid));
|
||||
}
|
||||
} else {
|
||||
if (rec.result != null && rec.result.getFluid() != null) {
|
||||
currenttip.add(rec.result.getFluid().getLocalizedName(rec.result));
|
||||
}
|
||||
}
|
||||
if (inTankBounds.contains(relMouse) && rec.inFluid != null && rec.inFluid.getFluid() != null) {
|
||||
currenttip.add(rec.inFluid.getFluid().getLocalizedName(rec.inFluid));
|
||||
currenttip.add(EnumChatFormatting.GRAY.toString() + rec.getInputFluidAmount() + " " + Fluids.MB());
|
||||
} else if (outTankBounds.contains(relMouse) && rec.result != null && rec.result.getFluid() != null) {
|
||||
currenttip.add(rec.result.getFluid().getLocalizedName(rec.result));
|
||||
currenttip.add(EnumChatFormatting.GRAY.toString() + rec.getResultFluidAmount() + " " + Fluids.MB());
|
||||
}
|
||||
|
||||
return super.handleTooltip(gui, currenttip, recipeIndex);
|
||||
}
|
||||
|
||||
@@ -241,9 +237,7 @@ public class VatRecipeHandler extends TemplateRecipeHandler {
|
||||
InnerVatRecipe rec = (InnerVatRecipe) arecipes.get(recipeIndex);
|
||||
Point pos = GuiDraw.getMousePosition();
|
||||
Point offset = gui.getRecipePosition(recipeIndex);
|
||||
Point relMouse = new Point(
|
||||
pos.x - ((gui.width - 176) / 2) - offset.x,
|
||||
pos.y - ((gui.height - 166) / 2) - offset.y);
|
||||
Point relMouse = new Point(pos.x - gui.guiLeft - offset.x, pos.y - gui.guiTop - offset.y);
|
||||
|
||||
if (inTankBounds.contains(relMouse)) {
|
||||
transferFluidTank(rec.inFluid, usage);
|
||||
@@ -283,7 +277,10 @@ public class VatRecipeHandler extends TemplateRecipeHandler {
|
||||
|
||||
public class InnerVatRecipe extends TemplateRecipeHandler.CachedRecipe {
|
||||
|
||||
private ArrayList<PositionedStack> inputs;
|
||||
private List<PositionedStack> inputs = new ArrayList<>();
|
||||
private ItemStackMap<Float> firstItemMultiplier = new ItemStackMap();
|
||||
private ItemStackMap<Float> secondItemMultiplier = new ItemStackMap();
|
||||
private Map<FluidStack, Float> fluidMultiplier = new HashMap<>();
|
||||
private int energy;
|
||||
private FluidStack result;
|
||||
private FluidStack inFluid;
|
||||
@@ -294,7 +291,31 @@ public class VatRecipeHandler extends TemplateRecipeHandler {
|
||||
|
||||
@Override
|
||||
public List<PositionedStack> getIngredients() {
|
||||
return getCycledIngredients(cycleticks / 30, inputs);
|
||||
return getCycledIngredients(cycleticks / 30, this.inputs);
|
||||
}
|
||||
|
||||
public int getInputFluidAmount() {
|
||||
return (int) Math
|
||||
.round(FluidContainerRegistry.BUCKET_VOLUME * getFirstItemMultiplier() * getSecondItemMultiplier());
|
||||
}
|
||||
|
||||
public int getResultFluidAmount() {
|
||||
return (int) Math.round(
|
||||
FluidContainerRegistry.BUCKET_VOLUME * getFirstItemMultiplier()
|
||||
* getSecondItemMultiplier()
|
||||
* getFluidMultiplier());
|
||||
}
|
||||
|
||||
public float getFirstItemMultiplier() {
|
||||
return this.inputs.isEmpty() ? 1f : this.firstItemMultiplier.getOrDefault(this.inputs.get(0).item, 1f);
|
||||
}
|
||||
|
||||
public float getSecondItemMultiplier() {
|
||||
return this.inputs.size() < 2 ? 1f : this.secondItemMultiplier.getOrDefault(this.inputs.get(1).item, 1f);
|
||||
}
|
||||
|
||||
public float getFluidMultiplier() {
|
||||
return this.fluidMultiplier.getOrDefault(this.inFluid, 1f);
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -303,28 +324,41 @@ public class VatRecipeHandler extends TemplateRecipeHandler {
|
||||
}
|
||||
|
||||
public InnerVatRecipe(int energy, RecipeInput[] ingredients, FluidStack result) {
|
||||
ArrayList<ItemStack> inputsOne = new ArrayList<ItemStack>();
|
||||
ArrayList<ItemStack> inputsTwo = new ArrayList<ItemStack>();
|
||||
final List<ItemStack> inputsOne = new ArrayList<>();
|
||||
final List<ItemStack> inputsTwo = new ArrayList<>();
|
||||
|
||||
for (RecipeInput input : ingredients) {
|
||||
float multi = input.getMulitplier();
|
||||
|
||||
if (input.getInput() != null) {
|
||||
List<ItemStack> equivs = getInputs(input);
|
||||
final List<ItemStack> equivs = getInputs(input);
|
||||
|
||||
if (input.getSlotNumber() == 0) {
|
||||
inputsOne.addAll(equivs);
|
||||
|
||||
for (ItemStack stack : equivs) {
|
||||
this.firstItemMultiplier.put(stack, multi);
|
||||
}
|
||||
} else if (input.getSlotNumber() == 1) {
|
||||
inputsTwo.addAll(equivs);
|
||||
}
|
||||
} else if (input.getFluidInput() != null) {
|
||||
inFluid = input.getFluidInput();
|
||||
}
|
||||
}
|
||||
|
||||
inputs = new ArrayList<PositionedStack>();
|
||||
for (ItemStack stack : equivs) {
|
||||
this.secondItemMultiplier.put(stack, multi);
|
||||
}
|
||||
}
|
||||
|
||||
} else if (input.getFluidInput() != null) {
|
||||
this.inFluid = input.getFluidInput();
|
||||
this.fluidMultiplier.put(this.inFluid, multi);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
if (!inputsOne.isEmpty()) {
|
||||
inputs.add(new PositionedStack(inputsOne, 51, 1));
|
||||
this.inputs.add(new PositionedStack(inputsOne, 51, 1));
|
||||
}
|
||||
if (!inputsTwo.isEmpty()) {
|
||||
inputs.add(new PositionedStack(inputsTwo, 100, 1));
|
||||
this.inputs.add(new PositionedStack(inputsTwo, 100, 1));
|
||||
}
|
||||
|
||||
this.energy = energy;
|
||||
|
||||
@@ -0,0 +1,5 @@
|
||||
# Access Transformer configuration file
|
||||
public net.minecraft.client.gui.inventory.GuiContainer field_146999_f #xSize
|
||||
public net.minecraft.client.gui.inventory.GuiContainer field_147000_g #ySize
|
||||
public net.minecraft.client.gui.inventory.GuiContainer field_147003_i #guiLeft
|
||||
public net.minecraft.client.gui.inventory.GuiContainer field_147009_r #guiTop
|
||||
Reference in new issue
Block a user