Jump to content

imacatlolol

Forge Modder
  • Posts

    274
  • Joined

  • Days Won

    5

Everything posted by imacatlolol

  1. Using capabilities would be the best way to do this.
  2. Just a heads up, MatrixStack and IRenderTypeBuffer don't exist in 1.14.
  3. I took a quick look around the posted source for Archimedes' Ships and it's quite interesting. It seems that it saves the ship blocks in a "mobile chunk" which is rendered separately from the rest of the world. This allows it to only use one entity for the ship and allows tile entities to render properly, and it can take advantage of rendering optimizations used in regular block rendering. The exact details there would require a more thorough analysis, and I'm sure some of the concepts would need overhauls to work in 1.14 and up. Entities for individual blocks would be a bad idea for obvious reasons, so that "mobile chunk" concept seems to be a great alternative or at least a good starting point.
  4. The method is called contains now.
  5. Use a deferred registry, it's designed to get rid of these sorts of headaches.
  6. Use the fluid handler capability, also you should store fluid in FluidTank instances to simplify the process.
  7. Look at how vanilla uses Direction.getFacingDirections or use Direction.getFacingFromVector with the player's look vector.
  8. I believe it works if you create the registry statically instead of using the NewRegistry event, but that obviously goes against the intended workflow.
  9. Sound events are registered after blocks, so I believe that's part of the issue. One option would be to extend SoundType and override its get methods to make them access RegistryObject entries as needed instead of on initialization. Feels like there should be a cleaner solution though...
  10. What is the purpose of your mod? The server is responsible for save data, so the client doesn't have access to it on its own. In multiplayer, it wouldn't make sense for clients to have access to save information since the clients are effectively merely simulating the server-side world.
  11. Use your IDE's search function.
  12. You're misusing onItemUseFinish, the ItemStack is whatever item they're currently eating. By putting a stack of bowls in there, you're telling the game that the player is eating (or more accurately "using") a bowl. Look at how SoupItem does it.
  13. You're already returning super#onItemUseFinish, you cannot return twice.
  14. You can set the username with the --username program argument
  15. Do you mean you want to look at the game's source? If so, just search with your IDE, it's attached as a library.
  16. Just going to bump this once since I'd appreciate some input or thoughts on the matter. Reflection works fine but I hate using it for something so unimportant. I'm also legitimately curious to know if anyone here understands the data fixer system well enough to actually implement it for mods.
  17. One of my projects has quite a lot of new entities, and this warning has been getting really obnoxious. Is there a good workaround to suppress it? Registering data fixers would obviously be a good solution, but I've been unable to find any practical information on them when it comes to actually using them. Normally I'd just look at how vanilla does it, but so far this entire thing has been the essence of "here be dragons". I'm almost half tempted to break out reflection and mess with EntityType's serializable field just to get rid of the warnings, but I'm not a fan of such a hacky solution... Also, it'd be nice if I could actually use the system for real. It would make updating my projects a lot easier when I decide to change some data structures. But, that's not really the point of this topic right now.
  18. Just using @SubscribeEvent isn't enough, you need to tell it to search the class or object for that annotation. There are multiple ways of doing this, but the simplest way is to annotate the class with @Mod.EventBusSubscriber and make all methods that use @SubscribeEvent static. You can alternatively call MinecraftForge.EVENT_BUS.register() and pass in the object or class you want it to scan.
  19. That's just for the data fixer type, which as far as I understand is unnecessary. (To be honest I've never been able to figure out data fixers in the first place...)
  20. Aseprite is also a great tool for texturing, if you don't mind paying a bit. It's a pixel artist program specifically designed for this sort of tiny artwork. It has tools for rotating sprites with minimal quality loss and pixel-perfect freehand drawing, among many other precision features. One of my favorite features is its indexed color pallet mode, which you may find very handy when working with only a few colors.
×
×
  • Create New...

Important Information

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