net.minecraft.network.play.server.S35PacketUpdateTileEntity Java Examples

The following examples show how to use net.minecraft.network.play.server.S35PacketUpdateTileEntity. 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: TileEntityQBlock.java    From qcraft-mod with Apache License 2.0 6 votes vote down vote up
@Override
public void onDataPacket( NetworkManager net, S35PacketUpdateTileEntity packet )
{
    switch( packet.func_148853_f() ) // actionType
    {
        case 0:
        {
            // Receive sides and frequency
            int oldSide = m_currentDisplayedSide;
            int oldType = getObservedType();
            NBTTagCompound nbttagcompound = packet.func_148857_g(); // data
            readFromNBT( nbttagcompound );
            int newType = getObservedType();

            // Update state
            if( newType != oldType || oldSide < 0 )
            {
                m_timeSinceLastChange = 0;
                blockUpdate();
            }
            break;
        }
    }
}
 
Example #2
Source File: TileEntityQuantumComputer.java    From qcraft-mod with Apache License 2.0 6 votes vote down vote up
@Override
public Packet getDescriptionPacket()
{
    // Communicate networked state
    NBTTagCompound nbttagcompound = new NBTTagCompound();
    nbttagcompound.setInteger( "f", m_entanglementFrequency );
    if( m_portalID != null )
    {
        nbttagcompound.setString( "portalID", m_portalID );
    }
    nbttagcompound.setBoolean( "portalNameConflict", m_portalNameConflict );
    if( m_remoteServerAddress != null )
    {
        nbttagcompound.setString( "remoteIPAddress", m_remoteServerAddress );
    }
    if( m_remoteServerName != null )
    {
        nbttagcompound.setString( "remoteIPName", m_remoteServerName );
    }
    if( m_remotePortalID != null )
    {
        nbttagcompound.setString( "remotePortalID", m_remotePortalID );
    }
    return new S35PacketUpdateTileEntity( this.xCoord, this.yCoord, this.zCoord, 0, nbttagcompound );
}
 
Example #3
Source File: TileEntityHelm.java    From archimedes-ships with MIT License 5 votes vote down vote up
@Override
public Packet getDescriptionPacket()
{
	NBTTagCompound compound = new NBTTagCompound();
	writeNBTforSending(compound);
	return new S35PacketUpdateTileEntity(xCoord, yCoord, zCoord, 0, compound);
}
 
Example #4
Source File: TileEntityQBlock.java    From qcraft-mod with Apache License 2.0 5 votes vote down vote up
@Override
public Packet getDescriptionPacket()
{
    // Communicate sides and frequency, changing state is calculated on the fly
    NBTTagCompound nbttagcompound = new NBTTagCompound();
    writeToNBT( nbttagcompound );
    return new S35PacketUpdateTileEntity( this.xCoord, this.yCoord, this.zCoord, 0, nbttagcompound );
}
 
Example #5
Source File: TileMotor.java    From Framez with GNU General Public License v3.0 5 votes vote down vote up
@Override
public Packet getDescriptionPacket() {

    NBTTagCompound tCompound = new NBTTagCompound();
    writeToPacketNBT(tCompound);
    return new S35PacketUpdateTileEntity(xCoord, yCoord, zCoord, 0, tCompound);
}
 
Example #6
Source File: TileEntityBeefBase.java    From BigReactors with MIT License 5 votes vote down vote up
@Override
public Packet getDescriptionPacket()
{
	NBTTagCompound tagCompound = new NBTTagCompound();
	this.writeToNBT(tagCompound);
	
	return new S35PacketUpdateTileEntity(xCoord, yCoord, zCoord, 0, tagCompound);
}
 
Example #7
Source File: TileEntityBabyChest.java    From NewHorizonsCoreMod with GNU General Public License v3.0 5 votes vote down vote up
@Override
public Packet getDescriptionPacket() {
    NBTTagCompound syncData = new NBTTagCompound();
    writeSyncedNBT(syncData);

    return new S35PacketUpdateTileEntity(xCoord, yCoord, zCoord, 1, syncData);
}
 
