Jump to content

Luis_ST

Members
  • Posts

    5704
  • Joined

  • Last visited

  • Days Won

    72

Everything posted by Luis_ST

  1. 1.12 is no longer supported on this forum. Please update to a modern version of Minecraft to receive support.
  2. use LivingEquipmentChangeEvent, check if the slot is the Offhand then drop the item, you need to do that because the event is not cancelable no idea
  3. in addition to @Draco18s, 1.8.9 is no longer supported on this forum. i think the best way to do this is to create a world capability and store the timer in it. update the timer in the TickEvent#World, then create a command to handle the timer, like this for example: /timer <set,reset,get,...>
  4. then why does my code work without mod id?
  5. are the other parameters required? because that works fine for me https://github.com/Luis-st/Forge-1.16.5-Nero/blob/89b16e4c6350d11fde03d1cd3700d6c7838300a2/src/main/java/net/luis/nero/event/entity/living/player/OnHarvestCheckEvent.java#L11
  6. remove the parameters from the Mod.EventBusSubscriber annotation and this code line: MinecraftForge.EVENT_BUS.post(event);
  7. subscribing to the event looks good, only that you do not have to give any parameters in the EventBusSubscriber your doPlayerHarvestCheck method creates a new event, but you shouldn't used PlayerEvent.HarvestCheck as a parameter in your method, also set the return value to void then do your code there and use Event#... to get the player, and the other things that are given from the event
  8. you need to render the lines of the box, look at the StructureBlockTileEntityRenderer for an example but basically you render a box with WorldRenderer#renderLineBox
  9. do you know java? because you either haven't read the doc about the events or you basically can't java... the doc's have code examples why you don't look at them again and try to transfer them to the event you need
  10. looks good show the complete class
  11. you can use events to modify tools - PlayerEvent#HarvestCheck -> harvestLevel - PlayerEvent#BreakSpeed -> breakSpeed - LivingDamageEvent -> damage of tools - LivingEntityUseItemEvent -> durablity
  12. you can handle it on server-side just set after handling (Server)PlayerEntity#hurtMarked to true this will update the player and also the movement
  13. you can get it via Entity#getViewVector, use as the float parameter 1 else the value will be lerp with the current view vector, the last view vector and the parameter you given not sure but try to scale the vector
  14. 1.11 is no longer supported on this forum. Please update to a modern version of Minecraft to receive support.
  15. unfortunately most of the methods have no comments, there are only a few ways to find out what a method does find out for yourself what the method does ask for help here in the forum or on the discord server simple logic e.g.: World#setBlock -> set the block to a position in the world look for a code example, for most things there are examples of vanilla else look in the www. testing... look at the interface / and the classes that implement it Note: if you look in the vanilla classes, only methods and fields have 'correct names',
  16. first of all do you know basic java? this is the doc of forge: https://mcforge.readthedocs.io/en/latest/ and this is the forge community wiki: https://forge.gemwire.uk/wiki/Main_Page read the docs, after that ask the remaining questions
  17. remove the nbt part you don't need it, also i say the nbt part require an nbt not an integer!
  18. 1.7/1.12 is no longer supported on this forum. Please update to a modern version of Minecraft to receive support.
  19. post the update recipe (and pleas use the code feature), also are there errors in the log?
  20. you need to replace data with nbt, and it dosen't need an integer...
  21. This is a Forge Forum we don't support MCreator
  22. 1.8 is no longer supported on this forum. Please update to a modern version of Minecraft to receive support.
  23. since EntityArgument#player only uses the current player (the player which is execute the command), use EntityArgument#players to be able to choose from several players, or EntityArgument#entities to get all Entities
×
×
  • Create New...

Important Information

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