vanilla-fixes

Minecraft: Better than Adventure! mod that fixes some issues
git clone git://memoryshards.xyz/vanilla-fixes.git
Log | Files | Refs | README | LICENSE

commit 94deb078f12bf6d33f0a5090d7da6c0b8e990033
parent 65b32b386aba704cccc185158e39fca147a433d3
Author: Amb0s <ambos@disroot.org>
Date:   Wed,  8 Jul 2020 19:08:16 +0200

Minor changes

- Disabled some remapping
- Fixed tools
- Updated fabric.mod.json

Diffstat:
Asrc/main/java/ambos/vanillafixes/mixin/HatchetMixin.java | 15+++++++++++++++
Msrc/main/java/ambos/vanillafixes/mixin/MinecraftMixin.java | 2+-
Asrc/main/java/ambos/vanillafixes/mixin/PickaxeMixin.java | 18++++++++++++++++++
Msrc/main/java/ambos/vanillafixes/mixin/class_472Mixin.java | 2+-
Msrc/main/resources/fabric.mod.json | 7++-----
Msrc/main/resources/vanillafixes.mixins.json | 2++
6 files changed, 39 insertions(+), 7 deletions(-)

diff --git a/src/main/java/ambos/vanillafixes/mixin/HatchetMixin.java b/src/main/java/ambos/vanillafixes/mixin/HatchetMixin.java @@ -0,0 +1,15 @@ +package ambos.vanillafixes.mixin; + +import net.minecraft.item.tool.Hatchet; +import net.minecraft.tile.Tile; +import org.spongepowered.asm.mixin.Mixin; +import org.spongepowered.asm.mixin.Shadow; + +@Mixin(Hatchet.class) +public class HatchetMixin { + @Shadow + private static Tile[] effectiveBlocks = new Tile[]{Tile.WOOD, Tile.BOOKSHELF, Tile.LOG, Tile.CHEST, Tile.WORKBENCH, + Tile.DOOR_WOOD, Tile.STAIRS_WOOD, Tile.WOODEN_PRESSURE_PLATE, Tile.FENCE, Tile.TRAPDOOR, Tile.JUKEBOX, + Tile.PUMPKIN, Tile.LIT_PUMPKIN, Tile.STANDING_SIGN, Tile.WALL_SIGN, Tile.NOTEBLOCK, Tile.LADDER + }; +} 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) + @Redirect(method = "init", at = @At(value = "INVOKE", target = "Lorg/lwjgl/opengl/Display;create()V"), require = 0, remap = false) private void changeDepthBuffer() { PixelFormat pixelformat = new PixelFormat(); pixelformat = pixelformat.withDepthBits(24); diff --git a/src/main/java/ambos/vanillafixes/mixin/PickaxeMixin.java b/src/main/java/ambos/vanillafixes/mixin/PickaxeMixin.java @@ -0,0 +1,18 @@ +package ambos.vanillafixes.mixin; + +import net.minecraft.item.tool.Pickaxe; +import net.minecraft.tile.Tile; +import org.spongepowered.asm.mixin.Mixin; +import org.spongepowered.asm.mixin.Shadow; + +@Mixin(Pickaxe.class) +public class PickaxeMixin { + @Shadow + private static Tile[] effectiveBlocks = new Tile[]{Tile.STONEBRICK, Tile.DOUBLE_STONE_SLAB, Tile.STONE_SLAB, + Tile.STONE, Tile.SANDSTONE, Tile.MOSSY_COBBLESTONE, Tile.IRON_ORE, Tile.BLOCK_IRON, Tile.COAL_ORE, + Tile.BLOCK_GOLD, Tile.GOLD_ORE, Tile.ORE_DIAMOND, Tile.BLOCK_DIAMOND, Tile.ICE, Tile.NETHERRACK, + Tile.LAPIS_LAZULI_ORE, Tile.LAPIS_LAZULI_BLOCK, Tile.REDSTONE_ORE, Tile.REDSTONE_ORE_LIT, Tile.STAIRS_STONE, + Tile.DOOR_IRON, Tile.BRICK, Tile.FURNACE, Tile.FURNACE_LIT, Tile.DISPENSER, Tile.STONE_PRESSURE_PLATE, + Tile.RAIL, Tile.DETECTOR_RAIL, Tile.GOLDEN_RAIL + }; +} diff --git a/src/main/java/ambos/vanillafixes/mixin/class_472Mixin.java b/src/main/java/ambos/vanillafixes/mixin/class_472Mixin.java @@ -31,7 +31,7 @@ final class class_472Mixin { this.field_2485_proxy = var8; } - @ModifyArgs(method = "method_1909", at = @At(value = "INVOKE", target = "Lorg/lwjgl/opengl/GL11;glTranslatef(FFF)V")) + @ModifyArgs(method = "method_1909", at = @At(value = "INVOKE", target = "Lorg/lwjgl/opengl/GL11;glTranslatef(FFF)V"), remap = false) 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/resources/fabric.mod.json b/src/main/resources/fabric.mod.json @@ -3,12 +3,12 @@ "id": "vanillafixes", "version": "${version}", "name": "Vanilla Fixes", - "description": "", + "description": "Fixes some issues present in the base game.", "authors": [ "Ambos" ], "contact": { - "homepage": "https://github.com/Amb0s", + "issues": "https://github.com/Amb0s/vanilla-fixes/issues", "sources": "https://github.com/Amb0s/vanilla-fixes" }, "license": "LGPL-3.0-only", @@ -20,8 +20,5 @@ "depends": { "fabricloader": "*", "minecraft": "1.0.0-beta.7.3" - }, - "suggests": { - "flamingo": "*" } } diff --git a/src/main/resources/vanillafixes.mixins.json b/src/main/resources/vanillafixes.mixins.json @@ -11,6 +11,8 @@ "ClientPlayNetworkHandlerMixin", "DeathScreenMixin", "LoginThreadMixin", + "HatchetMixin", + "PickaxeMixin", "MinecraftMixin", "PlayerMixin", "RemoteClientPlayerMixin",