This is a read-only snapshot of the ComputerCraft forums, taken in April 2020.
gamax92's profile picture

Making blocks shaped like the modem.

Started by gamax92, 23 October 2012 - 01:11 AM
gamax92 #1
Posted 23 October 2012 - 03:11 AM
Is there any guide or framework for getting your peripheral to be the size of a modem and act like the modem in the way of attaching to blocks?
Xfel #2
Posted 23 October 2012 - 05:05 PM
well, first you should understand how half or smaller blocks work in general. look at the code for BlockHalfSlab, for example. Then, you should store the side the block is attached to somewhere (metadata or tile entity field). The IPeripheral interface defines a method canAttachToSide(int side). you return true only if the given side value is equal to your stored attachment side value.
gamax92 #3
Posted 23 October 2012 - 08:50 PM
Thank you, I will go study that block.