예제 #1
0
  protected void updateDataClient() {
    head.x = decodeDouble(dataWatcher.getWatchableObjectInt(8));
    head.y = decodeDouble(dataWatcher.getWatchableObjectInt(9));
    head.z = decodeDouble(dataWatcher.getWatchableObjectInt(10));
    tail.x = decodeDouble(dataWatcher.getWatchableObjectInt(11));
    tail.y = decodeDouble(dataWatcher.getWatchableObjectInt(12));
    tail.z = decodeDouble(dataWatcher.getWatchableObjectInt(13));

    isVisible = (dataWatcher.getWatchableObjectByte(14) == 1);
  }
예제 #2
0
  @Override
  public void entityEntering(ItemStack payload, ForgeDirection orientation) {

    /* FIXME: This is untested guesswork */
    Position itemPos = new Position(xCoord, yCoord, zCoord, orientation);
    itemPos.moveBackwards(1.0);

    itemPos.x += 0.5;
    itemPos.y += 0.25;
    itemPos.z += 0.5;
    itemPos.moveForwards(0.5);

    EntityPassiveItem pipedItem =
        new EntityPassiveItem(worldObj, itemPos.x, itemPos.y, itemPos.z, payload);
    entityEntering(pipedItem, orientation);
  }