-
Posts
390 -
Joined
-
Last visited
-
Days Won
15
Everything posted by vemerion
-
If you call setHealth() after you changed the attribute it should update immediately, something like this: player.setHealth(Math.min(player.getMaxHealth(), player.getHealth()));
-
You can use the Random object from LootContext.getRandom() to determine how many items should be added to the loot.
-
The code works when I try it. From where are you calling it?
-
You can get the current power of a bow with: BowItem.getPowerForTime(player.getUseItem().getUseDuration() - player.getUseItemRemainingTicks())
-
You can do it with global loot modifiers. You can learn about them on the Forge docs here
-
It is the same with vanilla stained glass, you can't see the rain through it. If you want to be able to see the rain you have to specify render_type "cutout", but then you can't make any of the pixels semi-transparent (like stained glass), they have to be either fully transparent or fully solid (like regular glass).
-
1.20.1 LivingAttackEvent dont effect Witches .. help pls
vemerion replied to NoahKassem's topic in Modder Support
Yes, sorry about that, looks like the name was changed to MobEffectEvent.Added. -
You can use the RegisterColorHandlersEvent.Item event to register a color handler for the item that changes the color based on NBT and layer.
- 1 reply
-
- 1
-
-
Strange that it does not work, the code looks OK to me. This works when I try it: @SubscribeEvent public static void event(RenderPlayerEvent.Pre event) { event.getPoseStack().scale(1, -1, 1); }
-
1.20.1 LivingAttackEvent dont effect Witches .. help pls
vemerion replied to NoahKassem's topic in Modder Support
Unfortunately I don't think the entity that threw the potion is propagated to the LivingAttackEvent. What you could do is subscribe to the PotionAddedEvent and check if the source entity is a witch. -
Hm, this does not seem to be the full log. There is no crash there at all!
- 13 replies
-
- 1.20.1
- broken mod
-
(and 1 more)
Tagged with:
-
Hmm, hard to say exactly what goes wrong. Would you mind uploading the debug.log file so I can take a closer look?
- 13 replies
-
- 1.20.1
- broken mod
-
(and 1 more)
Tagged with:
-
TS has not been online on the forum for a couple of years, so probably you won't get an answer. Better to start your own thread and explain your problem so others can help you
-
What exactly happens when you start the game that makes you have to delete the file? My guess is that some option is malformed, but hard to say what is going wrong without more info.
- 13 replies
-
- 1.20.1
- broken mod
-
(and 1 more)
Tagged with:
-
The 'Minecraft' class only exists on the client so you can't refer to it in your entity classes.
- 13 replies
-
- 1.20.1
- broken mod
-
(and 1 more)
Tagged with:
-
You are reaching across logical sides in several places in your entity and packet classes. I recommend reading the Forge documentation to learn more about it
- 13 replies
-
- 1.20.1
- broken mod
-
(and 1 more)
Tagged with:
-
It is hard to know what is wrong just by looking at these code snippets. Do you have a link to your full repository?
-
1.19.2 [1.19.2] Painting Variants limit
vemerion replied to groundbeefconsumer's topic in Modder Support
What happens when you try to place the painting? It just does not appear? Does it say anything in the log when you try to place it? -
No problem! Glad I could help
-
Change" "item:": to "item":
-
You need to remove the quotes from the nine so it just becomes: "count": 9 and you need to remove the colon inside the string so it just becomes: "item": "beyond:soul_shard" I recommend using data generators to avoid having to manually create the json recipes and avoid these problems in the future.
-
The problem is that 'KnightEntity' is missing the required Attribute 'Attributes.FOLLOW_RANGE'. To fix it change the call from 'createLivingAttributes()' to 'createMobAttributes()' in 'KnightEntity.createAttributes()'
-
I would do a search for the recipe file names in the debug log file to see if something went wrong.
-
1.20.2 Custom farmland block taking vanilla CropBlock
vemerion replied to itzer's topic in Modder Support
You can override the 'canSustainPlant()' method on your custom farmland block and return true for any type of 'plantable' you want. -
Could be that you might need to refresh the files in your IDE for them to be found by the game. Otherwise I would recommend checking the log to see if it says anything about the recipes not working.