mirror of
https://github.com/Jozufozu/Flywheel.git
synced 2024-11-10 20:45:59 +01:00
Contraptions were too lit
- Fix bug causing potentially moving contraptions to re-upload their light every tick - Reduces tick stutter with large amounts of contraptions
This commit is contained in:
parent
c2be6a0faa
commit
35f513a2a0
@ -42,6 +42,15 @@ public interface ImmutableBox {
|
||||
return getMinX() == other.getMinX() && getMinY() == other.getMinY() && getMinZ() == other.getMinZ() && getMaxX() == other.getMaxX() && getMaxY() == other.getMaxY() && getMaxZ() == other.getMaxZ();
|
||||
}
|
||||
|
||||
default boolean sameAs(ImmutableBox other, int margin) {
|
||||
return getMinX() == other.getMinX() - margin &&
|
||||
getMinY() == other.getMinY() - margin &&
|
||||
getMinZ() == other.getMinZ() - margin &&
|
||||
getMaxX() == other.getMaxX() + margin &&
|
||||
getMaxY() == other.getMaxY() + margin &&
|
||||
getMaxZ() == other.getMaxZ() + margin;
|
||||
}
|
||||
|
||||
default boolean sameAs(AABB other) {
|
||||
return getMinX() == Math.floor(other.minX)
|
||||
&& getMinY() == Math.floor(other.minY)
|
||||
|
Loading…
Reference in New Issue
Block a user