Class DiskDriveNetworkNode
java.lang.Object
com.refinedmods.refinedstorage.apiimpl.network.node.NetworkNode
com.refinedmods.refinedstorage.apiimpl.network.node.diskdrive.DiskDriveNetworkNode
- All Implemented Interfaces:
INetworkNodeVisitor
,INetworkNode
,IStorageDiskContainerContext
,IStorageProvider
,IAccessType
,IComparable
,IPrioritizable
,IType
,IWhitelistBlacklist
public class DiskDriveNetworkNode
extends NetworkNode
implements IStorageProvider, IComparable, IWhitelistBlacklist, IPrioritizable, IType, IAccessType, IStorageDiskContainerContext
-
Nested Class Summary
Nested classes/interfaces inherited from interface com.refinedmods.refinedstorage.api.network.INetworkNodeVisitor
INetworkNodeVisitor.Operator
-
Field Summary
Fields inherited from class com.refinedmods.refinedstorage.apiimpl.network.node.NetworkNode
level, network, owner, pos, redstoneMode, ticks, version
Fields inherited from interface com.refinedmods.refinedstorage.blockentity.config.IType
FLUIDS, ITEMS
Fields inherited from interface com.refinedmods.refinedstorage.blockentity.config.IWhitelistBlacklist
BLACKLIST, WHITELIST
-
Constructor Summary
ConstructorDescriptionDiskDriveNetworkNode
(net.minecraft.world.level.Level level, net.minecraft.core.BlockPos pos) -
Method Summary
Modifier and TypeMethodDescriptionvoid
addFluidStorages
(List<IStorage<net.neoforged.neoforge.fluids.FluidStack>> storages) void
addItemStorages
(List<IStorage<net.minecraft.world.item.ItemStack>> storages) int
net.neoforged.neoforge.items.IItemHandler
getDisks()
net.neoforged.neoforge.items.IItemHandler
getDrops()
int
net.minecraft.resources.ResourceLocation
getId()
net.neoforged.neoforge.items.IItemHandlerModifiable
int
int
getType()
int
void
onConnectedStateChange
(INetwork network, boolean state, ConnectivityStateChangeCause cause) void
read
(net.minecraft.nbt.CompoundTag tag) void
readConfiguration
(net.minecraft.nbt.CompoundTag tag) void
setAccessType
(AccessType value) void
setCompare
(int compare) void
setPriority
(int priority) void
setType
(int type) void
setWhitelistBlacklistMode
(int mode) void
update()
Updates a network node.net.minecraft.nbt.CompoundTag
write
(net.minecraft.nbt.CompoundTag tag) Writes the network node data to NBT.net.minecraft.nbt.CompoundTag
writeConfiguration
(net.minecraft.nbt.CompoundTag tag) Methods inherited from class com.refinedmods.refinedstorage.apiimpl.network.node.NetworkNode
canConduct, canUpdate, getDirection, getFacingBlockEntity, getItemStack, getLevel, getNetwork, getOwner, getPos, getRedstoneMode, getUpdateThrottleActiveToInactive, getUpdateThrottleInactiveToActive, isActive, markDirty, onConnected, onDirectionChanged, onDisconnected, setOwner, setRedstoneMode, setRedstonePowered, shouldRebuildGraphOnChange, visit
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface com.refinedmods.refinedstorage.api.network.node.INetworkNode
canReceive
-
Field Details
-
ID
public static final net.minecraft.resources.ResourceLocation ID
-
-
Constructor Details
-
DiskDriveNetworkNode
public DiskDriveNetworkNode(net.minecraft.world.level.Level level, net.minecraft.core.BlockPos pos)
-
-
Method Details
-
getItemDisks
-
getFluidDisks
-
getEnergyUsage
public int getEnergyUsage()- Specified by:
getEnergyUsage
in interfaceINetworkNode
- Returns:
- the energy usage of this node
-
update
public void update()Description copied from interface:INetworkNode
Updates a network node.- Specified by:
update
in interfaceINetworkNode
- Overrides:
update
in classNetworkNode
-
onConnectedStateChange
public void onConnectedStateChange(INetwork network, boolean state, ConnectivityStateChangeCause cause) - Overrides:
onConnectedStateChange
in classNetworkNode
-
addItemStorages
- Specified by:
addItemStorages
in interfaceIStorageProvider
- Parameters:
storages
- the item storages
-
addFluidStorages
- Specified by:
addFluidStorages
in interfaceIStorageProvider
- Parameters:
storages
- the fluid storages
-
read
public void read(net.minecraft.nbt.CompoundTag tag) - Overrides:
read
in classNetworkNode
-
getId
public net.minecraft.resources.ResourceLocation getId()- Specified by:
getId
in interfaceINetworkNode
- Returns:
- the id of this node as specified in
INetworkNodeRegistry
-
write
public net.minecraft.nbt.CompoundTag write(net.minecraft.nbt.CompoundTag tag) Description copied from interface:INetworkNode
Writes the network node data to NBT.- Specified by:
write
in interfaceINetworkNode
- Overrides:
write
in classNetworkNode
- Parameters:
tag
- the tag- Returns:
- the written tag
-
writeConfiguration
public net.minecraft.nbt.CompoundTag writeConfiguration(net.minecraft.nbt.CompoundTag tag) - Overrides:
writeConfiguration
in classNetworkNode
-
readConfiguration
public void readConfiguration(net.minecraft.nbt.CompoundTag tag) - Overrides:
readConfiguration
in classNetworkNode
-
getCompare
public int getCompare()- Specified by:
getCompare
in interfaceIComparable
-
setCompare
public void setCompare(int compare) - Specified by:
setCompare
in interfaceIComparable
-
getWhitelistBlacklistMode
public int getWhitelistBlacklistMode()- Specified by:
getWhitelistBlacklistMode
in interfaceIWhitelistBlacklist
-
setWhitelistBlacklistMode
public void setWhitelistBlacklistMode(int mode) - Specified by:
setWhitelistBlacklistMode
in interfaceIWhitelistBlacklist
-
getAccessType
- Specified by:
getAccessType
in interfaceIAccessType
- Specified by:
getAccessType
in interfaceIStorageDiskContainerContext
- Returns:
- the access type
-
setAccessType
- Specified by:
setAccessType
in interfaceIAccessType
-
getPriority
public int getPriority()- Specified by:
getPriority
in interfaceIPrioritizable
-
setPriority
public void setPriority(int priority) - Specified by:
setPriority
in interfaceIPrioritizable
-
getDiskState
-
getDisks
public net.neoforged.neoforge.items.IItemHandler getDisks() -
getType
public int getType() -
setType
public void setType(int type) -
getItemFilters
public net.neoforged.neoforge.items.IItemHandlerModifiable getItemFilters()- Specified by:
getItemFilters
in interfaceIType
-
getFluidFilters
- Specified by:
getFluidFilters
in interfaceIType
-
getDrops
public net.neoforged.neoforge.items.IItemHandler getDrops()- Overrides:
getDrops
in classNetworkNode
-