From 96616e1b5a60c32b1cd16dad3a9f796624abbc64 Mon Sep 17 00:00:00 2001 From: ACGaming <4818419+ACGaming@users.noreply.github.com> Date: Fri, 5 Apr 2024 16:52:32 +0200 Subject: [PATCH] Bump version, formatting --- gradle.properties | 2 +- .../mixin/UTPlagueEventHandlerMixin.java | 3 ++- .../mixin/UTBlockLaserRelayMixin.java | 15 +++++++++------ .../tconstruct/mixin/SmelteryRendererMixin.java | 7 ++++--- src/main/resources/mixins.mods.tconstruct.json | 2 +- 5 files changed, 17 insertions(+), 12 deletions(-) diff --git a/gradle.properties b/gradle.properties index 809fa892..0e8deae9 100644 --- a/gradle.properties +++ b/gradle.properties @@ -6,7 +6,7 @@ org.gradle.jvmargs = -Xmx3G maven_group = mod.acgaming mod_id = universaltweaks mod_name = Universal Tweaks -mod_version = 1.10.1 +mod_version = 1.11.0 archives_base_name = UniversalTweaks-1.12.2 # If any properties changes below this line, run `gradlew setupDecompWorkspace` and refresh gradle again to ensure everything is working correctly. diff --git a/src/main/java/mod/acgaming/universaltweaks/mods/abyssalcraft/mixin/UTPlagueEventHandlerMixin.java b/src/main/java/mod/acgaming/universaltweaks/mods/abyssalcraft/mixin/UTPlagueEventHandlerMixin.java index 95943c4e..54d695fb 100644 --- a/src/main/java/mod/acgaming/universaltweaks/mods/abyssalcraft/mixin/UTPlagueEventHandlerMixin.java +++ b/src/main/java/mod/acgaming/universaltweaks/mods/abyssalcraft/mixin/UTPlagueEventHandlerMixin.java @@ -1,8 +1,9 @@ package mod.acgaming.universaltweaks.mods.abyssalcraft.mixin; +import net.minecraftforge.event.entity.living.LivingDeathEvent; + import com.shinoow.abyssalcraft.common.handlers.PlagueEventHandler; import mod.acgaming.universaltweaks.config.UTConfigMods; -import net.minecraftforge.event.entity.living.LivingDeathEvent; import org.spongepowered.asm.mixin.Mixin; import org.spongepowered.asm.mixin.injection.At; import org.spongepowered.asm.mixin.injection.Inject; diff --git a/src/main/java/mod/acgaming/universaltweaks/mods/actuallyadditions/mixin/UTBlockLaserRelayMixin.java b/src/main/java/mod/acgaming/universaltweaks/mods/actuallyadditions/mixin/UTBlockLaserRelayMixin.java index 6360d868..9d995252 100644 --- a/src/main/java/mod/acgaming/universaltweaks/mods/actuallyadditions/mixin/UTBlockLaserRelayMixin.java +++ b/src/main/java/mod/acgaming/universaltweaks/mods/actuallyadditions/mixin/UTBlockLaserRelayMixin.java @@ -1,9 +1,5 @@ package mod.acgaming.universaltweaks.mods.actuallyadditions.mixin; -import de.ellpeck.actuallyadditions.mod.blocks.BlockLaserRelay; -import de.ellpeck.actuallyadditions.mod.tile.TileEntityLaserRelay; -import de.ellpeck.actuallyadditions.mod.util.StackUtil; -import mod.acgaming.universaltweaks.config.UTConfigMods; import net.minecraft.block.state.IBlockState; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.ItemStack; @@ -12,6 +8,11 @@ import net.minecraft.util.EnumHand; import net.minecraft.util.math.BlockPos; import net.minecraft.world.World; + +import de.ellpeck.actuallyadditions.mod.blocks.BlockLaserRelay; +import de.ellpeck.actuallyadditions.mod.tile.TileEntityLaserRelay; +import de.ellpeck.actuallyadditions.mod.util.StackUtil; +import mod.acgaming.universaltweaks.config.UTConfigMods; import org.spongepowered.asm.mixin.Mixin; import org.spongepowered.asm.mixin.injection.At; import org.spongepowered.asm.mixin.injection.Inject; @@ -26,12 +27,14 @@ public void utOnBlockActivated(World world, BlockPos pos, IBlockState state, Ent { if (!UTConfigMods.ACTUALLY_ADDITIONS.utLaserUpgradeVoid) return; TileEntity tile = world.getTileEntity(pos); - if (tile instanceof TileEntityLaserRelay) { + if (tile instanceof TileEntityLaserRelay) + { ItemStack stack = player.getHeldItem(hand); ItemStack set = stack.copy(); set.setCount(1); ((TileEntityLaserRelay) tile).inv.setStackInSlot(0, set); - if (!player.isCreative()) { + if (!player.isCreative()) + { player.setHeldItem(hand, StackUtil.shrink(stack, 1)); } cir.setReturnValue(true); diff --git a/src/main/java/mod/acgaming/universaltweaks/mods/tconstruct/mixin/SmelteryRendererMixin.java b/src/main/java/mod/acgaming/universaltweaks/mods/tconstruct/mixin/SmelteryRendererMixin.java index 3013e9af..14ce265b 100644 --- a/src/main/java/mod/acgaming/universaltweaks/mods/tconstruct/mixin/SmelteryRendererMixin.java +++ b/src/main/java/mod/acgaming/universaltweaks/mods/tconstruct/mixin/SmelteryRendererMixin.java @@ -1,5 +1,7 @@ package mod.acgaming.universaltweaks.mods.tconstruct.mixin; +import javax.annotation.Nonnull; + import mod.acgaming.universaltweaks.config.UTConfigMods; import org.spongepowered.asm.mixin.Mixin; import org.spongepowered.asm.mixin.injection.At; @@ -9,8 +11,6 @@ import slimeknights.tconstruct.smeltery.client.SmelteryTankRenderer; import slimeknights.tconstruct.smeltery.tileentity.TileSmeltery; -import javax.annotation.Nonnull; - // Courtesy of WaitingIdly @Mixin(value = SmelteryRenderer.class, remap = false) public abstract class SmelteryRendererMixin extends SmelteryTankRenderer @@ -19,7 +19,8 @@ public abstract class SmelteryRendererMixin extends SmelteryTankRenderer UTConfigMods.TINKERS_CONSTRUCT.utMaximumItemRendersInSmeltery) { + if (smeltery.getSizeInventory() > UTConfigMods.TINKERS_CONSTRUCT.utMaximumItemRendersInSmeltery) + { ci.cancel(); } } diff --git a/src/main/resources/mixins.mods.tconstruct.json b/src/main/resources/mixins.mods.tconstruct.json index 37679fdc..30283dda 100644 --- a/src/main/resources/mixins.mods.tconstruct.json +++ b/src/main/resources/mixins.mods.tconstruct.json @@ -3,5 +3,5 @@ "refmap": "universaltweaks.refmap.json", "minVersion": "0.8", "compatibilityLevel": "JAVA_8", - "mixins": ["MaterialAccessor", "UTEntityProjectileBaseMixin", "UTFaucetMixin", "UTLongSwordMixin", "UTRapierMixin", "SmelteryRendererMixin"] + "mixins": ["MaterialAccessor", "SmelteryRendererMixin", "UTEntityProjectileBaseMixin", "UTFaucetMixin", "UTLongSwordMixin", "UTRapierMixin"] } \ No newline at end of file