-
Posts
11 -
Joined
-
Last visited
Posts posted by Shnupbups100
-
-
I was attempting to update my dev environment to 1.12.2 (from 1.12.1, which worked perfectly) and kept getting an error when using
gradlew setupDecompWorkspace
During the :decompileMc process, I would get this error:
Spoiler:decompileMc Exception in thread "main" java.lang.IndexOutOfBoundsException: Index: 24, Size: 9 at java.util.ArrayList.rangeCheck(ArrayList.java:653) at java.util.ArrayList.get(ArrayList.java:429) at org.jetbrains.java.decompiler.struct.consts.ConstantPool.<init>(ConstantPool.java:109) at org.jetbrains.java.decompiler.struct.StructClass.<init>(StructClass.java:84) at org.jetbrains.java.decompiler.struct.StructClass.<init>(StructClass.java:72) at org.jetbrains.java.decompiler.struct.StructContext.addArchive(StructContext.java:159) at org.jetbrains.java.decompiler.struct.StructContext.addSpace(StructContext.java:100) at org.jetbrains.java.decompiler.struct.StructContext.addSpace(StructContext.java:78) at org.jetbrains.java.decompiler.main.Fernflower.addAllClasspath(Fernflower.java:119) at org.jetbrains.java.decompiler.main.Fernflower.<init>(Fernflower.java:47) at org.jetbrains.java.decompiler.main.decompiler.BaseDecompiler.<init>(BaseDecompiler.java:32) at net.minecraftforge.gradle.tasks.fernflower.FernFlowerInvoker.runFernFlower(FernFlowerInvoker.java:64) at net.minecraftforge.gradle.tasks.fernflower.FernFlowerInvoker.main(FernFlowerInvoker.java:41) :decompileMc FAILED
My JAVA_HOME is correctly set, I'm using JDK 1.8 64 bit, everything worked perfectly fine just as I had it with 1.12.1.
Anyone know why this is happening, and if I can do anything to fix it?
-
You need to call
setHasSubtypes(true)
on your
Item
, otherwise the metadata will be ignored when the player picks it up.
Haha, I can't believe I missed that! Thankyou! Solved.
-
I'm working on a n item with 16 colour metadatas based on the 16 block colours. For some reason, however, if I have, for example, a green one in my inventory and pick up a purple one, the purple one will get picked up as a green one. So instead of a purple item being added to my inventory, the itemstack that contains the green item will increase in stack size by 1. This also occurs when using /give, however I believe that the give command uses item pick up code, so that doesn't shock me.
My Item Code:
If you need to see any other code, let me know. Do I have to use some sort of workaround? Am I doing something wrong? Has this happened to anyone else?
-
Thanks it worked. do you know how to make it spawn default in the village?
To spawn in the Village, as far as I know, you can only do it with a custom house. If you already have a custom house, override the getVillagerType method in your house's class and make it return the id of your villager. if you don't, I suggest you look at some open source mods that add villager houses to get a feel of how to do it. (TConstruct helped me get mine)
-
First, you'll need to make a new class that extends IVillageTradeHandler.
In the constructor, add ItemStacks of the items you want it to trade to an ArrayList, then in the manipulateTradesForVillager method, have it make sure the villager is yours by using villager.getProfession() and your villager ID, then in a for loop use recipeList.addToListWithCheck to add new instances of MerchantRecipe to your villager's trade list.
Then, in your mod's main class, register the trade handler with VillageRegistry.instance().registerVillagerTradeHandler(villagerId, instanceOfTradeHandler);
-
I'm working on a 'Tortoise' mob, and it's almost finished. It can breed and have babies, and though the babies' hitboxes are small, their models render the same size as if they were adult. What do I have to add to my entity/model/render classes to make babies render smaller than adults?
setupDecompWorkspace not found
in ForgeGradle
Posted
'setupDecompWorkspace' no longer exists. Forge, and by extent ForgeGradle, for 1.13.x received major rewrites, and a lot of things are done very differently. Please do your research before posting here.
Also, Java 11 is not supported. Use Java 8, 9 or 10.