Jump to content

Cadiboo

Members
  • Posts

    3624
  • Joined

  • Last visited

  • Days Won

    58

Everything posted by Cadiboo

  1. 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
  2. If you could post your code as a GitHub repository that would be best
  3. Extend GuiConfig and pass the name of the class to guiClassName in @Mod
  4. 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.
  5. 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.
  6. 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
  7. 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
  8. I don’t think there’s any way to decide what parts of the NBT are “important” and which parts arent
  9. Did you read the FAQ? It tells you how to solve your problem
  10. Do not download mods from 9minecraft. They deprive the author of income, are usually outdated and can contain malware/viruses.
  11. What java installation does eclipse launch userdev with?
  12. 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
  13. No, because they encourage me to fix my missing models
  14. 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?
  15. 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)
  16. Will the text change much?
  17. 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
  18. You can either make a better loop, or increment your maxX and maxZ based on Y value
  19. Your computer could probably do this computation billions of times in less than a microsecond
  20. 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
  21. What is that code meant to do? It’s not valid java
  22. I think you’ll find out in a sec that it’s not for “no reason”
  23. 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
  24. 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
×
×
  • Create New...

Important Information

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