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.

Robin Withes

Members
  • Joined

  • Last visited

Everything posted by Robin Withes

  1. Well but i cant, @SubscribeEvent public void entitySpawned(EntityJoinWorldEvent event) { Entity entity = event.getEntity(); if (MonsterConfig.isEnhancedMob(entity.getDisplayName().getUnformattedText()) && !entity.isDead) { //Add potion effect to entity here } } This is my event currently, i have no idea how to convert the entity to a entitylivingbase. No idea what that means, i already tried this: EntityLivingBase entityLivingBase = (Entity) entity;
  2. That's peculier then because i am trying to add a effect to a creeper, which should be possible then right? I have a creeper stored into a entity object, can i convert it to entitylivingbase somehow?
  3. I dont get the difference between the 2?
  4. Ah, any chance you can send me some documentation or supply me with a code snippet?
  5. Is capabilities something originally from Java or from forge, i never heard of it before.
  6. Ah thanks, was hoping there was a cleaner way to do it but i guess not.
  7. Hey everyone, been trying for a while to look for a solution to this problem: So i am looking for certain mobs to spawn with entitySpawned(EntityJoinWorldEvent event) Then when i find the mob i'm looking for i want to do something like this to it: //Obviously just a dumbed down example public void entitySpawned(EntityJoinWorldEvent event) { Entity entity = event.getEntity(); if (true) { entity.onDead(someFunction()); //Runs when the entity dies. } } What would be a ideal solution to this?

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.