Everything posted by imacatlolol
-
[1.15.2] Best way to store strings on the player object.
Using capabilities would be the best way to do this.
-
[1.14.4] Rotating & Moving Blocks
Just a heads up, MatrixStack and IRenderTypeBuffer don't exist in 1.14.
-
[1.14.4] Rotating & Moving Blocks
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.
-
[1.14.4] Get mouse over
The method is called contains now.
-
[1.15.2] Dimension registering problem
Use a deferred registry, it's designed to get rid of these sorts of headaches.
-
[Solved] [1.15.2] Saving fluid stack to nbt
Use the fluid handler capability, also you should store fluid in FluidTank instances to simplify the process.
-
(Minecraft 1.15.2 Forge) Is there a way to get the side of the block the player is looking at?
Look at how vanilla uses Direction.getFacingDirections or use Direction.getFacingFromVector with the player's look vector.
-
[SOLVED] [1.15.2] Using custom deferred registers
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
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...
-
[1.14/1.15] Get world Save folder client side or detect when world is deleted
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.
-
How do I make an item that when used gives another item?
Use your IDE's search function.
-
How do I make an item that when used gives another item?
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?
You're already returning super#onItemUseFinish, you cannot return twice.
-
[1.15] Caused by: java.lang.IllegalStateException: Failed to resolve consumer event type: net.minecraftforge.fml.network.simple.
I might be wrong then. Show the full log
-
[1.15] Caused by: java.lang.IllegalStateException: Failed to resolve consumer event type: net.minecraftforge.fml.network.simple.
Open the project structure and change the project SDK
-
[1.15] Caused by: java.lang.IllegalStateException: Failed to resolve consumer event type: net.minecraftforge.fml.network.simple.
This is usually caused by using the wrong java version; use java 8.
-
how can i get it where i have a build file that shows not just the package-info.class file but the code for the package too?
No, it's in net.minecraftforge:forge:<version>
-
[SOLVED] [1.15.2] Testing with multiple players
You can set the username with the --username program argument
-
how can i get it where i have a build file that shows not just the package-info.class file but the code for the package too?
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.
-
[1.14.4] Suppressing "No data fixer registered for entity" warnings?
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.
-
[1.14.4] Suppressing "No data fixer registered for entity" warnings?
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.
-
Is there a way to edit a horse's inventory to allow my custom saddle to be placed in its inventory?
Show your full class code
-
Is there a way to edit a horse's inventory to allow my custom saddle to be placed in its inventory?
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
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...
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.
IPS spam blocked by CleanTalk.