Class PartTypePanelLightDynamic
java.lang.Object
org.cyclops.integrateddynamics.api.part.PartTypeAdapter<PartTypePanelLightDynamic,PartTypePanelLightDynamic.State>
org.cyclops.integrateddynamics.core.part.PartTypeBase<PartTypePanelLightDynamic,PartTypePanelLightDynamic.State>
org.cyclops.integrateddynamics.core.part.panel.PartTypePanel<PartTypePanelLightDynamic,PartTypePanelLightDynamic.State>
org.cyclops.integrateddynamics.core.part.panel.PartTypePanelVariableDriven<PartTypePanelLightDynamic,PartTypePanelLightDynamic.State>
org.cyclops.integrateddynamics.part.PartTypePanelLightDynamic
- All Implemented Interfaces:
INetworkEventListener<IPartNetworkElement<PartTypePanelLightDynamic,,PartTypePanelLightDynamic.State>> IPartType<PartTypePanelLightDynamic,,PartTypePanelLightDynamic.State> IPartTypeActiveVariable<PartTypePanelLightDynamic,PartTypePanelLightDynamic.State>
public class PartTypePanelLightDynamic
extends PartTypePanelVariableDriven<PartTypePanelLightDynamic,PartTypePanelLightDynamic.State>
A part that can display variables.
-
Nested Class Summary
Nested ClassesNested 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> -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected net.minecraft.world.level.block.BlockcreateBlock(org.cyclops.cyclopscore.config.extendedconfig.BlockConfig blockConfig) Factory method for creating a block instance.intprotected intgetLightLevel(PartTypePanelLightDynamic.State state, IValue value) protected IgnoredBlockStatus.StatusvoidonBlockNeighborChange(INetwork network, IPartNetwork partNetwork, PartTarget target, PartTypePanelLightDynamic.State 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.voidonNetworkRemoval(INetwork network, IPartNetwork partNetwork, PartTarget target, PartTypePanelLightDynamic.State state) Called when this element is removed from the network.voidonPostRemoved(INetwork network, IPartNetwork partNetwork, PartTarget target, PartTypePanelLightDynamic.State state) Called after this element has been removed.protected voidonValueChanged(INetwork network, IPartNetwork partNetwork, PartTarget target, PartTypePanelLightDynamic.State state, IValue lastValue, IValue newValue) voidpostUpdate(INetwork network, IPartNetwork partNetwork, PartTarget target, PartTypePanelLightDynamic.State state, boolean updated) Called after the element was updated or not.static voidsetLightLevel(PartTarget target, int lightLevel) booleanMethods inherited from class org.cyclops.integrateddynamics.core.part.panel.PartTypePanelVariableDriven
addDrops, constructNetworkEventActions, getActiveVariable, getBlockState, getContainerProvider, hasActiveVariable, isUpdate, loadTooltip, onPartActivated, onVariableContentsUpdated, shouldTriggerBlockRenderUpdate, update, writeExtraGuiDataMethods inherited from class org.cyclops.integrateddynamics.core.part.PartTypeBase
createItem, createNetworkElement, createTranslationKey, forceLightTransparency, getBaseBlockState, getBlockModelPath, getMod, getModId, getSubscribedEvents, getUniqueName, hasEventSubscriptions, loadTooltip, onEvent, registerBlockMethods 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, onNetworkAddition, onOffsetVariablesChanged, onPreRemoved, setEnabled, setPriorityAndChannel, setTargetOffset, setTargetSideOverride, setUpdateInterval, toNBT, updateTickMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.cyclops.integrateddynamics.api.network.INetworkEventListener
getSubscribedEvents, hasEventSubscriptions, onEventMethods inherited from interface org.cyclops.integrateddynamics.api.part.IPartType
afterNetworkAlive, afterNetworkReAlive, beforeNetworkKill, createNetworkElement, defaultBlockState, forceLightTransparency, fromNBT, getBaseBlockState, getBlockModelPath, getChannel, getCloneItemStack, getContainerProviderOffsets, getContainerProviderSettings, getItem, getItemStack, getMinimumUpdateInterval, getPartRenderPosition, getPriority, getState, getTarget, getTargetOffset, getTargetSideOverride, getTranslationKey, getUniqueName, getUpdateInterval, isEnabled, isSolid, loadTooltip, onNetworkAddition, onOffsetVariablesChanged, onPreRemoved, setEnabled, setPriorityAndChannel, setTargetOffset, setTargetSideOverride, setUpdateInterval, toNBT, updateTick, writeExtraGuiDataOffsets, writeExtraGuiDataSettings
-
Constructor Details
-
PartTypePanelLightDynamic
-
-
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:PartTypeBaseFactory method for creating a block instance.- Overrides:
createBlockin classPartTypePanelVariableDriven<PartTypePanelLightDynamic,PartTypePanelLightDynamic.State> - Parameters:
blockConfig- The config to register the block for.- Returns:
- The block instance.
-
constructDefaultState
- Specified by:
constructDefaultStatein classPartTypeAdapter<PartTypePanelLightDynamic,PartTypePanelLightDynamic.State> - Returns:
- Constructor call for a new default state for this part type.
-
getConsumptionRate
- Specified by:
getConsumptionRatein interfaceIPartType<PartTypePanelLightDynamic,PartTypePanelLightDynamic.State> - Overrides:
getConsumptionRatein classPartTypeAdapter<PartTypePanelLightDynamic,PartTypePanelLightDynamic.State> - Parameters:
state- The state- Returns:
- The consumption rate of this part for the given state.
-
getStatus
- Overrides:
getStatusin classPartTypePanelVariableDriven<PartTypePanelLightDynamic,PartTypePanelLightDynamic.State>
-
onValueChanged
protected void onValueChanged(INetwork network, IPartNetwork partNetwork, PartTarget target, PartTypePanelLightDynamic.State state, IValue lastValue, IValue newValue) -
getLightLevel
-
onNetworkRemoval
public void onNetworkRemoval(INetwork network, IPartNetwork partNetwork, PartTarget target, PartTypePanelLightDynamic.State state) Description copied from interface:IPartTypeCalled when this element is removed from the network.- Specified by:
onNetworkRemovalin interfaceIPartType<PartTypePanelLightDynamic,PartTypePanelLightDynamic.State> - Overrides:
onNetworkRemovalin classPartTypeAdapter<PartTypePanelLightDynamic,PartTypePanelLightDynamic.State> - 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, PartTypePanelLightDynamic.State state) Description copied from interface:IPartTypeCalled after this element has been removed.- Specified by:
onPostRemovedin interfaceIPartType<PartTypePanelLightDynamic,PartTypePanelLightDynamic.State> - Overrides:
onPostRemovedin classPartTypeAdapter<PartTypePanelLightDynamic,PartTypePanelLightDynamic.State> - Parameters:
network- The network.partNetwork- The part network to update in.target- The target block.state- The state
-
onBlockNeighborChange
public void onBlockNeighborChange(INetwork network, IPartNetwork partNetwork, PartTarget target, PartTypePanelLightDynamic.State state, net.minecraft.world.level.BlockGetter world, net.minecraft.world.level.block.Block neighbourBlock, net.minecraft.core.BlockPos neighbourPos) Description copied from interface:IPartTypeCalled 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:
onBlockNeighborChangein interfaceIPartType<PartTypePanelLightDynamic,PartTypePanelLightDynamic.State> - Overrides:
onBlockNeighborChangein classPartTypeAdapter<PartTypePanelLightDynamic,PartTypePanelLightDynamic.State> - 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.
-
postUpdate
public void postUpdate(INetwork network, IPartNetwork partNetwork, PartTarget target, PartTypePanelLightDynamic.State state, boolean updated) Description copied from interface:IPartTypeCalled 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:
postUpdatein interfaceIPartType<PartTypePanelLightDynamic,PartTypePanelLightDynamic.State> - Overrides:
postUpdatein classPartTypeAdapter<PartTypePanelLightDynamic,PartTypePanelLightDynamic.State> - 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.
-
setLightLevel
-