MCPcopy Create free account
hub / github.com/TimMcCool/scratchattach / block_shape

Method block_shape

scratchattach/editor/block.py:136–146  ·  view source on GitHub ↗

Search for & return the associated blockshape stored in blockshape.py :return: The block's block shape (by opcode)

(self)

Source from the content-addressed store, hash-verified

134
135 @property
136 def block_shape(self) -> blockshape.BlockShape:
137 """
138 Search for & return the associated blockshape stored in blockshape.py
139 :return: The block's block shape (by opcode)
140 """
141 _shape = blockshape.BlockShapes.find(self.opcode, "opcode")
142 if _shape is None:
143 warnings.warn(f"No blockshape {self.opcode!r} exists! Defaulting to {blockshape.BlockShapes.UNDEFINED}")
144 _shape = blockshape.BlockShapes.UNDEFINED
145 assert isinstance(_shape, blockshape.BlockShape)
146 return _shape
147
148 @property
149 def can_next(self):

Callers

nothing calls this directly

Calls 1

findMethod · 0.45

Tested by

no test coverage detected