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.

IPECTER

Members
  • Joined

  • Last visited

Everything posted by IPECTER

  1. hmm... It's weird... Everything is perfect. But Mob's maxhealth doesn't go up above 1024. public X100health() { MinecraftForge.EVENT_BUS.register(this); } @SubscribeEvent public void on(FMLCommonSetupEvent e) { e.enqueueWork(() -> { replaceAttributeValue((RangedAttribute) Attributes.MAX_HEALTH, 131072); System.out.println("Hello!!!"); }); } protected static void replaceAttributeValue(RangedAttribute attribute, double maxValue) { attribute.maxValue = maxValue; } @SubscribeEvent public void onMobSpawn(LivingSpawnEvent.SpecialSpawn e) { if (e.getEntity() instanceof Mob) { Mob mob = (Mob) e.getEntity(); mob.getAttribute(Attributes.MAX_HEALTH).setBaseValue(mob.getAttribute(Attributes.MAX_HEALTH).getBaseValue() * 100); mob.setHealth(mob.getHealth() * 100); } }
  2. holly.... thank you very much
  3. Therefore e.enqueueWork(() -> { Attribute.MAX_HEALTH.maxValue = 10000000;1 }); !!!! Ill try it morning
  4. What I want to know is what should be written in parentheses of equeueWork() If I say something weird, please tell me. The translator isn't perfect either.
  5. ..... I use JAVA since 2 years ago... but... I mean... I cant understand How to use what e.equeueWork(HERE).. hmm... I cant explain using English that my think well... or.. I might be not able to understand your comments...
  6. I've made a lot of plugins, but it's almost the first mod. I don't understand well about the current work and the supplier. I feel like I'm missing something.
  7. Okay, I'll try it for a few hours.
  8. hmm... e.enqueueWork(() -> Attribute.MAX_HEALTH.getDefaultValue) = 1234567890 ?
  9. @SubscribeEvent public void on(FMLCommonSetupEvent e) { e.enqueueWork(() -> Attributes.MAX_HEALTH); } hmm.. it is my best
  10. Can you tell me just this time? I've never seen anything like that before. supplier?
  11. @SubscribeEvent public void on(FMLCommonSetupEvent e) { e.enqueueWork(Attributes.MAX_HEALTH()??????); } hmm...
  12. I complete to add AT (build.gradle) then.. What should i do?
  13. I dont know anything how to add/use access transformer...
  14. "Have you added the access transformer?" no.
  15. I'm creating a mod that set MaxHealth to MaxHealth*100 when only once mob spawned.
  16. "add an attribute modifier."? addTransientModifier()? or addPermanentModifier()? else?
  17. I couldn't do anything. I don't know how to set the maximum value of Attributes.MAX_HEALTH. Can you show us the code as an example? I've been looking for it for hours, but it's hard alone.
  18. hmm.. too hard this is my code, but Cant make Maxhealth up 1024.... @SubscribeEvent public void onMobSpawn(EntityJoinWorldEvent e) { if (e.getEntity() instanceof Mob) { Mob mob = (Mob) e.getEntity(); mob.getAttribute(Attributes.MAX_HEALTH).setBaseValue(mob.getAttribute(Attributes.MAX_HEALTH).getBaseValue() * 100); mob.setHealth(mob.getHealth() * 100); } }
  19. It has to be an event that runs only once for all mobs. No matter how mob spawn, Event should happen to Mob. LivingSpawnEvent.SpecialSpawn occur when only player summon Mob using spawn egg
  20. Thank you for the explanation. I'll try it and ask you again if there's anything difficult.
  21. hmm.... It's getting harder. How can you modify the health and maxHealth of all mobs 100 times(maxhealth * 100) using AccessTransformer? sorry for asking a lot of questions..

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.