예제 #1
0
  @Override
  public void updateInPedestal(World world, int x, int y, int z) {
    if (!world.isRemote && ProjectEConfig.ignitePedCooldown != -1) {
      DMPedestalTile tile = ((DMPedestalTile) world.getTileEntity(x, y, z));
      if (tile.getActivityCooldown() == 0) {
        List<EntityLiving> list =
            world.getEntitiesWithinAABB(EntityLiving.class, tile.getEffectBounds());
        for (EntityLiving living : list) {
          living.attackEntityFrom(DamageSource.inFire, 3.0F);
          living.setFire(8);
        }

        tile.setActivityCooldown(ProjectEConfig.ignitePedCooldown);
      } else {
        tile.decrementActivityCooldown();
      }
    }
  }
예제 #2
0
 @Override
 public void updateInPedestal(@Nonnull World world, @Nonnull BlockPos pos) {
   if (!world.isRemote && ProjectEConfig.zeroPedCooldown != -1) {
     DMPedestalTile tile = ((DMPedestalTile) world.getTileEntity(pos));
     if (tile.getActivityCooldown() == 0) {
       AxisAlignedBB aabb = tile.getEffectBounds();
       WorldHelper.freezeInBoundingBox(world, aabb, null, false);
       List<Entity> list = world.getEntitiesWithinAABB(Entity.class, aabb);
       for (Entity ent : list) {
         if (ent.isBurning()) {
           ent.extinguish();
         }
       }
       tile.setActivityCooldown(ProjectEConfig.zeroPedCooldown);
     } else {
       tile.decrementActivityCooldown();
     }
   }
 }