Skip to content

Commit 75d67b7

Browse files
authored
Merge pull request #2092
Fix filters having duplicate NBT
2 parents 7a08a68 + e29c81d commit 75d67b7

3 files changed

Lines changed: 25 additions & 6 deletions

File tree

src/main/java/wayoftime/bloodmagic/common/item/inventory/ItemInventory.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ public void readFromStack(ItemStack masterStack)
8080
{
8181
NBTHelper.checkNBT(masterStack);
8282
CompoundTag tag = masterStack.getTag();
83-
readFromNBT(tag.getCompound(Constants.NBT.ITEM_INVENTORY + name));
83+
readFromNBT(tag);
8484
}
8585
}
8686

@@ -92,7 +92,7 @@ public void writeToStack(ItemStack masterStack)
9292
CompoundTag tag = masterStack.getTag();
9393
CompoundTag invTag = new CompoundTag();
9494
writeToNBT(invTag);
95-
tag.put(Constants.NBT.ITEM_INVENTORY + name, invTag);
95+
//tag.put(Constants.NBT.ITEM_INVENTORY + name, invTag);
9696
}
9797
}
9898

Lines changed: 16 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,29 @@
11
{
2-
"name": "Copying Filters",
2+
"name": "Editing Filters",
33
"icon": "minecraft:writable_book",
44
"category": "bloodmagic:demon_will/item_routing",
55
"pages":[
66
{
77
"type": "patchouli:text",
8-
"text": "if you are configuring a large number of $(thing)filters$(), or want to expand your existing filter setups, simply place two filters into a crafting table to copy the filter in slot one onto the filter in slot two."
8+
"text": "If you are configuring a large number of $(thing)filters$(), or want to expand your existing filter setups, simply place between two and 9 filters into a crafting table to copy the filter in slot one onto all the other filters."
99
},
1010
{
1111
"type": "bloodmagic:manual_recipe",
12-
"input1": "bloodmagic:itemrouterfilterexact{itemInventoryRoutingFilter: {Items: [{Slot: 0b, id: \"minecraft:leather\", Count: 1b, tag: {stackSize: 1}}]}, Items: [{Slot: 0b, id: \"minecraft:leather\", Count: 1b, tag: {stackSize: 1}}], \"button:blackwhitelist\": 0, leastSig: -8112316981097356963L, mostSig: 4875194384706061509L}",
12+
"input1": "bloodmagic:itemrouterfilterexact{Items: [{Slot: 0b, id: \"minecraft:leather\", Count: 1b, tag: {stackSize: 1}}], \"button:blackwhitelist\": 0}",
1313
"input2": "bloodmagic:itemrouterfilterexact",
14-
"output": "bloodmagic:itemrouterfilterexact#2{itemInventoryRoutingFilter: {Items: [{Slot: 0b, id: \"minecraft:leather\", Count: 1b, tag: {stackSize: 1}}]}, Items: [{Slot: 0b, id: \"minecraft:leather\", Count: 1b, tag: {stackSize: 1}}], \"button:blackwhitelist\": 0, leastSig: -8112316981097356963L, mostSig: 4875194384706061509L}"
14+
"input9": "bloodmagic:itemrouterfilterexact",
15+
"output": "bloodmagic:itemrouterfilterexact#3{Items: [{Slot: 0b, id: \"minecraft:leather\", Count: 1b, tag: {stackSize: 1}}], \"button:blackwhitelist\": 0}"
16+
},
17+
{
18+
"type": "patchouli:text",
19+
"text": "Similarly, if you want to clear a filter, place it in the crafting table on its own, like so."
20+
},
21+
{
22+
"type": "bloodmagic:manual_recipe",
23+
"input1": "bloodmagic:itemrouterfilterexact{Items: [{Slot: 0b, id: \"minecraft:leather\", Count: 1b, tag: {stackSize: 1}}], \"button:blackwhitelist\": 0}",
24+
"input2": "minecraft:air",
25+
"input9": "minecraft:air",
26+
"output": "bloodmagic:itemrouterfilterexact"
1527
}
1628
]
1729
}

src/main/resources/assets/bloodmagic/patchouli_books/guide/en_us/templates/manual_recipe.json

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,13 @@
2626
"x":"31",
2727
"y":"7"
2828
},
29+
{
30+
"type": "patchouli:item",
31+
"item": "#input9#",
32+
"framed": false,
33+
"x": "50",
34+
"y": "45"
35+
},
2936
{
3037
"type": "patchouli:item",
3138
"item": "#output#",

0 commit comments

Comments
 (0)