Everything posted by Draco18s
-
[1.12.2] NBT List with one Key?
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.
-
My GUI doesnt want to show up(FIXED)
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)
-
[1.12.2] NBT List with one Key?
@Override public void deserializeNBT(NBTTagCompound nbt) { nbt.getIntArray("LearnedSpells"); } Oooh, a value! *throws it in the garbage.*
-
[1.12.2] NBT List with one Key?
nbt.setIntArray("LearnedSpells", Ints.toArray(knownSpells)); // :O SUCH MAGIC
-
[1.12.2] NBT List with one Key?
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."
-
[1.12.2] [Solved] Applying enchantment effects when player wear it
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.
-
Villager selling spawn egg
new ItemMonsterPlacer() is the Item, isn't it? You should be putting an ItemStack in there, I would have thought.
-
[Solved]I18n.translateToLocal Not Working For Entities Anymore?
Vanilla might've provided it, but vanilla also disregards it in a lot of places too, opting for a blank string.
-
[Solved]I18n.translateToLocal Not Working For Entities Anymore?
No resource domain -> minecraft* *Provided by Forge
-
[Solved]I18n.translateToLocal Not Working For Entities Anymore?
Vanilla isn't a mod, so it doesn't have a mod ID. Mods should have a : though.
-
[1.12.2] How to make the player sleep
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.
-
Item Rendering in hand
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)
-
[1.12.2] How to make the player sleep
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.
-
[1.12.2] How to make the player sleep
Generally...you don't
-
Get all minecraft colors to negative
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.
-
[1.12.2] How to make the player sleep
You would need to find a way to remove that check.
-
[1.12.2] NBT List with one Key?
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.
-
[Forge 1.12.2] Calculate block hit vec
Right click -> references -> find in project
-
Get all minecraft colors to negative
Define "negative color."
-
[1.12.2] NBT List with one Key?
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.
-
Can't run/open universal forge for mod server
Are you making a mod? No? You're in the wrong place. http://www.minecraftforge.net/forum/forum/18-support-bug-reports/
-
Creating a sword swipe from an item
That's handled by ItemSword as well as some bits elsewhere in the code that check for instances of ItemSword
-
[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.
IPS spam blocked by CleanTalk.