SlimeVoid / LittleBlocks-FML

LittleBlocks for FML
http://www.slimevoid.net/LittleBlocks
GNU Lesser General Public License v3.0
18 stars 13 forks source link

Suggestion: remove need for LB piston Replacment #82

Closed Tarig0 closed 10 years ago

Tarig0 commented 10 years ago

Since we have control over the little block world space we can add a check in the LittleServer world in the function onblockeventrecived

 if (blockId == blockEventData.getBlockID()) {
    if (Block[ blockEventData.getBlockID()] instanceof BlockPistonBase ){
        int xOffset = blockEventData.getX()+ Facing.offsetsXForSide[eventID];
        int yOffset = blockEventData.getY()+ Facing.offsetsYForSide[eventID];
        int zOffset = blockEventData.getZ() + Facing.offsetsZForSide[eventID];
        if (this.isOutSideLittleWorld(xOffset,
                                                            yOffset,
                                                            zOffset)) {
            return false;
       }
    }

   //continue vannila
}
Tarig0 commented 10 years ago

This is using 1.6.4 code but the theroy should be the same for 1.7.2

Tarig0 commented 10 years ago

Disable stats is the only thing that is different between vannila doors and what LBdoors have

Eurymachus commented 10 years ago

This has already been done. Legacy classes will be removed in subsequent versions.