Class SidedFilteringBehaviour
java.lang.Object
com.simibubi.create.foundation.blockEntity.behaviour.BlockEntityBehaviour
com.simibubi.create.foundation.blockEntity.behaviour.filtering.FilteringBehaviour
com.simibubi.create.foundation.blockEntity.behaviour.filtering.SidedFilteringBehaviour
- All Implemented Interfaces:
ClipboardCloneable,ValueSettingsBehaviour
-
Nested Class Summary
Nested classes/interfaces inherited from interface com.simibubi.create.foundation.blockEntity.behaviour.ValueSettingsBehaviour
ValueSettingsBehaviour.ValueSettings -
Field Summary
Fields inherited from class com.simibubi.create.foundation.blockEntity.behaviour.filtering.FilteringBehaviour
count, customLabel, filter, TYPE, upToFields inherited from class com.simibubi.create.foundation.blockEntity.behaviour.BlockEntityBehaviour
blockEntity -
Constructor Summary
ConstructorsConstructorDescriptionSidedFilteringBehaviour(SmartBlockEntity be, ValueBoxTransform.Sided sidedSlot, BiFunction<net.minecraft.core.Direction, FilteringBehaviour, FilteringBehaviour> filterFactory, Predicate<net.minecraft.core.Direction> validDirections) -
Method Summary
Modifier and TypeMethodDescriptionvoiddestroy()Block destroyed or removed.get(net.minecraft.core.Direction side) net.minecraft.world.item.ItemStackgetFilter(net.minecraft.core.Direction side) voidvoidread(net.minecraft.nbt.CompoundTag nbt, net.minecraft.core.HolderLookup.Provider registries, boolean clientPacket) voidremoveFilter(net.minecraft.core.Direction side) booleansetFilter(net.minecraft.core.Direction side, net.minecraft.world.item.ItemStack stack) booleantest(net.minecraft.core.Direction side, net.minecraft.world.item.ItemStack stack) booleantestHit(net.minecraft.world.level.LevelAccessor level, net.minecraft.core.BlockPos pos, net.minecraft.core.Direction direction, net.minecraft.world.phys.Vec3 hit) voidtick()voidvoidwrite(net.minecraft.nbt.CompoundTag nbt, net.minecraft.core.HolderLookup.Provider registries, boolean clientPacket) Methods inherited from class com.simibubi.create.foundation.blockEntity.behaviour.filtering.FilteringBehaviour
acceptsValueSettings, anyAmount, bypassesInput, canShortInteract, createBoard, forFluids, formatValue, forRecipes, getAmount, getAmountTip, getClipboardKey, getCountLabelForValueBox, getFilter, getLabel, getRenderDistance, getSlotPositioning, getTip, getType, getValueSettings, isActive, isCountVisible, isRecipeFilter, isSafeNBT, netId, onlyActiveWhen, onShortInteract, readFromClipboard, setFilter, setLabel, setValueSettings, showCount, showCountWhen, test, test, testHit, withCallback, withPredicate, writeToClipboardMethods inherited from class com.simibubi.create.foundation.blockEntity.behaviour.BlockEntityBehaviour
get, get, getPos, getWorld, lazyTick, onBlockChanged, onNeighborChanged, setLazyTickRate, unload, writeSafeMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.simibubi.create.foundation.blockEntity.behaviour.ValueSettingsBehaviour
mayInteract, newSettingHovered, onlyVisibleWithWrench, playFeedbackSound
-
Constructor Details
-
SidedFilteringBehaviour
public SidedFilteringBehaviour(SmartBlockEntity be, ValueBoxTransform.Sided sidedSlot, BiFunction<net.minecraft.core.Direction, FilteringBehaviour, FilteringBehaviour> filterFactory, Predicate<net.minecraft.core.Direction> validDirections)
-
-
Method Details
-
initialize
public void initialize()- Overrides:
initializein classBlockEntityBehaviour
-
get
-
updateFilterPresence
public void updateFilterPresence() -
write
public void write(net.minecraft.nbt.CompoundTag nbt, net.minecraft.core.HolderLookup.Provider registries, boolean clientPacket) - Overrides:
writein classFilteringBehaviour
-
read
public void read(net.minecraft.nbt.CompoundTag nbt, net.minecraft.core.HolderLookup.Provider registries, boolean clientPacket) - Overrides:
readin classFilteringBehaviour
-
tick
public void tick()- Overrides:
tickin classBlockEntityBehaviour
-
setFilter
public boolean setFilter(net.minecraft.core.Direction side, net.minecraft.world.item.ItemStack stack) - Overrides:
setFilterin classFilteringBehaviour
-
getFilter
public net.minecraft.world.item.ItemStack getFilter(net.minecraft.core.Direction side) - Overrides:
getFilterin classFilteringBehaviour
-
test
public boolean test(net.minecraft.core.Direction side, net.minecraft.world.item.ItemStack stack) -
destroy
public void destroy()Description copied from class:BlockEntityBehaviourBlock destroyed or removed. Requires block to call ITE::onRemove- Overrides:
destroyin classFilteringBehaviour
-
getRequiredItems
- Overrides:
getRequiredItemsin classFilteringBehaviour
-
removeFilter
public void removeFilter(net.minecraft.core.Direction side) -
testHit
public boolean testHit(net.minecraft.world.level.LevelAccessor level, net.minecraft.core.BlockPos pos, net.minecraft.core.Direction direction, net.minecraft.world.phys.Vec3 hit)
-