Skip to content

Commit

Permalink
修复不存在的漏洞
Browse files Browse the repository at this point in the history
  • Loading branch information
ZhuRuoLing committed Dec 2, 2024
1 parent a280a37 commit c8b4e86
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 13 deletions.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
import com.mojang.blaze3d.vertex.VertexFormat;
import dev.dubhe.anvilcraft.api.hammer.IHasHammerEffect;
import dev.dubhe.anvilcraft.api.input.IMouseHandlerExtension;
import dev.dubhe.anvilcraft.api.input.KeyboardInputActionIgnorable;
import dev.dubhe.anvilcraft.client.init.ModRenderTypes;
import dev.dubhe.anvilcraft.client.init.ModShaders;
import dev.dubhe.anvilcraft.network.HammerChangeBlockPacket;
Expand All @@ -37,7 +36,7 @@
import java.util.List;

@ParametersAreNonnullByDefault
public class AnvilHammerScreen extends Screen implements IHasHammerEffect, KeyboardInputActionIgnorable {
public class AnvilHammerScreen extends Screen implements IHasHammerEffect {
public static final int RADIUS = 80;
public static final int DELAY = 80;//ms
public static final int ANIMATION_T = 300;//ms
Expand Down Expand Up @@ -475,11 +474,6 @@ public RenderType renderType() {
return ModRenderTypes.TRANSLUCENT_COLORED_OVERLAY;
}

@Override
public boolean shouldIgnoreInput() {
return closingAnimationStarted;
}

private record SelectionItem(
Vector2f center,
float detectionAngleStart,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,9 @@ public Type<? extends CustomPacketPayload> type() {
public void handle(IPayloadContext context) {
context.enqueueWork(() -> {
Level level = context.player().level();
level.setBlock(pos, state, Block.UPDATE_ALL_IMMEDIATE);
if (level.isLoaded(pos)) {
level.setBlock(pos, state, Block.UPDATE_ALL_IMMEDIATE);
}
});
}
}

0 comments on commit c8b4e86

Please sign in to comment.