net.minecraft.network.INetworkManager Java Examples

The following examples show how to use net.minecraft.network.INetworkManager. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: TileEntityTerminalFluid.java    From ExtraCells1 with MIT License 6 votes vote down vote up
public void onDataPacket(INetworkManager net, Packet132TileEntityData packet)
{
	super.onDataPacket(net, packet);
	readFromNBT(packet.data);

	NBTTagCompound fluids = packet.data.getCompoundTag("fluids");
	fluidsInNetwork = new ArrayList<SpecialFluidStack>();
	int[] fluidIDs = fluids.getIntArray("FluidIDs");
	for (int i = 0; i < fluidIDs.length; i++)
	{
		fluidsInNetwork.add(new SpecialFluidStack(fluidIDs[i], fluids.getLong("FluidAmount#" + i)));
	}

	NBTTagCompound craftableFluids = packet.data.getCompoundTag("craftablefluids");
	craftableFluidsInNetwork = new ArrayList<Fluid>();
	int[] craftableFluidIDs = craftableFluids.getIntArray("FluidIDs");
	for (int i = 0; i < craftableFluidIDs.length; i++)
	{
		craftableFluidsInNetwork.add(FluidRegistry.getFluid(craftableFluidIDs[i]));
	}
	currentFluid = FluidRegistry.getFluid(packet.data.getInteger("currentFluid"));
	powerStatus = packet.data.getBoolean("powered");
	networkReady = packet.data.getBoolean("ready");
	worldObj.updateAllLightTypes(xCoord, yCoord, zCoord);
}
 
Example #2
Source File: TileEntityMonitorStorageFluid.java    From ExtraCells1 with MIT License 5 votes vote down vote up
@Override
public void onDataPacket(INetworkManager net, Packet132TileEntityData packet)
{
	super.onDataPacket(net, packet);
	readFromNBT(packet.data);
	networkReady = packet.data.getBoolean("networkReady");
	powerStatus = packet.data.getBoolean("powerStatus");
	fluidAmount = packet.data.getLong("amount");
	blockMetadata = packet.data.getInteger("meta");
}
 
Example #3
Source File: TileEntityLevelEmitterFluid.java    From ExtraCells1 with MIT License 5 votes vote down vote up
public void onDataPacket(INetworkManager net, Packet132TileEntityData packet)
{
	super.onDataPacket(net, packet);
	readFromNBT(packet.data);

	currentAmount = packet.data.getLong("currentAmount");
	filterAmount = packet.data.getLong("filterAmount");

	worldObj.updateAllLightTypes(xCoord, yCoord, zCoord);
}
 
Example #4
Source File: TileEntityBusFluidImport.java    From ExtraCells1 with MIT License 4 votes vote down vote up
@Override
public void onDataPacket(INetworkManager net, Packet132TileEntityData packet)
{
	super.onDataPacket(net, packet);
	readFromNBT(packet.data);
}
 
Example #5
Source File: TileEntityMEBattery.java    From ExtraCells1 with MIT License 4 votes vote down vote up
@Override
public void onDataPacket(INetworkManager net, Packet132TileEntityData packet)
{
	readFromNBT(packet.data);
}
 
Example #6
Source File: TileEntityInterfaceFluid.java    From ExtraCells1 with MIT License 4 votes vote down vote up
@Override
public void onDataPacket(INetworkManager net, Packet132TileEntityData packet)
{
	super.onDataPacket(net, packet);
	readFromNBT(packet.data);
}
 
Example #7
Source File: TileEntityBusFluidExport.java    From ExtraCells1 with MIT License 4 votes vote down vote up
@Override
public void onDataPacket(INetworkManager net, Packet132TileEntityData packet)
{
	super.onDataPacket(net, packet);
	readFromNBT(packet.data);
}
 
Example #8
Source File: TileEntityCertusTank.java    From ExtraCells1 with MIT License 4 votes vote down vote up
public void onDataPacket(INetworkManager net, Packet132TileEntityData packet)
{
	worldObj.markBlockForRenderUpdate(xCoord, yCoord, zCoord);
	readFromNBT(packet.data);
}
 
Example #9
Source File: TileEntityBusFluidStorage.java    From ExtraCells1 with MIT License 4 votes vote down vote up
@Override
public void onDataPacket(INetworkManager net, Packet132TileEntityData packet)
{
	super.onDataPacket(net, packet);
	readFromNBT(packet.data);
}