Jump to content
View in the app

A better way to browse. Learn more.

Forge Forums

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Petchy

Members
  • Joined

  • Last visited

  1. I'm attempting to make the bee entity setHasStung() method public, however I can't seem to get the access transformer to work, what should I put in the accesstransformer.cfg file to accomplish this? Thanks so much Edit: nvm figured it out
  2. Hi, i'm trying to make it so that wolves will not attack other mobs when untamed, i'm aware im probably doing it totally wrong, but I can't figure out how to make this work: @SubscribeEvent public static void wolfNoChase(EntityJoinWorldEvent e) { if (e.getEntity() instanceof Wolf) { ((Wolf) e.getEntity()).targetSelector.removeGoal(NonTameRandomTargetGoal); } } Please could I be given some pointers or shown an example of how to do this properly? Thank you so much I also tried this (doesnt work either): @SubscribeEvent public static void wolfNoChase(EntityJoinWorldEvent e) { if (e.getEntity() instanceof Wolf) { for(Goal goal: ((Wolf) e.getEntity()).targetSelector.getAvailableGoals()) { if (goal instanceof NonTameRandomTargetGoal) { ((Wolf) e.getEntity()).targetSelector.removeGoal(goal); } } } }
  3. Update: setHasStung is still seen as private in the subscribe event, the change has not been recognised, how do I fix this?
  4. public void setHasStung(boolean p_27926_) { this.setFlag(4, p_27926_); } I have set setHasStung to public, however it still seems to not let me call the method. I'm trying to make it so that bees can sting you, but will not lose their stinger and die: @SubscribeEvent public static void unSting(LivingHurtEvent e) { if (e.getSource().getEntity() instanceof Bee) { ((Bee)e.getSource().getEntity()).setHasStung(false); } } setHasStung is just underlined red, can anyone explain this? Thank you
  5. How would I make it so that bees no longer become aggressive under any circumstance, I can't seem to figure it out. thanks so much
  6. I'm trying to make cave spiders passive, how would I go about doing that?
  7. @EventHandler public void attack(LivingDamageEvent event) { if (event.getEntity() instanceof EntityCow) { event.setCanceled(true); } } I'm new to minecraft mods, why does this not trigger when I hit a cow and cancel the damage? Thank you
  8. Can I just ask, I wrote this quick code, should this not work? It doesn't seem to: @EventHandler public void attack(LivingDamageEvent event) { if (event.getEntity() instanceof EntityCow) { event.setCanceled(true); } }
  9. How do I access the mobs (specifically passive animals) in order to modify them, making them invincible for example. I'm new to minecraft modding. Thanks so much for any help.

Important Information

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

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.