Example #8
Source File: TileEntityWoodProxy.java    From GardenCollection with MIT License 5 votes vote down vote up
@Override
public Packet getDescriptionPacket () {
    NBTTagCompound tag = new NBTTagCompound();
    writeToNBT(tag);

    return new S35PacketUpdateTileEntity(xCoord, yCoord, zCoord, 5, tag);
}
 
Example #9
Source File: TileEntityGarden.java    From GardenCollection with MIT License 5 votes vote down vote up
@Override
public Packet getDescriptionPacket () {
    NBTTagCompound tag = new NBTTagCompound();
    writeToNBT(tag);

    return new S35PacketUpdateTileEntity(xCoord, yCoord, zCoord, 5, tag);
}
 
Example #10
Source File: TileEntityGarden.java    From GardenCollection with MIT License 5 votes vote down vote up
@Override
public void onDataPacket (NetworkManager net, S35PacketUpdateTileEntity pkt) {
    readFromNBT(pkt.func_148857_g());
    getWorldObj().func_147479_m(xCoord, yCoord, zCoord); // markBlockForRenderUpdate

    int y = yCoord;
    while (getWorldObj().getBlock(xCoord, ++y, zCoord) instanceof IPlantProxy)
        getWorldObj().func_147479_m(xCoord, y, zCoord);
}
 
Example #11
Source File: TileEntityCompostBin.java    From GardenCollection with MIT License 5 votes vote down vote up
@Override
public Packet getDescriptionPacket () {
    NBTTagCompound tag = new NBTTagCompound();
    writeToNBT(tag);

    return new S35PacketUpdateTileEntity(xCoord, yCoord, zCoord, 5, tag);
}
 
Example #12
Source File: TileEntityBlockMateralProxy.java    From GardenCollection with MIT License 5 votes vote down vote up
@Override
public Packet getDescriptionPacket () {
    NBTTagCompound tag = new NBTTagCompound();
    writeToNBT(tag);

    return new S35PacketUpdateTileEntity(xCoord, yCoord, zCoord, 5, tag);
}
 
Example #13
Source File: TileEntityCandelabra.java    From GardenCollection with MIT License 5 votes vote down vote up
@Override
public Packet getDescriptionPacket () {
    NBTTagCompound tag = new NBTTagCompound();
    writeToNBT(tag);

    return new S35PacketUpdateTileEntity(xCoord, yCoord, zCoord, 5, tag);
}
 
Example #14
Source File: TileEntityEMT.java    From Electro-Magic-Tools with GNU General Public License v3.0 5 votes vote down vote up
@Override
public final Packet getDescriptionPacket() {
    NBTTagCompound nbt = new NBTTagCompound();
    writeToNBT(nbt);
    S35PacketUpdateTileEntity packet = new S35PacketUpdateTileEntity(xCoord, yCoord, zCoord, 0, nbt);
    return packet;
}
 
Example #15
Source File: TileEntityLantern.java    From GardenCollection with MIT License 5 votes vote down vote up
@Override
public Packet getDescriptionPacket () {
    NBTTagCompound tag = new NBTTagCompound();
    writeToNBT(tag);

    return new S35PacketUpdateTileEntity(xCoord, yCoord, zCoord, 5, tag);
}
 
Example #16
Source File: TileEntityCrate.java    From archimedes-ships with MIT License 5 votes vote down vote up
@Override
public Packet getDescriptionPacket()
{
	NBTTagCompound compound = new NBTTagCompound();
	writeToNBT(compound);
	return new S35PacketUpdateTileEntity(xCoord, yCoord, zCoord, 0, compound);
}
 
Example #17
Source File: TileEntityEngine.java    From archimedes-ships with MIT License 5 votes vote down vote up
@Override
public Packet getDescriptionPacket()
{
	NBTTagCompound compound = new NBTTagCompound();
	writeToNBT(compound);
	return new S35PacketUpdateTileEntity(xCoord, yCoord, zCoord, 1, compound);
}
 
Example #18
Source File: TileEntityGauge.java    From archimedes-ships with MIT License 5 votes vote down vote up
@Override
public Packet getDescriptionPacket()
{
	NBTTagCompound compound = new NBTTagCompound();
	writeToNBT(compound);
	return new S35PacketUpdateTileEntity(xCoord, yCoord, zCoord, 1, compound);
}
 
