2013-12-27 23:59:59 +01:00
|
|
|
package appeng.tile.events;
|
|
|
|
|
2014-02-09 02:34:52 +01:00
|
|
|
import io.netty.buffer.ByteBuf;
|
|
|
|
|
2013-12-27 23:59:59 +01:00
|
|
|
import java.io.IOException;
|
|
|
|
import java.util.EnumSet;
|
|
|
|
|
|
|
|
import net.minecraft.nbt.NBTTagCompound;
|
|
|
|
import cpw.mods.fml.relauncher.Side;
|
|
|
|
import cpw.mods.fml.relauncher.SideOnly;
|
|
|
|
|
|
|
|
public abstract class AETileEventHandler
|
|
|
|
{
|
|
|
|
|
|
|
|
final EnumSet<TileEventType> supportedEvents;
|
|
|
|
|
2014-01-26 07:46:16 +01:00
|
|
|
public AETileEventHandler(TileEventType... events) {
|
|
|
|
supportedEvents = EnumSet.noneOf( TileEventType.class );
|
|
|
|
for (TileEventType t : events)
|
|
|
|
supportedEvents.add( t );
|
2013-12-27 23:59:59 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
public EnumSet<TileEventType> getSubscribedEvents()
|
|
|
|
{
|
|
|
|
return supportedEvents;
|
|
|
|
}
|
|
|
|
|
|
|
|
// TICK
|
|
|
|
public void Tick()
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
// WORLD_NBT
|
|
|
|
public void writeToNBT(NBTTagCompound data)
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
// WORLD NBT
|
|
|
|
public void readFromNBT(NBTTagCompound data)
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
// NETWORK
|
2014-02-09 02:34:52 +01:00
|
|
|
public void writeToStream(ByteBuf data) throws IOException
|
2013-12-27 23:59:59 +01:00
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
// NETWORK
|
|
|
|
/**
|
|
|
|
* returning true from this method, will update the block's render
|
|
|
|
*
|
|
|
|
* @param data
|
|
|
|
* @return
|
|
|
|
* @throws IOException
|
|
|
|
*/
|
|
|
|
@SideOnly(Side.CLIENT)
|
2014-02-09 02:34:52 +01:00
|
|
|
public boolean readFromStream(ByteBuf data) throws IOException
|
2013-12-27 23:59:59 +01:00
|
|
|
{
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|