Everything posted by Draco18s
-
[1.12] Item texture not working
Probably because ModelLoader itself (while in a client package) isn't marked SideOnly, but its parent class is. This means the JVM can find ModelLoader and the server is fine. But! There's no guarantee that that won't change suddenly and unexpectedly in the future. You're safest assuming that client stuff only happens on the client than saying "works for me." Because at some point, it suddenly won't, and you won't know why.
-
Why not override 'equals'?
How equal are item stacks? Item: yes Metadata: maybe (tools vs. dye) Stack size: unlikely (but maybe you do care, eg. recipes) NBT data: sometimes (depends on the item and the NBT tag) Ergo you need more than one way to compare.
-
[1.12] Item texture not working
That has nothing to do with it. Pretend you are the JVM. When you load a class you need to check that the class contains valid code. Ie that every referenced class with its already loaded or can be found and loaded if it is needed. The JVM cannot predict whether or not a given method will execute, so it assumes that all of them will at some point. The JVM scans through your class, finds a reference to a ModelRegistryEvent, attempts to locate this class, and fails to do so.
-
Dynamic JSON recipe output
Probably create a custom IRecipe implementation (you can subclass the existing ones).
-
[1.11.2] [SOLVED!] How do I do Packets
The magic of packets
-
[1.12][SOLVED] Some questions about the Capability System
NBT is not relevant, but yes, you will need to save and synchronize just as you always have.
-
[1.12][SOLVED] Some questions about the Capability System
To be compatible with things like hoppers? NBT has nothing to do with anything. IItemStackHandler is also saved to NBT. TileEntities do not operate on NBT at runtime, NBT is for serialization and serialization only.
-
Error when trying to run Minecraft client in Java Eclipse
Nope. I need to update to that method, but I haven't gotten around to it yet.
-
[1.11.2] [SOLVED!] How do I do Packets
You're setting awake on the server. You're expecting the client to render something. You need to tell the client that the data has changed.
-
[1.12][SOLVED] Some questions about the Capability System
I'd use an IItemStackHandler (the capability) in order to provide the capability to "handle items" with a single slot containing a 1-size stack of whatever's stored. Then you store an integer normally that actually tracks how many are stored.
-
Error when trying to run Minecraft client in Java Eclipse
They aren't. The obsolete part is the GameRegistry. They've been deprecated in favor of the Registry<T> events.
-
[SOLVED] How to place an item as a different block?
These are not the same object.
-
Error when trying to run Minecraft client in Java Eclipse
If you don't mind a slightly obsolete method of doing things https://github.com/Draco18s/ReasonableRealism/blob/master/src/main/java/com/draco18s/hardlib/EasyRegistry.java https://github.com/Draco18s/ReasonableRealism/blob/master/src/main/java/com/draco18s/hardlib/client/ClientEasyRegistry.java These classes are proxy/client proxy. It makes registering blocks and items very similar to how it was done in 1.7 Also note that these lines are just a reference back to the main mod class so that static methods can be used instead.
-
[SOLVED] How to place an item as a different block?
Have you looked at how reeds, doors, cakes, redstone dust, and so on work?
-
Error when trying to run Minecraft client in Java Eclipse
"AL lib: (EE) alc_cleanup" isn't your problem. A clean exit will display that message too. In addition to the above, use a god damn spoiler tag.
-
[1.10.2] Blacklist certain blocks from being broken with an item
I would be more amused if you returned Float.MIN_VALUE (the smallest, positive value representable) instead of 0.
-
Recommended vs latest version rule of thumb
For development? Latest. Recommended is more for players.
-
[1.12] Mod detecting
Also, you should always register all items and blocks, regardless.
-
[1.10.2] Rendering Armor throws NullPointerException
Also, you can use item.getRegistryName() instead "zocrpmod:" + itemName
-
Dealing with overrides
Step 1: Create a new class Step 2: Use the sustitution/override system to replace the vanilla instance with your own instance
-
[1.11.2] EntityThrowable only Renders Partly?
A lot of people post "I have problem" and don't post code or error and expect us to help merely by recognizing a vague description of the problem. So I end up writing a lot of witty retorts.
-
[1.11.2] EntityThrowable only Renders Partly?
Ah, yes, I see the problem. On line 109 in your Render class you perform an illegal action. You should do this:
-
Dealing with overrides
You mean the substitution alias system. That's not override.
-
[1.10.2] Rendering Armor throws NullPointerException
1) GameRegistry.registerItem(item, itemName) is deprecated. That's why it has a line through it, use the new Registry events instead. 2) Minecraft.getMinecraft().getRenderItem().getItemModelMesher()... is bad, use ModelLoader.setCustomModelResourceLocation(...) instead. 3) The error is in getArmorResource of LayerArmorBase which means that you did not correctly override something you needed to.
-
1.12 Custom resource location
Awful, awful, terrible, no good, very bad things. But we can't tell, because you haven't posted all of the code involved. Liiiike your AchievementBookItem class where you declare getModelLocation()
IPS spam blocked by CleanTalk.