Everything posted by warjort
-
How can you program in a forge mod that the player gets an effect when he wears armour, for example?
And events are explained on that same wiki: https://forge.gemwire.uk/wiki/Main_Page
-
How can you program in a forge mod that the player gets an effect when he wears armour, for example?
https://forge.gemwire.uk/wiki/Mob_Effects For an example look at WitherSkeleton.doHurtTarget()
-
[1.19.2] How do I add Sweet Berry Bush like Bushes?
https://forge.gemwire.uk/wiki/Biome_Modifiers
-
How do you create custom tree trunks and leaves?
Your question is unanswerable. "It does not work" style statements contain no useful information. Show what you tried. Preferably by posting your code to github where we can see the full context.
-
setting up a forge server on 1.18.2, missing dependencies:forge, forge, forge, forge
Update forge, you have mods that want a later version. e.g. create requires forge 40.1.60 or later.
-
Please help with this
Use java 17. Mixin doesn't like java 19
-
forge 1.19.2 instaler doesn't work
Update your java to a recent version.
-
How can you program in a forge mod that the player gets an effect when he wears armour, for example?
Jump Boost is a potion effect, it doesn't apply to items. The correct way to do this is to add your own net.minecraft.world.entity.ai.attributes.Attribute for this (unfortunately for you, Jump Boost doesn't use an Attribute). There is one for horse jumping. The quick and dirty alternate is to subscribe to LivingEquipmentChangeEvent and add/remove the mob effect yourself.
-
Adding effect to an item via JSON
mob effects (potion effects) apply to entities, you don't apply them to items. you can add enchantments using the enchant_with_levels loot item function if you want examples just look at the loot tables in the minecraft jar
-
Running code on a certain player by his name
This command already exists: https://minecraft.fandom.com/wiki/Commands/effect
-
SOLVED [1.19.2] Entity Sitting Pose?
WolfModel.prepareMobModel() Those data types you mention just mean the data is automagically synched to the client.
-
Running code on a certain player by his name
Why do you need to use the name? Typically, you only need to do that with commands, e.g. see the GiveCommand and how it uses "targets". For adding effects to entities see WitherSkeleton.doHurtTarget() If you were going to do this outside of the context of commands, it would be something like this untested code: public static void setGlowing(ServerLevel level, String name) { var player = level.getServer().getPlayerList().getPlayerByName(name); if (player != null) { player.addEffect(new MobEffectInstance(MobEffects.GLOWING)); } }
-
custom GUI mod
Your current code responds to every screen event. Look at all its subclasses. Use the one I told you to use.
-
Health Bar Removing
You can do what you like. But always remember that other mods will do what like as well. ๐
-
[Forge 1.18.2] Invalid Player Data Error
Duplicate post also with no useful information.
-
Can someone help?
Not without you showing some relevant information. Never paraphrase errors. Post a link to the full debug.log
-
Health Bar Removing
See: https://forums.minecraftforge.net/topic/115993-how-to-remove-the-sight-cross-in-the-center-of-the-screen/#comment-512635 Except you want VanillaGuiOverlay.PLAYER_HEALTH and you want to do some replacement rendering.
-
custom GUI mod
That is correct. But that is also not the name mentioned above. You should also try using proper logging or adding a breakpoint in a debugger instead of System.out.println().
-
1.18.2 font/default.json file handler
FontManager although the details are in the GlyphProvider implementations.
-
[1.19.2] Client/Server/World Tick Events crashing the game.
Your error says there is mismatch in types for your inner (anonymous) classes when invoking an event. The event in question is for ClientTickEvent But I don't see you handling any ClientTickEvents in the code you posted? They are all ServerTickEvents. Are you sure you are running that code? BTW: I can see one obvious error but it doesn't really cause a problem because of the way tick events work and it's unrelated to your reported error. MinecraftForge.EVENT_BUS.register(this); // world is null here this.world = world; You should never call out from a constructor into unknown code before your object state is fully initialized.
-
How do I add biomes in 1.19?
See: https://forums.minecraftforge.net/topic/115751-119-creating-new-biome/ or one of the many other discussions in this forum that contains more details.
-
Can someone help?
Issue with flywheel, probably a conflict with another mod. Check you have the latest version then contact the mod author.
-
Game closing mid session
Looks like a conflict between reliquary and aoa3. Check you have the latest versions then contact the mod authors.
-
Will Fluids API Overhaul be on 1.18.x or just 1.19.x?
I would guess no. As you say 1.18 is LTS. You can't change the api and break all the mods. ๐
-
Forge Server 1.19.2 not using allocated RAM
Since you don't post any useful information (including the file you modified) it is impossible to say. What makes you think a lack of heap memory is the cause of your problem? You can use a mod like this to analysis server performance https://www.curseforge.com/minecraft/mc-mods/spark see its wiki and docs for how to use it.