Skip to content

Commit

Permalink
fix rocket building (again)
Browse files Browse the repository at this point in the history
  • Loading branch information
screret committed Sep 28, 2024
1 parent 5e555a5 commit 5045b8f
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 13 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

### FIXES:
- Fixed rocket synchronization
- Fixed rockets forming incorrectly again

### CHANGES:
- updated to GT 1.4.4
Expand Down
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ org.gradle.jvmargs=-Xmx4G -Xss4M

mod_id=gcyr
mod_name=Gregicality Rocketry
mod_version=0.2.3
mod_version=0.2.4
maven_group=argent_matter

loom.platform=forge
Original file line number Diff line number Diff line change
Expand Up @@ -115,15 +115,15 @@ public void setRocketBuilt(boolean rocketBuilt) {
this.rocketBuilt = rocketBuilt && isFormed;
if (getLevel().isClientSide || !this.isFormed) return;

boolean isNegative = this.getFrontFacing().getAxisDirection() == Direction.AxisDirection.NEGATIVE;
Direction back = this.getFrontFacing().getOpposite();
Direction left = this.getFrontFacing().getCounterClockWise();
BlockPos current = getPos().relative(back, 1);
int startX = current.getX();
int endX = current.relative(back, bDist - 1).getX();
int startZ = current.relative(left, lDist).getZ();
int endZ = current.relative(left.getOpposite(), rDist).getZ();
int startX = current.getX() + (isNegative ? -1 : 1);
int endX = current.getX() - (isNegative ? -(bDist - 1) : (bDist - 1));
int startZ = current.getZ() - (isNegative ? -(lDist + 1) : (lDist + 1));
int endZ = current.getZ() - (isNegative ? (rDist - 1) : -(rDist - 1));
int startY = current.getY();
int endY = current.offset(0, hDist, 0).getY();
int endY = current.getY() + hDist;

AABB bounds = new AABB(startX, startY, startZ, endX, endY, endZ);
startX = (int) bounds.minX;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -93,15 +93,15 @@ private void onBuildButtonClick(ClickData data) {
Planet targetPlanet = PlanetIdChipBehaviour.getPlanetFromStack(idChip);
if (targetPlanet == null) return;

boolean isNegative = this.getFrontFacing().getAxisDirection() == Direction.AxisDirection.NEGATIVE;
Direction back = this.getFrontFacing().getOpposite();
Direction left = this.getFrontFacing().getCounterClockWise();
BlockPos current = getPos().relative(back, 1);
int startX = current.getX();
int endX = current.relative(back, bDist - 1).getX();
int startZ = current.relative(left, lDist).getZ();
int endZ = current.relative(left.getOpposite(), rDist).getZ();
int startX = current.getX() + (isNegative ? -1 : 1);
int endX = current.getX() + (isNegative ? (bDist - 1) : -(bDist - 1));
int startZ = current.getZ() + (isNegative ? (lDist + 1) : -(lDist + 1));
int endZ = current.getZ() - (isNegative ? (rDist - 1) : -(rDist - 1));
int startY = current.getY();
int endY = current.offset(0, hDist, 0).getY();
int endY = current.getY() + hDist;

AABB bounds = new AABB(startX, startY, startZ, endX, endY, endZ);
startX = (int) bounds.minX;
Expand Down

0 comments on commit 5045b8f

Please sign in to comment.