Jump to content

Cadiboo

Members
  • Posts

    3624
  • Joined

  • Last visited

  • Days Won

    58

Everything posted by Cadiboo

  1. Update to a modern version of minecraft to receive support. 1.12.2 is old and you shouldn’t be making new mods for an outdated version.
  2. We don’t support 1.12.2 on these forums anymore because it’s too old. You’ll need to update to a modern version of minecraft to receive support.
  3. You can have a json model with an overlay texture that is 40% transparent + an iblockcolors implementation + setting the render layer of your block. This should work.
  4. This means “an method called setRenderLayer in the class RenderTypeLookup”. (Usually “#” is the same as “.” but specifically means instance, however many people use “#”, “.” and “::” interchangeably which defeats their purpose). Your code will use RenderTypeLookup#setRenderLayer from inside the FMLClientSetupEvent. RenderTypeLookup#setRenderLayer needs to be called after block registration on the client distribution so the FMLClientSetupEvent callback is the perfect place to call it. You need to be careful though as RenderTypeLookup and RenderType are client side only classes. This usually isn’t an issue as you’re using them inside a method that will only get called on the client, however, if you specify multiple RenderTypes for your via a lambda, you need to take extra precautions that your code isn’t loaded serverside because of how lambdas work. Therefore it’s best to subscribe to the FMLClientSetupEvent in a client only event subscriber (subscribed to the mod event bus obviously) rather than in your main class. Since ChampionAsh wrote their response, mappings for 1.15.1 have been released. You should have updated your mappings to the latest (or latest stable) version and therefore should be referencing the mapped names not the SRG names in your source code.
  5. What do you mean?
  6. The vanilla code is a bit of a mess of legacy code and Forge compatibility hacks. Vanilla’s code was never meant to be extended by Modders. I would either extend the vanilla class and write all the necessary hacks to get stuff to work the way you want or write my own implementation that will be much cleaner and uses forges systems. You can see an example of the latter here
  7. You can use a single line of code with ObfuscationReflectionHelper. You can also use an AT (Access Transformer)
  8. Your logs should contain some information
  9. There are the Forge data generators that were made for exactly this purpose.
  10. Show your code. As a general rule projectiles should extend ArrowEntity because Minecraft has special handling for them that uses instanceof checks.
  11. Add/Remove a Field/Method
  12. Look at how the arrow entity syncs its isCritical flag.
  13. This is the right way to do it. Make sure you sync it properly with the EntityDataManger or similar.
  14. MCP is separate to Forge. Literally anyone can add names to the list of mappings.
  15. Ok so you would want a condition called something like “has_learned_item”. I’m not sure if you get a player object in the conditions, let me check
  16. It makes your code simpler. You can still do iterative registration with DeferredRegister and unless you’re doing something very complicated (which you probably shouldn’t be) you can do complex registration too.
  17. Forge doesn’t do this, your mappings (MCP) does this. Forge provides an API on top of Minecraft’s code. This API is constantly changing and being made better.
  18. What is the condition that you’re trying to implement meant to do?
  19. Show your code please. Vanilla handles many trying based on instanceof or equality checks that don’t play well with mods.
  20. You don’t do any complex or iterative registration so using DeferredRegister would simplify and clean up your code a ton
  21. Many things can change in a few weeks, such as MinecraftForge#6444 being merged.
  22. I know that JSON models provide a way to do it via the transforms section but the best way to do it is definitely to change your model to the correct scale
  23. This is what you’re meant to do. What is the exact issue that you’re having? Forge provides custom conditions too so even if you’re having trouble with the docs, you can look at Forge’s code to see how it works
  24. ^ You need two blocks
  25. So you copied and pasted a class in an old version. Then you made some (probably small) changes to that class. Then you updated and are having trouble because the code that the old class depended on has changed. The class obviously also changed since the old version so you should copy + paste it again and re-apply the changes you made to the new code.
×
×
  • Create New...

Important Information

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