Interface RedstonePart
- All Superinterfaces:
MultiPart
- All Known Subinterfaces:
FaceRedstonePart,MaskedRedstonePart
- All Known Implementing Classes:
ButtonPart,ButtonPart.AcaciaButtonPart,ButtonPart.BirchButtonPart,ButtonPart.CrimsonButtonPart,ButtonPart.DarkOakButtonPart,ButtonPart.JungleButtonPart,ButtonPart.OakButtonPart,ButtonPart.PolishedBlackstoneButtonPart,ButtonPart.SpruceButtonPart,ButtonPart.StoneButtonPart,ButtonPart.WarpedButtonPart,LeverPart,RedstoneTorchPart
Interface for parts with redstone interaction
Marker interface for TRedstoneTile. This means that if a part is an instance of RedstonePart,
the container tile may be cast to RedstoneTile
-
Method Summary
Modifier and TypeMethodDescriptionbooleancanConnectRedstone(int side) Returns weather this part can connect to redstone on the specified side.intstrongPowerLevel(int side) Returns the strong (indirect, through blocks) signal being emitted by this part on the specified side.intweakPowerLevel(int side) Returns the weak (direct) being emitted by this part on the specified side.Methods inherited from interface codechicken.multipart.api.part.MultiPart
addDestroyEffects, addHitEffects, addLandingEffects, addRunningEffects, capCache, click, getBlockSupportShape, getCloneStack, getCollisionShape, getDrops, getExplosionResistance, getInteractionShape, getLightEmission, getModelData, getPlacementSound, getRenderBounds, getRenderOcclusionShape, getShape, getStrength, getType, getVisualShape, harvest, hasLevel, hasTile, invalidateConvertedTile, level, load, occlusionTest, onAdded, onChunkLoad, onChunkUnload, onConverted, onEntityCollision, onEntityStanding, onMoved, onNeighborBlockChanged, onPartChanged, onRemoved, onWorldJoin, onWorldSeparate, pos, preRemove, readDesc, readUpdate, save, scheduledTick, scheduleTick, sendUpdate, tile, useItemOn, useWithoutItem, writeDesc
-
Method Details
-
strongPowerLevel
int strongPowerLevel(int side) Returns the strong (indirect, through blocks) signal being emitted by this part on the specified side.- Parameters:
side- The side index.- Returns:
- The redstone signal.
-
weakPowerLevel
int weakPowerLevel(int side) Returns the weak (direct) being emitted by this part on the specified side.- Parameters:
side- The side index.- Returns:
- The redstone signal.
-
canConnectRedstone
boolean canConnectRedstone(int side) Returns weather this part can connect to redstone on the specified side.Blocking parts like covers will be handled by RedstoneInteractions.
- Parameters:
side- The side index.- Returns:
- True if redstone can connect.
-