Skip to content

Commit ffa85dc

Browse files
committed
Multifiltration
- Clipboards now copy invertedness of brass diodes - Clipboards can now copy filters, consuming filter items from the players' inventory - Fixed Filters and Attribute Filters not stacking with unmodified, equivalent stacks - Fixed Attribute Filters saving the name tag preview item in their data - Filters and Schedules can now be reset via crafting - Fixed 'upto'-filter amounts not working correctly on inserting belt funnels
1 parent c7b0c11 commit ffa85dc

File tree

18 files changed

+311
-38
lines changed

18 files changed

+311
-38
lines changed

src/generated/resources/.cache/cache

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -578,7 +578,7 @@ bf2b0310500213ff853c748c236eb5d01f61658e assets/create/blockstates/yellow_toolbo
578578
7f39521b211441f5c3e06d60c5978cebe16cacfb assets/create/blockstates/zinc_block.json
579579
b7181bcd8182b2f17088e5aa881f374c9c65470c assets/create/blockstates/zinc_ore.json
580580
e4af08f4e51db9c4a722ebff44a04e8bd9a9dba6 assets/create/lang/en_ud.json
581-
b14838ef90096d8877aa4ca10e5b261063a41805 assets/create/lang/en_us.json
581+
d2175e6c3f6eb92f6d92c9314014c175239a744e assets/create/lang/en_us.json
582582
487a511a01b2a4531fb672f917922312db78f958 assets/create/models/block/acacia_window.json
583583
b48060cba1a382f373a05bf0039054053eccf076 assets/create/models/block/acacia_window_pane_noside.json
584584
3066db1bf03cffa1a9c7fbacf47ae586632f4eb3 assets/create/models/block/acacia_window_pane_noside_alt.json
@@ -2378,17 +2378,20 @@ d8331026603dacf176ef6475f0d2b4f93e1a71a8 data/create/advancements/recipes/buildi
23782378
ba80332510acab3f60f30d8b802ee2d450fd51b9 data/create/advancements/recipes/create.base/blasting/zinc_ingot_from_crushed.json
23792379
4bb60ef5e186f12a9d52e61319db8c78300c64ab data/create/advancements/recipes/create.base/blasting/zinc_ingot_from_ore.json
23802380
00ff89f208cb9023d7a2657c43d267e21755fb2e data/create/advancements/recipes/create.base/blasting/zinc_ingot_from_raw_ore.json
2381+
6050a12e82e081cc869b9a2a878b9da27854b022 data/create/advancements/recipes/create.base/crafting/appliances/attribute_filter_clear.json
23812382
3194b8da04cfb26f070b0a14f210f0117f252993 data/create/advancements/recipes/create.base/crafting/appliances/clipboard.json
23822383
a1746099602e91fd23fba112016d41c71f9de62e data/create/advancements/recipes/create.base/crafting/appliances/clipboard_clear.json
23832384
376bda381f3dedb52b03eb1504b103d8ddd1b672 data/create/advancements/recipes/create.base/crafting/appliances/copper_backtank.json
23842385
9833d16405f8c51646590e98588fb410f96d9523 data/create/advancements/recipes/create.base/crafting/appliances/copper_diving_boots.json
23852386
680c982dd1d3c45bed4d390fc0da5042750c157a data/create/advancements/recipes/create.base/crafting/appliances/copper_diving_helmet.json
23862387
265a953eaac909fd2817c6dc3d1a08b376579a25 data/create/advancements/recipes/create.base/crafting/appliances/crafting_blueprint.json
23872388
fa2e18298f7710465d9b0798a69288e846c646fd data/create/advancements/recipes/create.base/crafting/appliances/dough.json
2389+
048a24b84c19c47802c5aed069001925eedd087d data/create/advancements/recipes/create.base/crafting/appliances/filter_clear.json
23882390
a9b163744b1c494d07ec256d0367884f9601176d data/create/advancements/recipes/create.base/crafting/appliances/linked_controller.json
23892391
ab1e704db4a41a8d2cba357942f95c411a80a0c8 data/create/advancements/recipes/create.base/crafting/appliances/netherite_backtank.json
23902392
f714a7fa70ed9e9b0c145d466357cd1ef4de184b data/create/advancements/recipes/create.base/crafting/appliances/netherite_diving_boots.json
23912393
99efa64a74ad29cf3b6cc565eabdd9b7e7e0cc40 data/create/advancements/recipes/create.base/crafting/appliances/netherite_diving_helmet.json
2394+
4f591309b0d47e2940f60e0e43f65fdf250b0dfa data/create/advancements/recipes/create.base/crafting/appliances/schedule_clear.json
23922395
c4769d7ac9c537eb4409b02883e89d0930514a8b data/create/advancements/recipes/create.base/crafting/appliances/tree_fertilizer.json
23932396
bb138bedd2aec741fa54b6b52be384fdbd741249 data/create/advancements/recipes/create.base/crafting/curiosities/brown_toolbox.json
23942397
773faf96b003868e35ceeb0bf738281d066e343b data/create/advancements/recipes/create.base/crafting/curiosities/minecart_coupling.json
@@ -3855,17 +3858,20 @@ ac91109efa5a253f54257904190b80a400ec6d0c data/create/recipes/compacting/diorite_
38553858
82316030429530a798020a6a31a3f1718b1123b2 data/create/recipes/copper_tiles_from_ingots_copper_stonecutting.json
38563859
64e802b3c6fc1c7e9926531cfa625d58505852f6 data/create/recipes/copycat_panel_from_ingots_zinc_stonecutting.json
38573860
4c4d62d9e95c6e37ab38c49cf472034d750530c7 data/create/recipes/copycat_step_from_ingots_zinc_stonecutting.json
3861+
fab6c25ea9eeb489121c96002f361ac032ec42c9 data/create/recipes/crafting/appliances/attribute_filter_clear.json
38583862
005f8ad32598ea98314031e66b06e95e1f8ddd13 data/create/recipes/crafting/appliances/clipboard.json
38593863
db648fd89bc2030f3e1e9baa0d2b5b69238dec4c data/create/recipes/crafting/appliances/clipboard_clear.json
38603864
eb18d5972484418fa5a768633e68688ad20d2bd7 data/create/recipes/crafting/appliances/copper_backtank.json
38613865
5771562086710eb5a3a05d464989d2f23d6c5e86 data/create/recipes/crafting/appliances/copper_diving_boots.json
38623866
ec38ddb44e4bf8eaaba6f9d27e8469234fc98528 data/create/recipes/crafting/appliances/copper_diving_helmet.json
38633867
c077375d16b4505e52548613fbc9356993556e6b data/create/recipes/crafting/appliances/crafting_blueprint.json
38643868
edf96556bb2357f54fd398fe573641afa15239b2 data/create/recipes/crafting/appliances/dough.json
3869+
96feda6a0556a73851a41c6b7b7be1e8d9d5a028 data/create/recipes/crafting/appliances/filter_clear.json
38653870
75cdbd88973a8ca943ebe890153b01a344b96b01 data/create/recipes/crafting/appliances/linked_controller.json
38663871
9ef7bae26db471741096abd2b02f738202913994 data/create/recipes/crafting/appliances/netherite_backtank.json
38673872
e84952517f02a7c1ba10f12e2e0e32b94f720e58 data/create/recipes/crafting/appliances/netherite_diving_boots.json
38683873
664421c08143e4eb60332f53da17f70b4be83e74 data/create/recipes/crafting/appliances/netherite_diving_helmet.json
3874+
9c40eb131b4e8161654e00f47b654abf5ed75804 data/create/recipes/crafting/appliances/schedule_clear.json
38693875
7b5f863dda3d05a79cb85943a178eba0bd8a7dc7 data/create/recipes/crafting/appliances/slime_ball.json
38703876
b159ba84428eee6ef6e23df1766f2a18f2c8a63e data/create/recipes/crafting/appliances/tree_fertilizer.json
38713877
395f5fc62e27448121e3447a24a752be1a91def2 data/create/recipes/crafting/copper/waxed_copper_shingle_slab_from_honeycomb.json

