disable gbf for now

This commit is contained in:
gnembon committed 2019-07-26 15:28:11 -03:00
1 parent e4a035149a
commit ceffb9efbd
3 files changed
+13 -3

No files matched your search

@@ -10,8 +10,11 @@ import net.minecraft.util.math.Direction;
import net.minecraft.world.BlockView;
import org.spongepowered.asm.mixin.Mixin;
import org.spongepowered.asm.mixin.injection.At;
import org.spongepowered.asm.mixin.injection.Constant;
import org.spongepowered.asm.mixin.injection.ModifyConstant;
import org.spongepowered.asm.mixin.injection.Redirect;
//needs tests, WIP
@Mixin(ServerPlayerInteractionManager.class)
public class ServerPlayerInteractionManager_ghostBlocksMixin
{
@@ -28,4 +31,13 @@ public class ServerPlayerInteractionManager_ghostBlocksMixin
return 1.0f;
return blockState.calcBlockBreakingDelta(playerEntity_1, blockView_1, blockPos_1);
}
@ModifyConstant(method = "method_14263",
constant = @Constant(doubleValue = 36D))
private double addDistance(double original) {
if (CarpetSettings.miningGhostBlockFix)
return 1024D;
return original;
}
}
@@ -229,7 +229,7 @@ public class CarpetSettings
@Rule(desc = "smooth client animations with low tps settings", extra = "works only in SP, and will slow down players", category = CREATIVE)
public static boolean smoothClientAnimations;
@Rule(desc="Fixes mining ghost blocks by allowing ANY mining speed from clients", category = SURVIVAL)
//@Rule(desc="Fixes mining ghost blocks by allowing ANY mining speed from clients", category = SURVIVAL)
public static boolean miningGhostBlockFix;
private static class PushLimitLimits extends Validator<Integer> {