mirror of
https://github.com/Jozufozu/Flywheel.git
synced 2024-12-27 23:47:09 +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
eb5d3c4b25
commit
e3ceacd6e4
1 changed files with 9 additions and 0 deletions
|
@ -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();
|
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) {
|
default boolean sameAs(AABB other) {
|
||||||
return getMinX() == Math.floor(other.minX)
|
return getMinX() == Math.floor(other.minX)
|
||||||
&& getMinY() == Math.floor(other.minY)
|
&& getMinY() == Math.floor(other.minY)
|
||||||
|
|
Loading…
Reference in a new issue