(World worldIn, BlockPos pos, IBlockState state, Random rand)
| 33 | } |
| 34 | |
| 35 | public void updateTick(World worldIn, BlockPos pos, IBlockState state, Random rand) |
| 36 | { |
| 37 | super.updateTick(worldIn, pos, state, rand); |
| 38 | |
| 39 | if (worldIn.provider.isSurfaceWorld() && worldIn.getGameRules().getGameRuleBooleanValue("doMobSpawning") && rand.nextInt(2000) < worldIn.getDifficulty().getDifficultyId()) |
| 40 | { |
| 41 | int i = pos.getY(); |
| 42 | BlockPos blockpos; |
| 43 | |
| 44 | for (blockpos = pos; !World.doesBlockHaveSolidTopSurface(worldIn, blockpos) && blockpos.getY() > 0; blockpos = blockpos.down()) |
| 45 | { |
| 46 | ; |
| 47 | } |
| 48 | |
| 49 | if (i > 0 && !worldIn.getBlockState(blockpos.up()).getBlock().isNormalCube()) |
| 50 | { |
| 51 | Entity entity = ItemMonsterPlacer.spawnCreature(worldIn, 57, (double)blockpos.getX() + 0.5D, (double)blockpos.getY() + 1.1D, (double)blockpos.getZ() + 0.5D); |
| 52 | |
| 53 | if (entity != null) |
| 54 | { |
| 55 | entity.timeUntilPortal = entity.getPortalCooldown(); |
| 56 | } |
| 57 | } |
| 58 | } |
| 59 | } |
| 60 | |
| 61 | public AxisAlignedBB getCollisionBoundingBox(World worldIn, BlockPos pos, IBlockState state) |
| 62 | { |
nothing calls this directly
no test coverage detected