Package appeng.api.networking.events
Class GridSpatialEvent
java.lang.Object
appeng.api.networking.events.GridEvent
appeng.api.networking.events.GridSpatialEvent
An event that is posted whenever a spatial IO is active.
-
Field Summary
FieldsModifier and TypeFieldDescriptionfinal double
The energy in AE units needed to perform this transition.final net.minecraft.world.level.Level
The level in which the Spatial I/O block entity triggering this transition is located.final net.minecraft.core.BlockPos
The block position at which the Spatial I/O block entity triggering this transition is located. -
Constructor Summary
ConstructorsConstructorDescriptionGridSpatialEvent
(net.minecraft.world.level.Level spatialIoLevel, net.minecraft.core.BlockPos spatialIoPos, double EnergyUsage) -
Method Summary
Modifier and TypeMethodDescriptionboolean
void
Prevent the Spatial IO transition from happening.
-
Field Details
-
spatialIoLevel
public final net.minecraft.world.level.Level spatialIoLevelThe level in which the Spatial I/O block entity triggering this transition is located. -
spatialIoPos
public final net.minecraft.core.BlockPos spatialIoPosThe block position at which the Spatial I/O block entity triggering this transition is located. -
spatialEnergyUsage
public final double spatialEnergyUsageThe energy in AE units needed to perform this transition.
-
-
Constructor Details
-
GridSpatialEvent
public GridSpatialEvent(net.minecraft.world.level.Level spatialIoLevel, net.minecraft.core.BlockPos spatialIoPos, double EnergyUsage) - Parameters:
spatialIoLevel
- Level where the Spatial IO is locatedspatialIoPos
- Position where the Spatial IO is locatedEnergyUsage
- ( the amount of energy that the SpatialIO uses)
-
-
Method Details
-
preventTransition
public void preventTransition()Prevent the Spatial IO transition from happening. -
isTransitionPrevented
public boolean isTransitionPrevented()- Returns:
- True if the transition into the spatial IO should not be allowed.
-