Examples of Range4D


Examples of mekanism.api.Range4D

          {
            obj.getBlock(worldObj).onNeighborChange(worldObj, obj.xCoord, obj.yCoord, obj.zCoord, xCoord, yCoord, zCoord);
          }
        }

        Mekanism.packetHandler.sendToReceivers(new TileEntityMessage(Coord4D.get(this), getNetworkedData(new ArrayList())), new Range4D(Coord4D.get(this)));
      }

      prevStructure = structure != null;

      if(structure != null)
View Full Code Here

Examples of mekanism.api.Range4D

              if(structure.fluidStored.amount == 0)
              {
                structure.fluidStored = null;
              }

              Mekanism.packetHandler.sendToReceivers(new TileEntityMessage(Coord4D.get(this), getNetworkedData(new ArrayList())), new Range4D(Coord4D.get(this)));
            }
          }
        }
      }
      else if(FluidContainerRegistry.isFilledContainer(structure.inventory[0]) && (structure.editMode == ContainerEditMode.BOTH || structure.editMode == ContainerEditMode.EMPTY))
      {
        FluidStack itemFluid = FluidContainerRegistry.getFluidForFilledItem(structure.inventory[0]);

        if((structure.fluidStored == null && itemFluid.amount <= max) || structure.fluidStored.amount+itemFluid.amount <= max)
        {
          if(structure.fluidStored != null && !structure.fluidStored.isFluidEqual(itemFluid))
          {
            return;
          }

          ItemStack containerItem = structure.inventory[0].getItem().getContainerItem(structure.inventory[0]);

          boolean filled = false;

          if(containerItem != null)
          {
            if(structure.inventory[1] == null || (structure.inventory[1].isItemEqual(containerItem) && structure.inventory[1].stackSize+1 <= containerItem.getMaxStackSize()))
            {
              structure.inventory[0] = null;

              if(structure.inventory[1] == null)
              {
                structure.inventory[1] = containerItem;
              }
              else {
                structure.inventory[1].stackSize++;
              }

              filled = true;
            }
          }
          else {
            structure.inventory[0].stackSize--;

            if(structure.inventory[0].stackSize == 0)
            {
              structure.inventory[0] = null;
            }

            filled = true;
          }

          if(filled)
          {
            if(structure.fluidStored == null)
            {
              structure.fluidStored = itemFluid.copy();
            }
            else {
              structure.fluidStored.amount += itemFluid.amount;
            }
           
            markDirty();
          }

          Mekanism.packetHandler.sendToReceivers(new TileEntityMessage(Coord4D.get(this), getNetworkedData(new ArrayList())), new Range4D(Coord4D.get(this)));
        }
      }
    }
  }
View Full Code Here

Examples of mekanism.api.Range4D

      {
        TileEntityDynamicTank tileEntity = (TileEntityDynamicTank)obj.getTileEntity(worldObj);

        if(tileEntity != null && tileEntity.isRendering)
        {
          Mekanism.packetHandler.sendToReceivers(new TileEntityMessage(Coord4D.get(tileEntity), tileEntity.getNetworkedData(new ArrayList())), new Range4D(Coord4D.get(tileEntity)));
        }
      }
    }
  }
View Full Code Here

Examples of mekanism.api.Range4D

      {
        updateDelay--;

        if(updateDelay == 0 && clientActive != isActive)
        {
          Mekanism.packetHandler.sendToReceivers(new TileEntityMessage(Coord4D.get(this), getNetworkedData(new ArrayList())), new Range4D(Coord4D.get(this)));
        }
      }

      ChargeUtils.discharge(2, this);
View Full Code Here

Examples of mekanism.api.Range4D

  {
    isActive = active;

    if(clientActive != active && updateDelay == 0)
    {
      Mekanism.packetHandler.sendToReceivers(new TileEntityMessage(Coord4D.get(this), getNetworkedData(new ArrayList())), new Range4D(Coord4D.get(this)));

      updateDelay = 10;
      clientActive = active;
    }
  }
View Full Code Here

Examples of mekanism.api.Range4D

      {
        updateDelay--;

        if(updateDelay == 0 && clientActive != isActive)
        {
          Mekanism.packetHandler.sendToReceivers(new TileEntityMessage(Coord4D.get(this), getNetworkedData(new ArrayList())), new Range4D(Coord4D.get(this)));
        }
      }

      ChargeUtils.discharge(3, this);
View Full Code Here

Examples of mekanism.api.Range4D

  {
    isActive = active;

    if(clientActive != active && updateDelay == 0)
    {
      Mekanism.packetHandler.sendToReceivers(new TileEntityMessage(Coord4D.get(this), getNetworkedData(new ArrayList())), new Range4D(Coord4D.get(this)));

      updateDelay = 10;
      clientActive = active;
    }
  }
View Full Code Here

Examples of mekanism.api.Range4D

            }
           
            ((EntityPlayerMP)player).playerNetServerHandler.setPlayerLocation(coords.xCoord+0.5, coords.yCoord+1, coords.zCoord+0.5, player.rotationYaw, player.rotationPitch);
           
            world.playSoundAtEntity(player, "mob.endermen.portal", 1.0F, 1.0F);
            Mekanism.packetHandler.sendToReceivers(new PortalFXMessage(coords), new Range4D(coords));
          } catch(Exception e) {}
        }
      }
    }
   
View Full Code Here

Examples of mekanism.api.Range4D

  @Override
  public void openInventory()
  {
    if(!worldObj.isRemote)
    {
      Mekanism.packetHandler.sendToReceivers(new TileEntityMessage(Coord4D.get(this), getFilterPacket(new ArrayList())), new Range4D(Coord4D.get(this)));
    }
  }
View Full Code Here

Examples of mekanism.api.Range4D

  {
    isActive = active;

    if(clientActive != active)
    {
      Mekanism.packetHandler.sendToReceivers(new TileEntityMessage(Coord4D.get(this), getNetworkedData(new ArrayList())), new Range4D(Coord4D.get(this)));

      if(active)
      {
        worldObj.playSoundEffect(xCoord, yCoord, zCoord, "mekanism:etc.Click", 0.3F, 1);
      }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.