类 TileIOHandler
java.lang.Object
committee.nova.mods.avaritia.core.io.TileIOHandler
IO处理器基础实现类
包含所有通用的方向转换和IO处理逻辑
-
构造器概要
构造器构造器说明TileIOHandler(net.minecraft.world.level.block.entity.BlockEntity tileEntity, net.minecraft.world.level.block.state.properties.DirectionProperty facing) -
方法概要
修饰符和类型方法说明protected final net.minecraft.core.Direction获取方块的实际朝向protected final net.minecraft.core.DirectiongetRelativeDirection(net.minecraft.core.Direction relativeSide, net.minecraft.core.Direction blockFacing) protected final net.minecraft.core.DirectiongetRelativeDirectionFromAbsolute(net.minecraft.core.Direction absoluteDirection, net.minecraft.core.Direction blockFacing) protected voidhandleActiveInput(net.minecraft.core.Direction side) 处理从指定方向的主动输入void处理主动输入输出操作protected voidhandleActiveOutput(net.minecraft.core.Direction side) 处理到指定方向的主动输出protected voidhandleMixedIO(net.minecraft.core.Direction side) 处理指定方向的混合IO(同时支持输入和输出)booleanshouldAllowPassiveIO(@Nullable net.minecraft.core.Direction side) 检查被动IO配置,用于getCapability调用
-
构造器详细资料
-
TileIOHandler
public TileIOHandler(net.minecraft.world.level.block.entity.BlockEntity tileEntity, net.minecraft.world.level.block.state.properties.DirectionProperty facing)
-
-
方法详细资料
-
getRelativeDirection
protected final net.minecraft.core.Direction getRelativeDirection(net.minecraft.core.Direction relativeSide, net.minecraft.core.Direction blockFacing) -
getRelativeDirectionFromAbsolute
protected final net.minecraft.core.Direction getRelativeDirectionFromAbsolute(net.minecraft.core.Direction absoluteDirection, net.minecraft.core.Direction blockFacing) -
getBlockFacing
protected final net.minecraft.core.Direction getBlockFacing()获取方块的实际朝向 -
handleActiveIO
public void handleActiveIO()处理主动输入输出操作 -
handleActiveInput
protected void handleActiveInput(net.minecraft.core.Direction side) 处理从指定方向的主动输入 -
handleActiveOutput
protected void handleActiveOutput(net.minecraft.core.Direction side) 处理到指定方向的主动输出 -
handleMixedIO
protected void handleMixedIO(net.minecraft.core.Direction side) 处理指定方向的混合IO(同时支持输入和输出) -
shouldAllowPassiveIO
public boolean shouldAllowPassiveIO(@Nullable @Nullable net.minecraft.core.Direction side) 检查被动IO配置,用于getCapability调用
-