Luis_ST
Members-
Posts
5704 -
Joined
-
Last visited
-
Days Won
72
Everything posted by Luis_ST
-
1.12 is no longer supported on this forum. Please update to a modern version of Minecraft to receive support.
-
[1.16.4] How do I prevent items from being placed in certain slots?
Luis_ST replied to LK1905's topic in Modder Support
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 -
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,...>
-
How would I go about changing the values of vanilla tools?
Luis_ST replied to Leronus's topic in Modder Support
then why does my code work without mod id? -
How would I go about changing the values of vanilla tools?
Luis_ST replied to Leronus's topic in Modder Support
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 -
How would I go about changing the values of vanilla tools?
Luis_ST replied to Leronus's topic in Modder Support
remove the parameters from the Mod.EventBusSubscriber annotation and this code line: MinecraftForge.EVENT_BUS.post(event); -
How would I go about changing the values of vanilla tools?
Luis_ST replied to Leronus's topic in Modder Support
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 -
How to make an Axis Aligned Border Box visible?
Luis_ST replied to squidlex's topic in Modder Support
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 -
How would I go about changing the values of vanilla tools?
Luis_ST replied to Leronus's topic in Modder Support
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 -
(Solved) [1.16.4] Loot Modification, get the basics to work
Luis_ST replied to FenrisFox86's topic in Modder Support
looks good show the complete class -
How would I go about changing the values of vanilla tools?
Luis_ST replied to Leronus's topic in Modder Support
you can use events to modify tools - PlayerEvent#HarvestCheck -> harvestLevel - PlayerEvent#BreakSpeed -> breakSpeed - LivingDamageEvent -> damage of tools - LivingEntityUseItemEvent -> durablity -
[1.16.4] Make LivingEntity move in the Direction it's facing
Luis_ST replied to FenrisFox86's topic in Modder Support
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 -
[1.16.4] Make LivingEntity move in the Direction it's facing
Luis_ST replied to FenrisFox86's topic in Modder Support
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 -
1.11 is no longer supported on this forum. Please update to a modern version of Minecraft to receive support.
-
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',
-
remove the nbt part you don't need it, also i say the nbt part require an nbt not an integer!
-
1.7/1.12 is no longer supported on this forum. Please update to a modern version of Minecraft to receive support.
-
post the update recipe (and pleas use the code feature), also are there errors in the log?
-
you need to replace data with nbt, and it dosen't need an integer...
-
forge 1.8 does not open installer
Luis_ST replied to Dsvid1000000005's topic in Support & Bug Reports
1.8 is no longer supported on this forum. Please update to a modern version of Minecraft to receive support. -
Player argument not using the current player by default
Luis_ST replied to TheOnlyTails's topic in Modder Support
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