Files
ForestryMC/src/main/java/forestry/api/multiblock/IMultiblockLogic.java
T
mezz efcab41e04 Revert "Use generics for Chromosome type, begin unifying code"
This reverts commit 43e41034f6.

Conflicts:
	src/main/java/forestry/api/arboriculture/IAlleleTreeSpecies.java
	src/main/java/forestry/api/genetics/IAlleleSpeciesCustom.java
	src/main/java/forestry/core/proxy/ProxyRenderClient.java
2016-03-03 20:50:38 -08:00

74 lines
2.0 KiB
Java

/*******************************************************************************
* Copyright 2011-2014 SirSengir
*
* This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details.
******************************************************************************/
package forestry.api.multiblock;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.world.World;
import forestry.api.core.INbtWritable;
/**
* Multiblock Logic implements the basic logic for IMultiblockComponent tile entities.
* Instances must come from MultiblockManager.logicFactory, most of the implementation is hidden.
*
* IMultiblockComponent tile entities must wire up the methods in the "Updating and Synchronization" section.
* As a starting point, you can use MultiblockTileEntityBase.
*/
public interface IMultiblockLogic extends INbtWritable {
/**
* @return True if this block is connected to a multiblock controller. False otherwise.
*/
boolean isConnected();
/**
* @return the multiblock controller for this logic
*/
IMultiblockController getController();
/* Updating and Synchronization */
/**
* call on Tile.validate()
**/
void validate(World world, IMultiblockComponent part);
/**
* call on Tile.invalidate()
**/
void invalidate(World world, IMultiblockComponent part);
/**
* call on Tile.onChunkUnload()
**/
void onChunkUnload(World world, IMultiblockComponent part);
/**
* Writes data for client synchronization.
* Use this in Tile.getDescriptionPacket()
*/
void encodeDescriptionPacket(NBTTagCompound packetData);
/**
* Reads data for client synchronization.
* Use this in Tile.onDataPacket()
*/
void decodeDescriptionPacket(NBTTagCompound packetData);
/**
* Read the logic's data from file.
* Use this in Tile.readFromNBT()
*/
void readFromNBT(NBTTagCompound nbttagcompound);
/**
* Write the logic's data to file.
* Use this in Tile.writeToNBT()
*/
@Override
void writeToNBT(NBTTagCompound nbttagcompound);
}