Massive GUI Overhauls!
This commit is contained in:
parent
d66edf4ad6
commit
408c66441b
10 changed files with 44 additions and 57 deletions
|
|
@ -1,3 +1,7 @@
|
||||||
|
1.3.9:
|
||||||
|
-Changed: Scribes are no longer picky about having the EXACT stack size for a recipe, just the minimum
|
||||||
|
-Changed: GUI for scribe - completely redesigned! :D
|
||||||
|
-Changed: Scribe is now instantaneous
|
||||||
1.3.8:
|
1.3.8:
|
||||||
-Added: Dependency on Forge 11.15.1.1722 or newer
|
-Added: Dependency on Forge 11.15.1.1722 or newer
|
||||||
-Added: Capabilities Compatibility to all TileEntities
|
-Added: Capabilities Compatibility to all TileEntities
|
||||||
|
|
|
||||||
|
|
@ -29,8 +29,8 @@ public class ContainerCropomator extends Container
|
||||||
lastProcessTime = 0;
|
lastProcessTime = 0;
|
||||||
lastCatalystInUseTime = 0;
|
lastCatalystInUseTime = 0;
|
||||||
|
|
||||||
this.addSlotToContainer(new Slot(cropomator, 0, 56, 17)); // input
|
this.addSlotToContainer(new Slot(cropomator, 0, 56, 35)); // input
|
||||||
this.addSlotToContainer(new Slot(cropomator, 1, 56, 53)); // catalyst
|
this.addSlotToContainer(new Slot(cropomator, 1, 8, 56)); // catalyst
|
||||||
this.addSlotToContainer(new MachineOutputSlot(player, cropomator, 2, 116, 35));
|
this.addSlotToContainer(new MachineOutputSlot(player, cropomator, 2, 116, 35));
|
||||||
this.addInventorySlots();
|
this.addInventorySlots();
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -29,8 +29,8 @@ public class ContainerElectroextractor extends Container
|
||||||
lastCrushTime = 0;
|
lastCrushTime = 0;
|
||||||
lastFuelTime = 0;
|
lastFuelTime = 0;
|
||||||
|
|
||||||
this.addSlotToContainer(new Slot(electroextractor, 0, 56, 17)); // input
|
this.addSlotToContainer(new Slot(electroextractor, 0, 56, 35)); // input
|
||||||
this.addSlotToContainer(new Slot(electroextractor, 1, 56, 53)); // fuelitem
|
this.addSlotToContainer(new Slot(electroextractor, 1, 8, 56)); // fuelitem
|
||||||
this.addSlotToContainer(new MachineOutputSlot(player, electroextractor, 2, 116, 35));
|
this.addSlotToContainer(new MachineOutputSlot(player, electroextractor, 2, 116, 35));
|
||||||
this.addInventorySlots();
|
this.addInventorySlots();
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -13,7 +13,7 @@ import net.minecraft.util.StatCollector;
|
||||||
|
|
||||||
public class GUICropomator extends GuiContainer
|
public class GUICropomator extends GuiContainer
|
||||||
{
|
{
|
||||||
public static final ResourceLocation backgroundTexture = new ResourceLocation(Lib.MODID.toLowerCase(), "textures/gui/cropomator.png");
|
public static final ResourceLocation texture = new ResourceLocation(Lib.MODID.toLowerCase(), "textures/gui/cropomator.png");
|
||||||
|
|
||||||
private TileCropomator cropomator;
|
private TileCropomator cropomator;
|
||||||
|
|
||||||
|
|
@ -34,17 +34,21 @@ public class GUICropomator extends GuiContainer
|
||||||
protected void drawGuiContainerBackgroundLayer(float partialTickTime, int mouseX, int mouseY)
|
protected void drawGuiContainerBackgroundLayer(float partialTickTime, int mouseX, int mouseY)
|
||||||
{
|
{
|
||||||
GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
|
GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
|
||||||
this.mc.renderEngine.bindTexture(backgroundTexture);
|
this.mc.renderEngine.bindTexture(texture);
|
||||||
int k = (this.width - this.xSize) / 2;
|
int k = (this.width - this.xSize) / 2;
|
||||||
int l = (this.height - this.ySize) / 2;
|
int l = (this.height - this.ySize) / 2;
|
||||||
this.drawTexturedModalRect(k, l, 0, 0, this.xSize, this.ySize);
|
this.drawTexturedModalRect(k, l, 0, 0, this.xSize, this.ySize);
|
||||||
|
|
||||||
if (this.cropomator.isUsingFuel())
|
if (this.cropomator.isUsingFuel())
|
||||||
{
|
{
|
||||||
int i1 = this.cropomator.getBurnTimeRemainingScaled(13);
|
//draws burn meter
|
||||||
this.drawTexturedModalRect(k + 56, l + 36 + 12 - i1, 176, 12 - i1, 14, i1 + 1);
|
int i1 = this.cropomator.getBurnTimeRemainingScaled(46);
|
||||||
|
//args: x, y, textureX, textureY, width, height
|
||||||
|
this.drawTexturedModalRect(k + 8, l + 51 - i1, 176, 17, 16, i1 - 1);
|
||||||
|
//draws progress bar
|
||||||
i1 = this.cropomator.getProgressScaled(24);
|
i1 = this.cropomator.getProgressScaled(24);
|
||||||
this.drawTexturedModalRect(k + 79, l + 34, 176, 14, i1 + 1, 16);
|
//args: x, y, textureX, textureY, width, height
|
||||||
|
this.drawTexturedModalRect(k + 79, l + 34, 176, 0, i1 + 1, 16);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -13,7 +13,7 @@ import net.minecraft.util.StatCollector;
|
||||||
|
|
||||||
public class GUIElectroextractor extends GuiContainer
|
public class GUIElectroextractor extends GuiContainer
|
||||||
{
|
{
|
||||||
public static final ResourceLocation backgroundTexture = new ResourceLocation(Lib.MODID.toLowerCase(), "textures/gui/electroextractor.png");
|
public static final ResourceLocation texture = new ResourceLocation(Lib.MODID.toLowerCase(), "textures/gui/electroextractor.png");
|
||||||
|
|
||||||
private TileElectroextractor electroextractor;
|
private TileElectroextractor electroextractor;
|
||||||
|
|
||||||
|
|
@ -34,17 +34,21 @@ public class GUIElectroextractor extends GuiContainer
|
||||||
protected void drawGuiContainerBackgroundLayer(float partialTickTime, int mouseX, int mouseY)
|
protected void drawGuiContainerBackgroundLayer(float partialTickTime, int mouseX, int mouseY)
|
||||||
{
|
{
|
||||||
GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
|
GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
|
||||||
this.mc.renderEngine.bindTexture(backgroundTexture);
|
this.mc.renderEngine.bindTexture(texture);
|
||||||
int k = (this.width - this.xSize) / 2;
|
int k = (this.width - this.xSize) / 2;
|
||||||
int l = (this.height - this.ySize) / 2;
|
int l = (this.height - this.ySize) / 2;
|
||||||
this.drawTexturedModalRect(k, l, 0, 0, this.xSize, this.ySize);
|
this.drawTexturedModalRect(k, l, 0, 0, this.xSize, this.ySize);
|
||||||
|
|
||||||
if (this.electroextractor.isUsingFuel())
|
if (this.electroextractor.isUsingFuel())
|
||||||
{
|
{
|
||||||
int i1 = this.electroextractor.getBurnTimeRemainingScaled(13);
|
//draws burn meter
|
||||||
this.drawTexturedModalRect(k + 56, l + 36 + 12 - i1, 176, 12 - i1, 14, i1 + 1);
|
int i1 = this.electroextractor.getBurnTimeRemainingScaled(46);
|
||||||
|
//args: x, y, textureX, textureY, width, height
|
||||||
|
this.drawTexturedModalRect(k + 8, l + 51 - i1, 176, 17, 16, i1 - 1);
|
||||||
|
//draws progress bar
|
||||||
i1 = this.electroextractor.getProgressScaled(24);
|
i1 = this.electroextractor.getProgressScaled(24);
|
||||||
this.drawTexturedModalRect(k + 79, l + 34, 176, 14, i1 + 1, 16);
|
//args: x, y, textureX, textureY, width, height
|
||||||
|
this.drawTexturedModalRect(k + 79, l + 34, 176, 0, i1 + 1, 16);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -1,7 +1,5 @@
|
||||||
package com.oitsjustjose.criss_cross.jei;
|
package com.oitsjustjose.criss_cross.jei;
|
||||||
|
|
||||||
import javax.annotation.Nonnull;
|
|
||||||
|
|
||||||
import com.oitsjustjose.criss_cross.gui.GUICropomator;
|
import com.oitsjustjose.criss_cross.gui.GUICropomator;
|
||||||
import com.oitsjustjose.criss_cross.lib.Config;
|
import com.oitsjustjose.criss_cross.lib.Config;
|
||||||
import com.oitsjustjose.criss_cross.lib.Lib;
|
import com.oitsjustjose.criss_cross.lib.Lib;
|
||||||
|
|
@ -22,33 +20,26 @@ public class CropomatorCategory implements IRecipeCategory
|
||||||
private static final int OUTPUT_SLOT = 1;
|
private static final int OUTPUT_SLOT = 1;
|
||||||
private static final int FUEL_SLOT = 2;
|
private static final int FUEL_SLOT = 2;
|
||||||
|
|
||||||
IDrawableStatic fuelDrawable = JEIPluginManager.jeiHelper.getGuiHelper().createDrawable(GUICropomator.backgroundTexture, 176, 0, 14, 14);
|
IDrawableStatic fuelDrawable = JEIPluginManager.jeiHelper.getGuiHelper().createDrawable(GUICropomator.texture, 176, 17, 16, 46);
|
||||||
IDrawableStatic progressDrawable = JEIPluginManager.jeiHelper.getGuiHelper().createDrawable(GUICropomator.backgroundTexture, 177, 14, 23, 16);
|
IDrawableStatic progressDrawable = JEIPluginManager.jeiHelper.getGuiHelper().createDrawable(GUICropomator.texture, 177, 0, 23, 16);
|
||||||
|
|
||||||
@Nonnull
|
private final IDrawable background = JEIPluginManager.jeiHelper.getGuiHelper().createDrawable(GUICropomator.texture, 7, 6, 130, 67);
|
||||||
private final IDrawable background = JEIPluginManager.jeiHelper.getGuiHelper().createDrawable(GUICropomator.backgroundTexture, 55, 16, 82, 54);
|
|
||||||
@Nonnull
|
|
||||||
protected final IDrawableAnimated fuel = JEIPluginManager.jeiHelper.getGuiHelper().createAnimatedDrawable(fuelDrawable, Config.cropomatorProcessTime, IDrawableAnimated.StartDirection.TOP, true);
|
protected final IDrawableAnimated fuel = JEIPluginManager.jeiHelper.getGuiHelper().createAnimatedDrawable(fuelDrawable, Config.cropomatorProcessTime, IDrawableAnimated.StartDirection.TOP, true);
|
||||||
@Nonnull
|
|
||||||
protected final IDrawableAnimated progress = JEIPluginManager.jeiHelper.getGuiHelper().createAnimatedDrawable(progressDrawable, Config.cropomatorProcessTime, IDrawableAnimated.StartDirection.LEFT, false);
|
protected final IDrawableAnimated progress = JEIPluginManager.jeiHelper.getGuiHelper().createAnimatedDrawable(progressDrawable, Config.cropomatorProcessTime, IDrawableAnimated.StartDirection.LEFT, false);
|
||||||
@Nonnull
|
|
||||||
private final String localizedName = StatCollector.translateToLocal("recipe.cropomator");
|
private final String localizedName = StatCollector.translateToLocal("recipe.cropomator");
|
||||||
|
|
||||||
@Nonnull
|
|
||||||
@Override
|
@Override
|
||||||
public String getUid()
|
public String getUid()
|
||||||
{
|
{
|
||||||
return Lib.CROPOMATOR_UID;
|
return Lib.CROPOMATOR_UID;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Nonnull
|
|
||||||
@Override
|
@Override
|
||||||
public String getTitle()
|
public String getTitle()
|
||||||
{
|
{
|
||||||
return localizedName;
|
return localizedName;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Nonnull
|
|
||||||
@Override
|
@Override
|
||||||
public IDrawable getBackground()
|
public IDrawable getBackground()
|
||||||
{
|
{
|
||||||
|
|
@ -64,18 +55,16 @@ public class CropomatorCategory implements IRecipeCategory
|
||||||
@Override
|
@Override
|
||||||
public void drawAnimations(Minecraft minecraft)
|
public void drawAnimations(Minecraft minecraft)
|
||||||
{
|
{
|
||||||
fuel.draw(minecraft, 1, 20);
|
fuel.draw(minecraft, 1, 0);
|
||||||
progress.draw(minecraft, 25, 18);
|
progress.draw(minecraft, 73, 28);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@SuppressWarnings("unchecked")
|
public void setRecipe(IRecipeLayout recipeLayout, IRecipeWrapper recipeWrapper)
|
||||||
public void setRecipe(@Nonnull IRecipeLayout recipeLayout, @Nonnull IRecipeWrapper recipeWrapper)
|
|
||||||
{
|
{
|
||||||
|
recipeLayout.getItemStacks().init(INPUT_SLOT, true, 48, 28);
|
||||||
recipeLayout.getItemStacks().init(INPUT_SLOT, true, 0, 0);
|
recipeLayout.getItemStacks().init(OUTPUT_SLOT, false, 108, 28);
|
||||||
recipeLayout.getItemStacks().init(OUTPUT_SLOT, false, 60, 18);
|
recipeLayout.getItemStacks().init(FUEL_SLOT, true, 0, 49);
|
||||||
recipeLayout.getItemStacks().init(FUEL_SLOT, true, 0, 36);
|
|
||||||
|
|
||||||
if (recipeWrapper instanceof CropomatorRecipeJEI)
|
if (recipeWrapper instanceof CropomatorRecipeJEI)
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,5 @@
|
||||||
package com.oitsjustjose.criss_cross.jei;
|
package com.oitsjustjose.criss_cross.jei;
|
||||||
|
|
||||||
import javax.annotation.Nonnull;
|
|
||||||
|
|
||||||
import com.oitsjustjose.criss_cross.gui.GUIElectroextractor;
|
import com.oitsjustjose.criss_cross.gui.GUIElectroextractor;
|
||||||
import com.oitsjustjose.criss_cross.lib.Config;
|
import com.oitsjustjose.criss_cross.lib.Config;
|
||||||
import com.oitsjustjose.criss_cross.lib.Lib;
|
import com.oitsjustjose.criss_cross.lib.Lib;
|
||||||
|
|
@ -22,33 +20,26 @@ public class ElectroextractorCategory implements IRecipeCategory
|
||||||
private static final int OUTPUT_SLOT = 1;
|
private static final int OUTPUT_SLOT = 1;
|
||||||
private static final int FUEL_SLOT = 2;
|
private static final int FUEL_SLOT = 2;
|
||||||
|
|
||||||
IDrawableStatic fuelDrawable = JEIPluginManager.jeiHelper.getGuiHelper().createDrawable(GUIElectroextractor.backgroundTexture, 176, 0, 14, 14);
|
IDrawableStatic fuelDrawable = JEIPluginManager.jeiHelper.getGuiHelper().createDrawable(GUIElectroextractor.texture, 176, 17, 16, 46);
|
||||||
IDrawableStatic progressDrawable = JEIPluginManager.jeiHelper.getGuiHelper().createDrawable(GUIElectroextractor.backgroundTexture, 177, 14, 23, 16);
|
IDrawableStatic progressDrawable = JEIPluginManager.jeiHelper.getGuiHelper().createDrawable(GUIElectroextractor.texture, 177, 0, 23, 16);
|
||||||
|
|
||||||
@Nonnull
|
private final IDrawable background = JEIPluginManager.jeiHelper.getGuiHelper().createDrawable(GUIElectroextractor.texture, 7, 6, 130, 67);
|
||||||
protected final IDrawableAnimated fuel = JEIPluginManager.jeiHelper.getGuiHelper().createAnimatedDrawable(fuelDrawable, Config.electroextractorProcessTime, IDrawableAnimated.StartDirection.TOP, true);
|
protected final IDrawableAnimated fuel = JEIPluginManager.jeiHelper.getGuiHelper().createAnimatedDrawable(fuelDrawable, Config.electroextractorProcessTime, IDrawableAnimated.StartDirection.TOP, true);
|
||||||
@Nonnull
|
|
||||||
protected final IDrawableAnimated progress = JEIPluginManager.jeiHelper.getGuiHelper().createAnimatedDrawable(progressDrawable, Config.electroextractorProcessTime, IDrawableAnimated.StartDirection.LEFT, false);
|
protected final IDrawableAnimated progress = JEIPluginManager.jeiHelper.getGuiHelper().createAnimatedDrawable(progressDrawable, Config.electroextractorProcessTime, IDrawableAnimated.StartDirection.LEFT, false);
|
||||||
@Nonnull
|
|
||||||
private final IDrawable background = JEIPluginManager.jeiHelper.getGuiHelper().createDrawable(GUIElectroextractor.backgroundTexture, 55, 16, 82, 54);
|
|
||||||
@Nonnull
|
|
||||||
private final String localizedName = StatCollector.translateToLocal("recipe.electroextractor");
|
private final String localizedName = StatCollector.translateToLocal("recipe.electroextractor");
|
||||||
|
|
||||||
@Nonnull
|
|
||||||
@Override
|
@Override
|
||||||
public String getUid()
|
public String getUid()
|
||||||
{
|
{
|
||||||
return Lib.ELECTROEXTRACTOR_UID;
|
return Lib.ELECTROEXTRACTOR_UID;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Nonnull
|
|
||||||
@Override
|
@Override
|
||||||
public String getTitle()
|
public String getTitle()
|
||||||
{
|
{
|
||||||
return localizedName;
|
return localizedName;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Nonnull
|
|
||||||
@Override
|
@Override
|
||||||
public IDrawable getBackground()
|
public IDrawable getBackground()
|
||||||
{
|
{
|
||||||
|
|
@ -64,18 +55,16 @@ public class ElectroextractorCategory implements IRecipeCategory
|
||||||
@Override
|
@Override
|
||||||
public void drawAnimations(Minecraft minecraft)
|
public void drawAnimations(Minecraft minecraft)
|
||||||
{
|
{
|
||||||
fuel.draw(minecraft, 1, 20);
|
fuel.draw(minecraft, 1, 0);
|
||||||
progress.draw(minecraft, 25, 18);
|
progress.draw(minecraft, 73, 28);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@SuppressWarnings("unchecked")
|
public void setRecipe(IRecipeLayout recipeLayout, IRecipeWrapper recipeWrapper)
|
||||||
public void setRecipe(@Nonnull IRecipeLayout recipeLayout, @Nonnull IRecipeWrapper recipeWrapper)
|
|
||||||
{
|
{
|
||||||
|
recipeLayout.getItemStacks().init(INPUT_SLOT, true, 48, 28);
|
||||||
recipeLayout.getItemStacks().init(INPUT_SLOT, true, 0, 0);
|
recipeLayout.getItemStacks().init(OUTPUT_SLOT, false, 108, 28);
|
||||||
recipeLayout.getItemStacks().init(OUTPUT_SLOT, false, 60, 18);
|
recipeLayout.getItemStacks().init(FUEL_SLOT, true, 0, 49);
|
||||||
recipeLayout.getItemStacks().init(FUEL_SLOT, true, 0, 36);
|
|
||||||
|
|
||||||
if (recipeWrapper instanceof ElectroextractorRecipeJEI)
|
if (recipeWrapper instanceof ElectroextractorRecipeJEI)
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -4,15 +4,12 @@ import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
||||||
import javax.annotation.Nonnull;
|
|
||||||
|
|
||||||
import com.oitsjustjose.criss_cross.recipes.machine.WoodchipperRecipes;
|
import com.oitsjustjose.criss_cross.recipes.machine.WoodchipperRecipes;
|
||||||
|
|
||||||
import net.minecraft.item.ItemStack;
|
import net.minecraft.item.ItemStack;
|
||||||
|
|
||||||
public class WoodchipperRecipeMaker
|
public class WoodchipperRecipeMaker
|
||||||
{
|
{
|
||||||
@Nonnull
|
|
||||||
public static List<WoodchipperRecipeJEI> getRecipes()
|
public static List<WoodchipperRecipeJEI> getRecipes()
|
||||||
{
|
{
|
||||||
Map<ItemStack, ItemStack> woodchipperMap = WoodchipperRecipes.getInstance().getRecipeList();
|
Map<ItemStack, ItemStack> woodchipperMap = WoodchipperRecipes.getInstance().getRecipeList();
|
||||||
|
|
|
||||||
Binary file not shown.
|
Before Width: | Height: | Size: 2 KiB After Width: | Height: | Size: 5.3 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 1.8 KiB After Width: | Height: | Size: 5.4 KiB |
Loading…
Reference in a new issue