Everything posted by Draco18s
-
[1.12.2] NBT List with one Key?
I find this particularly hilarious as the post where I said that there already existed a method to do the conversion (which was the same post I told him to use a list) he replied with "I didn't know that, so I made one." Though I was referring to the toArray method in the List<T> class. I didn't know about the Guava version.
-
[1.12.2] Multiple Mods in one Jar File
Use one workspace. Don't modify your build.gradle file. It magically happens for you because you didn't tell gradle there was supposed to be two jar files, so it makes one.
-
[1.12.2] NBT List with one Key?
But you returned null. Returning null is never1 the right answer. 1. There are cases where it's fine, but only when you know what it is that null means in that context. "This is how I save to disk" should never ever--not in a billion lifetimes of the universe--ever be true.
-
[1.12.2] NBT List with one Key?
/me scans the code you posted. Line 114-116? Oh yeah, that might do it. Why would you ever return null from a serialize function?
-
[1.12.2] NBT List with one Key?
Christ, I think you've seriously fucked up somewhere. Hell if I know where though.
-
[1.12.2] NBT List with one Key?
Why do you think there's more? The only other property your class has is a SPELL_ID field which is literally useless.
-
[1.12.2] NBT List with one Key?
Yes. Otherwise they're useless. Yes. You can't manipulate null. You probably have to do this too, but now I am unsure what you are asking.
-
[1.12.2] NBT List with one Key?
The crash report does not contain enough information to tell me what is wrong. That is not how that code works. For one, you are creating a new tagCompound, not using a non-existent one. Second, setting values creates them if they don't exist.
-
[1.12.2] NBT List with one Key?
Yes No
-
[1.12.2] NBT List with one Key?
List<T>#toArray() And again: public void learnedSpell(int spellLearned) { this.SPELL_ID = spellLearned; this.knownSpells.add(SPELL_ID); serializeNBT(); } Why are you calling serializeNBT here? You're telling it to create an NBTcompound and then throwing the result away. Commenting that line out would have the same result.
-
[1.12.2] NBT List with one Key?
The if-statement will never be true. Remove it. Just write the array. Except you have a List<int> which is not an int[], you need to convert. There is a method to do this for you already.
-
[1.12.2] NBT List with one Key?
This is still true. Why are you doing this? You would be writing data into an NBT tag which you then immediately chuck in the trash. NBTTagCompound nbt = new NBTTagCompound(); if (nbt.hasKey("LearnedSpells")) This if-statement will never evaluate to true, you just created that NBTTag, it has no keys yet.
-
[1.12.2] NBT List with one Key?
public void learnedSpell(int spellLearned) writeNBT(); } Why are you calling writeNBT here? private NBTTagCompound writeNBT(NBTTagIntArray listSpells) { NBTTagCompound nbt = new NBTTagCompound(); return null; } You aren't writing anything at all And returning null. Why? Why do you make coding puppy sad?
-
[1.12.2] NBT List with one Key?
How about an NBTTagIntArray?
-
[1.12.2] NBT List with one Key?
private List<int> knownSpells = new List<int>(); this.knownSpells.add(spellLearned)
-
Biomes inverted in world gen
Correct.
-
"Cannot instantiate the type EntityArrow" error [1.11.2]
Call setDead on it before your function ends?
-
"Cannot instantiate the type EntityArrow" error [1.11.2]
You can't instantiate abstract classes: public abstract class EntityArrow You need to create a new EntityTippedArrow and give it no special effects.
-
[1.12.2] Use of returned ActionResult object in Item.onItemRightClick
right click on the method -> references -> find in project
-
How to run a server with more RAM
Are you making a mod? No? You're in the wrong place.
-
[1.12.2] Issues with getting the player in HarvestDropsEvent
I'm not sure what the problem is, I can't help you other than to say "use the debugger and figure out which value is not what you expect, then find out why"
-
Biomes inverted in world gen
So, the darker color is #100c01 which is borderline black. But the full-bright color is #ffbf10 which is a golden-brown. The lighter color is #231c19 which brightens up to #ffccb6, a pale tan. The only green in the images is from the fog, on the right half of the screen. Which is not what's under query in the other two screenshots.
-
Biomes inverted in world gen
/me looks at the screenshots. /me sees brown...and a different brown.
-
Custom enchantment behaviour.
I'd get the boots equipment stack directly, rather than asking for the "best version in all of the player's gear" But that's just me.
-
[Solved] Can I keep Capability data when breaking and replacing a vanilla Block?
A core mod is one that uses ASM to make changes to code that you do not control through the class loading process. You will find very little help writing such code, as it is very easy to do things Badly and cause more problems than you solve.
IPS spam blocked by CleanTalk.