diff --git a/src/main/java/drzhark/mocreatures/entity/aquatic/MoCEntityJellyFish.java b/src/main/java/drzhark/mocreatures/entity/aquatic/MoCEntityJellyFish.java index a85e195..1b5f6bc 100644 --- a/src/main/java/drzhark/mocreatures/entity/aquatic/MoCEntityJellyFish.java +++ b/src/main/java/drzhark/mocreatures/entity/aquatic/MoCEntityJellyFish.java @@ -5,8 +5,10 @@ import drzhark.mocreatures.entity.MoCEntityTameableAquatic; import net.minecraft.block.material.Material; import net.minecraft.entity.Entity; +import net.minecraft.entity.EntityList; import net.minecraft.entity.EntityLivingBase; import net.minecraft.entity.SharedMonsterAttributes; +import net.minecraft.entity.item.EntityBoat; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.init.Items; import net.minecraft.potion.Potion; @@ -169,13 +171,32 @@ protected void collideWithEntity(Entity entityThatThisEntityHasCollidedWith) entityThatThisEntityHasCollidedWith instanceof MoCEntityJellyFish || entityThatThisEntityHasCollidedWith instanceof MoCEntityShark || entityThatThisEntityHasCollidedWith instanceof MoCEntityRay + || ( + entityThatThisEntityHasCollidedWith instanceof EntityPlayer + && entityThatThisEntityHasCollidedWith.ridingEntity != null + && ( //don't try to poison players that are riding boats + entityThatThisEntityHasCollidedWith.ridingEntity instanceof EntityBoat + || ( + MoCreatures.isEtFuturumRequiemLoaded + && + ( + EntityList.getEntityString(entityThatThisEntityHasCollidedWith.ridingEntity).equals("etfuturum.new_boat") + || EntityList.getEntityString(entityThatThisEntityHasCollidedWith.ridingEntity).equals("etfuturum.chest_boat") + ) + ) + ) + ) ) ) { int secondsToApplyPoison = worldObj.difficultySetting.getDifficultyId() * 3; //posion entities that collide with this entity - ((EntityLivingBase) entityThatThisEntityHasCollidedWith).addPotionEffect(new PotionEffect(Potion.poison.id, (secondsToApplyPoison)* 20, 0)); + + if (entityThatThisEntityHasCollidedWith instanceof EntityLivingBase) + { + ((EntityLivingBase) entityThatThisEntityHasCollidedWith).addPotionEffect(new PotionEffect(Potion.poison.id, (secondsToApplyPoison)* 20, 0)); + } } super.collideWithEntity(entityThatThisEntityHasCollidedWith); diff --git a/src/main/resources/Rozmirs modifications to Mo Creatures.txt b/src/main/resources/Rozmirs modifications to Mo Creatures.txt index c3bf08a..71d9fb6 100644 --- a/src/main/resources/Rozmirs modifications to Mo Creatures.txt +++ b/src/main/resources/Rozmirs modifications to Mo Creatures.txt @@ -1330,4 +1330,7 @@ Converted the "instant kill if entity spawned in wrong biome" events to override Fixed Fish Net not saving the entity data of aquatic pet which used to prompt the player to rename an already named pet. -Non-Flying Mo'Creatures Horses now display and use the vanilla horse jump bar. \ No newline at end of file +Non-Flying Mo'Creatures Horses now display and use the vanilla horse jump bar. + + +Fixed Jellyfish trying to poison Boats and Players on Boats. This also includes Boats from Et Futurum Requiem. \ No newline at end of file