src/generated/resources/assets/create/lang/en_us.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1099,6 +1099,7 @@
10991099
"create.logistics.filter.any_amount_short": "Any",
11001100
"create.logistics.filter.up_to": "Up to",
11011101
"create.logistics.filter.exactly": "Exactly",
1102+
"create.logistics.filter.requires_item_in_inventory": "Requires %1$s item in Inventory",
11021103
"create.logistics.creative_crate.supply": "Infinite Supply",
11031104
"create.logistics.train_observer.cargo_filter": "Cargo Filter",
11041105

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
{
2+
"parent": "minecraft:recipes/root",
3+
"rewards": {
4+
"recipes": [
5+
"create:crafting/appliances/attribute_filter_clear"
6+
]
7+
},
8+
"criteria": {
9+
"has_item": {
10+
"trigger": "minecraft:inventory_changed",
11+
"conditions": {
12+
"items": [
13+
{
14+
"items": [
15+
"create:attribute_filter"
16+
]
17+
}
18+
]
19+
}
20+
},
21+
"has_the_recipe": {
22+
"trigger": "minecraft:recipe_unlocked",
23+
"conditions": {
24+
"recipe": "create:crafting/appliances/attribute_filter_clear"
25+
}
26+
}
27+
},
28+
"requirements": [
29+
[
30+
"has_item",
31+
"has_the_recipe"
32+
]
33+
]
34+
}
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
{
2+
"parent": "minecraft:recipes/root",
3+
"rewards": {
4+
"recipes": [
5+
"create:crafting/appliances/filter_clear"
6+
]
7+
},
8+
"criteria": {
9+
"has_item": {
10+
"trigger": "minecraft:inventory_changed",
11+
"conditions": {
12+
"items": [
13+
{
14+
"items": [
15+
"create:filter"
16+
]
17+
}
18+
]
19+
}
20+
},
21+
"has_the_recipe": {
22+
"trigger": "minecraft:recipe_unlocked",
23+
"conditions": {
24+
"recipe": "create:crafting/appliances/filter_clear"
25+
}
26+
}
27+
},
28+
"requirements": [
29+
[
30+
"has_item",
31+
"has_the_recipe"
32+
]
33+
]
34+
}
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
{
2+
"parent": "minecraft:recipes/root",
3+
"rewards": {
4+
"recipes": [
5+
"create:crafting/appliances/schedule_clear"
6+
]
7+
},
8+
"criteria": {
9+
"has_item": {
10+
"trigger": "minecraft:inventory_changed",
11+
"conditions": {
12+
"items": [
13+
{
14+
"items": [
15+
"create:schedule"
16+
]
17+
}
18+
]
19+
}
20+
},
21+
"has_the_recipe": {
22+
"trigger": "minecraft:recipe_unlocked",
23+
"conditions": {
24+
"recipe": "create:crafting/appliances/schedule_clear"
25+
}
26+
}
27+
},
28+
"requirements": [
29+
[
30+
"has_item",
31+
"has_the_recipe"
32+
]
33+
]
34+
}
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
{
2+
"type": "minecraft:crafting_shapeless",
3+
"ingredients": [
4+
{
5+
"item": "create:attribute_filter"
6+
}
7+
],
8+
"result": {
9+
"item": "create:attribute_filter"
10+
}
11+
}
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
{
2+
"type": "minecraft:crafting_shapeless",
3+
"ingredients": [
4+
{
5+
"item": "create:filter"
6+
}
7+
],
8+
"result": {
9+
"item": "create:filter"
10+
}
11+
}
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
{
2+
"type": "minecraft:crafting_shapeless",
3+
"ingredients": [
4+
{
5+
"item": "create:schedule"
6+
}
7+
],
8+
"result": {
9+
"item": "create:schedule"
10+
}
11+
}

