1.15 mixin cleanup

This commit is contained in:
gnembon committed 2019-12-07 01:07:19 -04:00
1 parent 380b9131d8
commit 04459094e6
22 files changed
+72 -643

No files matched your search

@@ -0,0 +1,31 @@
package carpet.mixins;
import carpet.settings.CarpetSettings;
import net.minecraft.block.BlockState;
import net.minecraft.entity.player.PlayerEntity;
import net.minecraft.server.network.ServerPlayerEntity;
import net.minecraft.server.network.ServerPlayerInteractionManager;
import net.minecraft.server.network.packet.PlayerActionC2SPacket;
import net.minecraft.util.math.BlockPos;
import net.minecraft.util.math.Direction;
import net.minecraft.world.BlockView;
import org.spongepowered.asm.mixin.Mixin;
import org.spongepowered.asm.mixin.Shadow;
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;
@Mixin(ServerPlayerInteractionManager.class)
public class ServerPlayerInteractionManager_antiCheatMixin
{
@Shadow public ServerPlayerEntity player;
@ModifyConstant(method = "processBlockBreakingAction",
constant = @Constant(doubleValue = 36D))
private double addDistance(double original) {
if (CarpetSettings.antiCheatDisabled)
return 1024D; // blocks 32 distance
return original;
}
}