Fix Starlight crash when moving empty contraptions with downward-facing mechanical pistons. Closes https://github.com/Fabricators-of-Create/Create/issues/360

This commit is contained in:
Aeiou 2022-06-12 13:31:46 -04:00
parent 97da6be27f
commit cbe0f733ee

View file

@ -23,8 +23,10 @@ public class ContraptionWorld extends WrappedWorld {
this.contraption = contraption; this.contraption = contraption;
minY = nextMultipleOf16(contraption.bounds.minY); // Include 1 block above/below contraption height range to avoid certain edge-case Starlight crashes with
height = nextMultipleOf16(contraption.bounds.maxY) - minY; // downward-facing mechanical pistons.
minY = nextMultipleOf16(contraption.bounds.minY - 1);
height = nextMultipleOf16(contraption.bounds.maxY + 1) - minY;
} }
// https://math.stackexchange.com/questions/291468 // https://math.stackexchange.com/questions/291468