use of buildcraft.core.LaserData in project BuildCraft by BuildCraft.
the class TileConstructionMarker method readData.
@Override
public void readData(ByteBuf stream) {
box.readData(stream);
int flags = stream.readUnsignedByte();
if ((flags & 1) != 0) {
laser = new LaserData();
laser.readData(stream);
} else {
laser = null;
}
if ((flags & 2) != 0) {
itemBlueprint = NetworkUtils.readStack(stream);
} else {
itemBlueprint = null;
}
}
use of buildcraft.core.LaserData in project BuildCraft by BuildCraft.
the class TileAbstractBuilder method readData.
@Override
public void readData(ByteBuf stream) {
super.readData(stream);
int size = stream.readUnsignedShort();
pathLasers.clear();
for (int i = 0; i < size; i++) {
LaserData ld = new LaserData();
ld.readData(stream);
pathLasers.add(ld);
}
}
use of buildcraft.core.LaserData in project BuildCraft by BuildCraft.
the class RenderPathMarker method renderTileEntityAt.
@Override
public void renderTileEntityAt(TilePathMarker marker, double x, double y, double z, float f, int arg) {
if (marker != null) {
GL11.glPushMatrix();
GL11.glPushAttrib(GL11.GL_ENABLE_BIT);
GL11.glTranslated(x, y, z);
GL11.glTranslated(-marker.getPos().getX(), -marker.getPos().getY(), -marker.getPos().getZ());
for (LaserData laser : marker.lasers) {
if (laser != null) {
GL11.glPushMatrix();
RenderLaser.doRenderLaser(TileEntityRendererDispatcher.instance.worldObj, Minecraft.getMinecraft().renderEngine, laser, EntityLaser.LASER_BLUE);
GL11.glPopMatrix();
}
}
GL11.glPopAttrib();
GL11.glPopMatrix();
}
}
use of buildcraft.core.LaserData in project BuildCraft by BuildCraft.
the class TileLaser method initialize.
@Override
public void initialize() {
super.initialize();
if (laser == null) {
laser = new LaserData();
}
laser.isVisible = false;
laser.head = Utils.convert(getPos());
laser.tail = Utils.convert(getPos());
laser.isGlowing = true;
}
use of buildcraft.core.LaserData in project BuildCraft by BuildCraft.
the class TileArchitect method writeData.
@Override
public void writeData(ByteBuf stream) {
box.writeData(stream);
NetworkUtils.writeUTF(stream, name);
stream.writeBoolean(getIsWorking());
stream.writeByte(mode.ordinal());
if (mode == Mode.COPY) {
readConfiguration.writeData(stream);
stream.writeShort(subLasers.size());
for (LaserData ld : subLasers) {
ld.writeData(stream);
}
}
}
Aggregations