-
Posts
1830 -
Joined
-
Last visited
-
Days Won
12
Posts posted by DavidM
-
-
1 minute ago, poopoodice said:
It seems like EntityLiving is now LivingEntity, and EntityLivingBase is now MobEntity
My bad. That seems to be the correct relationship.
You probably meant the other way though.
-
Mappings (as well as code) have changed recently.
EntityLivingBase -> LivingEntity.
AFAIK there is no EntityLivingBase anymore; LivingEntity has taken its place (and combined the previous EntityLiving and EntityLivingBase). -
Quote
if it doesnt work try updating java too
Don’t do this blindly.
Deleting the config is not the solution to most crashes.
In 90% of the times what you suggested will not fix the crash.
Please refer to the crash log to solve crashes.
-
-
Please read the EAQ and post the appropriate logs.
-
27 minutes ago, Swordsaint said:
Well, If i rightclick the tank with a modded item like a tank from "LargeFluidTank", the game crashes due to being unable to cast the Modded Item to Bucket Item. I'll have to gain some experience and fix this bug later.
You can either 1) Check before cast or even better 2) look for the fluid handler capability in the ItemStack. The second method is compatible with other mods (as long as the other mod creates tanks properly by giving it a fluid handler capability).
-
2 hours ago, iimyst said:
getDisplayName() .getUnformattedText().toString
That should work.
Please define “nothing ends up happening”. What does it return? What are you expecting it to return?
-
38 minutes ago, Swordsaint said:
I have one more problem though, I don't know how to create a Bucketitem with the right fluid (the one from the tank). I fiddled around with the BucketItem constructor and how to use it, but I am unable to come up with an instruction that returns a Bucket filled with the tankfluid. If you could elaborate on how to do it I would be very thankful and this thread would probably be solved.
BucketItem is an Item, which is singleton; there can only be one instance of it during the entire game. What you are looking for is an ItemStack of BucketItem with the correct liquid, which is done (if I recall correctly) by a capability in the ItemStack. Check out FluidBucketWrapper class.
Also, currently your code executes on both the client and server; however, it should only happen on the server (since it is block placement and inventory changing). Check the side the code is on via World#isRemote (which is true on client and false on server) and only run the code when it is on server.
-
2 minutes ago, Swordsaint said:
I have no clue how to check if the player is holding a bucket with fluid in it and how to access the FluidTank in the VoidCollectorTile on BlockActivation.
Check if player is holding bucket: player.getActiveItemStack() instanced BucketItem
Get FluidTank in tile (pseudocode):
void onBlockActivated(args) { TileEntity te = world.getTileEntity(pos); if (te instanceof YourTileEntity) { LazyOptional<IFluidHandler> fluidHandler = te.getCapability(CapabilityFluidHandler.FLUID_HANDLER_CAPABILITY, side); // Do stuff } }
-
Do you have Java installed?
-
You should create a separate Launcher Profile for each version.
Click on the "New" button on the top of the "Installations" page to create a new Launcher Profile.
-
Hi.
I am creating a walking chest entity that has an inventory.
This entity is meant to be summoned temporarily, and should disappear (die) when the chunk it is in unloads, during which it should place down a vanilla chest block at its location.
My current idea is to subscribe to the chunk unloading event and check if my entity is in there; however, I am wondering if there are better ways (i.e. methods in LivingEntity that are triggered during unloading of the chunk it is in). There is LivingEntity#remove, but that is also fired when the entity dies, and as far as I can tell there is no way to distinguish between the two causes.
What would be the best way to achieve this?
-
Hi.
I am trying to create a LivingEntity that has animation.
Is there a built-in system for keyframe animation of entities? There is animation state machine, but as far as I know that is meant for block only.
If not, what would be the best way to create entity animation (moving arms, head, etc)?
-
You can check the color style of the player’s name via PlayerEntity#getDisplayName (might be off; can’t remember the exact spelling).
-
You could just subscribe to render player event and manipulate the layers/rendering or override the rendering.
-
You need to set the render type of the block to CUTOUT during FMLClientSetupEvent via RenderTypeLookup::setRenderLayer.
An example is here.
-
According to MCreator's license, you must state on your project page that this mod is made with MCreator, which you did not.
-
There was a vote on what version Forge should provide long term support to, and most people chose 1.14 over 1.12.
Therefore, 1.14 received LTS, while 1.12 went out of support due to its age.
-
Stab in the dark: you might be allocating too much RAM.
How much RAM are you allocating to your game?
Also, please read the EAQ and post the appropriate log.
-
2 hours ago, Skelyvelocirap said:
Hmmm.. although, how do i check if the person is filling or draining?
I don’t think it is possible to tell so from the tile entity with the vanilla fluid handler.
However you could create your own fluid handler implementation that handles 2 different tanks and their insertion/extraction.
-
Check out how vanilla create tool types (look at SwordItem class, etc).
-
Yes. Just create another fluid handler.
Then, in getCapability, determine which tank to return based on the given information and the current data in the tile entity.
-
Optifine has yet to release a 1.15 version.
Remove Optifine.
Make sure to only download mods from their official page.
-
9 hours ago, M1ntcraft3r said:
I will have a look, but if you can link a basic example that would be awesome
Look at vanilla classes, such as DeathScreen.
Forge 1.15 doesn't scan version number folder
in Support & Bug Reports
Posted
That feature is removed, as launcher profile is a better way to separate different versions.