net.minecraft.entity.EntityLiving.SpawnPlacementType Java Examples
The following examples show how to use
net.minecraft.entity.EntityLiving.SpawnPlacementType.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: WorldOverlayRenderer.java From NotEnoughItems with MIT License | 6 votes |
private static int getSpawnMode(Chunk chunk, int x, int y, int z) { World world = chunk.getWorld(); BlockPos pos = new BlockPos(x, y, z); if (!SpawnerAnimals.canCreatureTypeSpawnAtLocation(SpawnPlacementType.ON_GROUND, world, pos) || chunk.getLightFor(EnumSkyBlock.BLOCK, pos) >= 8) return 0; c.set(x+0.2, y+0.01, z+0.2, x+0.8, y+1.8, z+0.8); AxisAlignedBB aabb = c.aabb(); if (!world.checkNoEntityCollision(aabb) || !world.getCollidingBoundingBoxes(dummyEntity, aabb).isEmpty() || world.isAnyLiquid(aabb)) return 0; if (chunk.getLightFor(EnumSkyBlock.SKY, pos) >= 8) return 1; return 2; }
Example #2
Source File: WorldOverlayRenderer.java From NotEnoughItems with MIT License | 6 votes |
private static int getSpawnMode(Chunk chunk, int x, int y, int z) { World world = chunk.getWorld(); BlockPos pos = new BlockPos(x, y, z); if (!WorldEntitySpawner.canCreatureTypeSpawnAtLocation(SpawnPlacementType.ON_GROUND, world, pos) || chunk.getLightFor(EnumSkyBlock.BLOCK, pos) >= 8) { return 0; } c.set(x + 0.2, y + 0.01, z + 0.2, x + 0.8, y + 1.8, z + 0.8); AxisAlignedBB aabb = c.aabb(); if (!world.checkNoEntityCollision(aabb) || !world.getEntitiesWithinAABBExcludingEntity(null, aabb).isEmpty() || world.containsAnyLiquid(aabb)) { return 0; } if (chunk.getLightFor(EnumSkyBlock.SKY, pos) >= 8) { return 1; } return 2; }
Example #3
Source File: BlockFireboxCasing.java From GregTech with GNU Lesser General Public License v3.0 | 4 votes |
@Override public boolean canCreatureSpawn(IBlockState state, IBlockAccess world, BlockPos pos, SpawnPlacementType type) { return false; }
Example #4
Source File: BearBrownAnimalDef.java From TFC2 with GNU General Public License v3.0 | 4 votes |
@Override public SpawnPlacementType getPlacementType() { return SpawnPlacementType.ON_GROUND; }
Example #5
Source File: GenericHerdAnimalDef.java From TFC2 with GNU General Public License v3.0 | 4 votes |
@Override public SpawnPlacementType getPlacementType() { return SpawnPlacementType.ON_GROUND; }
Example #6
Source File: ElephantAnimalDef.java From TFC2 with GNU General Public License v3.0 | 4 votes |
@Override public SpawnPlacementType getPlacementType() { return SpawnPlacementType.ON_GROUND; }
Example #7
Source File: GTBlockMortar.java From GT-Classic with GNU Lesser General Public License v3.0 | 4 votes |
@Override public boolean canCreatureSpawn(IBlockState state, IBlockAccess world, BlockPos pos, SpawnPlacementType type) { return false; }
Example #8
Source File: GTBlockCasing.java From GT-Classic with GNU Lesser General Public License v3.0 | 4 votes |
@Override public boolean canCreatureSpawn(IBlockState state, IBlockAccess world, BlockPos pos, SpawnPlacementType type) { return false; }
Example #9
Source File: GTMaterialBlock.java From GT-Classic with GNU Lesser General Public License v3.0 | 4 votes |
@Override public boolean canCreatureSpawn(IBlockState state, IBlockAccess world, BlockPos pos, SpawnPlacementType type) { return false; }
Example #10
Source File: GTBlockBaseOre.java From GT-Classic with GNU Lesser General Public License v3.0 | 4 votes |
@Override public boolean canCreatureSpawn(IBlockState state, IBlockAccess world, BlockPos pos, SpawnPlacementType type) { return false; }
Example #11
Source File: GTBlockBaseConnect.java From GT-Classic with GNU Lesser General Public License v3.0 | 4 votes |
@Override public boolean canCreatureSpawn(IBlockState state, IBlockAccess world, BlockPos pos, SpawnPlacementType type) { return false; }
Example #12
Source File: GTBlockBaseMachine.java From GT-Classic with GNU Lesser General Public License v3.0 | 4 votes |
@Override public boolean canCreatureSpawn(IBlockState state, IBlockAccess world, BlockPos pos, SpawnPlacementType type) { return false; }
Example #13
Source File: BlockWireCoil.java From GregTech with GNU Lesser General Public License v3.0 | 4 votes |
@Override public boolean canCreatureSpawn(IBlockState state, IBlockAccess world, BlockPos pos, SpawnPlacementType type) { return false; }
Example #14
Source File: BlockMetalCasing.java From GregTech with GNU Lesser General Public License v3.0 | 4 votes |
@Override public boolean canCreatureSpawn(IBlockState state, IBlockAccess world, BlockPos pos, SpawnPlacementType type) { return false; }
Example #15
Source File: BlockBoilerCasing.java From GregTech with GNU Lesser General Public License v3.0 | 4 votes |
@Override public boolean canCreatureSpawn(IBlockState state, IBlockAccess world, BlockPos pos, SpawnPlacementType type) { return false; }
Example #16
Source File: BlockTurbineCasing.java From GregTech with GNU Lesser General Public License v3.0 | 4 votes |
@Override public boolean canCreatureSpawn(IBlockState state, IBlockAccess world, BlockPos pos, SpawnPlacementType type) { return false; }
Example #17
Source File: BlockPetrifiedFoam.java From GregTech with GNU Lesser General Public License v3.0 | 4 votes |
@Override public boolean canCreatureSpawn(IBlockState state, IBlockAccess world, BlockPos pos, SpawnPlacementType type) { return false; }
Example #18
Source File: BlockMachineCasing.java From GregTech with GNU Lesser General Public License v3.0 | 4 votes |
@Override public boolean canCreatureSpawn(IBlockState state, IBlockAccess world, BlockPos pos, SpawnPlacementType type) { return false; }
Example #19
Source File: BlockCrusherBlade.java From GregTech with GNU Lesser General Public License v3.0 | 4 votes |
@Override public boolean canCreatureSpawn(IBlockState state, IBlockAccess world, BlockPos pos, SpawnPlacementType type) { return false; }
Example #20
Source File: BlockFrame.java From GregTech with GNU Lesser General Public License v3.0 | 4 votes |
@Override public boolean canCreatureSpawn(IBlockState state, IBlockAccess world, BlockPos pos, SpawnPlacementType type) { return false; }
Example #21
Source File: BlockMultiblockCasing.java From GregTech with GNU Lesser General Public License v3.0 | 4 votes |
@Override public boolean canCreatureSpawn(IBlockState state, IBlockAccess world, BlockPos pos, SpawnPlacementType type) { return false; }
Example #22
Source File: BlockMachine.java From GregTech with GNU Lesser General Public License v3.0 | 4 votes |
@Override public boolean canCreatureSpawn(IBlockState state, IBlockAccess world, BlockPos pos, SpawnPlacementType type) { return false; }
Example #23
Source File: IAnimalDef.java From TFC2 with GNU General Public License v3.0 | votes |
public SpawnPlacementType getPlacementType();