Skip to content

Commit

Permalink
minor changes
Browse files Browse the repository at this point in the history
  • Loading branch information
qouteall committed Jun 11, 2023
1 parent 33ef75d commit 35db1cf
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ private UseOnContext redirectNewUseOnContext(Player player, InteractionHand inte
target = "Lnet/minecraft/world/phys/Vec3;distanceToSqr(Lnet/minecraft/world/phys/Vec3;)D"
)
)
private double redirectDistanceInHandleBlockBreakAction(Vec3 instance, Vec3 vec, Operation<Double> original) {
private double wrapDistanceInHandleBlockBreakAction(Vec3 instance, Vec3 vec, Operation<Double> original) {
ServerLevel redirect = BlockManipulationServer.SERVER_PLAYER_INTERACTION_REDIRECT.get();
if (redirect != null) {
return 0;
Expand Down Expand Up @@ -156,9 +156,7 @@ private ServerLevel redirectLevelOnTicking(ServerPlayerGameMode instance) {
return level;
}

@Inject(
method = "tick", at = @At("RETURN")
)
@Inject(method = "tick", at = @At("RETURN"))
private void onTickingEnd(CallbackInfo ci) {
if (!hasDelayedDestroy && !isDestroyingBlock) {
ip_destroyPosLevel = null;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -263,11 +263,11 @@ public static void resetFogState() {
float g = client.gameRenderer.getRenderDistance();

Vec3 cameraPos = camera.getPosition();
double d = cameraPos.x();
double e = cameraPos.y();
double f = cameraPos.z();
double x = cameraPos.x();
double y = cameraPos.y();
double z = cameraPos.z();

boolean isFoggy = client.level.effects().isFoggyAt(Mth.floor(d), Mth.floor(e)) ||
boolean isFoggy = client.level.effects().isFoggyAt(Mth.floor(x), Mth.floor(y)) ||
client.gui.getBossOverlay().shouldCreateWorldFog();

FogRenderer.setupFog(
Expand Down

0 comments on commit 35db1cf

Please sign in to comment.