Package net.minecraft.world.ticks
Class LevelTicks<T>
java.lang.Object
net.minecraft.world.ticks.LevelTicks<T>
- All Implemented Interfaces:
LevelTickAccess<T>
,TickAccess<T>
-
Nested Class Summary
Modifier and TypeClassDescription(package private) static interface
-
Field Summary
Modifier and TypeFieldDescriptionprivate final it.unimi.dsi.fastutil.longs.Long2ObjectMap<LevelChunkTicks<T>>
private final List<ScheduledTick<T>>
private final BiConsumer<LevelChunkTicks<T>,
ScheduledTick<T>> private static final Comparator<LevelChunkTicks<?>>
private final Queue<LevelChunkTicks<T>>
private final it.unimi.dsi.fastutil.longs.Long2LongMap
private final Supplier<ProfilerFiller>
private final LongPredicate
private final Queue<ScheduledTick<T>>
private final Set<ScheduledTick<?>>
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
addContainer
(ChunkPos p_193232_, LevelChunkTicks<T> p_193233_) private void
private boolean
canScheduleMoreTicks
(int p_193215_) private void
void
clearArea
(BoundingBox p_193235_) private void
collectTicks
(long p_193222_, int p_193223_, ProfilerFiller p_193224_) void
copyArea
(BoundingBox p_193243_, Vec3i p_193244_) void
copyAreaFrom
(LevelTicks<T> p_265554_, BoundingBox p_265172_, Vec3i p_265318_) int
count()
private void
drainContainers
(long p_193219_, int p_193220_) private void
drainFromCurrentContainer
(Queue<LevelChunkTicks<T>> p_193268_, LevelChunkTicks<T> p_193269_, long p_193270_, int p_193271_) private void
forContainersInArea
(BoundingBox p_193237_, LevelTicks.PosAndContainerConsumer<T> p_193238_) boolean
hasScheduledTick
(BlockPos p_193254_, T p_193255_) void
removeContainer
(ChunkPos p_193230_) private void
private void
runCollectedTicks
(BiConsumer<BlockPos, T> p_193273_) void
schedule
(ScheduledTick<T> p_193252_) private void
scheduleForThisTick
(ScheduledTick<T> p_193286_) private void
sortContainersToTick
(long p_193217_) void
tick
(long p_193226_, int p_193227_, BiConsumer<BlockPos, T> p_193228_) private void
updateContainerScheduling
(ScheduledTick<T> p_193280_) boolean
willTickThisTick
(BlockPos p_193282_, T p_193283_)
-
Field Details
-
CONTAINER_DRAIN_ORDER
-
tickCheck
-
profiler
-
allContainers
-
nextTickForContainer
private final it.unimi.dsi.fastutil.longs.Long2LongMap nextTickForContainer -
containersToTick
-
toRunThisTick
-
alreadyRunThisTick
-
toRunThisTickSet
-
chunkScheduleUpdater
-
-
Constructor Details
-
LevelTicks
-
-
Method Details
-
addContainer
-
removeContainer
-
schedule
- Specified by:
schedule
in interfaceTickAccess<T>
-
tick
-
collectTicks
-
sortContainersToTick
private void sortContainersToTick(long p_193217_) -
drainContainers
private void drainContainers(long p_193219_, int p_193220_) -
rescheduleLeftoverContainers
private void rescheduleLeftoverContainers() -
updateContainerScheduling
-
drainFromCurrentContainer
private void drainFromCurrentContainer(Queue<LevelChunkTicks<T>> p_193268_, LevelChunkTicks<T> p_193269_, long p_193270_, int p_193271_) -
scheduleForThisTick
-
canScheduleMoreTicks
private boolean canScheduleMoreTicks(int p_193215_) -
runCollectedTicks
-
cleanupAfterTick
private void cleanupAfterTick() -
hasScheduledTick
- Specified by:
hasScheduledTick
in interfaceTickAccess<T>
-
willTickThisTick
- Specified by:
willTickThisTick
in interfaceLevelTickAccess<T>
-
calculateTickSetIfNeeded
private void calculateTickSetIfNeeded() -
forContainersInArea
private void forContainersInArea(BoundingBox p_193237_, LevelTicks.PosAndContainerConsumer<T> p_193238_) -
clearArea
-
copyArea
-
copyAreaFrom
-
count
public int count()- Specified by:
count
in interfaceTickAccess<T>
-