Remove leadFix rule

It's been fixed for ages, and the only code we still add is already in vanilla
This commit is contained in:
altrisi committed 2023-01-20 18:27:40 +01:00
1 parent 583a372ba4
commit 1f38a2e89c
3 files changed
-42

No files matched your search

-7
View File
@@ -864,13 +864,6 @@ public class CarpetSettings
@Rule(desc = "fixes block placement rotation issue when player rotates quickly while placing blocks", category = RuleCategory.BUGFIX)
public static boolean placementRotationFix = false;
@Rule(
desc = "Fixes leads breaking/becoming invisible in unloaded chunks",
extra = "You may still get visibly broken leash links on the client side, but server side the link is still there.",
category = RuleCategory.BUGFIX
)// needs checkfix for 1.15
public static boolean leadFix = false;
@Rule(desc = "Spawning requires much less CPU and Memory", category = OPTIMIZATION)
public static boolean lagFreeSpawning = false;
@@ -1,34 +0,0 @@
package carpet.mixins;
import carpet.CarpetSettings;
import org.spongepowered.asm.mixin.Final;
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.Inject;
import org.spongepowered.asm.mixin.injection.callback.CallbackInfo;
import java.util.function.Consumer;
import net.minecraft.network.protocol.Packet;
import net.minecraft.network.protocol.game.ClientboundSetEntityLinkPacket;
import net.minecraft.server.level.ServerEntity;
import net.minecraft.world.entity.Entity;
import net.minecraft.world.entity.Mob;
@Mixin(ServerEntity.class)
public class ServerEntity_leashFixMixin
{
@Shadow @Final private Entity entity;
@Inject(method = "sendPairingData", at = @At("RETURN"))
private void sendLeashPackets(Consumer<Packet<?>> consumer_1, CallbackInfo ci)
{
if (CarpetSettings.leadFix)
{
if (entity instanceof Mob)
{
consumer_1.accept( new ClientboundSetEntityLinkPacket(entity, ((Mob) entity).getLeashHolder()));
}
}
}
}