Jump to content

Robin Withes

Members
  • Posts

    9
  • Joined

  • Last visited

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

Robin Withes's Achievements

Tree Puncher

Tree Puncher (2/8)

0

Reputation

  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. Ah, any chance you can send me some documentation or supply me with a code snippet?
  4. Is capabilities something originally from Java or from forge, i never heard of it before.
  5. Ah thanks, was hoping there was a cleaner way to do it but i guess not.
  6. 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?
×
×
  • Create New...

Important Information

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