Jump to content

Beethoven92

Members
  • Posts

    687
  • Joined

  • Last visited

  • Days Won

    10

Everything posted by Beethoven92

  1. Effects#GLOWING ?
  2. That makes sense..but i suppose since the player has to be near the fire to throw the item in, is there really a possibility for the entity to be removed in any other way than by fire collision?
  3. Just for curiosity sake, why is EntityLeaveWorldEvent less reliable?
  4. add defaultMaxDamage(*theMaxUsesYouWant*) to your item properties when constructing the item, so you give it a finite number of uses before it breaks (keep in mind your food won't be stackable). Then you need to use ItemStack#damageItem to decrease its life when you hit an entity.
  5. So, what you are searching for is PlayerInteractEvent.EntityInteract, which fires when the player right clicks an entity...just handle the event and check if the player is holding your custom item. Then use world#AddParticle to spawn particles. You can create your custom particles or use vanilla particles, which you can find inside ParticleTypes class
  6. I think you could find this mod useful to look at: https://www.curseforge.com/minecraft/mc-mods/enhancedvisuals
  7. Let them burn in fire...you can use the EntityLeaveWorldEvent, which will be fired also when an ItemEntity collide with a fire block (which causes the entity to disappear)...inside the event handler first check if the Entity is an instaceof ItemEntity. If thats the case check if the ItemEntity represent the item you want to cook (for example your potato). Then check if the position of the ItemEntity coincide with the position of a fire block ----> spawn a new ItemEntity in the world (in your case cooked potato) ...possibly 1 or 2 block away from the fire block or you won't see your item for long time! If instead you want that behaviour for a custom item you made just override onEntityItemUpdate inside your item class. That's just an idea, as there are other ways to do what you want to accomplish
  8. Capability examples: https://github.com/TheGreyGhost/MinecraftByExample/tree/master/src/main/java/minecraftbyexample/mbe65_capability (Should be working fine in 1.16.1 also)
  9. TileEntityRenderer? https://mcforge.readthedocs.io/en/latest/tileentities/tesr/
  10. Same exact topic already made by someone else, take a look here: https://forums.minecraftforge.net/topic/89830-modstoml-missing-metadata-for-modid-examplemod/?tab=comments#comment-418298
  11. So, you will need the class for your block (obviously), a tile entity (implementing INamedContainerProvider) for your block's logic, a class representing your container (which extends Container) to specify how the GUI interacts, and finally a class extending from ContainerScreen which actually draws your GUI on screen. Lot of things to implement huh? Take a look at Cadiboo example mod..he has some examples for blocks with custom GUIs, and also take a look here: https://greyminecraftcoder.blogspot.com/2020/04/containers-1144.html
  12. Weird....well if it works it works
  13. Best place to look at is vanilla code, try looking into BowItem and ArrowEntity classes
  14. It works because you raised the rarity from 30 to 500, thats a big step ๐Ÿ˜‰ ...it was tecnically working even before..but the rarity was too low...remember you were trying to replace clay blocks...and think about how few of them generates in the world (compared to stone for example)...so with rarity set to 30 the chances for your block to generate were simply too low
  15. Jsons are fine, can you show how is your assets folder structured?
  16. Show the jsons of your block...blockstate and models
  17. 1.16.6? ๐Ÿ˜ show the code you tried...also for an example on how to use TileEntity renderers you can look here: https://github.com/TheGreyGhost/MinecraftByExample/tree/1-15-2-working/src/main/java/minecraftbyexample/mbe21_tileentityrenderer
  18. You should make your own post for this
  19. I tried with around 300 for the frequency and it was working fine, not sure why it is not working for you
  20. So the player can walk through the block only when actually looking at it?
  21. try using the Placement#COUNT_TOP_SOLID and set a high frequency..try and tweak the values to your liking
  22. TileEntityRenderer<ProCampfireTileEntity> h = new ProCampfireTileEntityRenderer(TileEntityRendererDispatcher.instance); ClientRegistry.bindTileEntityRenderer(ModTileEntityTypes.CAMPFIRE, h); You don't need the first line..in fact it would be a mistake. Just use ProCampfireTileEntityRenderer::new in the bindTileEntityRenderer
  23. Yep, by handling the event above you can intercept tooltips before they are rendered, so you can modify them
  24. Then show your condition code
×
×
  • Create New...

Important Information

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