Skip to content

Commit

Permalink
Merge branch 'refs/heads/1.20.1' into 1.21
Browse files Browse the repository at this point in the history
# Conflicts:
#	CHANGELOG.md
#	src/main/java/argent_matter/gcyr/common/data/GCYREntityDataSerializers.java
  • Loading branch information
screret committed Sep 28, 2024
2 parents 2110408 + 5045b8f commit 2451b16
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 16 deletions.
4 changes: 2 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
### ADDITIONS:

### FIXES:
- fixed server crash
- Fixed rocket synchronization
- Fixed rockets forming incorrectly again

### CHANGES:
- updated to GT 1.4.4

## WIP Documentation!:

Expand Down
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -14,5 +14,5 @@ loader_version_range=[4,)

mod_id=gcyr
mod_name=Gregicality Rocketry
mod_version=0.2.3
mod_version=0.2.4
maven_group=argent_matter
Original file line number Diff line number Diff line change
Expand Up @@ -116,15 +116,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
3 changes: 2 additions & 1 deletion src/main/java/argent_matter/gcyr/util/PosWithState.java
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
import net.minecraft.network.RegistryFriendlyByteBuf;
import net.minecraft.network.codec.ByteBufCodecs;
import net.minecraft.network.codec.StreamCodec;
import net.minecraft.world.level.block.Block;
import net.minecraft.world.level.block.state.BlockState;

import javax.annotation.ParametersAreNonnullByDefault;
Expand All @@ -25,7 +26,7 @@ public PosWithState(BlockPos pos, BlockState state) {

public static final StreamCodec<RegistryFriendlyByteBuf, PosWithState> STREAM_CODEC = StreamCodec.composite(
BlockPos.STREAM_CODEC, PosWithState::pos,
ByteBufCodecs.fromCodec(BlockState.CODEC), PosWithState::state,
ByteBufCodecs.idMapper(Block.BLOCK_STATE_REGISTRY), PosWithState::state,
ByteBufCodecs.OPTIONAL_COMPOUND_TAG, PosWithState::entityTag,
PosWithState::new);

Expand Down

0 comments on commit 2451b16

Please sign in to comment.