Returns the block coords of the block receiving the output items, based on the meta Returns false if unattached */
| 34 | Returns false if unattached |
| 35 | */ |
| 36 | bool cHopperEntity::GetOutputBlockPos(NIBBLETYPE a_BlockMeta, int & a_OutputX, int & a_OutputY, int & a_OutputZ) |
| 37 | { |
| 38 | a_OutputX = m_PosX; |
| 39 | a_OutputY = m_PosY; |
| 40 | a_OutputZ = m_PosZ; |
| 41 | switch (a_BlockMeta) |
| 42 | { |
| 43 | case E_META_HOPPER_FACING_XM: a_OutputX--; return true; |
| 44 | case E_META_HOPPER_FACING_XP: a_OutputX++; return true; |
| 45 | case E_META_HOPPER_FACING_YM: a_OutputY--; return true; |
| 46 | case E_META_HOPPER_FACING_ZM: a_OutputZ--; return true; |
| 47 | case E_META_HOPPER_FACING_ZP: a_OutputZ++; return true; |
| 48 | default: |
| 49 | { |
| 50 | // Not attached |
| 51 | return false; |
| 52 | } |
| 53 | } |
| 54 | } |
| 55 | |
| 56 | |
| 57 |
no outgoing calls
no test coverage detected