Package net.minecraftforge.event.entity
Class EntityEvent.EnteringSection
java.lang.Object
net.minecraftforge.eventbus.api.Event
net.minecraftforge.event.entity.EntityEvent
net.minecraftforge.event.entity.EntityEvent.EnteringSection
- Enclosing class:
- EntityEvent
This event is fired on server and client after an Entity has entered a different section. 
Sections are 16x16x16 block grids of the world.
This event does not fire when a new entity is spawned, only when an entity moves from one section to another one. Use
This event is not
 
This event does not have a result.
This event is fired on the
Sections are 16x16x16 block grids of the world.
This event does not fire when a new entity is spawned, only when an entity moves from one section to another one. Use
EntityJoinLevelEvent to detect new entities joining the world.
 This event is not
Cancelable.This event does not have a result.
Event.HasResult
 This event is fired on the
MinecraftForge.EVENT_BUS.- 
Nested Class SummaryNested classes/interfaces inherited from class net.minecraftforge.event.entity.EntityEventEntityEvent.EnteringSection, EntityEvent.EntityConstructingNested classes/interfaces inherited from class net.minecraftforge.eventbus.api.Eventnet.minecraftforge.eventbus.api.Event.HasResult, net.minecraftforge.eventbus.api.Event.Result
- 
Field SummaryFields
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionbooleanWhether the chunk has changed as part of this event.longA packed version of the new section's position.longA packed version of the old section's position.Methods inherited from class net.minecraftforge.event.entity.EntityEventgetEntityMethods inherited from class net.minecraftforge.eventbus.api.EventgetListenerList, getPhase, getResult, hasResult, isCancelable, isCanceled, setCanceled, setPhase, setResult
- 
Field Details- 
packedOldPosprivate final long packedOldPos
- 
packedNewPosprivate final long packedNewPos
 
- 
- 
Constructor Details- 
EnteringSection
 
- 
- 
Method Details- 
getPackedOldPospublic long getPackedOldPos()A packed version of the old section's position. This is to be used with the various methods inSectionPos, such asSectionPos.of(long)orSectionPos.x(long)to avoid allocation.- Returns:
- the packed position of the old section
 
- 
getPackedNewPospublic long getPackedNewPos()A packed version of the new section's position. This is to be used with the various methods inSectionPos, such asSectionPos.of(long)orSectionPos.x(long)to avoid allocation.- Returns:
- the packed position of the new section
 
- 
getOldPos- Returns:
- the position of the old section
 
- 
getNewPos- Returns:
- the position of the new section
 
- 
didChunkChangepublic boolean didChunkChange()Whether the chunk has changed as part of this event. If this method returns false, only the Y position of the section has changed.
 
-