ForgePatch/common/net/minecraftforge/common/IExtendedEntityProperties.java
Christian 300f471c57 Merge branch 'mithionchanges' of github.com:Mithion/MinecraftForge into mithionchanges
Fix up code for minecraftforge style. Clean up patches.

Conflicts:
	common/forge_at.cfg
	patches/minecraft/net/minecraft/block/Block.java.patch
2013-03-23 16:56:01 -04:00

37 lines
1.3 KiB
Java

package net.minecraftforge.common;
import net.minecraft.entity.Entity;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.world.World;
/**
* Allows for custom entity data and logic to be hooked to existing entity classes.
*
* @author cpw, mithion
*
*/
public interface IExtendedEntityProperties {
/**
* Called when the entity that this class is attached to is saved.
* Any custom entity data that needs saving should be saved here.
* @param compound The compound to save to.
*/
public void saveNBTData(NBTTagCompound compound);
/**
* Called when the entity that this class is attached to is loaded.
* In order to hook into this, you will need to subscribe to the EntityConstructing event.
* Otherwise, you will need to initialize manually.
* @param compound The compound to load from.
*/
public void loadNBTData(NBTTagCompound compound);
/**
* Used to initialize the extended properties with the entity that this is attached to, as well
* as the world object.
* Called automatically if you register with the EntityConstructing event.
* @param entity The entity that this extended properties is attached to
* @param world The world in which the entity exists
*/
public void init(Entity entity, World world);
}