From 22af2594e413f1b56385b44b12eebb0aaf30b113 Mon Sep 17 00:00:00 2001 From: Jacky Date: Fri, 1 Sep 2023 22:23:33 +0800 Subject: [PATCH] 2.10.3 Update --- build.gradle | 6 +----- gradle.properties | 2 +- .../java/jackyy/exchangers/handler/ClientEventsHandler.java | 1 + src/main/java/jackyy/exchangers/item/ItemExchangerBase.java | 6 ++++-- src/main/java/jackyy/exchangers/util/Reference.java | 2 +- src/main/resources/mcmod.info | 2 +- src/main/resources/pack.mcmeta | 2 +- 7 files changed, 10 insertions(+), 11 deletions(-) diff --git a/build.gradle b/build.gradle index 977d87d..7298a68 100644 --- a/build.gradle +++ b/build.gradle @@ -1,7 +1,7 @@ buildscript { repositories { jcenter() - maven { url = "http://files.minecraftforge.net/maven" } + maven { url = "https://maven.minecraftforge.net" } } dependencies { classpath 'net.minecraftforge.gradle:ForgeGradle:2.3-SNAPSHOT' @@ -32,10 +32,6 @@ repositories { name = "ModMaven" url = "https://modmaven.dev" } - maven { - name = "JEI Maven" - url = "https://dvs1.progwml6.com/files/maven" - } maven { name = "CoFH Maven" url = "https://maven.covers1624.net" diff --git a/gradle.properties b/gradle.properties index 1596f46..a8e8290 100644 --- a/gradle.properties +++ b/gradle.properties @@ -2,6 +2,6 @@ org.gradle.jvmargs=-Xmx4G mod_name=Exchangers mc_version=1.12.2 forge_version=14.23.5.2847 -mod_version=2.10.2 +mod_version=2.10.3 mappings_channel=stable mappings_version=39 diff --git a/src/main/java/jackyy/exchangers/handler/ClientEventsHandler.java b/src/main/java/jackyy/exchangers/handler/ClientEventsHandler.java index 344f621..6ddbfaa 100644 --- a/src/main/java/jackyy/exchangers/handler/ClientEventsHandler.java +++ b/src/main/java/jackyy/exchangers/handler/ClientEventsHandler.java @@ -172,6 +172,7 @@ public void onKeyInput(InputEvent.KeyInputEvent event) { EntityPlayer player = FMLClientHandler.instance().getClient().player; ItemStack heldItem = player.getHeldItemMainhand(); if (!heldItem.isEmpty() && heldItem.getItem() instanceof ItemExchangerBase) { + ExchangerHandler.setDefaultTagCompound(heldItem); if (Keys.OPEN_GUI_KEY.isPressed()) { mc.displayGuiScreen(new ExchangersGuiScreen()); } else if (Keys.RANGE_SWITCH_KEY.isPressed()) { diff --git a/src/main/java/jackyy/exchangers/item/ItemExchangerBase.java b/src/main/java/jackyy/exchangers/item/ItemExchangerBase.java index 73c5e01..cc4594b 100644 --- a/src/main/java/jackyy/exchangers/item/ItemExchangerBase.java +++ b/src/main/java/jackyy/exchangers/item/ItemExchangerBase.java @@ -54,11 +54,13 @@ public boolean isPowered() { @Override public EnumActionResult onItemUse(EntityPlayer player, World world, BlockPos pos, EnumHand hand, EnumFacing side, float hitX, float hitY, float hitZ) { + ItemStack mainHandStack = player.getHeldItemMainhand(); + ExchangerHandler.setDefaultTagCompound(mainHandStack); if (!world.isRemote) { if (player.isSneaking()) { - ExchangerHandler.selectBlock(player.getHeldItemMainhand(), player, world, pos); + ExchangerHandler.selectBlock(mainHandStack, player, world, pos); } else { - ExchangerHandler.placeBlock(player.getHeldItemMainhand(), player, world, pos, side); + ExchangerHandler.placeBlock(mainHandStack, player, world, pos, side); } } return EnumActionResult.SUCCESS; diff --git a/src/main/java/jackyy/exchangers/util/Reference.java b/src/main/java/jackyy/exchangers/util/Reference.java index a6e59cd..320c9d9 100644 --- a/src/main/java/jackyy/exchangers/util/Reference.java +++ b/src/main/java/jackyy/exchangers/util/Reference.java @@ -13,7 +13,7 @@ public final class Reference { public static final String MODID = "exchangers"; public static final String MODNAME = "Exchangers"; - public static final String VERSION = "1.12.2-2.10.2"; + public static final String VERSION = "1.12.2-2.10.3"; public static final String MCVERSION = "[1.12,1.13)"; public static final String EIO = "enderio"; diff --git a/src/main/resources/mcmod.info b/src/main/resources/mcmod.info index 3cb4d0b..ea2a88a 100644 --- a/src/main/resources/mcmod.info +++ b/src/main/resources/mcmod.info @@ -3,7 +3,7 @@ "modid": "exchangers", "name": "Exchangers", "description": "Block Exchangers.", - "version": "1.12.2-2.10.2", + "version": "1.12.2-2.10.3", "mcversion": "1.12.2", "url": "https://github.com/JackyyTV/Exchangers", "updateUrl": "", diff --git a/src/main/resources/pack.mcmeta b/src/main/resources/pack.mcmeta index 3d4ec1f..b01f442 100644 --- a/src/main/resources/pack.mcmeta +++ b/src/main/resources/pack.mcmeta @@ -1,6 +1,6 @@ { "pack": { - "description": "Exchangers Resources", + "description": "Exchangers resources", "pack_format": 3 } }