-
-
Notifications
You must be signed in to change notification settings - Fork 827
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
large fixes and improvements to better tooltips
- fix hide flags - fix container previews - peek screens can be closed with your inventory key - fix book previews crashing - add middle click open for books
- Loading branch information
Showing
14 changed files
with
250 additions
and
73 deletions.
There are no files selected for viewing
22 changes: 0 additions & 22 deletions
22
src/main/java/meteordevelopment/meteorclient/events/game/SectionVisibleEvent.java
This file was deleted.
Oops, something went wrong.
22 changes: 22 additions & 0 deletions
22
src/main/java/meteordevelopment/meteorclient/mixin/ArmorTrimMixin.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
/* | ||
* This file is part of the Meteor Client distribution (https://github.com/MeteorDevelopment/meteor-client). | ||
* Copyright (c) Meteor Development. | ||
*/ | ||
|
||
package meteordevelopment.meteorclient.mixin; | ||
|
||
import com.llamalad7.mixinextras.injector.ModifyExpressionValue; | ||
import meteordevelopment.meteorclient.systems.modules.Modules; | ||
import meteordevelopment.meteorclient.systems.modules.render.BetterTooltips; | ||
import net.minecraft.item.trim.ArmorTrim; | ||
import org.spongepowered.asm.mixin.Mixin; | ||
import org.spongepowered.asm.mixin.injection.At; | ||
|
||
@Mixin(ArmorTrim.class) | ||
public class ArmorTrimMixin { | ||
@ModifyExpressionValue(method = "appendTooltip", at = @At(value = "FIELD", target = "Lnet/minecraft/item/trim/ArmorTrim;showInTooltip:Z")) | ||
private boolean modifyShowInTooltip(boolean original) { | ||
BetterTooltips bt = Modules.get().get(BetterTooltips.class); | ||
return (bt.isActive() && bt.upgrades.get()) || original; | ||
} | ||
} |
28 changes: 28 additions & 0 deletions
28
src/main/java/meteordevelopment/meteorclient/mixin/BundleItemMixin.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
/* | ||
* This file is part of the Meteor Client distribution (https://github.com/MeteorDevelopment/meteor-client). | ||
* Copyright (c) Meteor Development. | ||
*/ | ||
|
||
package meteordevelopment.meteorclient.mixin; | ||
|
||
import com.llamalad7.mixinextras.injector.ModifyExpressionValue; | ||
import meteordevelopment.meteorclient.systems.modules.Modules; | ||
import meteordevelopment.meteorclient.systems.modules.render.BetterTooltips; | ||
import net.minecraft.item.BundleItem; | ||
import org.spongepowered.asm.mixin.Mixin; | ||
import org.spongepowered.asm.mixin.injection.At; | ||
|
||
@Mixin(BundleItem.class) | ||
public class BundleItemMixin { | ||
@ModifyExpressionValue(method = "getTooltipData", at = @At(value = "INVOKE", target = "Lnet/minecraft/item/ItemStack;contains(Lnet/minecraft/component/DataComponentType;)Z", ordinal = 0)) | ||
private boolean modifyContains1(boolean original) { | ||
BetterTooltips bt = Modules.get().get(BetterTooltips.class); | ||
return (bt.isActive() && bt.tooltip.get()) || original; | ||
} | ||
|
||
@ModifyExpressionValue(method = "getTooltipData", at = @At(value = "INVOKE", target = "Lnet/minecraft/item/ItemStack;contains(Lnet/minecraft/component/DataComponentType;)Z", ordinal = 1)) | ||
private boolean modifyContains2(boolean original) { | ||
BetterTooltips bt = Modules.get().get(BetterTooltips.class); | ||
return (bt.isActive() && bt.additional.get()) || original; | ||
} | ||
} |
18 changes: 18 additions & 0 deletions
18
src/main/java/meteordevelopment/meteorclient/mixin/ContainerComponentAccessor.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
/* | ||
* This file is part of the Meteor Client distribution (https://github.com/MeteorDevelopment/meteor-client). | ||
* Copyright (c) Meteor Development. | ||
*/ | ||
|
||
package meteordevelopment.meteorclient.mixin; | ||
|
||
import net.minecraft.component.type.ContainerComponent; | ||
import net.minecraft.item.ItemStack; | ||
import net.minecraft.util.collection.DefaultedList; | ||
import org.spongepowered.asm.mixin.Mixin; | ||
import org.spongepowered.asm.mixin.gen.Accessor; | ||
|
||
@Mixin(ContainerComponent.class) | ||
public interface ContainerComponentAccessor { | ||
@Accessor | ||
DefaultedList<ItemStack> getStacks(); | ||
} |
22 changes: 22 additions & 0 deletions
22
src/main/java/meteordevelopment/meteorclient/mixin/DyedColorComponentMixin.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
/* | ||
* This file is part of the Meteor Client distribution (https://github.com/MeteorDevelopment/meteor-client). | ||
* Copyright (c) Meteor Development. | ||
*/ | ||
|
||
package meteordevelopment.meteorclient.mixin; | ||
|
||
import com.llamalad7.mixinextras.injector.ModifyExpressionValue; | ||
import meteordevelopment.meteorclient.systems.modules.Modules; | ||
import meteordevelopment.meteorclient.systems.modules.render.BetterTooltips; | ||
import net.minecraft.component.type.DyedColorComponent; | ||
import org.spongepowered.asm.mixin.Mixin; | ||
import org.spongepowered.asm.mixin.injection.At; | ||
|
||
@Mixin(DyedColorComponent.class) | ||
public class DyedColorComponentMixin { | ||
@ModifyExpressionValue(method = "appendTooltip", at = @At(value = "FIELD", target = "Lnet/minecraft/component/type/DyedColorComponent;showInTooltip:Z")) | ||
private boolean modifyShowInTooltip(boolean original) { | ||
BetterTooltips bt = Modules.get().get(BetterTooltips.class); | ||
return (bt.isActive() && bt.dye.get()) || original; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
22 changes: 22 additions & 0 deletions
22
src/main/java/meteordevelopment/meteorclient/mixin/ItemEnchantmentsComponentMixin.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
/* | ||
* This file is part of the Meteor Client distribution (https://github.com/MeteorDevelopment/meteor-client). | ||
* Copyright (c) Meteor Development. | ||
*/ | ||
|
||
package meteordevelopment.meteorclient.mixin; | ||
|
||
import com.llamalad7.mixinextras.injector.ModifyExpressionValue; | ||
import meteordevelopment.meteorclient.systems.modules.Modules; | ||
import meteordevelopment.meteorclient.systems.modules.render.BetterTooltips; | ||
import net.minecraft.component.type.ItemEnchantmentsComponent; | ||
import org.spongepowered.asm.mixin.Mixin; | ||
import org.spongepowered.asm.mixin.injection.At; | ||
|
||
@Mixin(ItemEnchantmentsComponent.class) | ||
public class ItemEnchantmentsComponentMixin { | ||
@ModifyExpressionValue(method = "appendTooltip", at = @At(value = "FIELD", target = "Lnet/minecraft/component/type/ItemEnchantmentsComponent;showInTooltip:Z")) | ||
private boolean modifyShowInTooltip(boolean original) { | ||
BetterTooltips bt = Modules.get().get(BetterTooltips.class); | ||
return (bt.isActive() && bt.enchantments.get()) || original; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
22 changes: 22 additions & 0 deletions
22
src/main/java/meteordevelopment/meteorclient/mixin/UnbreakableComponentMixin.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
/* | ||
* This file is part of the Meteor Client distribution (https://github.com/MeteorDevelopment/meteor-client). | ||
* Copyright (c) Meteor Development. | ||
*/ | ||
|
||
package meteordevelopment.meteorclient.mixin; | ||
|
||
import com.llamalad7.mixinextras.injector.ModifyExpressionValue; | ||
import meteordevelopment.meteorclient.systems.modules.Modules; | ||
import meteordevelopment.meteorclient.systems.modules.render.BetterTooltips; | ||
import net.minecraft.component.type.UnbreakableComponent; | ||
import org.spongepowered.asm.mixin.Mixin; | ||
import org.spongepowered.asm.mixin.injection.At; | ||
|
||
@Mixin(UnbreakableComponent.class) | ||
public class UnbreakableComponentMixin { | ||
@ModifyExpressionValue(method = "appendTooltip", at = @At(value = "FIELD", target = "Lnet/minecraft/component/type/UnbreakableComponent;showInTooltip:Z")) | ||
private boolean modifyShowInTooltip(boolean original) { | ||
BetterTooltips bt = Modules.get().get(BetterTooltips.class); | ||
return (bt.isActive() && bt.unbreakable.get()) || original; | ||
} | ||
} |
Oops, something went wrong.