Skip 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. No. Christ. getIntArray returns a value that you then proceed to do FUCK ALL with. You want to read a value out of the NBT? STORE IT SOMEWHERE. It does not magically get saved into your LearnedSpells property.
  2. That's easy. Compare and contrast: https://github.com/MamboDancer/minecraftmod/blob/master/src/main/resources/assets/ttb/recipes/pickaxe_terrifying.json#L16 https://github.com/MamboDancer/minecraftmod/blob/master/src/main/resources/assets/ttb/recipes/theterrifyingblock.json#L13 What is different? (Hint: count the amount of white space)
  3. @Override public void deserializeNBT(NBTTagCompound nbt) { nbt.getIntArray("LearnedSpells"); } Oooh, a value! *throws it in the garbage.*
  4. nbt.setIntArray("LearnedSpells", Ints.toArray(knownSpells)); // :O SUCH MAGIC
  5. You don't need it at all. You never did. I don't know why my last comment made you think "oh, this should be a property" and not "oh, I need to not do this thing he told me not to do."
  6. You need to register an event handler for PlayerTickEvent, check the player's equipment (you get the player through the event object) and if they have boots, get the enchantment power for your enchantment from the boot stack (there's an EnchantmentHelper function for this) and if its > 0, allow flight.
  7. new ItemMonsterPlacer() is the Item, isn't it? You should be putting an ItemStack in there, I would have thought.
  8. Vanilla might've provided it, but vanilla also disregards it in a lot of places too, opting for a blank string.
  9. No resource domain -> minecraft* *Provided by Forge
  10. Vanilla isn't a mod, so it doesn't have a mod ID. Mods should have a : though.
  11. Unfortunately, not for this. If you try to set the player sleeping, they'll unsleep the next time the update code runs, popping them out of the sleeping state in a way that you (as a modder) can't cancel. You can replace EntityPlayer with a new subclass, but you are correct that it could break things (e.g. conflict with other mods that also replace EntityPlayer, like Galacticraft). There is no way around this, beyond the previously mentioned alternatives.
  12. Your Durmstrium ladder does not implement IHasModel, so you never register a model for it. (And this is why I hate the IHasModel method of supplying models. There are so much better ways. Hint: fucking everything needs a model registered... except when it doesn't)
  13. You have two three options: 1) Find a way to replace the object that the code is in with your own version of that class. Doing this ranges from medium difficult to almost impossible, depending on the object in question. 2) Core mods, which are heavily discouraged. Do not do this, do not ask for help doing this. If you do not know how to do this no one will tell you. 3) Make a pull request to Forge to insert some kind of event or other modification that will allow a mod to hook into the behavior and override the vanilla mechanic. Then wait six to eight weeks for your PR to get approved.
  14. Mathematically this is an inverse. And I believe there's already a "secret setting" shader that does this (there is, ctrl-f, invert). But if not...you could write one.
  15. You would need to find a way to remove that check.
  16. Why are you performing the conversion on line 1? What is the point of this? Whatever it does, the result is immediately overwritten by line 2. return nbbt; You have a typo. diesieben07 may have more input as well. There's something I'm scratching my head over, but can't articulate what I think you're doing wrong.
  17. Right click -> references -> find in project
  18. Define "negative color."
  19. On ILearnedSpells (your capability) should not extend INBTSerializable : https://github.com/Draco18s/ReasonableRealism/blob/master/src/main/java/com/draco18s/hardlib/api/capability/RawMechanicalPowerHandler.java#L8 On LearnedSpellsStorage::readNBT checks if nbt is an NBTTagIntArray and if so casts it to NBTTagCompound : You should read the NBT by reversing whatever writeNBT does: read out an NBTTagIntArray.
  20. Are you making a mod? No? You're in the wrong place. http://www.minecraftforge.net/forum/forum/18-support-bug-reports/
  21. That's handled by ItemSword as well as some bits elsewhere in the code that check for instances of ItemSword
  22. 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.
  23. 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.
  24. 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.

Important Information

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

Account

Navigation

Search

Search

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.