Jump to content

Luis_ST

Members
  • Posts

    5704
  • Joined

  • Last visited

  • Days Won

    72

Everything posted by Luis_ST

  1. you should remove this because you are checking here if you are on the server (not on client) and the video shows that the server receives the changes but the client doesn't
  2. Constants.BlockFlags, in this class all BlockFlags are listed with an explanation
  3. you can use World#getEntitiesOfClass and use as class ItemEntiy, and create AxisAlignedBB with size 1 or you check out the methods fallOn and stepOn in your block class, fallOn is fired if an Entity fall on the Block (include ItemEntity), and stepOn is fired every tick an entity stand on the block (also inclue ItemEntity).
  4. if i read the log correct the mod "pneumaticcraft" is not create for server or it was not tested properly on the server talk with the author of the mod
  5. should work... show the complete class Edit: Do you use DeferredRegister to register your items? if yes add .get() behind ModItems.SNG_INGOT
  6. i had this error some time ago, unfortunately i can't tell you exactly how i solved the problem. i tried a few gradle tasks and re-imported the project, that fixed the problem for me
  7. the method is now called "use"
  8. first this is not your thread, create next time your own itself it would work, you then only give the player the effect for the next tick, if you then use the night vision potion for example, the view is very strange because the potion kind of fades away and you do not have the achieved effect, test it out and you will see whats happen At the LivingEquipmentChangeEvent you give the player an infinite effect, and you remove it if the player takes the item from the armor slot that would be the most plausible explanation for me, correct me if something is wrong😀
  9. if I see that correctly you are trying to overwrite the armor item, if you want to add the damage there then you should use the entityHurt method but keep in mind you have to overwrite all ArmorItems An easier way would be if you use the LivingDamageEvent, check whether the attacker (DamageSource # getEntity) is holding an ArmorItem and then set the new damage check out the event for more info on how it works or when it is fired
  10. So I think you should use the event because if you overwrite getShape in the block class you can no longer interact with it
  11. no, you have to overwrite the method in your Block class
  12. BlockState -> yes, ServerWorld -> yes, BlockPos -> No, TileEntity (Nullable) -> yes check the parameters that you have specified
  13. use the static method Block#getDrops, which requires a BlockState, a world, a position and a TileEntity (nullable)
  14. There are different methods in the block class that return a VoxelShape (getInteractionShape, getCollisionShape, getRenderShape, getShape, ...). you should use getRenderShape but I'm not sure (test)
  15. so why do you not use Block#getDrops?
  16. solution for the world is you can get it from Minecraft (Minecraft#getInstance().level) your event should work, I cannot reproduce your error after trying something 😅
  17. I'm not sure, but I think you need to include your Mod ID here would be useful but shouldn't be the problem And I have no idea where you can get the world for it, because you only get a BlockRayTraceResult from the event and this does not contain a world Edit: you can get a ClientWorld from the WorldRenderer so you can use World#getBlockState to check whether the block at that point is your block
  18. looks good. is the event called? how do you register the event listener
  19. add requiresCorrectToolForDrops this fix your problem Edit: if the question is related to the blockdrop
  20. show your code of your container it could be that you do not synchronize the inventory of the container between server and client
  21. look at the event (java doc)
  22. Use EntityEvent.Size
  23. 1.8 is no longer supported on this forum. Please update to a modern version of Minecraft to receive support.
  24. update: I also solved the problem with the caves, but I still have no idea what I'm doing wrong with the BiomeLoadingEvent
×
×
  • Create New...

Important Information

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