-
Posts
1830 -
Joined
-
Last visited
-
Days Won
12
Everything posted by DavidM
-
[1.15.1] Why minecraft forge does not have a json api?
DavidM replied to DragonITA's topic in Modder Support
Google has a JSON library, which is included in your workspace. -
The attribute modid is undefined for annotation type Mod
DavidM replied to Gameatro's topic in Modder Support
That is not the correct way to build your mod. Run gradlew build to build your mod. Refer to the documentation for more details. -
Fine then. Replace with public void render(Breadling entity, float f, float f1, float f2, float f3, float f4, float f5) { . The signature (parameters, etc) of the overriding method must match the method it is overriding.
-
You might want to check out these: https://www.tutorialspoint.com/java/java_generics.htm https://www.java67.com/2012/08/what-is-method-overriding-in-java-example-tutorial.html
-
Problem with this line. Hint: the type of the first parameter is wrong. Check the render method in the superclass.
-
Check out ClientPlayerEntity::movementInput.
-
Can servers be pirated? I thought only client needs purchasing.
-
Thanks for the tip. However I am concerned that this might be concerned hacky (although I am not aware of the direct consequences) due to the direct deletion of part of the class on certain side to avoid class loading.
-
Thank you for the explaination. I was previously confused about the difference between a reference to a class and the loading of a class. Does this mean that the only appropiate place to load client-only classes in modern versions of Minecraft is client-only event bus subscribers?
-
I previously thought that class loading only occurs when a class is referenced anywhere as long as the class it is referenced is loaded. However, I came across this post today: and if I understood correctly, casting would trigger class loading. However, I am slightly confused by this: Even if OP changed the type of player to ClientPlayerEntity, wouldn't that still cause the loading of the class? Similarly, the OP in the linked post called Minecraft::getMinecraft in his packet code, which is loaded on both sides. Despite the method being called in enqueued work, would this still cause a crash when loaded on a server?
-
[1.15.1]How to sync my custom capability from server to client ?
DavidM replied to egod's topic in Modder Support
My apologies. That was a random off-topic reference. -
[1.15.1]How to sync my custom capability from server to client ?
DavidM replied to egod's topic in Modder Support
That would still make the client class load commonly. I was mistaken. -
[Solved] [1.14.4] Trouble converting Iterable to ArrayList
DavidM replied to Croa's topic in Modder Support
Because getAllInBoxMutable returns the same MutableBlockPos every iteration step. With your current method, you are basically filling an array with the same object. To achieve what you want, simply create a new BlockPos (which is immutable) per iteration step based of the value from the iterator, then store the newly created BlockPos in your array. Also don’t randomly add try blocks when there is no error to catch. -
Override Block#isOpaqueCube and return false.
-
What launcher are you using? Post a screenshot.
-
How do I make my custom tool be repaired with vanilla items?
DavidM replied to epicool's topic in Modder Support
That is my signature. Those are not directed at you specifically, but are general tips for new modders. If the debugger is not working for you, you might want to check your setup. Thr best way to learn to mod Minecraft is to read vanilla code and check out other mods' code on GitHub. -
How do I make my custom tool be repaired with vanilla items?
DavidM replied to epicool's topic in Modder Support
No. -
Any implementation of IForgeRegistry (blocks, items, etc). These should be created during the appropiate registry event. This is basic Java syntax. If you are struggling with this then you need to learn Java before making a mod. This is not a Java forum.
-
1.12.2 is no longer supported on this forum. Update to a modern version of Minecraft to receive support.
-
Java is a static language. It has to compile before running. There must be no syntax errors. However, it sounds like you are struggling with basic Java syntax. Please learn Java before making a mod, as not knowing Java will cause unnecessary confusions.
-
Please read the EAQ and post log.