mirror of
https://github.com/MinecraftForge/MinecraftForge.git
synced 2026-11-24 22:14:32 +00:00
Add in an "EntityEvent.EnteringChunk" event. Useful for your entity chunkloading stuff.
This commit is contained in:
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;
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user