Jump to content

Cadiboo

Members
  • Posts

    3624
  • Joined

  • Last visited

  • Days Won

    58

Everything posted by Cadiboo

  1. This means to override those two methods and return the values you want (if you don't know how to override methods you need to learn basic Java). The two methods are and You can use vanilla's pre-made ToolTypes such as Harvest levels are
  2. Why. “1.0” is not a valid variable name in any language. Neither is “1.12.2”. “${1.0}” is not a valid version. Neither is “${1.12.2}”. the syntax is “${variableNameFrom build.gradle}”
  3. post your build.gradle and your mcmod.info.
  4. The whole error. Where is the pixelmon library?
  5. Everything is the same except #2 which has been moved to its own method (fillStateContainer)
  6. You need - the SoundHandler instance from getSoundHandler - Field Objects for sndManager and playingSounds Then get the value of each field using Field#get on the appropriate instance. Critique: Why do you store this in a variable? You only use it once Why is this fully qualified? Isn’t this method public? What is soundH? The SoundHandler doesn’t have this value, the SoundManager does. The SoundHandler has an instance of the SoundManager which you need to get though (sndManager). You also need to use the SRG name of the field which you can look up at many places.
  7. Example of something similar (getting and then setting Minecraft#blockRendererDispatcher#fluidRenderer) https://github.com/Cadiboo/NoCubes/blob/ef2968d83544597fd5d267e476742beb2ec9a177/src/main/java/io/github/cadiboo/nocubes/client/ClientProxy.java#L89
  8. LiteLoader appears to be providing an older version of Mixins (a library for coremodding) than is required by SGCraft. Sollution: uninstall one of the mods or get a LiteLoader version that includes a Mixin version greater than or equal to 0.7.10.
  9. Minecraft.getMinecraft().getSoundHandler().sndManager.playingSounds. As diesieben07 said, sndManager and playingSounds are private, so you will need to use Reflection or an Access Transformer to access them.
  10. My bad, It doesn't have to be a method, it can also be a field.
  11. The "#" is the same as a ".", it just means "instance method" "instance" rather than "static method" "static" Read https://stackoverflow.com/questions/37628/what-is-reflection-and-why-is-it-useful Then use the ObfuscationReflectionHelper (only in Forge versions above 2782)
  12. You need to install Java
  13. I explicitly left automating itemblock and model registration out of my 1.12.2 example mod, it’s still in there though just commented out in one of the registration loops (the models IIRC)
  14. The above code won't quite work with OptiFine because it replaces ChunkCache with its own implementation, you can ignore this if you don't particularly care about compatibility. I can't think of how to solve this problem easily otherwise I would provide a solution
  15. Those are expensive operations, cache the result of them.
  16. Don't in short. If you need that for logic on the client, you should probably be doing that logic on the server and sending the result to the client.
  17. You can’t store blockstates as a tile entity. You can have an infinite amount of variables in a tile entity though which is probably what you meant.
  18. Blood magic requires a newer forge version than the one you are using.
  19. Not safer, but better. Feel free to read about the concepts at http://wiki.c2.com/?StringlyTyped
  20. The string version of a ResourceLocation is "domain:path". Using this correctly is fine, but the problem with this is that "path" turns into "minecraft:path" when parsed into a ResourceLocation which can lead to lots of bugs.
  21. Capabilities are the replacement for that system in 1.12.2, I'm not sure about 1.10.2 though
  22. You don't actually register any of your objects. What I'm doing //Registration event.getRegistry().registerAll( setup(new ItemNewApproach(), "new_approach"), setup(new ItemNewApproach(), "new_approach2") ); What you're doing setup(new ItemNewApproach(), "new_approach"); setup(new ItemNewApproach(), "new_approach2");
×
×
  • Create New...

Important Information

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