Package codechicken.multipart.trait
Class TRedstoneTile
java.lang.Object
net.neoforged.neoforge.attachment.AttachmentHolder
net.minecraft.world.level.block.entity.BlockEntity
codechicken.multipart.block.TileMultipart
codechicken.multipart.trait.TRedstoneTile
- All Implemented Interfaces:
codechicken.lib.world.IChunkLoadTile,RedstoneConnector,RedstoneTile,net.neoforged.neoforge.attachment.IAttachmentHolder,net.neoforged.neoforge.common.extensions.IBlockEntityExtension
Created by covers1624 on 31/12/20.
-
Nested Class Summary
Nested classes/interfaces inherited from class net.minecraft.world.level.block.entity.BlockEntity
net.minecraft.world.level.block.entity.BlockEntity.DataComponentInputNested classes/interfaces inherited from class net.neoforged.neoforge.attachment.AttachmentHolder
net.neoforged.neoforge.attachment.AttachmentHolder.AsField -
Field Summary
Fields inherited from class net.minecraft.world.level.block.entity.BlockEntity
level, remove, worldPositionFields inherited from class net.neoforged.neoforge.attachment.AttachmentHolder
ATTACHMENTS_NBT_KEY -
Constructor Summary
ConstructorsConstructorDescriptionTRedstoneTile(net.minecraft.core.BlockPos pos, net.minecraft.world.level.block.state.BlockState state) -
Method Summary
Modifier and TypeMethodDescriptionbooleancanConnectRedstone(int side) intgetConnectionMask(int side) Returns the connection mask of this tile for the given side.intgetDirectSignal(int side) intgetSignal(int side) intopenConnections(int side) Returns the mask of spaces through which a wire could connect on a side.intweakPowerLevel(int side, int mask) Returns the weak power level provided by this tile on the given side, through the given mask.Methods inherited from class codechicken.multipart.block.TileMultipart
addLandingEffects, addPart, addPart_do, addPart_impl, addRunningEffects, animateTick, attack, bindPart, canAddPart, canPlacePart, canReplacePart, clearParts, copyFrom, dropItem, dropItems, entityInside, from, fromNBT, getBlockSupportShape, getCapability, getCapCache, getCloneStack, getCollisionShape, getDestroyProgress, getDrops, getExplosionResistance, getInteractionShape, getPartList, getRenderOcclusionShape, getShape, getSlottedPart, getUpdateTag, getVisualShape, getWeakChanges, handleDescPacket, handleUpdateTag, harvestPart, internalPartChange, isClientTile, isUnobstructed, loadFrom, loadTo, markRender, markShapeChange, multiPartChange, notifyNeighborChange, notifyNeighborChange, notifyPartChange, notifyShapeChange, notifyTileChange, occlusionTest, onChunkLoad, onChunkUnloaded, onMoved, onNeighborBlockChanged, onNeighborTileChange, onRemoved, operate, partAdded, partRemoved, recalcLight, remPart, remPart_impl, replaceable, saveAdditional, setChanged, setLevel, setRemoved, setValid, stepOn, tile, updateLight, useItemOn, useWithoutItem, writeDescMethods inherited from class net.minecraft.world.level.block.entity.BlockEntity
addEntityType, applyComponents, applyComponentsFromItemStack, applyImplicitComponents, clearRemoved, collectComponents, collectImplicitComponents, components, fillCrashReportCategory, getBlockPos, getBlockState, getLevel, getPersistentData, getPosFromTag, getType, getUpdatePacket, hasLevel, isRemoved, isValidBlockState, loadAdditional, loadCustomOnly, loadStatic, loadWithComponents, onlyOpCanSetNbt, parseCustomNameSafe, removeComponentsFromTag, removeData, saveCustomAndMetadata, saveCustomOnly, saveToItem, saveWithFullMetadata, saveWithId, saveWithoutMetadata, setBlockState, setChanged, setComponents, setData, triggerEventMethods inherited from class net.neoforged.neoforge.attachment.AttachmentHolder
deserializeAttachments, getData, getExistingData, hasAttachments, hasData, serializeAttachmentsMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface net.neoforged.neoforge.attachment.IAttachmentHolder
getData, getExistingData, hasData, removeData, setDataMethods inherited from interface net.neoforged.neoforge.common.extensions.IBlockEntityExtension
getModelData, hasCustomOutlineRendering, invalidateCapabilities, onDataPacket, onLoad, requestModelDataUpdate
-
Constructor Details
-
TRedstoneTile
public TRedstoneTile(net.minecraft.core.BlockPos pos, net.minecraft.world.level.block.state.BlockState state)
-
-
Method Details
-
getDirectSignal
public int getDirectSignal(int side) - Overrides:
getDirectSignalin classTileMultipart
-
getSignal
public int getSignal(int side) - Overrides:
getSignalin classTileMultipart
-
canConnectRedstone
public boolean canConnectRedstone(int side) - Overrides:
canConnectRedstonein classTileMultipart
-
getConnectionMask
public int getConnectionMask(int side) Description copied from interface:RedstoneConnectorReturns the connection mask of this tile for the given side.- Specified by:
getConnectionMaskin interfaceRedstoneConnector- Parameters:
side- The side index.- Returns:
- The connection mask.
-
weakPowerLevel
public int weakPowerLevel(int side, int mask) Description copied from interface:RedstoneConnectorReturns the weak power level provided by this tile on the given side, through the given mask.- Specified by:
weakPowerLevelin interfaceRedstoneConnector- Parameters:
side- The side index.mask- The connection mask.- Returns:
- The redstone signal.
-
openConnections
public int openConnections(int side) Description copied from interface:RedstoneTileReturns the mask of spaces through which a wire could connect on a side.- Specified by:
openConnectionsin interfaceRedstoneTile- Parameters:
side- The side index.- Returns:
- The mask.
-