Rowsell99
Members-
Posts
11 -
Joined
-
Last visited
Converted
-
Gender
Undisclosed
-
Personal Text
I am new!
Rowsell99's Achievements
Tree Puncher (2/8)
3
Reputation
-
Forge install not creating correct workspace
Rowsell99 replied to Briggybros's topic in Modder Support
The common folder is meant to be empty, in the latest versions of Forge the src and common folders have been merged. When making your mod put the packages in minecraft/src and it will work the same as when you had to put it in minecraft/common. -
In the latest verisons of Forge the src and common folder have been merged to make things easier. You can follow the tutorial you are using just put your packages in minecraft/src.
-
[Solved] Making a RP2 Handsaw type item help.
Rowsell99 replied to Rowsell99's topic in Modder Support
Also you will want to remove this piece of code at the bottom of the code: craftMatrix.setInventorySlotContents(i, k); And put in this if else statement so if the item has no durability left it gets destroyed: if(k.getItemDamage() < k.getMaxDamage()){ craftMatrix.setInventorySlotContents(i, k); }else{ ItemStack l = new ItemStack(Block.blockClay, 0); craftMatrix.setInventorySlotContents(i, j); } The Block.blockClay can be replaced with anything because the 0 after it means that 0 of whatever item is stated will be put in your inventory. So the final code should look like this: @Override public void onCrafting(EntityPlayer player, ItemStack item, IInventory craftMatrix) { for(int i = 0; i < craftMatrix.getSizeInventory(); i++ ){ if(craftMatrix.getStackInSlot(i) != null){ ItemStack j = craftMatrix.getStackInSlot(i); if(j.getItem() != null && j.getItem() == YourMod.yourItem){ ItemStack k = new ItemStack(YourMod.yourItem, 2, (j.getItemDamage() + 1)); if(k.getItemDamage() < k.getMaxDamage()){ craftMatrix.setInventorySlotContents(i, k); }else{ ItemStack l = new ItemStack(Block.blockClay, 0); craftMatrix.setInventorySlotContents(i, j); } } } } } -
[Solved] Making a RP2 Handsaw type item help.
Rowsell99 replied to Rowsell99's topic in Modder Support
Oh by the way this line of code: ItemStack k = new ItemStack(mod_xxx.xxxItem, 2, (j.getItemDamage() - 1)); Should be changed to: ItemStack k = new ItemStack(mod_xxx.xxxItem, 2, (j.getItemDamage() + 1)); Because otherwise you are taking away from the damage value which adds to the durability so it will go from 123 to 124 instead of 123 to 122. -
[Solved] Making a RP2 Handsaw type item help.
Rowsell99 replied to Rowsell99's topic in Modder Support
Thanks a lot I've been looking for this for a while, I found the code that you put in the CraftingHandler class before but I didn't say that I had to put it in its own class so when I tried it in the base class it didn't work. -
I'm working on a mod at the moment and I'm trying to make a Red Power 2 handsaw or Equivalent Exchange 3 minium stone type item where you can use it in a crafting recipe and it will give it back but more damaged but I cant figure out how, if anybody knew I would be really thankful.
-
Thx
-
Thx OldYin. I just have one more question, does this mean that our mod packages go in Minecraft/src now?
-
Ok so I have fixed that problem but now when in eclipse it says the common folder is empty, I haven't modded with Forge for a while now so was wondering it was meant to happen or whether it is a bug.
-
I have the latest version of Forge installed just checked + reinstalled still got same problem, here is the errors:
-
I have been trying to start work a new mod I had some ideas for but when I decompiled Minecraft along with Forge I get 6955 errors which all seem to be able to be traced back to the lack of a cpw.mods.fml.common package in the decompiled code. I'm using the latest Forge, MCP and Minecraft + server.jar/