Package com.hbm_m.block.entity.machines
Class FluidExhaustBlockEntity
java.lang.Object
net.minecraftforge.common.capabilities.CapabilityProvider<net.minecraft.world.level.block.entity.BlockEntity>
net.minecraft.world.level.block.entity.BlockEntity
com.hbm_m.block.entity.machines.FluidExhaustBlockEntity
- All Implemented Interfaces:
IFluidConnectorMK2,IFluidPipeMK2,net.minecraftforge.common.capabilities.ICapabilityProvider,net.minecraftforge.common.capabilities.ICapabilityProviderImpl<net.minecraft.world.level.block.entity.BlockEntity>,net.minecraftforge.common.capabilities.ICapabilitySerializable<net.minecraft.nbt.CompoundTag>,net.minecraftforge.common.extensions.IForgeBlockEntity,net.minecraftforge.common.util.INBTSerializable<net.minecraft.nbt.CompoundTag>
public class FluidExhaustBlockEntity
extends net.minecraft.world.level.block.entity.BlockEntity
implements IFluidPipeMK2
BlockEntity выхлопной трубы (порт TileEntityPipeExhaust из 1.7.10).
Особенность: создаёт три отдельных FluidNode на одной позиции —
для SMOKE, SMOKE_LEADED и SMOKE_POISON.
canConnect разрешает подключение только к этим трём типам.
Типы дыма задаются через ModFluids (аналог Fluids.SMOKE_* из 1.7.10).
-
Nested Class Summary
Nested classes/interfaces inherited from class net.minecraftforge.common.capabilities.CapabilityProvider
net.minecraftforge.common.capabilities.CapabilityProvider.AsField<B extends net.minecraftforge.common.capabilities.ICapabilityProviderImpl<B>> -
Field Summary
Fields inherited from class net.minecraft.world.level.block.entity.BlockEntity
level, remove, worldPositionFields inherited from interface net.minecraftforge.common.extensions.IForgeBlockEntity
INFINITE_EXTENT_AABB -
Constructor Summary
ConstructorsConstructorDescriptionFluidExhaustBlockEntity(net.minecraft.core.BlockPos pos, net.minecraft.world.level.block.state.BlockState state) -
Method Summary
Modifier and TypeMethodDescriptionbooleancanConnect(net.minecraft.world.level.material.Fluid fluid, net.minecraft.core.Direction fromDir) Может ли этот коннектор принимать/отдавать жидкость указанного типа с указанной стороны.net.minecraft.world.level.material.Fluidnet.minecraft.network.protocol.Packet<net.minecraft.network.protocol.game.ClientGamePacketListener>net.minecraft.nbt.CompoundTagvoidload(net.minecraft.nbt.CompoundTag tag) voidvoidonLoad()protected voidsaveAdditional(net.minecraft.nbt.CompoundTag tag) voidstatic voidtick(net.minecraft.world.level.Level level, net.minecraft.core.BlockPos pos, net.minecraft.world.level.block.state.BlockState state, FluidExhaustBlockEntity entity) Methods inherited from class net.minecraft.world.level.block.entity.BlockEntity
addEntityType, clearRemoved, fillCrashReportCategory, getBlockPos, getBlockState, getLevel, getPersistentData, getPosFromTag, getType, hasLevel, isRemoved, loadStatic, onlyOpCanSetNbt, saveToItem, saveWithFullMetadata, saveWithId, saveWithoutMetadata, setBlockState, setChanged, setChanged, setLevel, triggerEventMethods inherited from class net.minecraftforge.common.capabilities.CapabilityProvider
areCapsCompatible, areCapsCompatible, deserializeCaps, gatherCapabilities, gatherCapabilities, gatherCapabilities, getCapabilities, getCapability, invalidateCaps, reviveCaps, serializeCapsMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface net.minecraftforge.common.capabilities.ICapabilityProvider
getCapability, getCapabilityMethods inherited from interface com.hbm_m.api.fluids.IFluidPipeMK2
createNodeMethods inherited from interface net.minecraftforge.common.extensions.IForgeBlockEntity
deserializeNBT, getModelData, getRenderBoundingBox, handleUpdateTag, hasCustomOutlineRendering, onDataPacket, requestModelDataUpdate, serializeNBT
-
Constructor Details
-
FluidExhaustBlockEntity
public FluidExhaustBlockEntity(net.minecraft.core.BlockPos pos, net.minecraft.world.level.block.state.BlockState state)
-
-
Method Details
-
getFluidType
public net.minecraft.world.level.material.Fluid getFluidType()- Specified by:
getFluidTypein interfaceIFluidPipeMK2
-
canConnect
public boolean canConnect(net.minecraft.world.level.material.Fluid fluid, net.minecraft.core.Direction fromDir) Description copied from interface:IFluidConnectorMK2Может ли этот коннектор принимать/отдавать жидкость указанного типа с указанной стороны.- Specified by:
canConnectin interfaceIFluidConnectorMK2- Parameters:
fluid- тип жидкостиfromDir- направление ОТ ЭТОГО узла к соседу (сторона, через которую идёт соединение)
-
onLoad
public void onLoad()- Specified by:
onLoadin interfacenet.minecraftforge.common.extensions.IForgeBlockEntity
-
setRemoved
public void setRemoved()- Overrides:
setRemovedin classnet.minecraft.world.level.block.entity.BlockEntity
-
onChunkUnloaded
public void onChunkUnloaded()- Specified by:
onChunkUnloadedin interfacenet.minecraftforge.common.extensions.IForgeBlockEntity- Overrides:
onChunkUnloadedin classnet.minecraft.world.level.block.entity.BlockEntity
-
tick
public static void tick(net.minecraft.world.level.Level level, net.minecraft.core.BlockPos pos, net.minecraft.world.level.block.state.BlockState state, FluidExhaustBlockEntity entity) -
saveAdditional
protected void saveAdditional(@NotNull net.minecraft.nbt.CompoundTag tag) - Overrides:
saveAdditionalin classnet.minecraft.world.level.block.entity.BlockEntity
-
load
public void load(@NotNull net.minecraft.nbt.CompoundTag tag) - Overrides:
loadin classnet.minecraft.world.level.block.entity.BlockEntity
-
getUpdateTag
public net.minecraft.nbt.CompoundTag getUpdateTag()- Overrides:
getUpdateTagin classnet.minecraft.world.level.block.entity.BlockEntity
-
getUpdatePacket
public net.minecraft.network.protocol.Packet<net.minecraft.network.protocol.game.ClientGamePacketListener> getUpdatePacket()- Overrides:
getUpdatePacketin classnet.minecraft.world.level.block.entity.BlockEntity
-