diff options
| author | 2024-01-10 00:26:04 +0100 | |
|---|---|---|
| committer | 2024-01-10 00:26:04 +0100 | |
| commit | 982f0bbbd7564b6f292a0890dd862149d9f710a9 (patch) | |
| tree | 30875caa478390a6c30096e17b4e0c8133a3cf88 /src/main/java/lv/enes/mc/eris_alchemy/mixin/client | |
| parent | Make Alchemical Chest waterloggable. (diff) | |
| download | mc-eris-alchemy-982f0bbbd7564b6f292a0890dd862149d9f710a9.tar.gz mc-eris-alchemy-982f0bbbd7564b6f292a0890dd862149d9f710a9.tar.xz mc-eris-alchemy-982f0bbbd7564b6f292a0890dd862149d9f710a9.zip | |
Some refactoring
Diffstat (limited to 'src/main/java/lv/enes/mc/eris_alchemy/mixin/client')
| -rw-r--r-- | src/main/java/lv/enes/mc/eris_alchemy/mixin/client/SheetsMixin.java | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/src/main/java/lv/enes/mc/eris_alchemy/mixin/client/SheetsMixin.java b/src/main/java/lv/enes/mc/eris_alchemy/mixin/client/SheetsMixin.java index 544dcef..46f7720 100644 --- a/src/main/java/lv/enes/mc/eris_alchemy/mixin/client/SheetsMixin.java +++ b/src/main/java/lv/enes/mc/eris_alchemy/mixin/client/SheetsMixin.java | |||
| @@ -13,8 +13,17 @@ import org.spongepowered.asm.mixin.injection.callback.CallbackInfoReturnable; | |||
| 13 | 13 | ||
| 14 | @Mixin(Sheets.class) | 14 | @Mixin(Sheets.class) |
| 15 | public abstract class SheetsMixin { | 15 | public abstract class SheetsMixin { |
| 16 | @Inject(method = "chooseMaterial(Lnet/minecraft/world/level/block/entity/BlockEntity;Lnet/minecraft/world/level/block/state/properties/ChestType;Z)Lnet/minecraft/client/resources/model/Material;", at = @At("RETURN"), cancellable = true) | 16 | @Inject( |
| 17 | private static void chooseMaterial(BlockEntity entity, ChestType type, boolean christmas, CallbackInfoReturnable<Material> cir) { | 17 | method = "chooseMaterial(Lnet/minecraft/world/level/block/entity/BlockEntity;Lnet/minecraft/world/level/block/state/properties/ChestType;Z)Lnet/minecraft/client/resources/model/Material;", |
| 18 | at = @At("RETURN"), | ||
| 19 | cancellable = true | ||
| 20 | ) | ||
| 21 | private static void chooseMaterial( | ||
| 22 | BlockEntity entity, | ||
| 23 | ChestType type, | ||
| 24 | boolean christmas, | ||
| 25 | CallbackInfoReturnable<Material> cir | ||
| 26 | ) { | ||
| 18 | if (entity instanceof AlchemicalChestBlockEntity) { | 27 | if (entity instanceof AlchemicalChestBlockEntity) { |
| 19 | cir.setReturnValue(ErisAlchemyMaterials.ALCHEMICAL_CHEST); | 28 | cir.setReturnValue(ErisAlchemyMaterials.ALCHEMICAL_CHEST); |
| 20 | } | 29 | } |