commit e315760aa27e0831cf722ecf42e30717ae0d62d6 parent 1231b6dcabcc585bdffc4710ead8d83c4428f711 Author: Amb0s <ambos@disroot.org> Date: Mon, 5 Apr 2021 12:42:17 +0200 Bumped version number and changed mixins Diffstat:
16 files changed, 24 insertions(+), 24 deletions(-)
diff --git a/gradle.properties b/gradle.properties @@ -11,6 +11,6 @@ org.gradle.daemon=false loader_version=671a1bb # Mod Properties - mod_version = 1.0.2 + mod_version = 1.0.3 maven_group = ambos archives_base_name = vanilla-fixes diff --git a/src/main/java/ambos/vanillafixes/mixin/AbstractClientPlayerMixin.java b/src/main/java/ambos/vanillafixes/mixin/AbstractClientPlayerMixin.java @@ -18,12 +18,12 @@ abstract class AbstractClientPlayerMixin extends PlayerBase { super(level); } - @Redirect(method = "<init>", at = @At(value = "INVOKE", target = "Ljava/lang/StringBuilder;toString()Ljava/lang/String;")) + @Redirect(method = "<init>", at = @At(value = "INVOKE", target = "Ljava/lang/StringBuilder;toString()Ljava/lang/String;"), require = 0) private String changeSkin(StringBuilder builder, Minecraft minecraft, Level level, Session session, int integer) { return MinecraftUtil.getPlayerSkin(session.username); } - @Inject(method = "<init>", at = @At("RETURN")) + @Inject(method = "<init>", at = @At("RETURN"), require = 0) private void AbstractClientPlayer(Minecraft minecraft, Level level, Session session, int integer, CallbackInfo ci) { if (session != null && session.username != null && session.username.length() > 0) { cloakUrl = MinecraftUtil.getPlayerCape(session.username); diff --git a/src/main/java/ambos/vanillafixes/mixin/BoatMixin.java b/src/main/java/ambos/vanillafixes/mixin/BoatMixin.java @@ -20,17 +20,17 @@ abstract class BoatMixin extends EntityBase { super(level); } - @Inject(method = "<init>", at = @At("RETURN")) + @Inject(method = "<init>", at = @At("RETURN"), require = 0) private void onInit(CallbackInfo ci) { field_1624 = false; } - @Redirect(method = "damage", at = @At(value = "INVOKE", target = "Lnet/minecraft/entity/Boat;dropItem(IIF)Lnet/minecraft/entity/Item;")) + @Redirect(method = "damage", at = @At(value = "INVOKE", target = "Lnet/minecraft/entity/Boat;dropItem(IIF)Lnet/minecraft/entity/Item;"), require = 0) private Item onDropItem(Boat boat, int i, int j, float f) { return null; } - @Inject(method = "damage", at = @At(value = "INVOKE", target = "Lnet/minecraft/entity/Boat;remove()V"), cancellable = true) + @Inject(method = "damage", at = @At(value = "INVOKE", target = "Lnet/minecraft/entity/Boat;remove()V"), cancellable = true, require = 0) private void dropBoat(CallbackInfoReturnable<Boolean> ci) { this.dropItem(ItemBase.boat.id, 1, 0.0F); } diff --git a/src/main/java/ambos/vanillafixes/mixin/ClientPlayNetworkHandlerMixin.java b/src/main/java/ambos/vanillafixes/mixin/ClientPlayNetworkHandlerMixin.java @@ -7,7 +7,7 @@ import org.spongepowered.asm.mixin.injection.ModifyConstant; @Mixin(ClientPlayNetworkHandler.class) final class ClientPlayNetworkHandlerMixin { - @ModifyConstant(method = "method_1471", constant = @Constant(stringValue = "http://www.minecraft.net/game/joinserver.jsp?user=")) + @ModifyConstant(method = "method_1471", constant = @Constant(stringValue = "http://www.minecraft.net/game/joinserver.jsp?user="), require = 0) private String changeURL(String url) { return "http://session.minecraft.net/game/joinserver.jsp?user="; } diff --git a/src/main/java/ambos/vanillafixes/mixin/DeathMixin.java b/src/main/java/ambos/vanillafixes/mixin/DeathMixin.java @@ -9,7 +9,7 @@ import org.spongepowered.asm.mixin.injection.invoke.arg.Args; @Mixin(Death.class) final class DeathMixin extends ScreenBase { - @ModifyArgs(method = "render", at = @At(value = "INVOKE", target = "Lnet/minecraft/client/gui/screen/ingame/Death;drawTextWithShadowCentred(Lnet/minecraft/client/render/TextRenderer;Ljava/lang/String;III)V")) + @ModifyArgs(method = "render", at = @At(value = "INVOKE", target = "Lnet/minecraft/client/gui/screen/ingame/Death;drawTextWithShadowCentred(Lnet/minecraft/client/render/TextRenderer;Ljava/lang/String;III)V"), require = 0) private void changeDeathMessage(Args args) { if (args.get(1) != "Game over!") { args.set(1, "Score: §e" + minecraft.player.getScore()); diff --git a/src/main/java/ambos/vanillafixes/mixin/EntityBaseMixin.java b/src/main/java/ambos/vanillafixes/mixin/EntityBaseMixin.java @@ -10,19 +10,19 @@ import org.spongepowered.asm.mixin.injection.Redirect; @Mixin(EntityBase.class) final class EntityBaseMixin { - @Redirect(method = "move", at = @At(value = "FIELD", target = "Lnet/minecraft/entity/EntityBase;x:D", opcode = Opcodes.PUTFIELD)) + @Redirect(method = "move", at = @At(value = "FIELD", target = "Lnet/minecraft/entity/EntityBase;x:D", opcode = Opcodes.PUTFIELD), require = 0) private void fixX(EntityBase entityBase, double value) { if (!entityBase.level.isClient || entityBase instanceof PlayerBase || !(entityBase instanceof Living)) entityBase.x = value; } - @Redirect(method = "move", at = @At(value = "FIELD", target = "Lnet/minecraft/entity/EntityBase;y:D", opcode = Opcodes.PUTFIELD)) + @Redirect(method = "move", at = @At(value = "FIELD", target = "Lnet/minecraft/entity/EntityBase;y:D", opcode = Opcodes.PUTFIELD), require = 0) private void fixY(EntityBase entityBase, double value) { if (!entityBase.level.isClient || entityBase instanceof PlayerBase || !(entityBase instanceof Living)) entityBase.y = value; } - @Redirect(method = "move", at = @At(value = "FIELD", target = "Lnet/minecraft/entity/EntityBase;z:D", opcode = Opcodes.PUTFIELD)) + @Redirect(method = "move", at = @At(value = "FIELD", target = "Lnet/minecraft/entity/EntityBase;z:D", opcode = Opcodes.PUTFIELD), require = 0) private void fixZ(EntityBase entityBase, double value) { if (!entityBase.level.isClient || entityBase instanceof PlayerBase || !(entityBase instanceof Living)) entityBase.z = value; diff --git a/src/main/java/ambos/vanillafixes/mixin/FenceMixin.java b/src/main/java/ambos/vanillafixes/mixin/FenceMixin.java @@ -9,7 +9,7 @@ import org.spongepowered.asm.mixin.injection.callback.CallbackInfoReturnable; @Mixin(Fence.class) final class FenceMixin { - @Inject(method = "canPlaceAt", at = @At("RETURN"), cancellable = true) + @Inject(method = "canPlaceAt", at = @At("RETURN"), cancellable = true, require = 0) private void onCanPlaceAt(Level level, int x, int y, int z, CallbackInfoReturnable cir) { cir.setReturnValue(true); } diff --git a/src/main/java/ambos/vanillafixes/mixin/LoginThreadMixin.java b/src/main/java/ambos/vanillafixes/mixin/LoginThreadMixin.java @@ -8,7 +8,7 @@ import org.spongepowered.asm.mixin.injection.callback.CallbackInfo; @Mixin(Minecraft.LoginThread.class) final class LoginThreadMixin { - @Inject(method = "run", at = @At("HEAD"), cancellable = true, remap = false) + @Inject(method = "run", at = @At("HEAD"), cancellable = true, remap = false, require = 0) private void onRun(CallbackInfo ci) { ci.cancel(); } diff --git a/src/main/java/ambos/vanillafixes/mixin/MainMenuMixin.java b/src/main/java/ambos/vanillafixes/mixin/MainMenuMixin.java @@ -9,7 +9,7 @@ import org.spongepowered.asm.mixin.injection.callback.CallbackInfo; @Mixin(MainMenu.class) final class MainMenuMixin extends ScreenBase { - @Inject(method = "init", at = @At("HEAD")) + @Inject(method = "init", at = @At("HEAD"), require = 0) private void onInit(CallbackInfo ci) { minecraft.isApplet = false; } diff --git a/src/main/java/ambos/vanillafixes/mixin/MinecraftMixin.java b/src/main/java/ambos/vanillafixes/mixin/MinecraftMixin.java @@ -10,7 +10,7 @@ import org.spongepowered.asm.mixin.injection.Redirect; @Mixin(Minecraft.class) final class MinecraftMixin { - @Redirect(method = "init", at = @At(value = "INVOKE", target = "Lorg/lwjgl/opengl/Display;create()V"), require = 0, remap = false) + @Redirect(method = "init", at = @At(value = "INVOKE", target = "Lorg/lwjgl/opengl/Display;create()V"), remap = false, require = 0) private void changeDepthBuffer() { PixelFormat pixelformat = new PixelFormat(); pixelformat = pixelformat.withDepthBits(24); diff --git a/src/main/java/ambos/vanillafixes/mixin/PlayerBaseMixin.java b/src/main/java/ambos/vanillafixes/mixin/PlayerBaseMixin.java @@ -22,7 +22,7 @@ final class PlayerBaseMixin extends Living { super(level); } - @Inject(method = "initCloak", at = @At("RETURN")) + @Inject(method = "initCloak", at = @At("RETURN"), require = 0) private void onInitCloak(CallbackInfo ci) { playerCloakUrl = MinecraftUtil.getPlayerCape(name); cloakUrl = playerCloakUrl; diff --git a/src/main/java/ambos/vanillafixes/mixin/RemoteClientInteractionManagerMixin.java b/src/main/java/ambos/vanillafixes/mixin/RemoteClientInteractionManagerMixin.java @@ -12,7 +12,7 @@ final class RemoteClientInteractionManagerMixin { @Shadow private int hitDelay; - @Inject(method = "method_1721", at = @At("RETURN")) + @Inject(method = "method_1721", at = @At("RETURN"), require = 0) private void changeHitDelay(CallbackInfo ci) { hitDelay = 0; } diff --git a/src/main/java/ambos/vanillafixes/mixin/RemoteClientPlayerMixin.java b/src/main/java/ambos/vanillafixes/mixin/RemoteClientPlayerMixin.java @@ -16,12 +16,12 @@ abstract class RemoteClientPlayerMixin extends PlayerBase { super(level); } - @Redirect(method = "<init>", at = @At(value = "INVOKE", target = "Ljava/lang/StringBuilder;toString()Ljava/lang/String;")) + @Redirect(method = "<init>", at = @At(value = "INVOKE", target = "Ljava/lang/StringBuilder;toString()Ljava/lang/String;"), require = 0) private String toStr(StringBuilder builder, Level level, String username) { return MinecraftUtil.getPlayerSkin(username); } - @Inject(method = "<init>", at = @At("RETURN")) + @Inject(method = "<init>", at = @At("RETURN"), require = 0) private void RemoteClientPlayer(Level level, String username, CallbackInfo ci) { if (username != null && username.length() > 0) { cloakUrl = MinecraftUtil.getPlayerCape(username); diff --git a/src/main/java/ambos/vanillafixes/mixin/RenderListMixin.java b/src/main/java/ambos/vanillafixes/mixin/RenderListMixin.java @@ -24,14 +24,14 @@ final class RenderListMixin { @Shadow private int field_2482; - @Inject(method = "method_1912", at = @At("RETURN")) + @Inject(method = "method_1912", at = @At("RETURN"), require = 0) private void onMethod_1912(int var1, int var2, int var3, double var4, double var6, double var8, CallbackInfo ci) { this.field_2483_proxy = var4; this.field_2484_proxy = var6; this.field_2485_proxy = var8; } - @ModifyArgs(method = "method_1909", at = @At(value = "INVOKE", target = "Lorg/lwjgl/opengl/GL11;glTranslatef(FFF)V"), remap = false) + @ModifyArgs(method = "method_1909", at = @At(value = "INVOKE", target = "Lorg/lwjgl/opengl/GL11;glTranslatef(FFF)V"), remap = false, require = 0) private void changeType(Args args) { args.set(0, (float) ((double) this.field_2480 - this.field_2483_proxy)); args.set(1, (float) ((double) this.field_2481 - this.field_2484_proxy)); diff --git a/src/main/java/ambos/vanillafixes/mixin/StairsMixin.java b/src/main/java/ambos/vanillafixes/mixin/StairsMixin.java @@ -18,12 +18,12 @@ final class StairsMixin extends BlockBase { super(id, material); } - @Inject(method = "getDropId", at = @At("RETURN"), cancellable = true) + @Inject(method = "getDropId", at = @At("RETURN"), cancellable = true, require = 0) private void onGetDropId(int meta, Random rand, CallbackInfoReturnable cir) { cir.setReturnValue(id); } - @Inject(method = "beforeDestroyedByExplosion", at = @At("HEAD"), cancellable = true) + @Inject(method = "beforeDestroyedByExplosion", at = @At("HEAD"), cancellable = true, require = 0) private void onBeforeDestroyedByExplosion(Level level, int x, int y, int z, int meta, float dropChance, CallbackInfo ci) { super.beforeDestroyedByExplosion(level, x, y, z, meta, dropChance); ci.cancel(); diff --git a/src/main/java/ambos/vanillafixes/mixin/ThreadDownloadResourcesMixin.java b/src/main/java/ambos/vanillafixes/mixin/ThreadDownloadResourcesMixin.java @@ -8,7 +8,7 @@ import org.spongepowered.asm.mixin.injection.ModifyConstant; @Mixin(ThreadDownloadResources.class) final class ThreadDownloadResourcesMixin { - @ModifyConstant(method = "run", constant = @Constant(stringValue = "http://s3.amazonaws.com/MinecraftResources/"), remap = false) + @ModifyConstant(method = "run", constant = @Constant(stringValue = "http://s3.amazonaws.com/MinecraftResources/"), remap = false, require = 0) private String changeURL(String url) { return MinecraftUtil.getResources(); }