bool PlaceBlock(byte old, ushort x, ushort y, ushort z, byte block, byte extBlock) { if (modeType != 0) { if (old == modeType) { SendBlockchange(x, y, z, old); } else { ChangeBlock(x, y, z, modeType, 0); } return(true); } HandlePlace handler = BlockBehaviour.placeHandlers[block]; if (handler != null) { if (handler(this, old, x, y, z)) { return(false); } } else { return(ChangeBlock(x, y, z, block, extBlock)); } return(true); }
ChangeResult PlaceBlock(BlockID old, ushort x, ushort y, ushort z, BlockID block) { HandlePlace handler = level.placeHandlers[block]; if (handler != null) { return(handler(this, block, x, y, z)); } return(ChangeBlock(x, y, z, block)); }
bool PlaceBlock(ExtBlock old, ushort x, ushort y, ushort z, ExtBlock block) { HandlePlace handler = level.placeHandlers[block.Index]; if (handler != null) { handler(this, block, x, y, z); return(true); } return(ChangeBlock(x, y, z, block) == 2); }
bool PlaceBlock(BlockID old, ushort x, ushort y, ushort z, BlockID block) { HandlePlace handler = level.placeHandlers[block]; if (handler != null) { handler(this, block, x, y, z); return(true); } return(ChangeBlock(x, y, z, block) == 2); }