Everything posted by Luis_ST
-
[1.16.4] How do I prevent items from being placed in certain slots?
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
-
Customizable Timer
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?
then why does my code work without mod id?
-
How would I go about changing the values of vanilla tools?
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?
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?
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?
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?
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
looks good show the complete class
-
How would I go about changing the values of vanilla tools?
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
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
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
-
Can somone help me update a 1.7.10 mod to 1.12?
1.11 is no longer supported on this forum. Please update to a modern version of Minecraft to receive support.
-
How do you find the functions you need to modify (when you know what you want to do)?
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',
-
How do you find the functions you need to modify (when you know what you want to do)?
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
-
Crafting Recipe Not Working
remove the nbt part you don't need it, also i say the nbt part require an nbt not an integer!
-
how do i update a mod from 1.7.10 to 12.2
1.7/1.12 is no longer supported on this forum. Please update to a modern version of Minecraft to receive support.
-
Crafting Recipe Not Working
post the update recipe (and pleas use the code feature), also are there errors in the log?
-
Crafting Recipe Not Working
you need to replace data with nbt, and it dosen't need an integer...
-
How to send an IMC Message in 1.16.5? Old tutorials that I found don't work anymore. They just give errors.
learn java before modding
-
queria saber por que se crasea cuando entro en el nether y me da este error
This is a Forge Forum we don't support MCreator
-
forge 1.8 does not open installer
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
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
-
I'm Trying to get the BlockPos Value of the targeted block with PlayerEvent.HarvestCheck
for what do you need the position of the block?
-
Armor with particles
Yes its possible, check out what the particle command dose and do that in the onArmorTick methode in your item class
IPS spam blocked by CleanTalk.