Search in sources :

Example 1 with TankManipulationBehaviour

use of com.simibubi.create.foundation.tileEntity.behaviour.inventory.TankManipulationBehaviour in project Create by Creators-of-Create.

the class StockpileSwitchTileEntity method addBehaviours.

@Override
public void addBehaviours(List<TileEntityBehaviour> behaviours) {
    filtering = new FilteringBehaviour(this, new FilteredDetectorFilterSlot()).moveText(new Vec3(0, 5, 0)).withCallback($ -> updateCurrentLevel());
    behaviours.add(filtering);
    InterfaceProvider towardBlockFacing = InterfaceProvider.towardBlockFacing();
    behaviours.add(observedInventory = new InvManipulationBehaviour(this, towardBlockFacing).bypassSidedness());
    behaviours.add(observedTank = new TankManipulationBehaviour(this, towardBlockFacing).bypassSidedness());
}
Also used : IItemHandler(net.minecraftforge.items.IItemHandler) IFluidHandler(net.minecraftforge.fluids.capability.IFluidHandler) TileEntityBehaviour(com.simibubi.create.foundation.tileEntity.TileEntityBehaviour) InterfaceProvider(com.simibubi.create.foundation.tileEntity.behaviour.inventory.CapManipulationBehaviourBase.InterfaceProvider) InvManipulationBehaviour(com.simibubi.create.foundation.tileEntity.behaviour.inventory.InvManipulationBehaviour) TankManipulationBehaviour(com.simibubi.create.foundation.tileEntity.behaviour.inventory.TankManipulationBehaviour) BlockState(net.minecraft.world.level.block.state.BlockState) FilteringBehaviour(com.simibubi.create.foundation.tileEntity.behaviour.filtering.FilteringBehaviour) SmartTileEntity(com.simibubi.create.foundation.tileEntity.SmartTileEntity) TickPriority(net.minecraft.world.ticks.TickPriority) List(java.util.List) CompoundTag(net.minecraft.nbt.CompoundTag) BlockPos(net.minecraft.core.BlockPos) BlockEntityType(net.minecraft.world.level.block.entity.BlockEntityType) Vec3(net.minecraft.world.phys.Vec3) Block(net.minecraft.world.level.block.Block) FluidStack(net.minecraftforge.fluids.FluidStack) ItemStack(net.minecraft.world.item.ItemStack) Mth(net.minecraft.util.Mth) FilteringBehaviour(com.simibubi.create.foundation.tileEntity.behaviour.filtering.FilteringBehaviour) Vec3(net.minecraft.world.phys.Vec3) InvManipulationBehaviour(com.simibubi.create.foundation.tileEntity.behaviour.inventory.InvManipulationBehaviour) InterfaceProvider(com.simibubi.create.foundation.tileEntity.behaviour.inventory.CapManipulationBehaviourBase.InterfaceProvider) TankManipulationBehaviour(com.simibubi.create.foundation.tileEntity.behaviour.inventory.TankManipulationBehaviour)

Example 2 with TankManipulationBehaviour

use of com.simibubi.create.foundation.tileEntity.behaviour.inventory.TankManipulationBehaviour in project Create by Creators-of-Create.

the class ContentObserverTileEntity method addBehaviours.

@Override
public void addBehaviours(List<TileEntityBehaviour> behaviours) {
    filtering = new FilteringBehaviour(this, new FilteredDetectorFilterSlot()).moveText(new Vec3(0, 5, 0));
    behaviours.add(filtering);
    InterfaceProvider towardBlockFacing = InterfaceProvider.towardBlockFacing();
    behaviours.add(observedInventory = new InvManipulationBehaviour(this, towardBlockFacing).bypassSidedness());
    behaviours.add(observedTank = new TankManipulationBehaviour(this, towardBlockFacing).bypassSidedness());
}
Also used : FilteringBehaviour(com.simibubi.create.foundation.tileEntity.behaviour.filtering.FilteringBehaviour) Vec3(net.minecraft.world.phys.Vec3) InvManipulationBehaviour(com.simibubi.create.foundation.tileEntity.behaviour.inventory.InvManipulationBehaviour) InterfaceProvider(com.simibubi.create.foundation.tileEntity.behaviour.inventory.CapManipulationBehaviourBase.InterfaceProvider) TankManipulationBehaviour(com.simibubi.create.foundation.tileEntity.behaviour.inventory.TankManipulationBehaviour)

Aggregations

FilteringBehaviour (com.simibubi.create.foundation.tileEntity.behaviour.filtering.FilteringBehaviour)2 InterfaceProvider (com.simibubi.create.foundation.tileEntity.behaviour.inventory.CapManipulationBehaviourBase.InterfaceProvider)2 InvManipulationBehaviour (com.simibubi.create.foundation.tileEntity.behaviour.inventory.InvManipulationBehaviour)2 TankManipulationBehaviour (com.simibubi.create.foundation.tileEntity.behaviour.inventory.TankManipulationBehaviour)2 Vec3 (net.minecraft.world.phys.Vec3)2 SmartTileEntity (com.simibubi.create.foundation.tileEntity.SmartTileEntity)1 TileEntityBehaviour (com.simibubi.create.foundation.tileEntity.TileEntityBehaviour)1 List (java.util.List)1 BlockPos (net.minecraft.core.BlockPos)1 CompoundTag (net.minecraft.nbt.CompoundTag)1 Mth (net.minecraft.util.Mth)1 ItemStack (net.minecraft.world.item.ItemStack)1 Block (net.minecraft.world.level.block.Block)1 BlockEntityType (net.minecraft.world.level.block.entity.BlockEntityType)1 BlockState (net.minecraft.world.level.block.state.BlockState)1 TickPriority (net.minecraft.world.ticks.TickPriority)1 FluidStack (net.minecraftforge.fluids.FluidStack)1 IFluidHandler (net.minecraftforge.fluids.capability.IFluidHandler)1 IItemHandler (net.minecraftforge.items.IItemHandler)1