Jump to content
View in the app

A better way to browse. Learn more.

Forge Forums

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Draco18s

Members
  • Joined

  • Last visited

Everything posted by Draco18s

  1. 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.
  2. 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.
  3. 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.
  4. /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?
  5. Christ, I think you've seriously fucked up somewhere. Hell if I know where though.
  6. Why do you think there's more? The only other property your class has is a SPELL_ID field which is literally useless.
  7. 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.
  8. 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.
  9. 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.
  10. 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.
  11. 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.
  12. 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?
  13. How about an NBTTagIntArray?
  14. private List<int> knownSpells = new List<int>(); this.knownSpells.add(spellLearned)
  15. Call setDead on it before your function ends?
  16. You can't instantiate abstract classes: public abstract class EntityArrow You need to create a new EntityTippedArrow and give it no special effects.
  17. right click on the method -> references -> find in project
  18. Are you making a mod? No? You're in the wrong place.
  19. 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"
  20. 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.
  21. /me looks at the screenshots. /me sees brown...and a different brown.
  22. 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.
  23. 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.

Important Information

By using this site, you agree to our Terms of Use.

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.