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.

KarmaOwner

Members
  • Joined

  • Last visited

  1. @SubscribeEvent public void onServerTick(TickEvent.ServerTickEvent event) { World world = MinecraftServer.getServer().getEntityWorld(); for(Object obj : world.playerEntities) { EntityPlayer p = (EntityPlayer) obj; ExtendedPlayer exP = ExtendedPlayer.get(p); p.getEntityAttribute(SharedMonsterAttributes.maxHealth).setBaseValue(ExtendedPlayer.startHP + Math.abs(p.getMaxHealth() - (p.getHealth() + exP.getHP())) + exP.getHP()); p.getEntityAttribute(SharedMonsterAttributes.attackDamage).setBaseValue(p.getEntityAttribute(SharedMonsterAttributes.attackDamage).getAttributeValue() + exP.getDamage()); if(ExtendedPlayer.maxLevel == -1) { if(p.experienceLevel >= exP.getLevel() + 1) { exP.onLevelUP(Math.abs(p.experienceLevel - exP.getLevel())); p.addChatMessage(new ChatComponentText(EnumChatFormatting.GREEN + "Felecitations vous venez d'up un level ! Votre lvl : " + EnumChatFormatting.GOLD + exP.getLevel())); } } else { if(p.experienceLevel < ExtendedPlayer.maxLevel && p.experienceLevel >= exP.getLevel() + 1) { exP.onLevelUP(Math.abs(p.experienceLevel - exP.getLevel())); p.addChatMessage(new ChatComponentText(EnumChatFormatting.GREEN + "Felecitations vous venez d'up un level ! Votre lvl : " + EnumChatFormatting.GOLD + exP.getLevel())); } } } }
  2. Hello firstly sorry for my bad english I use translator , I have created a level and attribute mod, the level system works with the vanilla mc system when the player increases by one level he gains +1 life and an attribute point when the player increases the level attribute of life it gains 2 life in addition until the all works however I try to make it compatible with a plugin named "My items" the system of life of this plugin replaces the system of life of my mod example: The bar of life of the player when he does not have the helmet equipped with the system of life of my mod: The life bar of the player when he equips the helmet with stats of life and more (stats of the plugin): as you can see the plugin life system replaces my system the player only have 15 more life , he is supposed to have 24 more life ... I have contacted the creator of the plugin to ask him the sources of his plugin for modifying the sources to add the lives of the two systems , however he explained to me that his plugin works with a library "AgarthaLib" and he told me says that there is an event named "PlayerHealthMaxChangeEvent" and that I can directly add the maximum life of my mod when the event is called however I have no idea how to do it ... Is it possible to use a Spigot library on Forge? Thank you in advance for those who can give me reasoning.

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.