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
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected net.minecraft.world.level.block.BlockcreateBlock(org.cyclops.cyclopscore.config.extendedconfig.BlockConfigCommon<?> blockConfig, net.minecraft.world.level.block.state.BlockBehaviour.Properties properties) Factory method for creating a block instance.intvoidonBlockNeighborChange(INetwork network, IPartNetwork partNetwork, PartTarget target, PartStateEmpty<PartTypePanelLightStatic> state, net.minecraft.world.level.BlockGetter world, net.minecraft.core.Direction side) Called when a neighbouring block is updated, more specifically whenBlockBehaviour.neighborChanged(BlockState, Level, BlockPos, Block, Orientation, boolean),IBlockExtension.onNeighborChange(BlockState, LevelReader, BlockPos, BlockPos)orBlockBehaviour.updateShape(BlockState, LevelReader, ScheduledTickAccess, BlockPos, Direction, BlockPos, BlockState, RandomSource)is called.voidonNetworkAddition(INetwork network, IPartNetwork partNetwork, PartTarget target, PartStateEmpty<PartTypePanelLightStatic> state) Called when this element is added to the network.voidonNetworkRemoval(INetwork network, IPartNetwork partNetwork, PartTarget target, PartStateEmpty<PartTypePanelLightStatic> state) Called when this element is removed from the network.voidonPostRemoved(INetwork network, IPartNetwork partNetwork, PartTarget target, PartStateEmpty<PartTypePanelLightStatic> state) Called after this element has been removed.voidpostUpdate(INetwork network, IPartNetwork partNetwork, PartTarget target, PartStateEmpty<PartTypePanelLightStatic> state, boolean updated) Called after the element was updated or not.booleanMethods inherited from class org.cyclops.integrateddynamics.core.part.PartTypeBase
addDrops, constructNetworkEventActions, createItem, createNetworkElement, createTranslationKey, forceLightTransparency, getBaseBlockState, getBlockModelPath, getBlockState, getMod, getModId, getSubscribedEvents, getUniqueName, hasEventSubscriptions, loadTooltip, loadTooltip, onEvent, onPartActivated, registerBlock, writeExtraGuiDataMethods inherited from class org.cyclops.integrateddynamics.api.part.PartTypeAdapter
afterNetworkAlive, afterNetworkReAlive, beforeNetworkKill, defaultBlockState, deserializeState, getChannel, getCloneItemStack, getItemStack, getMinimumUpdateInterval, getPriority, getState, getTarget, getTargetOffset, getTargetSideOverride, getTranslationKey, getUpdateInterval, hasOffsetVariables, isEnabled, isSolid, isUpdate, onBlockNeighborChange, onOffsetVariablesChanged, onPreRemoved, serializeState, setEnabled, setPriorityAndChannel, setTargetOffset, setTargetSideOverride, setUpdateInterval, shouldTriggerBlockRenderUpdate, update, 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.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.BlockConfigCommon<?> blockConfig, net.minecraft.world.level.block.state.BlockBehaviour.Properties properties) Description copied from class:PartTypeBaseFactory method for creating a block instance.- Overrides:
createBlockin classPartTypePanel<PartTypePanelLightStatic,PartStateEmpty<PartTypePanelLightStatic>> - Parameters:
blockConfig- The config to register the block for.properties-- Returns:
- The block instance.
-
constructDefaultState
- Specified by:
constructDefaultStatein classPartTypeAdapter<PartTypePanelLightStatic,PartStateEmpty<PartTypePanelLightStatic>> - Returns:
- Constructor call for a new default state for this part type.
-
getConsumptionRate
- Specified by:
getConsumptionRatein interfaceIPartType<PartTypePanelLightStatic,PartStateEmpty<PartTypePanelLightStatic>> - Overrides:
getConsumptionRatein 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:IPartTypeCalled when this element is added to the network.- Specified by:
onNetworkAdditionin interfaceIPartType<PartTypePanelLightStatic,PartStateEmpty<PartTypePanelLightStatic>> - Overrides:
onNetworkAdditionin 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, @Nullable net.minecraft.core.Direction side) Description copied from interface:IPartTypeCalled when a neighbouring block is updated, more specifically whenBlockBehaviour.neighborChanged(BlockState, Level, BlockPos, Block, Orientation, boolean),IBlockExtension.onNeighborChange(BlockState, LevelReader, BlockPos, BlockPos)orBlockBehaviour.updateShape(BlockState, LevelReader, ScheduledTickAccess, BlockPos, Direction, BlockPos, BlockState, RandomSource)is called.- Specified by:
onBlockNeighborChangein interfaceIPartType<PartTypePanelLightStatic,PartStateEmpty<PartTypePanelLightStatic>> - Overrides:
onBlockNeighborChangein 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.side- The side at the center block.
-
onNetworkRemoval
public void onNetworkRemoval(INetwork network, IPartNetwork partNetwork, PartTarget target, PartStateEmpty<PartTypePanelLightStatic> state) Description copied from interface:IPartTypeCalled when this element is removed from the network.- Specified by:
onNetworkRemovalin interfaceIPartType<PartTypePanelLightStatic,PartStateEmpty<PartTypePanelLightStatic>> - Overrides:
onNetworkRemovalin 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:IPartTypeCalled after this element has been removed.- Specified by:
onPostRemovedin interfaceIPartType<PartTypePanelLightStatic,PartStateEmpty<PartTypePanelLightStatic>> - Overrides:
onPostRemovedin 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: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<PartTypePanelLightStatic,PartStateEmpty<PartTypePanelLightStatic>> - Overrides:
postUpdatein 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.
-