Skip to content

Commit

Permalink
Warp data tweaks
Browse files Browse the repository at this point in the history
  • Loading branch information
WenXin20 committed Mar 5, 2025
1 parent ee50f77 commit c3e7923
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -282,6 +282,7 @@ public void setPlacedBy(Level world, BlockPos pos, BlockState state, @Nullable L
pipeBlockEntity.setPipeName(stack.getHoverName());
pipeBlockEntity.setChanged();
}
pipeBlockEntity.onLoad();
}
}

Expand Down Expand Up @@ -393,6 +394,7 @@ public void tick(BlockState state, ServerLevel serverWorld, BlockPos pos, Random
UUID uuid = UUID.randomUUID();
pipeBlockEntity.setUuid(uuid);
pipeBlockEntity.setChanged();
BaseWarpBlockEntity.WARP_LOCATIONS.put(uuid, pos);
}

if (state.getValue(WATER_SPOUT) && state.getValue(FACING) == Direction.UP && pipeBlockEntity != null
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,7 @@ public UUID getWarpUuid() {
public void setWarpUuid(UUID uuid) {
this.warpUuid = uuid;
this.setChanged();
this.onLoad();
}

public void markUpdated() {
Expand Down
4 changes: 2 additions & 2 deletions src/main/java/com/wenxin2/marioverse/mixin/PlayerMixin.java
Original file line number Diff line number Diff line change
Expand Up @@ -241,8 +241,8 @@ public void baseTick() {
if (this.marioverse$getWarpCooldown() == 0) {
this.marioverse$warp(pos, state, warpPos, warpBE);
this.marioverse$setWarpCooldown(ConfigRegistry.WARP_PIPE_COOLDOWN.get());
} /* else if (this.getWarpCooldown() <= 10)
displayDestinationMissingMessage(); */
} /* else if (this.marioverse$getWarpCooldown() <= 10 && BaseWarpBlockEntity.findMatchingUUID(warpBE.getWarpUuid()) == null && !warpBE.hasDestinationPos())
marioverse$displayDestinationMissingMessage();*/
else if (warpBE.hasDestinationPos())
this.marioverse$displayCooldownMessage(state);
}
Expand Down

0 comments on commit c3e7923

Please sign in to comment.