@Override
  public void updateTick(World par1World, int par2, int par3, int par4, Random par5Random) {
    super.updateTick(par1World, par2, par3, par4, par5Random);

    if (par1World.provider.isSurfaceWorld()
        && par5Random.nextInt(2000) < par1World.difficultySetting) {
      int l;

      for (l = par3; !par1World.doesBlockHaveSolidTopSurface(par2, l, par4) && l > 0; --l) {;
      }

      if (l > 0 && !par1World.isBlockNormalCube(par2, l + 1, par4)) {
        Entity entity =
            ItemMonsterPlacer.spawnCreature(par1World, 57, par2 + 0.5D, l + 1.1D, par4 + 0.5D);

        if (entity != null) {
          entity.timeUntilPortal = entity.getPortalCooldown();
        }
      }
    }
  }
Ejemplo n.º 2
0
  public void updateTick(World world, int x, int y, int z, Random rand) {
    super.updateTick(world, x, y, z, rand);

    TileEntityFruit teFruit = (TileEntityFruit) world.getBlockTileEntity(x, y, z);
    teFruit.tick();
  }
Ejemplo n.º 3
0
 @Override
 public void updateTick(World par1World, int par2, int par3, int par4, Random par5Random) {
   par1World.markBlockForRenderUpdate(par2, par3, par4);
   super.updateTick(par1World, par2, par3, par4, par5Random);
 }