From dc769fe3d8c263175f3bd7cc42d84316c2ef696c Mon Sep 17 00:00:00 2001
From: FlorianMichael <60033407+FlorianMichael@users.noreply.github.com>
Date: Sun, 24 Sep 2023 00:16:56 +0200
Subject: [PATCH] removed unused Code
---
.../minecraft/entity/MixinAllayEntity.java | 46 -------------------
.../minecraft/entity/MixinPlayerEntity.java | 7 ---
src/main/resources/viafabricplus.mixins.json | 1 -
3 files changed, 54 deletions(-)
delete mode 100644 src/main/java/de/florianmichael/viafabricplus/injection/mixin/fixes/minecraft/entity/MixinAllayEntity.java
diff --git a/src/main/java/de/florianmichael/viafabricplus/injection/mixin/fixes/minecraft/entity/MixinAllayEntity.java b/src/main/java/de/florianmichael/viafabricplus/injection/mixin/fixes/minecraft/entity/MixinAllayEntity.java
deleted file mode 100644
index 72fc7459..00000000
--- a/src/main/java/de/florianmichael/viafabricplus/injection/mixin/fixes/minecraft/entity/MixinAllayEntity.java
+++ /dev/null
@@ -1,46 +0,0 @@
-/*
- * This file is part of ViaFabricPlus - https://github.com/FlorianMichael/ViaFabricPlus
- * Copyright (C) 2021-2023 FlorianMichael/EnZaXD and contributors
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see .
- */
-package de.florianmichael.viafabricplus.injection.mixin.fixes.minecraft.entity;
-
-import net.minecraft.entity.EntityType;
-import net.minecraft.entity.mob.PathAwareEntity;
-import net.minecraft.world.World;
-import net.raphimc.vialoader.util.VersionEnum;
-import de.florianmichael.viafabricplus.protocolhack.ProtocolHack;
-import net.minecraft.entity.passive.AllayEntity;
-import org.spongepowered.asm.mixin.Mixin;
-import org.spongepowered.asm.mixin.injection.At;
-import org.spongepowered.asm.mixin.injection.Inject;
-import org.spongepowered.asm.mixin.injection.callback.CallbackInfoReturnable;
-
-@Mixin(AllayEntity.class)
-public abstract class MixinAllayEntity extends PathAwareEntity {
-
- protected MixinAllayEntity(EntityType extends PathAwareEntity> entityType, World world) {
- super(entityType, world);
- }
-
- @Inject(method = "getUnscaledRidingOffset", at = @At("HEAD"), cancellable = true)
- public void changeHeightOffset(CallbackInfoReturnable cir) {
- final var ver = ProtocolHack.getTargetVersion();
-
- if (ver.isOlderThanOrEqualTo(VersionEnum.r1_20tor1_20_1)) {
- cir.setReturnValue(ver.isOlderThanOrEqualTo(VersionEnum.r1_19_1tor1_19_2) ? 0.0F : 0.4F);
- }
- }
-}
diff --git a/src/main/java/de/florianmichael/viafabricplus/injection/mixin/fixes/minecraft/entity/MixinPlayerEntity.java b/src/main/java/de/florianmichael/viafabricplus/injection/mixin/fixes/minecraft/entity/MixinPlayerEntity.java
index 37eb39af..c3cdd385 100644
--- a/src/main/java/de/florianmichael/viafabricplus/injection/mixin/fixes/minecraft/entity/MixinPlayerEntity.java
+++ b/src/main/java/de/florianmichael/viafabricplus/injection/mixin/fixes/minecraft/entity/MixinPlayerEntity.java
@@ -133,11 +133,4 @@ public abstract class MixinPlayerEntity extends LivingEntity {
}
return instance.isSprinting();
}
-
- @Inject(method = "getUnscaledRidingOffset", at = @At("HEAD"), cancellable = true)
- public void setStaticScale(Entity vehicle, CallbackInfoReturnable cir) {
- if (ProtocolHack.getTargetVersion().isOlderThanOrEqualTo(VersionEnum.r1_20tor1_20_1)) {
- cir.setReturnValue(-0.35F);
- }
- }
}
diff --git a/src/main/resources/viafabricplus.mixins.json b/src/main/resources/viafabricplus.mixins.json
index 80794888..4161913e 100644
--- a/src/main/resources/viafabricplus.mixins.json
+++ b/src/main/resources/viafabricplus.mixins.json
@@ -72,7 +72,6 @@
"fixes.minecraft.block.MixinSugarCaneBlock",
"fixes.minecraft.block.MixinWallBlock",
"fixes.minecraft.entity.MixinAbstractDonkeyEntity",
- "fixes.minecraft.entity.MixinAllayEntity",
"fixes.minecraft.entity.MixinAnimalEntity",
"fixes.minecraft.entity.MixinBoatEntity",
"fixes.minecraft.entity.MixinCamelEntity",