From fb13a20feb6deedb690967509be866554a5e4c98 Mon Sep 17 00:00:00 2001 From: Ellpeck Date: Tue, 28 Apr 2015 20:54:23 +0200 Subject: [PATCH] Fixed a stupid Bug of mine --- build.gradle | 2 +- newestVersion.txt | 2 +- .../ellpeck/actuallyadditions/PLANNED.txt | 7 +++- .../items/ItemPotionRing.java | 4 +-- .../actuallyadditions/items/ItemUpgrade.java | 2 +- .../items/metalists/ThePotionRings.java | 2 +- .../nei/CrusherRecipeHandler.java | 33 ++++++++++++------ .../actuallyadditions/util/BlockUtil.java | 4 +-- .../actuallyadditions/util/ItemUtil.java | 4 +-- .../actuallyadditions/util/ModUtil.java | 2 +- .../textures/gui/guiGrinder.png | Bin 2456 -> 2462 bytes .../textures/gui/nei/grinder.png | Bin 2316 -> 0 bytes src/main/resources/mcmod.info | 2 +- 13 files changed, 40 insertions(+), 24 deletions(-) delete mode 100644 src/main/resources/assets/actuallyadditions/textures/gui/nei/grinder.png diff --git a/build.gradle b/build.gradle index b8bacda7a..c53644d51 100644 --- a/build.gradle +++ b/build.gradle @@ -18,7 +18,7 @@ buildscript { apply plugin: 'forge' apply plugin: 'maven' -version = "1.7.10-0.0.4.1" +version = "1.7.10-0.0.4.2" group = "ellpeck.actuallyadditions" archivesBaseName = "ActuallyAdditions" diff --git a/newestVersion.txt b/newestVersion.txt index 5f436a3e1..cbb3283b2 100644 --- a/newestVersion.txt +++ b/newestVersion.txt @@ -1 +1 @@ -1.7.10-0.0.4.1 \ No newline at end of file +1.7.10-0.0.4.2 \ No newline at end of file diff --git a/src/main/java/ellpeck/actuallyadditions/PLANNED.txt b/src/main/java/ellpeck/actuallyadditions/PLANNED.txt index 88ded5070..44545e5e1 100644 --- a/src/main/java/ellpeck/actuallyadditions/PLANNED.txt +++ b/src/main/java/ellpeck/actuallyadditions/PLANNED.txt @@ -55,4 +55,9 @@ -Super Speed Track -File Jukebox - -Plays Sound Files put into your Minecraft Folder \ No newline at end of file + -Plays Sound Files put into your Minecraft Folder + +-RF Implementation + -Power Acceptor Block that powers Machines + -Machines still don't accept RF themselves! + -Solar Panel & Heat Collector produce RF \ No newline at end of file diff --git a/src/main/java/ellpeck/actuallyadditions/items/ItemPotionRing.java b/src/main/java/ellpeck/actuallyadditions/items/ItemPotionRing.java index 4a6323b68..7f855ff2d 100644 --- a/src/main/java/ellpeck/actuallyadditions/items/ItemPotionRing.java +++ b/src/main/java/ellpeck/actuallyadditions/items/ItemPotionRing.java @@ -32,7 +32,7 @@ public class ItemPotionRing extends Item implements INameableItem{ @Override public String getOredictName(){ - return ""; + return this.getName(); } @Override @@ -91,7 +91,7 @@ public class ItemPotionRing extends Item implements INameableItem{ @SuppressWarnings("unchecked") @SideOnly(Side.CLIENT) public void addInformation(ItemStack stack, EntityPlayer player, List list, boolean isHeld){ - ItemUtil.addInformation(this, list, 2, "", allRings[stack.getItemDamage()].getOredictName()); + ItemUtil.addInformation(this, list, 2, "", this.getOredictName()); if(KeyUtil.isShiftPressed()){ if(stack.getItemDamage() == ThePotionRings.SATURATION.ordinal()){ diff --git a/src/main/java/ellpeck/actuallyadditions/items/ItemUpgrade.java b/src/main/java/ellpeck/actuallyadditions/items/ItemUpgrade.java index 292f07809..96623e566 100644 --- a/src/main/java/ellpeck/actuallyadditions/items/ItemUpgrade.java +++ b/src/main/java/ellpeck/actuallyadditions/items/ItemUpgrade.java @@ -16,7 +16,7 @@ import java.util.List; public class ItemUpgrade extends Item implements INameableItem{ - private String name; + private final String name; public UpgradeType type; private int textAmount; diff --git a/src/main/java/ellpeck/actuallyadditions/items/metalists/ThePotionRings.java b/src/main/java/ellpeck/actuallyadditions/items/metalists/ThePotionRings.java index a5141ad75..3e08a50c9 100644 --- a/src/main/java/ellpeck/actuallyadditions/items/metalists/ThePotionRings.java +++ b/src/main/java/ellpeck/actuallyadditions/items/metalists/ThePotionRings.java @@ -61,6 +61,6 @@ public enum ThePotionRings implements INameableItem{ @Override public String getOredictName(){ - return "itemPotionRing"; + return ""; } } \ No newline at end of file diff --git a/src/main/java/ellpeck/actuallyadditions/nei/CrusherRecipeHandler.java b/src/main/java/ellpeck/actuallyadditions/nei/CrusherRecipeHandler.java index 1742bc438..8eae1f040 100644 --- a/src/main/java/ellpeck/actuallyadditions/nei/CrusherRecipeHandler.java +++ b/src/main/java/ellpeck/actuallyadditions/nei/CrusherRecipeHandler.java @@ -4,6 +4,7 @@ import codechicken.lib.gui.GuiDraw; import codechicken.nei.ItemList; import codechicken.nei.NEIServerUtils; import codechicken.nei.PositionedStack; +import codechicken.nei.recipe.RecipeInfo; import codechicken.nei.recipe.TemplateRecipeHandler; import ellpeck.actuallyadditions.inventory.GuiGrinder; import ellpeck.actuallyadditions.recipe.GrinderRecipes; @@ -28,6 +29,11 @@ public class CrusherRecipeHandler extends TemplateRecipeHandler{ public static ArrayList fuels; + public CrusherRecipeHandler(){ + super(); + RecipeInfo.setGuiOffset(this.getGuiClass(), 0, 0); + } + public class CachedCrush extends CachedRecipe{ public PositionedStack ingredient; @@ -37,9 +43,9 @@ public class CrusherRecipeHandler extends TemplateRecipeHandler{ public CachedCrush(ItemStack in, ItemStack resultOne, ItemStack resultTwo, int secondChance){ in.stackSize = 1; - this.ingredient = new PositionedStack(in, 7, 37); - this.resultOne = new PositionedStack(resultOne, 60, 39); - if(resultTwo != null) this.resultTwo = new PositionedStack(resultTwo, 86, 39); + this.ingredient = new PositionedStack(in, 80, 21); + this.resultOne = new PositionedStack(resultOne, 66, 69); + if(resultTwo != null) this.resultTwo = new PositionedStack(resultTwo, 94, 69); this.secondChance = secondChance; } @@ -67,10 +73,15 @@ public class CrusherRecipeHandler extends TemplateRecipeHandler{ } } + @Override + public int recipiesPerPage(){ + return 1; + } + public static class Fuel{ public Fuel(ItemStack in, int burnTime){ - this.stack = new PositionedStack(in, 7, 3, false); + this.stack = new PositionedStack(in, 51, 21, false); this.burnTime = burnTime; } @@ -80,8 +91,8 @@ public class CrusherRecipeHandler extends TemplateRecipeHandler{ @Override public void loadTransferRects(){ - transferRects.add(new RecipeTransferRect(new Rectangle(29, 3, 16, 16), FUEL)); - transferRects.add(new RecipeTransferRect(new Rectangle(29, 32, 22, 22), NAME)); + transferRects.add(new RecipeTransferRect(new Rectangle(51, 5, 14, 14), FUEL)); + transferRects.add(new RecipeTransferRect(new Rectangle(80, 40, 24, 22), NAME)); } @Override @@ -139,26 +150,26 @@ public class CrusherRecipeHandler extends TemplateRecipeHandler{ @Override public String getGuiTexture(){ - return ModUtil.MOD_ID_LOWER + ":textures/gui/nei/grinder.png"; + return ModUtil.MOD_ID_LOWER + ":textures/gui/guiGrinder.png"; } @Override public void drawBackground(int recipeIndex){ GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F); GuiDraw.changeTexture(getGuiTexture()); - GuiDraw.drawTexturedModalRect(0, 0, 0, 0, 113, 66); + GuiDraw.drawTexturedModalRect(49, 5, 49, 5, 66, 86); } @Override public void drawExtras(int recipe){ - drawProgressBar(29, 4, 113, 44, 14, 14, 48, 7); - drawProgressBar(29, 32, 113, 0, 22, 22, 48, 0); + drawProgressBar(51, 5, 176, 44, 14, 14, 48, 7); + drawProgressBar(80, 40, 176, 0, 24, 23, 48, 1); CachedCrush crush = (CachedCrush)this.arecipes.get(recipe); if(crush.resultTwo != null){ int secondChance = crush.secondChance; String secondString = secondChance + "%"; - GuiDraw.drawString(secondString, 87, 24, StringUtil.DECIMAL_COLOR_GRAY_TEXT, false); + GuiDraw.drawString(secondString, 118, 73, StringUtil.DECIMAL_COLOR_GRAY_TEXT, false); } } diff --git a/src/main/java/ellpeck/actuallyadditions/util/BlockUtil.java b/src/main/java/ellpeck/actuallyadditions/util/BlockUtil.java index 4a6ef88c8..dcfe94660 100644 --- a/src/main/java/ellpeck/actuallyadditions/util/BlockUtil.java +++ b/src/main/java/ellpeck/actuallyadditions/util/BlockUtil.java @@ -44,7 +44,7 @@ public class BlockUtil{ block.setBlockName(createUnlocalizedName(block)); GameRegistry.registerBlock(block, itemBlock, ((INameableItem)block).getName()); for(Enum current : list){ - OreDictionary.registerOre(((INameableItem)current).getOredictName(), new ItemStack(block, 1, current.ordinal())); + if(!((INameableItem)current).getOredictName().isEmpty()) OreDictionary.registerOre(((INameableItem)current).getOredictName(), new ItemStack(block, 1, current.ordinal())); } } @@ -52,7 +52,7 @@ public class BlockUtil{ block.setCreativeTab(CreativeTab.instance); block.setBlockName(createUnlocalizedName(block)); GameRegistry.registerBlock(block, itemBlock, ((INameableItem)block).getName()); - OreDictionary.registerOre(((INameableItem)block).getOredictName(), block); + if(!((INameableItem)block).getOredictName().isEmpty()) OreDictionary.registerOre(((INameableItem)block).getOredictName(), block); } } diff --git a/src/main/java/ellpeck/actuallyadditions/util/ItemUtil.java b/src/main/java/ellpeck/actuallyadditions/util/ItemUtil.java index 07c1f25b1..0614892cd 100644 --- a/src/main/java/ellpeck/actuallyadditions/util/ItemUtil.java +++ b/src/main/java/ellpeck/actuallyadditions/util/ItemUtil.java @@ -46,7 +46,7 @@ public class ItemUtil{ item.setCreativeTab(CreativeTab.instance); item.setUnlocalizedName(createUnlocalizedName(item)); GameRegistry.registerItem(item, ((INameableItem)item).getName()); - OreDictionary.registerOre(((INameableItem)item).getOredictName(), item); + if(!((INameableItem)item).getOredictName().isEmpty()) OreDictionary.registerOre(((INameableItem)item).getOredictName(), item); } public static void register(Item item, Enum[] list){ @@ -54,7 +54,7 @@ public class ItemUtil{ item.setUnlocalizedName(createUnlocalizedName(item)); GameRegistry.registerItem(item, ((INameableItem)item).getName()); for(Enum current : list){ - OreDictionary.registerOre(((INameableItem)current).getOredictName(), new ItemStack(item, 1, current.ordinal())); + if(!((INameableItem)current).getOredictName().isEmpty()) OreDictionary.registerOre(((INameableItem)current).getOredictName(), new ItemStack(item, 1, current.ordinal())); } } diff --git a/src/main/java/ellpeck/actuallyadditions/util/ModUtil.java b/src/main/java/ellpeck/actuallyadditions/util/ModUtil.java index 2292a9c30..3097c271b 100644 --- a/src/main/java/ellpeck/actuallyadditions/util/ModUtil.java +++ b/src/main/java/ellpeck/actuallyadditions/util/ModUtil.java @@ -5,7 +5,7 @@ import org.apache.logging.log4j.Logger; public class ModUtil{ - public static final String VERSION = "1.7.10-0.0.4.1"; + public static final String VERSION = "1.7.10-0.0.4.2"; public static final String MOD_ID = "ActuallyAdditions"; public static final String NAME = "Actually Additions"; diff --git a/src/main/resources/assets/actuallyadditions/textures/gui/guiGrinder.png b/src/main/resources/assets/actuallyadditions/textures/gui/guiGrinder.png index 483f9f8bab233d929ce1cf8691fba7583975eb7e..9c94d97ff32880e76272f656cc5bed5e9a01a9ed 100644 GIT binary patch delta 1009 zcmVWR0ImN000iO0kJlEER$XYCVvG4NklYGAlGi4(7?+@u<) z%WVl*uVXOWo3wfJ*I%6y4a90&0@g(l4KUoBbOCX?e7wD-9ZLP`vw-z$@n;hZFx;DD z0e^A2j0_WC=f5a6!2rX(S+;;!f3bOaUC%7wNVZ!e86v>efAOby-56_zd$Vi-R(`w$ zUgj1M>uw&?Fi60rur*);W?unMBESr6isEInng1RT3%94bF$IGJ*r%X)`e%O^cp3pg zLH$vX;ob}qaEx__r@A!-Lj^Q2+?#;{&VSF21$-}qNk|nCN^isF|KJj6S(t+46+q#@ z*8k!rh=96dJP6?1flJ~sK)w7M*w|pWH)8}e7ABzWVknj1mxf>fS=p6?+>x#w*EN<{C7=z5zzHb>I!KD+<)7{ zjeuyNZZ$C6n;`;h-Cxi?X`O>zd<$U1Gu0gdW`ITm!@XImfEyU@&Ef=1jRcV0NPq-L z0LN)a00(wP0vHHL0DWg9fPqIyfCNZ@1S~|rvHqT_1p|T3!7k1M?(E^o1mxi?;FdQ( z0=`zE+B+;xK)7~kCPI-bD!wFN{eLqEcz>tSO;aVm3%MkY*PACi0z z2&+FXgS}l0bdF&96+q!Y=OANJ1)M4?eqZhF3a|#9BbZ*mg#o$}NWTe&H-J#QwVsoh z2Q+_RnF9E8-ah?XirW`v14$zULy+ypqttT0saj^O#paHGg^SuF~a@CcBT?+B3` f76~Ao^7ZvUsH1K|aJ8;400000NkvXXu0mjfo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/assets/actuallyadditions/textures/gui/nei/grinder.png deleted file mode 100644 index a05890aef1833a46a6d36bc2bafac04e7a66f034..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2316 zcmeAS@N?(olHy`uVBq!ia0y~yU<5K58911MRQ8&P5Fo{p?&#~tz_78O`%fY(0|PTd zfKP}kNL-hJ#f-t++?>smfjxwQvxq?>TIhz4>;G*G|NqOkwY7D0baZufb$567^z=-e zIC1IHrTg~n+rNMRfddB)9z1yH(4oVJ4<9*l(jCcwA^1DHDlpPG3p^r=85sDsf-qxp;fxbNL5ULAh?3y^w370~qEv>0 z#LT=By}Z;C1rt33J=4@yqf}ryQsn947*Y}Ub{4PyV+#@2SiTHr~AS|Nrt$ z=g(E*@PY06CO`atRay|OA+}eTT1e?Zkn@|=N);}UXOp}0aJKxce@$~OX zQ~mbC3JN>{ewA*lHt(Mc8SwmU+Qxe1cyKYB#3xpu(fvA&;bLhGg7HA7{5;_+z<9WE zb>fldTmFi4^c!(<#T}YZDl!gz{PCv2rh1^L@wOrH0%kcevyQ z3T}TdmICUL5HI+B;r{zH6Nlq#4YU;2)!%=APwIiZrrqHWUY&i>jEqx$9D4aTT&{lq z?&=*TAD+oxvN-H5W|h}EnIWsD&D_cG|L@=b62)UA0t5vPpZ9*C$1-QHXsF z4JORz?s0c>a4_%QxBvFrOSTGp#U?;?`XR`l=eNG3y zNyJaO_TSJaz|Gc9yWyEA)3w_Y)iHl-eOkZ9t2cxhL>_py@^&dN=9J#i%saBb>KGpbBmw+FL#KlanInv uh_(;CQ;sruMCvq*QWOV)Ys`Vmm;e8HBvZz===gO|UE}HM=d#Wzp$Pyw3{Ct1 diff --git a/src/main/resources/mcmod.info b/src/main/resources/mcmod.info index ddeb97860..7ed413355 100644 --- a/src/main/resources/mcmod.info +++ b/src/main/resources/mcmod.info @@ -3,7 +3,7 @@ "modid": "ActuallyAdditions", "name": "Actually Additions", "description": "Actually Additions is a Mod that offers a bunch of things from Machines for Automation and tons of food to advanced Hopper Mechanisms and Effect Rings!", - "version": "0.0.4.1", + "version": "0.0.4.2", "mcversion": "1.7.10", "url": "https://github.com/Ellpeck/ActuallyAdditions", "updateUrl": "",