Class PartTypePanelLightStatic
java.lang.Object
org.cyclops.integrateddynamics.api.part.PartTypeAdapter<PartTypePanelLightStatic,PartStateEmpty<PartTypePanelLightStatic>>
org.cyclops.integrateddynamics.core.part.PartTypeBase<PartTypePanelLightStatic,PartStateEmpty<PartTypePanelLightStatic>>
org.cyclops.integrateddynamics.core.part.panel.PartTypePanel<PartTypePanelLightStatic,PartStateEmpty<PartTypePanelLightStatic>>
org.cyclops.integrateddynamics.part.PartTypePanelLightStatic
- All Implemented Interfaces:
INetworkEventListener<IPartNetworkElement<PartTypePanelLightStatic,
,PartStateEmpty<PartTypePanelLightStatic>>> IPartType<PartTypePanelLightStatic,
PartStateEmpty<PartTypePanelLightStatic>>
public class PartTypePanelLightStatic
extends PartTypePanel<PartTypePanelLightStatic,PartStateEmpty<PartTypePanelLightStatic>>
A panel part that simply emits light.
-
Nested Class Summary
Nested classes/interfaces inherited from class org.cyclops.integrateddynamics.core.part.PartTypeBase
PartTypeBase.IEventAction<P extends IPartType<P,
S>, S extends IPartState<P>, E extends INetworkEvent> -
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected net.minecraft.world.level.block.Block
createBlock
(org.cyclops.cyclopscore.config.extendedconfig.BlockConfig blockConfig) Factory method for creating a block instance.int
void
onBlockNeighborChange
(INetwork network, IPartNetwork partNetwork, PartTarget target, PartStateEmpty<PartTypePanelLightStatic> state, net.minecraft.world.level.BlockGetter world, net.minecraft.world.level.block.Block neighbourBlock, net.minecraft.core.BlockPos neighbourPos) Called when a neighbouring block is updated, more specifically whenBlockBehaviour.neighborChanged(BlockState, Level, BlockPos, Block, BlockPos, boolean)
,IBlockExtension.onNeighborChange(BlockState, LevelReader, BlockPos, BlockPos)
orBlockBehaviour.updateShape(BlockState, Direction, BlockState, LevelAccessor, BlockPos, BlockPos)
is called.void
onNetworkAddition
(INetwork network, IPartNetwork partNetwork, PartTarget target, PartStateEmpty<PartTypePanelLightStatic> state) Called when this element is added to the network.void
onNetworkRemoval
(INetwork network, IPartNetwork partNetwork, PartTarget target, PartStateEmpty<PartTypePanelLightStatic> state) Called when this element is removed from the network.void
onPostRemoved
(INetwork network, IPartNetwork partNetwork, PartTarget target, PartStateEmpty<PartTypePanelLightStatic> state) Called after this element has been removed.void
postUpdate
(INetwork network, IPartNetwork partNetwork, PartTarget target, PartStateEmpty<PartTypePanelLightStatic> state, boolean updated) Called after the element was updated or not.boolean
Methods inherited from class org.cyclops.integrateddynamics.core.part.PartTypeBase
addDrops, constructNetworkEventActions, createItem, createNetworkElement, createTranslationKey, forceLightTransparency, getBaseBlockState, getBlockModelPath, getBlockState, getMod, getSubscribedEvents, getUniqueName, hasEventSubscriptions, loadTooltip, loadTooltip, onEvent, onPartActivated, registerBlock, writeExtraGuiData
Methods inherited from class org.cyclops.integrateddynamics.api.part.PartTypeAdapter
afterNetworkAlive, afterNetworkReAlive, beforeNetworkKill, defaultBlockState, fromNBT, getChannel, getCloneItemStack, getItemStack, getMinimumUpdateInterval, getPriority, getState, getTarget, getTargetOffset, getTargetSideOverride, getTranslationKey, getUpdateInterval, hasOffsetVariables, isEnabled, isSolid, isUpdate, onOffsetVariablesChanged, onPreRemoved, setEnabled, setPriorityAndChannel, setTargetOffset, setTargetSideOverride, setUpdateInterval, shouldTriggerBlockRenderUpdate, toNBT, update, updateTick
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.cyclops.integrateddynamics.api.part.IPartType
getContainerProvider, getContainerProviderOffsets, getContainerProviderSettings, getItem, getPartRenderPosition, writeExtraGuiDataOffsets, writeExtraGuiDataSettings
-
Field Details
-
LIGHT_LEVEL
public static final int LIGHT_LEVEL- See Also:
-
-
Constructor Details
-
PartTypePanelLightStatic
-
-
Method Details
-
supportsOffsets
public boolean supportsOffsets()- Returns:
- If this part can handle custom offsets.
-
createBlock
protected net.minecraft.world.level.block.Block createBlock(org.cyclops.cyclopscore.config.extendedconfig.BlockConfig blockConfig) Description copied from class:PartTypeBase
Factory method for creating a block instance.- Overrides:
createBlock
in classPartTypePanel<PartTypePanelLightStatic,
PartStateEmpty<PartTypePanelLightStatic>> - Parameters:
blockConfig
- The config to register the block for.- Returns:
- The block instance.
-
constructDefaultState
- Specified by:
constructDefaultState
in classPartTypeAdapter<PartTypePanelLightStatic,
PartStateEmpty<PartTypePanelLightStatic>> - Returns:
- Constructor call for a new default state for this part type.
-
getConsumptionRate
- Specified by:
getConsumptionRate
in interfaceIPartType<PartTypePanelLightStatic,
PartStateEmpty<PartTypePanelLightStatic>> - Overrides:
getConsumptionRate
in classPartTypeAdapter<PartTypePanelLightStatic,
PartStateEmpty<PartTypePanelLightStatic>> - Parameters:
state
- The state- Returns:
- The consumption rate of this part for the given state.
-
onNetworkAddition
public void onNetworkAddition(INetwork network, IPartNetwork partNetwork, PartTarget target, PartStateEmpty<PartTypePanelLightStatic> state) Description copied from interface:IPartType
Called when this element is added to the network.- Specified by:
onNetworkAddition
in interfaceIPartType<PartTypePanelLightStatic,
PartStateEmpty<PartTypePanelLightStatic>> - Overrides:
onNetworkAddition
in classPartTypeAdapter<PartTypePanelLightStatic,
PartStateEmpty<PartTypePanelLightStatic>> - Parameters:
network
- The network to update in.partNetwork
- The part network to update in.target
- The target block.state
- The state
-
onBlockNeighborChange
public void onBlockNeighborChange(INetwork network, IPartNetwork partNetwork, PartTarget target, PartStateEmpty<PartTypePanelLightStatic> state, net.minecraft.world.level.BlockGetter world, net.minecraft.world.level.block.Block neighbourBlock, net.minecraft.core.BlockPos neighbourPos) Description copied from interface:IPartType
Called when a neighbouring block is updated, more specifically whenBlockBehaviour.neighborChanged(BlockState, Level, BlockPos, Block, BlockPos, boolean)
,IBlockExtension.onNeighborChange(BlockState, LevelReader, BlockPos, BlockPos)
orBlockBehaviour.updateShape(BlockState, Direction, BlockState, LevelAccessor, BlockPos, BlockPos)
is called.- Specified by:
onBlockNeighborChange
in interfaceIPartType<PartTypePanelLightStatic,
PartStateEmpty<PartTypePanelLightStatic>> - Overrides:
onBlockNeighborChange
in classPartTypeAdapter<PartTypePanelLightStatic,
PartStateEmpty<PartTypePanelLightStatic>> - Parameters:
network
- The network to update in.partNetwork
- The part network to update in.target
- The target block.state
- The stateworld
- The world in which the neighbour was updated.neighbourBlock
- The block type of the neighbour that was updated.neighbourPos
- The position of the neighbour that was updated.
-
onNetworkRemoval
public void onNetworkRemoval(INetwork network, IPartNetwork partNetwork, PartTarget target, PartStateEmpty<PartTypePanelLightStatic> state) Description copied from interface:IPartType
Called when this element is removed from the network.- Specified by:
onNetworkRemoval
in interfaceIPartType<PartTypePanelLightStatic,
PartStateEmpty<PartTypePanelLightStatic>> - Overrides:
onNetworkRemoval
in classPartTypeAdapter<PartTypePanelLightStatic,
PartStateEmpty<PartTypePanelLightStatic>> - Parameters:
network
- The network to update in.partNetwork
- The part network to update in.target
- The target block.state
- The state
-
onPostRemoved
public void onPostRemoved(INetwork network, IPartNetwork partNetwork, PartTarget target, PartStateEmpty<PartTypePanelLightStatic> state) Description copied from interface:IPartType
Called after this element has been removed.- Specified by:
onPostRemoved
in interfaceIPartType<PartTypePanelLightStatic,
PartStateEmpty<PartTypePanelLightStatic>> - Overrides:
onPostRemoved
in classPartTypeAdapter<PartTypePanelLightStatic,
PartStateEmpty<PartTypePanelLightStatic>> - Parameters:
network
- The network.partNetwork
- The part network to update in.target
- The target block.state
- The state
-
postUpdate
public void postUpdate(INetwork network, IPartNetwork partNetwork, PartTarget target, PartStateEmpty<PartTypePanelLightStatic> state, boolean updated) Description copied from interface:IPartType
Called after the element was updated or not. If the update was not called, this can be because the network did not contain enough energy to let this element work.- Specified by:
postUpdate
in interfaceIPartType<PartTypePanelLightStatic,
PartStateEmpty<PartTypePanelLightStatic>> - Overrides:
postUpdate
in classPartTypeAdapter<PartTypePanelLightStatic,
PartStateEmpty<PartTypePanelLightStatic>> - Parameters:
network
- The network to update in.partNetwork
- The part network to update in.target
- The target block.state
- The stateupdated
- If theINetworkElement.update(INetwork)
was called.
-