Skip to content

Commit fad9f72

Browse files
committed
- fixed duplication bug + bumb to 1.1.16
1 parent 6ef75e6 commit fad9f72

File tree

3 files changed

+11
-19
lines changed

3 files changed

+11
-19
lines changed

CHANGELOG.md

Lines changed: 2 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,2 @@
1-
## v1.1.15 (1.20.1)
2-
- nerfed impact of Exhaustion
3-
- added Shielding Armor Attribute
4-
- improved OverlayModelProperty
5-
- fixed issue with generated materials were some generated Materials would crash out
6-
- added config option to allow Items to go into a Broken state instead of fully breaking, similar to vanillas elytra behaviour
7-
- fix module list scrolling to the top on gui update
8-
- added config to shielding_armor positions
9-
- added "can_child_be_empty" property to allow blocking of the Empty Slot Crafting Option
10-
- removed EF property for now (EF is still supported, this was just a fancier way for support that we didn't use)
11-
- added tags to miapi, c, minecraft and forge for armor, helmets, chestplates, leggings, boots, swords, knifes, tools, axes, pickaxes, shovels, hoes, bows, crossbows
1+
## v1.1.16 (1.20.1)
2+
- fixed duplication bug in workbench

common/src/main/java/smartin/miapi/client/gui/crafting/CraftingScreenHandler.java

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -300,6 +300,7 @@ public void sendContentUpdates() {
300300
BlockEntity be = playerInventory.player.getWorld().getBlockEntity(new BlockPos(x, y, z));
301301
if (be instanceof ModularWorkBenchEntity casted) blockEntity = casted;
302302
}
303+
updateBE();
303304
}
304305

305306
/**
@@ -379,6 +380,13 @@ public void setItem(ItemStack stack) {
379380
}
380381
}
381382

383+
private void updateBE() {
384+
if (notClient()) {
385+
blockEntity.setItem(inventory.getStack(0));
386+
blockEntity.saveAndSync();
387+
}
388+
}
389+
382390
public ItemStack quickMove(PlayerEntity player, int index) {
383391
inventory.markDirty();
384392
ItemStack itemStack = ItemStack.EMPTY;
@@ -465,13 +473,6 @@ public void setStack(ItemStack stack) {
465473
}
466474
this.markDirty();
467475
}
468-
469-
@Override
470-
public ItemStack getStack() {
471-
ItemStack stack = super.getStack();
472-
if (notClient() && !stack.isEmpty()) return blockEntity.getItem();
473-
return stack;
474-
}
475476
}
476477

477478
public static class PlayerInventorySlot extends Slot {

gradle.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ org.gradle.jvmargs=-Xmx3G
33
minecraft_version=1.20.1
44

55
archives_base_name=Truly-Modular-miapi
6-
mod_version=1.1.15
6+
mod_version=1.1.16
77
maven_group=smartin
88
mod_id=miapi
99
credits=KawataroTB, Nytifx, Ace, Beniven, Repeat, RPGLordLight and others

0 commit comments

Comments
 (0)