Add in an "EntityEvent.EnteringChunk" event. Useful for your entity chunkloading stuff.

This commit is contained in:
Christian committed 2012-09-26 08:52:40 -04:00
1 parent 1df9b144cd
commit 5fb999fa22
2 files changed
+57 -30

No files matched your search

@@ -6,12 +6,12 @@ import net.minecraftforge.event.Event;
public class EntityEvent extends Event
{
public final Entity entity;
public EntityEvent(Entity entity)
{
this.entity = entity;
}
public static class CanUpdate extends EntityEvent
{
public boolean canUpdate = false;
@@ -20,4 +20,21 @@ public class EntityEvent extends Event
super(entity);
}
}
public static class EnteringChunk extends EntityEvent
{
public int newChunkX;
public int newChunkZ;
public int oldChunkX;
public int oldChunkZ;
public EnteringChunk(Entity entity, int newChunkX, int newChunkZ, int oldChunkX, int oldChunkZ)
{
super(entity);
this.newChunkX = newChunkX;
this.newChunkZ = newChunkZ;
this.oldChunkX = oldChunkX;
this.oldChunkZ = oldChunkZ;
}
}
}