Class FilteringBehaviour
java.lang.Object
com.simibubi.create.foundation.blockEntity.behaviour.BlockEntityBehaviour
com.simibubi.create.foundation.blockEntity.behaviour.filtering.FilteringBehaviour
- All Implemented Interfaces:
ClipboardCloneable,ValueSettingsBehaviour
- Direct Known Subclasses:
FactoryPanelBehaviour,SidedFilteringBehaviour,TableClothFilteringBehaviour
-
Nested Class Summary
Nested classes/interfaces inherited from interface com.simibubi.create.foundation.blockEntity.behaviour.ValueSettingsBehaviour
ValueSettingsBehaviour.ValueSettings -
Field Summary
FieldsModifier and TypeFieldDescriptionintnet.minecraft.network.chat.MutableComponentprotected FilterItemStackstatic final BehaviourType<FilteringBehaviour> booleanFields inherited from class com.simibubi.create.foundation.blockEntity.behaviour.BlockEntityBehaviour
blockEntity -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanbooleanbooleanbypassesInput(net.minecraft.world.item.ItemStack mainhandItem) booleancanShortInteract(net.minecraft.world.item.ItemStack toApply) createBoard(net.minecraft.world.entity.player.Player player, net.minecraft.world.phys.BlockHitResult hitResult) voiddestroy()Block destroyed or removed.net.minecraft.network.chat.MutableComponentintnet.minecraft.network.chat.MutableComponentnet.minecraft.network.chat.MutableComponentnet.minecraft.world.item.ItemStacknet.minecraft.world.item.ItemStackgetFilter(net.minecraft.core.Direction side) net.minecraft.network.chat.MutableComponentgetLabel()floatnet.minecraft.network.chat.MutableComponentgetTip()getType()booleanisActive()booleanbooleanbooleanintnetId()onlyActiveWhen(Supplier<Boolean> condition) voidonShortInteract(net.minecraft.world.entity.player.Player player, net.minecraft.world.InteractionHand hand, net.minecraft.core.Direction side, net.minecraft.world.phys.BlockHitResult hitResult) voidread(net.minecraft.nbt.CompoundTag nbt, net.minecraft.core.HolderLookup.Provider registries, boolean clientPacket) booleanreadFromClipboard(@NotNull net.minecraft.core.HolderLookup.Provider registries, net.minecraft.nbt.CompoundTag tag, net.minecraft.world.entity.player.Player player, net.minecraft.core.Direction side, boolean simulate) booleansetFilter(net.minecraft.core.Direction face, net.minecraft.world.item.ItemStack stack) booleansetFilter(net.minecraft.world.item.ItemStack stack) voidsetLabel(net.minecraft.network.chat.MutableComponent label) voidsetValueSettings(net.minecraft.world.entity.player.Player player, ValueSettingsBehaviour.ValueSettings settings, boolean ctrlDown) showCountWhen(Supplier<Boolean> condition) booleantest(net.minecraft.world.item.ItemStack stack) booleantest(net.neoforged.neoforge.fluids.FluidStack stack) booleantestHit(net.minecraft.world.phys.Vec3 hit) withCallback(Consumer<net.minecraft.world.item.ItemStack> filterCallback) withPredicate(Predicate<net.minecraft.world.item.ItemStack> filterPredicate) voidwrite(net.minecraft.nbt.CompoundTag nbt, net.minecraft.core.HolderLookup.Provider registries, boolean clientPacket) booleanwriteToClipboard(@NotNull net.minecraft.core.HolderLookup.Provider registries, net.minecraft.nbt.CompoundTag tag, net.minecraft.core.Direction side) Methods inherited from class com.simibubi.create.foundation.blockEntity.behaviour.BlockEntityBehaviour
get, get, getPos, getWorld, initialize, lazyTick, onBlockChanged, onNeighborChanged, setLazyTickRate, tick, 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
-
Field Details
-
TYPE
-
customLabel
public net.minecraft.network.chat.MutableComponent customLabel -
filter
-
count
public int count -
upTo
public boolean upTo
-
-
Constructor Details
-
FilteringBehaviour
-
-
Method Details
-
isSafeNBT
public boolean isSafeNBT()- Overrides:
isSafeNBTin classBlockEntityBehaviour
-
write
public void write(net.minecraft.nbt.CompoundTag nbt, net.minecraft.core.HolderLookup.Provider registries, boolean clientPacket) - Overrides:
writein classBlockEntityBehaviour
-
read
public void read(net.minecraft.nbt.CompoundTag nbt, net.minecraft.core.HolderLookup.Provider registries, boolean clientPacket) - Overrides:
readin classBlockEntityBehaviour
-
withCallback
-
withPredicate
public FilteringBehaviour withPredicate(Predicate<net.minecraft.world.item.ItemStack> filterPredicate) -
forRecipes
-
forFluids
-
onlyActiveWhen
-
showCountWhen
-
showCount
-
setFilter
public boolean setFilter(net.minecraft.core.Direction face, net.minecraft.world.item.ItemStack stack) -
setLabel
public void setLabel(net.minecraft.network.chat.MutableComponent label) -
setFilter
public boolean setFilter(net.minecraft.world.item.ItemStack stack) -
setValueSettings
public void setValueSettings(net.minecraft.world.entity.player.Player player, ValueSettingsBehaviour.ValueSettings settings, boolean ctrlDown) - Specified by:
setValueSettingsin interfaceValueSettingsBehaviour
-
getValueSettings
- Specified by:
getValueSettingsin interfaceValueSettingsBehaviour
-
destroy
public void destroy()Description copied from class:BlockEntityBehaviourBlock destroyed or removed. Requires block to call ITE::onRemove- Overrides:
destroyin classBlockEntityBehaviour
-
getRequiredItems
- Overrides:
getRequiredItemsin classBlockEntityBehaviour
-
getFilter
public net.minecraft.world.item.ItemStack getFilter(net.minecraft.core.Direction side) -
getFilter
public net.minecraft.world.item.ItemStack getFilter() -
isCountVisible
public boolean isCountVisible() -
test
public boolean test(net.minecraft.world.item.ItemStack stack) -
test
public boolean test(net.neoforged.neoforge.fluids.FluidStack stack) -
getType
- Specified by:
getTypein classBlockEntityBehaviour
-
testHit
public boolean testHit(net.minecraft.world.phys.Vec3 hit) - Specified by:
testHitin interfaceValueSettingsBehaviour
-
getAmount
public int getAmount() -
anyAmount
public boolean anyAmount() -
acceptsValueSettings
public boolean acceptsValueSettings()- Specified by:
acceptsValueSettingsin interfaceValueSettingsBehaviour
-
isActive
public boolean isActive()- Specified by:
isActivein interfaceValueSettingsBehaviour
-
getSlotPositioning
- Specified by:
getSlotPositioningin interfaceValueSettingsBehaviour
-
createBoard
public ValueSettingsBoard createBoard(net.minecraft.world.entity.player.Player player, net.minecraft.world.phys.BlockHitResult hitResult) - Specified by:
createBoardin interfaceValueSettingsBehaviour
-
formatValue
public net.minecraft.network.chat.MutableComponent formatValue(ValueSettingsBehaviour.ValueSettings value) -
onShortInteract
public void onShortInteract(net.minecraft.world.entity.player.Player player, net.minecraft.world.InteractionHand hand, net.minecraft.core.Direction side, net.minecraft.world.phys.BlockHitResult hitResult) - Specified by:
onShortInteractin interfaceValueSettingsBehaviour
-
canShortInteract
public boolean canShortInteract(net.minecraft.world.item.ItemStack toApply) -
getLabel
public net.minecraft.network.chat.MutableComponent getLabel() -
getTip
public net.minecraft.network.chat.MutableComponent getTip() -
getAmountTip
public net.minecraft.network.chat.MutableComponent getAmountTip() -
getCountLabelForValueBox
public net.minecraft.network.chat.MutableComponent getCountLabelForValueBox() -
getClipboardKey
- Specified by:
getClipboardKeyin interfaceClipboardCloneable- Specified by:
getClipboardKeyin interfaceValueSettingsBehaviour
-
writeToClipboard
public boolean writeToClipboard(@NotNull net.minecraft.core.HolderLookup.Provider registries, net.minecraft.nbt.CompoundTag tag, net.minecraft.core.Direction side) - Specified by:
writeToClipboardin interfaceClipboardCloneable- Specified by:
writeToClipboardin interfaceValueSettingsBehaviour
-
readFromClipboard
public boolean readFromClipboard(@NotNull net.minecraft.core.HolderLookup.Provider registries, net.minecraft.nbt.CompoundTag tag, net.minecraft.world.entity.player.Player player, net.minecraft.core.Direction side, boolean simulate) - Specified by:
readFromClipboardin interfaceClipboardCloneable- Specified by:
readFromClipboardin interfaceValueSettingsBehaviour
-
isRecipeFilter
public boolean isRecipeFilter() -
bypassesInput
public boolean bypassesInput(net.minecraft.world.item.ItemStack mainhandItem) - Specified by:
bypassesInputin interfaceValueSettingsBehaviour
-
netId
public int netId()- Specified by:
netIdin interfaceValueSettingsBehaviour
-
getRenderDistance
public float getRenderDistance()
-