src/main/java/com/simibubi/create/content/contraptions/relays/belt/transport/BeltFunnelInteractionHandler.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ public static boolean checkForFunnels(BeltInventory beltInventory, TransportedIt
8383
else
8484
continue;
8585

86-
if (amountToExtract != -1) {
86+
if (amountToExtract != -1 && modeToExtract != ExtractionCountMode.UPTO) {
8787
toInsert.setCount(Math.min(amountToExtract, toInsert.getCount()));
8888
ItemStack remainder = inserting.simulate()
8989
.insert(toInsert);

src/main/java/com/simibubi/create/content/curiosities/clipboard/ClipboardValueSettingsHandler.java

Lines changed: 22 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -97,12 +97,16 @@ public static void clientTick() {
9797
boolean canCopy = smartBE.getAllBehaviours()
9898
.stream()
9999
.anyMatch(b -> b instanceof ClipboardCloneable cc
100-
&& cc.writeToClipboard(new CompoundTag(), target.getDirection()));
100+
&& cc.writeToClipboard(new CompoundTag(), target.getDirection()))
101+
|| smartBE instanceof ClipboardCloneable ccbe
102+
&& ccbe.writeToClipboard(new CompoundTag(), target.getDirection());
101103

102-
boolean canPaste = tagElement != null && smartBE.getAllBehaviours()
104+
boolean canPaste = tagElement != null && (smartBE.getAllBehaviours()
103105
.stream()
104106
.anyMatch(b -> b instanceof ClipboardCloneable cc && cc.readFromClipboard(
105-
tagElement.getCompound(cc.getClipboardKey()), mc.player, target.getDirection(), true));
107+
tagElement.getCompound(cc.getClipboardKey()), mc.player, target.getDirection(), true))
108+
|| smartBE instanceof ClipboardCloneable ccbe && ccbe.readFromClipboard(
109+
tagElement.getCompound(ccbe.getClipboardKey()), mc.player, target.getDirection(), true));
106110

107111
if (!canCopy && !canPaste)
108112
return;
@@ -164,6 +168,21 @@ private static void interact(PlayerInteractEvent event, boolean paste) {
164168
tag.put(clipboardKey, compoundTag);
165169
}
166170

171+
if (smartBE instanceof ClipboardCloneable ccbe) {
172+
anyValid = true;
173+
String clipboardKey = ccbe.getClipboardKey();
174+
if (paste) {
175+
anySuccess |= ccbe.readFromClipboard(tag.getCompound(clipboardKey), player, event.getFace(),
176+
world.isClientSide());
177+
} else {
178+
CompoundTag compoundTag = new CompoundTag();
179+
boolean success = ccbe.writeToClipboard(compoundTag, event.getFace());
180+
anySuccess |= success;
181+
if (success)
182+
tag.put(clipboardKey, compoundTag);
183+
}
184+
}
185+
167186
if (!anyValid)
168187
return;
169188

0 commit comments

Comments
 (0)