Jump to content

vemerion

Members
  • Posts

    390
  • Joined

  • Last visited

  • Days Won

    15

Everything posted by vemerion

  1. If you call setHealth() after you changed the attribute it should update immediately, something like this: player.setHealth(Math.min(player.getMaxHealth(), player.getHealth()));
  2. You can use the Random object from LootContext.getRandom() to determine how many items should be added to the loot.
  3. The code works when I try it. From where are you calling it?
  4. You can get the current power of a bow with: BowItem.getPowerForTime(player.getUseItem().getUseDuration() - player.getUseItemRemainingTicks())
  5. You can do it with global loot modifiers. You can learn about them on the Forge docs here
  6. 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).
  7. Yes, sorry about that, looks like the name was changed to MobEffectEvent.Added.
  8. You can use the RegisterColorHandlersEvent.Item event to register a color handler for the item that changes the color based on NBT and layer.
  9. 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); }
  10. 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.
  11. Hm, this does not seem to be the full log. There is no crash there at all!
  12. Hmm, hard to say exactly what goes wrong. Would you mind uploading the debug.log file so I can take a closer look?
  13. 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
  14. 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.
  15. The 'Minecraft' class only exists on the client so you can't refer to it in your entity classes.
  16. 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
  17. It is hard to know what is wrong just by looking at these code snippets. Do you have a link to your full repository?
  18. 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?
  19. No problem! Glad I could help
  20. Change" "item:": to "item":
  21. 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.
  22. 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()'
  23. I would do a search for the recipe file names in the debug log file to see if something went wrong.
  24. You can override the 'canSustainPlant()' method on your custom farmland block and return true for any type of 'plantable' you want.
  25. 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.
×
×
  • Create New...

Important Information

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