Class GlobalBlockEntityCacheManager
java.lang.Object
me.desht.pneumaticcraft.common.util.GlobalBlockEntityCacheManager
Helper which allows querying BE's of specific types, like the Universal Sensor, Security Station and Charging Station
This is very important for performance, especially in worlds with many block entities.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classGlobalBlockEntityCacheManager.GlobalTileEntityCache<T extends net.minecraft.world.level.block.entity.BlockEntity> -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetInstance(net.minecraft.world.level.LevelAccessor level) static voidonWorldUnloaded(net.minecraftforge.event.level.LevelEvent.Unload event)
-
Constructor Details
-
GlobalBlockEntityCacheManager
public GlobalBlockEntityCacheManager()
-
-
Method Details
-
getInstance
public static GlobalBlockEntityCacheManager getInstance(@Nullable net.minecraft.world.level.LevelAccessor level) -
onWorldUnloaded
public static void onWorldUnloaded(net.minecraftforge.event.level.LevelEvent.Unload event) -
getUniversalSensors
public GlobalBlockEntityCacheManager.GlobalTileEntityCache<UniversalSensorBlockEntity> getUniversalSensors() -
getChargingStations
public GlobalBlockEntityCacheManager.GlobalTileEntityCache<ChargingStationBlockEntity> getChargingStations() -
getSecurityStations
public GlobalBlockEntityCacheManager.GlobalTileEntityCache<SecurityStationBlockEntity> getSecurityStations() -
getAerialInterfaces
public GlobalBlockEntityCacheManager.GlobalTileEntityCache<AerialInterfaceBlockEntity> getAerialInterfaces()
-