Skip to content

Commit

Permalink
3.5.1 Update
Browse files Browse the repository at this point in the history
- Added additional checks for null NBT tags, fixed a rare crash with NBT tags not applying to new Exchangers properly, closes #69
  • Loading branch information
JackyyTV committed Sep 1, 2023
1 parent 40e9548 commit b62c298
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 12 deletions.
9 changes: 1 addition & 8 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -62,13 +62,6 @@ repositories {
name = 'ModMaven'
url = 'https://modmaven.dev'
}
maven {
name = 'JEI Maven'
url = 'https://dvs1.progwml6.com/files/maven'
content {
includeGroup 'mezz.jei'
}
}
maven {
name = 'Curse Maven'
url = 'https://www.cursemaven.com'
Expand All @@ -87,7 +80,7 @@ dependencies {

implementation fg.deobf("curse.maven:gunpowderlib-356646:4573505") //1.20-2.2

runtimeOnly fg.deobf("curse.maven:ender_io-64578:4637542") //6.0.5-alpha
runtimeOnly fg.deobf("curse.maven:ender_io-64578:4719371") //6.0.18-alpha
//runtimeOnly fg.deobf("curse.maven:mekanism-268560:")
//runtimeOnly fg.deobf("curse.maven:immersive_engineering-231951:")
//runtimeOnly fg.deobf("curse.maven:cofh_core-69162:")
Expand Down
4 changes: 2 additions & 2 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,14 @@ mod_name=Exchangers
mc_version=1.20.1
mc_version_range=[1.20,1.21)

forge_version=47.1.28
forge_version=47.1.46
forge_version_range=[46,)
loader_version_range=[46,)

mappings_channel=official
mappings_version=1.20.1

mod_version=3.5
mod_version=3.5.1
mod_license=Jacky's Minecraft Mods License
mod_authors=Jackyy, TurkeyDev
mod_description=Block Exchangers.
Original file line number Diff line number Diff line change
Expand Up @@ -146,6 +146,7 @@ public void onKeyInput(InputEvent.Key event) {
if (player != null) {
ItemStack heldItem = player.getMainHandItem();
if (!heldItem.isEmpty() && heldItem.getItem() instanceof ItemExchangerBase) {
ExchangerHandler.setDefaultTagCompound(heldItem);
if (Keys.OPEN_GUI_KEY.get().isDown()) {
mc.setScreen(new ExchangersGuiScreen());
} else if (Keys.RANGE_SWITCH_KEY.get().isDown()) {
Expand Down
6 changes: 4 additions & 2 deletions src/main/java/jackyy/exchangers/item/ItemExchangerBase.java
Original file line number Diff line number Diff line change
Expand Up @@ -59,10 +59,12 @@ public InteractionResult useOn(UseOnContext context) {
BlockPos pos = context.getClickedPos();
Direction side = context.getClickedFace();
if (!world.isClientSide() && player != null) {
ItemStack mainHandStack = player.getMainHandItem();
ExchangerHandler.setDefaultTagCompound(mainHandStack);
if (player.isShiftKeyDown()) {
ExchangerHandler.selectBlock(player.getMainHandItem(), player, world, pos);
ExchangerHandler.selectBlock(mainHandStack, player, world, pos);
} else {
ExchangerHandler.placeBlock(player.getMainHandItem(), player, world, pos, side, context);
ExchangerHandler.placeBlock(mainHandStack, player, world, pos, side, context);
}
}
return InteractionResult.SUCCESS;
Expand Down

0 comments on commit b62c298

Please sign in to comment.