Skip to content

Commit

Permalink
Imp's should now spawn in any world that is "hell" typed (water isn't…
Browse files Browse the repository at this point in the history
… allowed and or is labeled as a hell biome)
  • Loading branch information
alexbegt committed Jan 10, 2018
1 parent 3f74ed0 commit e11b2ba
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
Expand Up @@ -31,7 +31,6 @@
import net.minecraft.util.SoundEvent;
import net.minecraft.util.math.BlockPos;
import net.minecraft.world.World;
import net.minecraft.world.WorldProviderHell;

public class EntityImp extends EntityAnimal
{
Expand Down Expand Up @@ -139,6 +138,6 @@ public EntityAgeable createChild(EntityAgeable par1EntityAgeable)
@Override
public boolean getCanSpawnHere()
{
return this.world.provider instanceof WorldProviderHell && this.world.checkNoEntityCollision(this.getEntityBoundingBox()) && this.world.getCollisionBoxes(this, this.getEntityBoundingBox()).isEmpty() && !this.world.containsAnyLiquid(this.getEntityBoundingBox());
return (this.world.provider.doesWaterVaporize() || this.world.provider.isNether()) && this.world.checkNoEntityCollision(this.getEntityBoundingBox()) && this.world.getCollisionBoxes(this, this.getEntityBoundingBox()).isEmpty() && !this.world.containsAnyLiquid(this.getEntityBoundingBox());
}
}
Expand Up @@ -93,10 +93,12 @@ public static boolean applyBonemeal(ItemStack stack, World worldIn, BlockPos tar
IBlockState iblockstate = worldIn.getBlockState(target);

BonemealEvent event = new BonemealEvent(player, worldIn, target, iblockstate, hand, stack);

if (MinecraftForge.EVENT_BUS.post(event))
{
return false;
}

if (event.getResult() == Result.ALLOW)
{
return true;
Expand Down

0 comments on commit e11b2ba

Please sign in to comment.