Jump to content

DavidM

Members
  • Posts

    1830
  • Joined

  • Last visited

  • Days Won

    12

Everything posted by DavidM

  1. That feature is removed, as launcher profile is a better way to separate different versions.
  2. My bad. That seems to be the correct relationship. You probably meant the other way though.
  3. 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).
  4. 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.
  5. 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?
  6. Please read the EAQ and post the appropriate logs.
  7. 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).
  8. That should work. Please define “nothing ends up happening”. What does it return? What are you expecting it to return?
  9. 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.
  10. 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 } }
  11. Do you have Java installed?
  12. 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.
  13. 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?
  14. 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)?
  15. You can check the color style of the player’s name via PlayerEntity#getDisplayName (might be off; can’t remember the exact spelling).
  16. You could just subscribe to render player event and manipulate the layers/rendering or override the rendering.
  17. You need to set the render type of the block to CUTOUT during FMLClientSetupEvent via RenderTypeLookup::setRenderLayer. An example is here.
  18. According to MCreator's license, you must state on your project page that this mod is made with MCreator, which you did not.
  19. 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.
  20. 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.
  21. 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.
  22. Check out how vanilla create tool types (look at SwordItem class, etc).
  23. 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.
  24. Optifine has yet to release a 1.15 version. Remove Optifine. Make sure to only download mods from their official page.
  25. Look at vanilla classes, such as DeathScreen.
×
×
  • Create New...

Important Information

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