-
Posts
1830 -
Joined
-
Last visited
-
Days Won
12
Everything posted by DavidM
-
Forge 1.15 doesn't scan version number folder
DavidM replied to imodre's topic in Support & Bug Reports
That feature is removed, as launcher profile is a better way to separate different versions. -
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).
-
Hi. I am trying to create a configuration file for my mod. My code for the config is here, and registered here. However, when I launch the client, no config file is generated. I suspect that I did not register the config properly. How would I fix this?
-
Please read the EAQ and post the appropriate logs.
-
[1.15.2] Creating a very basic fluidtank-block
DavidM replied to Swordsaint's topic in Modder Support
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). -
That should work. Please define “nothing ends up happening”. What does it return? What are you expecting it to return?
-
[1.15.2] Creating a very basic fluidtank-block
DavidM replied to Swordsaint's topic in Modder Support
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. -
[1.15.2] Creating a very basic fluidtank-block
DavidM replied to Swordsaint's topic in Modder Support
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?
-
Forge 1.8.9 compatibility with forge 1.14.4+
DavidM replied to d4nvol's topic in Support & Bug Reports
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)?
-
Check if the tab list contains different colored text
DavidM replied to iimyst's topic in Modder Support
You can check the color style of the player’s name via PlayerEntity#getDisplayName (might be off; can’t remember the exact spelling). -
IForgeItem method to suppress rendering on the HeadLayer
DavidM replied to Fuffles's topic in Suggestions
You could just subscribe to render player event and manipulate the layers/rendering or override the rendering. -
Textures with transparency are not working properly
DavidM replied to LittlePeter's topic in Modder Support
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.
-
Why is 1.12.2 no longer supported on the forum?
DavidM replied to Turtledove's topic in Modder Support
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.
-
Fluid tank block with multiple tanks [SOLVED]
DavidM replied to Skelyvelocirap's topic in Modder Support
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).
-
Fluid tank block with multiple tanks [SOLVED]
DavidM replied to Skelyvelocirap's topic in Modder Support
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. -
1.15 basic chest type container on client side only
DavidM replied to M1ntcraft3r's topic in Modder Support
Look at vanilla classes, such as DeathScreen.