
Everything posted by Cadiboo
-
my mod cannot run on a server
Rendering stuff is client only. It doesn’t exist on the sever. You need to make sure you aren’t referencing it from any common code
-
Item that has to disappears over time
If you could post your code as a GitHub repository that would be best
-
[1.12.2] Easy way of storing NBT data in config files?
Extend GuiConfig and pass the name of the class to guiClassName in @Mod
-
Where is the horse or pig EntityViewRenderEvent.CameraSetup when riding them.
It gives you a normalised vector IIRC
-
Item that has to disappears over time
You need to use Capabilities on the ItemStack. Items are singletons (there is only one of each) and itemstacks are the actual things that are in your inventory.
-
Item that has to disappears over time
What: Not using an interface to register models Why: This interface (commonly called IHasModel) is unnecessary. All items need models and nothing about model registration requires private or protected data. Consequences: This interface makes you write 4 lines of code in each class and 2+ lines of code in your registry event, when 1 or 2 lines of code could accomplish the exact same thing. It also leads to weird bugs when you forget to make your object implement the interface. How: Simply register each model in the registry event (1 line of code for each model) or write a loop that does it for you (1 or 2 lines depending on the implementation). For example: Write out registerModel(item, meta, variant) for each item and variant or write a loop like this for (Item item : allModItemsAndItemBlocks) registerModel(item, meta, variant); A list of all your items can be acquired in many ways, such as looping over registries and checking domain, keeping your own list, looping over registries and using an instanceof check etc.
-
[1.12.2] turn Itemstack into Itemstack [ ] [Solved]
By the way, = checks whether 2 references are the same reference (if 2 objects are the same instance) .equals checks if 2 objects are equal for example new String() == new String() will never be true. However new String().equals(new String()) will always be true
-
API for 1.5.2 BukkitForge?
Anything under 1.10 isn’t supported on these forums anymore. 1.5.2 is over 7 years old now. We can help you if you update
-
[1.12.2] Easy way of storing NBT data in config files?
I don’t think there’s any way to decide what parts of the NBT are “important” and which parts arent
-
Blackscreen with forge.
Did you read the FAQ? It tells you how to solve your problem
-
FORGE WONT OPEN
Do not download mods from 9minecraft. They deprive the author of income, are usually outdated and can contain malware/viruses.
-
Can't start Forge on Eclipse
What java installation does eclipse launch userdev with?
-
[1.12.2] turn Itemstack into Itemstack [ ] [Solved]
Modding is a bad way to learn programming, as lots of stuff is done badly, many dirty hacks are used and you have to do a bunch of stuff in Avery specific way that is unique to modding
-
Item model with text?
No, because they encourage me to fix my missing models
-
[SOLVED] Gradle dependency problem
Files in /libs/ are automatically added to your project without needing anything in the build script. Are the mappings for the dependency the same as your mappings?
-
Item model with text?
I’ve noticed that their implementation is pretty poor performance wise when you have lots of missing model on screen at once, and is prone to crashes (in a debug world type, probably a problem with getActualState or something) and weird errors rendering (parts of text not appearing, random vertices shooting off in random directions)
-
Item model with text?
Will the text change much?
-
[1.12.2] turn Itemstack into Itemstack [ ] [Solved]
What is this you need to check if it is empty by checking the values or all the stacks. This can be accomplished with streams or loops. You also shouldn’t compare with ItemStack.EMPTY. Use ItemStack#isEmpty
-
[1.12.2] Make Crater on TNT explode
You can either make a better loop, or increment your maxX and maxZ based on Y value
-
[1.12.2] Sunrise event?
Your computer could probably do this computation billions of times in less than a microsecond
-
[1.12.2] Add delay to Custom TNT explode
You need to find a way to distribute your logic over multiple ticks. Pre-generating a list of coordinates would work, but would use up massive amounts of memory. I would distribute my loop over multiple ticks
-
[1.12.2] Add delay to Custom TNT explode
What is that code meant to do? It’s not valid java
-
Mod fails to build [1.12.2]
I think you’ll find out in a sec that it’s not for “no reason”
-
[1.12.2] Add delay to Custom TNT explode
I would turn the for loop into something that executes every tick. What if another explosion happens while the first is still happening? Because you aren’t doing everything all at once, other stuff can happen in the meantime
-
Help with MCP
The mistake could be literally anything. You haven’t posted your code, we have no idea what it could be. It’s also hard to work with minecraft directly because of Sides/Distributions. Which is one of the reasons why you shouldn’t do it
IPS spam blocked by CleanTalk.