Example #19
Source File: TileThaumcraft.java    From PneumaticCraft with GNU General Public License v3.0 4 votes vote down vote up
@Override
public void onDataPacket(NetworkManager net, S35PacketUpdateTileEntity pkt) {
	super.onDataPacket(net, pkt);		
	this.readCustomNBT(pkt.func_148857_g());
}
 
Example #20
Source File: TileEntityEMT.java    From Electro-Magic-Tools with GNU General Public License v3.0 4 votes vote down vote up
@Override
public void onDataPacket(NetworkManager net, S35PacketUpdateTileEntity pkt) {
    NBTTagCompound nbt = pkt.func_148857_g();
    readFromNBT(nbt);
}
 
Example #21
Source File: TileThaumcraft.java    From ForbiddenMagic with Do What The F*ck You Want To Public License 4 votes vote down vote up
@Override
public void onDataPacket(NetworkManager net, S35PacketUpdateTileEntity pkt) {
	super.onDataPacket(net, pkt);		
	this.readCustomNBT(pkt.func_148857_g());
}
 
Example #22
Source File: TileEntityTrap.java    From Artifacts with MIT License 4 votes vote down vote up
@Override
public void onDataPacket(NetworkManager net, S35PacketUpdateTileEntity packet) {
	readFromNBT(packet.func_148857_g());
}
 
Example #23
Source File: TileEntityDisplayPedestal.java    From Artifacts with MIT License 4 votes vote down vote up
@Override
public Packet getDescriptionPacket() {
	NBTTagCompound nbtTag = new NBTTagCompound();
	this.writeToNBT(nbtTag);
	return new S35PacketUpdateTileEntity(this.xCoord, this.yCoord, this.zCoord, 1, nbtTag);
}
 
Example #24
Source File: TileEntityDisplayPedestal.java    From Artifacts with MIT License 4 votes vote down vote up
@Override
public void onDataPacket(NetworkManager net, S35PacketUpdateTileEntity packet) {
	readFromNBT(packet.func_148857_g());
}
 
Example #25
Source File: TileEntityEngine.java    From archimedes-ships with MIT License 4 votes vote down vote up
@Override
public void onDataPacket(NetworkManager net, S35PacketUpdateTileEntity packet)
{
	readFromNBT(packet.func_148857_g());
}
 
Example #26
Source File: TileEntitySword.java    From Artifacts with MIT License 4 votes vote down vote up
@Override
public Packet getDescriptionPacket() {
	NBTTagCompound nbtTag = new NBTTagCompound();
	this.writeToNBT(nbtTag);
	return new S35PacketUpdateTileEntity(this.xCoord, this.yCoord, this.zCoord, 1, nbtTag);
}
 
Example #27
Source File: TileEntityBabyChest.java    From NewHorizonsCoreMod with GNU General Public License v3.0 4 votes vote down vote up
@Override
public void onDataPacket(NetworkManager pNetMan, S35PacketUpdateTileEntity pPkt) 
{
    readSyncedNBT(pPkt.func_148857_g());
}
 
Example #28
Source File: TileEntityHelm.java    From archimedes-ships with MIT License 4 votes vote down vote up
@Override
public void onDataPacket(NetworkManager net, S35PacketUpdateTileEntity packet)
{
	readFromNBT(packet.func_148857_g());
}
 
Example #29
Source File: TileEntitySword.java    From Artifacts with MIT License 4 votes vote down vote up
@Override
public void onDataPacket(NetworkManager net, S35PacketUpdateTileEntity packet) {
	readFromNBT(packet.func_148857_g());
}
 
Example #30
Source File: TileEntityWrathCage.java    From ForbiddenMagic with Do What The F*ck You Want To Public License 4 votes vote down vote up
@Override
public void onDataPacket(NetworkManager net, S35PacketUpdateTileEntity pkt) {
    readFromNBT(pkt.func_148857_g());
    worldObj.markBlockForUpdate(xCoord, yCoord, zCoord);
}