Package com.flansmod.common.vector

Examples of com.flansmod.common.vector.Vector3i


        //MovingObjectPosition hit = ((EntityLivingBase)seats[0].riddenByEntity).rayTrace(reach, 1F);
        if(hit != null && hit.typeOfHit == MovingObjectType.BLOCK)
        {
          if(breakingBlock == null || breakingBlock.x != hit.blockX || breakingBlock.y != hit.blockY || breakingBlock.z != hit.blockZ)
            breakingProgress = 0F;
          breakingBlock = new Vector3i(hit.blockX, hit.blockY, hit.blockZ);
        }
      }
     
      else if(heldItem instanceof ItemGun)
      {
View Full Code Here


                case 2 : z--; break;
                case 3 : z++; break;
                case 4 : x--; break;
                case 5 : x++; break;
                }
                blockLightOverrides.add(new Vector3i(x, y, z));
                mc.theWorld.setLightValue(EnumSkyBlock.Block, x, y, z, 12);
                mc.theWorld.updateLightByType(EnumSkyBlock.Block, x, y + 1, z);
                mc.theWorld.updateLightByType(EnumSkyBlock.Block, x, y - 1, z);
                mc.theWorld.updateLightByType(EnumSkyBlock.Block, x + 1, y, z);
                mc.theWorld.updateLightByType(EnumSkyBlock.Block, x - 1, y, z);
                mc.theWorld.updateLightByType(EnumSkyBlock.Block, x, y, z + 1);
                mc.theWorld.updateLightByType(EnumSkyBlock.Block, x, y, z - 1);
              }
            }
          }
        }
      }
     
      for(Object obj : mc.theWorld.loadedEntityList)
      {
        if(obj instanceof EntityBullet)
        {
          EntityBullet bullet = (EntityBullet)obj;
          if(!bullet.isDead && bullet.type.hasLight)
          {
            int x = MathHelper.floor_double(bullet.posX);
            int y = MathHelper.floor_double(bullet.posY);
            int z = MathHelper.floor_double(bullet.posZ);
            blockLightOverrides.add(new Vector3i(x, y, z));
            mc.theWorld.setLightValue(EnumSkyBlock.Block, x, y, z, 15);
            mc.theWorld.updateLightByType(EnumSkyBlock.Block, x, y + 1, z);
            mc.theWorld.updateLightByType(EnumSkyBlock.Block, x, y - 1, z);
            mc.theWorld.updateLightByType(EnumSkyBlock.Block, x + 1, y, z);
            mc.theWorld.updateLightByType(EnumSkyBlock.Block, x - 1, y, z);
            mc.theWorld.updateLightByType(EnumSkyBlock.Block, x, y, z + 1);
            mc.theWorld.updateLightByType(EnumSkyBlock.Block, x, y, z - 1);
          }
        }
        else if(obj instanceof EntityMecha)
        {
          EntityMecha mecha = (EntityMecha)obj;
          int x = MathHelper.floor_double(mecha.posX);
          int y = MathHelper.floor_double(mecha.posY);
          int z = MathHelper.floor_double(mecha.posZ);
          if(mecha.lightLevel() > 0)
          {
            blockLightOverrides.add(new Vector3i(x, y, z));
            mc.theWorld.setLightValue(EnumSkyBlock.Block, x, y, z, Math.max(mc.theWorld.getBlockLightValue(x, y, z), mecha.lightLevel()));
            mc.theWorld.updateLightByType(EnumSkyBlock.Block, x + 1, y, z);
            mc.theWorld.updateLightByType(EnumSkyBlock.Block, x - 1, y + 1, z);
            mc.theWorld.updateLightByType(EnumSkyBlock.Block, x, y + 1, z);
            mc.theWorld.updateLightByType(EnumSkyBlock.Block, x, y - 1, z);
            mc.theWorld.updateLightByType(EnumSkyBlock.Block, x, y, z + 1);
            mc.theWorld.updateLightByType(EnumSkyBlock.Block, x, y, z - 1);
          }
          if(mecha.forceDark())
          {
            for(int i = -3; i <= 3; i++)
            {
              for(int j = -3; j <= 3; j++)
              {
                for(int k = -3; k <= 3; k++)
                {
                  int xd = i + x;
                  int yd = j + y;
                  int zd = k + z;
                  blockLightOverrides.add(new Vector3i(xd, yd, zd));
                  mc.theWorld.setLightValue(EnumSkyBlock.Sky, xd, yd, zd, Math.abs(i) + Math.abs(j) + Math.abs(k));
                }
              }
            }
          }
View Full Code Here

TOP

Related Classes of com.flansmod.common.vector.Vector3i

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.