YesCheat/src/main/java/io/gitlab/jfronny/yescheat/mixin/DistantBreaking.java

19 lines
641 B
Java

package io.gitlab.jfronny.yescheat.mixin;
import net.minecraft.server.network.ServerPlayNetworkHandler;
import org.spongepowered.asm.mixin.*;
import org.spongepowered.asm.mixin.injection.At;
import org.spongepowered.asm.mixin.injection.Inject;
import org.spongepowered.asm.mixin.injection.callback.CallbackInfo;
@Mixin(ServerPlayNetworkHandler.class)
public class DistantBreaking {
@Mutable
@Shadow @Final public static double MAX_BREAK_SQUARED_DISTANCE;
@Inject(method = "<clinit>", at = @At("TAIL"))
private static void yescheat$postInit(CallbackInfo ci) {
MAX_BREAK_SQUARED_DISTANCE = Double.MAX_VALUE;
}
}