-
Posts
274 -
Joined
-
Days Won
5
Everything posted by imacatlolol
-
[1.15.2] Best way to store strings on the player object.
imacatlolol replied to ZeProfCoding's topic in Modder Support
Using capabilities would be the best way to do this. -
Just a heads up, MatrixStack and IRenderTypeBuffer don't exist in 1.14.
-
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.
-
The method is called contains now.
-
Use a deferred registry, it's designed to get rid of these sorts of headaches.
-
[Solved] [1.15.2] Saving fluid stack to nbt
imacatlolol replied to FossilFind's topic in Modder Support
Use the fluid handler capability, also you should store fluid in FluidTank instances to simplify the process. -
[SOLVED] [1.15.2] Using custom deferred registers
imacatlolol replied to kaydogz's topic in Modder Support
I believe it works if you create the registry statically instead of using the NewRegistry event, but that obviously goes against the intended workflow. -
[1.15.2] New SoundType - Registry Object not present
imacatlolol replied to Corgam's topic in Modder Support
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... -
How do I make an item that when used gives another item?
imacatlolol replied to martiblq's topic in Modder Support
Use your IDE's search function. -
How do I make an item that when used gives another item?
imacatlolol replied to martiblq's topic in Modder Support
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. -
How do I make an item that when used gives another item?
imacatlolol replied to martiblq's topic in Modder Support
You're already returning super#onItemUseFinish, you cannot return twice. -
[SOLVED] [1.15.2] Testing with multiple players
imacatlolol replied to Novârch's topic in Modder Support
You can set the username with the --username program argument -
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.
-
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.
-
TileEntity read/write not working properly
imacatlolol replied to Jipthechip's topic in Modder Support
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...) -
Not strictly Forge-related, but...
imacatlolol replied to TheThorneCorporation's topic in Modder Support
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.