Merge branch 'mc1.20.1/0.5.1' into mc1.20.1/dev

This commit is contained in:
simibubi 2024-10-09 18:15:19 +02:00
commit bcad4bfeaa
73 changed files with 432 additions and 140 deletions

View file

@ -1,4 +1,4 @@
// 1.20.1 2024-09-02T22:36:27.3560692 Create's Sequenced Assembly Recipes
// 1.20.1 2024-10-09T12:24:59.2666858 Create's Sequenced Assembly Recipes
dbaca5a5aa312f3bc7b826e51e665d32e798a5d7 data/create/recipes/sequenced_assembly/precision_mechanism.json
dacafdb106304d183b00e21fb01517ac45eca800 data/create/recipes/sequenced_assembly/sturdy_sheet.json
1274315b5c570722d6f5b2ed7f5e53fe01b6288a data/create/recipes/sequenced_assembly/track.json

View file

@ -1,4 +1,4 @@
// 1.20.1 2024-09-02T22:36:27.3056283 Registrate Provider for create [Recipes, Advancements, Loot Tables, Tags (blocks), Tags (items), Tags (fluids), Tags (entity_types), Blockstates, Item models, Lang (en_us/en_ud)]
// 1.20.1 2024-10-09T12:24:59.2028575 Registrate Provider for create [Recipes, Advancements, Loot Tables, Tags (blocks), Tags (items), Tags (fluids), Tags (entity_types), Blockstates, Item models, Lang (en_us/en_ud)]
60bbdf92d2ac9824ea6144955c74043a6005f79d assets/create/blockstates/acacia_window.json
6a67703c2697d81b7dc83e9d72a66f9c9ff08383 assets/create/blockstates/acacia_window_pane.json
c3ae87b62e81d8e9476eccd793bb1548d74c66a1 assets/create/blockstates/adjustable_chain_gearshift.json

View file

@ -1,4 +1,4 @@
// 1.20.1 2024-09-02T22:36:27.2861383 Create's Advancements
// 1.20.1 2024-10-09T12:24:59.1794112 Create's Advancements
2661a689fdcf729494f46e3c719f71c62e31582e data/create/advancements/andesite_alloy.json
fa16c4afe0496edc3f157858a6e0ff177a1622ff data/create/advancements/andesite_casing.json
5a694002d0a663bc869b09d15924a10c43dc522f data/create/advancements/anvil_plough.json

View file

@ -1,4 +1,4 @@
// 1.20.1 2024-09-02T22:36:27.2891201 Create Train Hat Information
// 1.20.1 2024-10-09T12:24:59.1824022 Create Train Hat Information
be16d47aa64e673b1107a36ce06475016e316fca assets/minecraft/train_hat_info/axolotl.json
b8ae6d9c8014439f4049622e0d6e79b9d6716260 assets/minecraft/train_hat_info/bat.json
5053a6c9fb412dfac1bf17eb0f57f9fd314198e4 assets/minecraft/train_hat_info/bee.json

View file

@ -1,4 +1,4 @@
// 1.20.1 2024-09-02T22:36:27.3630513 Create's Mechanical Crafting Recipes
// 1.20.1 2024-10-09T12:24:59.2726698 Create's Mechanical Crafting Recipes
f076d64d9f30709bed34775136c9241097b28aa9 data/create/recipes/mechanical_crafting/crushing_wheel.json
694dca9dcff246bb7f560b3304fcc244c53217d5 data/create/recipes/mechanical_crafting/extendo_grip.json
c03bc27f537e2d6531438bf58a17d977a7e16c7b data/create/recipes/mechanical_crafting/potato_cannon.json

View file

@ -1,4 +1,4 @@
// 1.20.1 2024-09-02T22:36:27.358065 Create's Standard Recipes
// 1.20.1 2024-10-09T12:24:59.2686824 Create's Standard Recipes
a8cc4af26f6c7c45a9eef12e92af1452fe042454 data/create/advancements/recipes/combat/crafting/appliances/netherite_backtank.json
2c2639c7b307ee7c7a4e97e5efebf496788998ad data/create/advancements/recipes/combat/crafting/appliances/netherite_backtank_from_netherite.json
81dcf0cb1aa99e39bc7d1a386e07cad4cee7d8b9 data/create/advancements/recipes/combat/crafting/appliances/netherite_diving_boots.json
@ -7,7 +7,7 @@ a8cc4af26f6c7c45a9eef12e92af1452fe042454 data/create/advancements/recipes/combat
c1f2e6d1d955fb2d6d7ccc7a6d45d051bbcab315 data/create/advancements/recipes/combat/crafting/appliances/netherite_diving_helmet_from_netherite.json
6418408e9fe53c03eae1e2b17b2229a548abc226 data/create/advancements/recipes/misc/blasting/copper_ingot_from_crushed.json
d88c5c8b6751f389d9eea30acbd566c120e77705 data/create/advancements/recipes/misc/blasting/gold_ingot_from_crushed.json
c5eabab1b28eaf8d83007b303480f12d8c319c4d data/create/advancements/recipes/misc/blasting/ingot_aluminum_compat_ic2.json
ea97407030aed9f2da5720fe7f68dd0c87f68944 data/create/advancements/recipes/misc/blasting/ingot_aluminium_compat_ic2.json
2532dd0af4124639c26525b6c4bbaf8059132903 data/create/advancements/recipes/misc/blasting/ingot_aluminum_compat_immersiveengineering.json
6b62cf9551e30b3560349e8d905cd10b446a98fd data/create/advancements/recipes/misc/blasting/ingot_lead_compat_immersiveengineering.json
4568168d851832c9eefd177c64a2de9c40e9954b data/create/advancements/recipes/misc/blasting/ingot_lead_compat_mekanism.json
@ -217,7 +217,7 @@ bb87cb8787644e20b3418d6f57726f2ca70b0aae data/create/advancements/recipes/misc/s
70342b3f5c5482caa82e0afcd559c7b200d9f247 data/create/advancements/recipes/misc/smelting/glass_pane_from_tiled_glass_pane.json
8635e2becb91b0e4e754fd79d231300492b8afce data/create/advancements/recipes/misc/smelting/glass_pane_from_vertical_framed_glass_pane.json
d76d08c3efcf9174ee2980796aa04c67fe9443eb data/create/advancements/recipes/misc/smelting/gold_ingot_from_crushed.json
6a53b4a956a5560dfa7a6ed3d3279fe502a45574 data/create/advancements/recipes/misc/smelting/ingot_aluminum_compat_ic2.json
5e222928aadd0a91f9996b0a104ec4b80646058c data/create/advancements/recipes/misc/smelting/ingot_aluminium_compat_ic2.json
1e88edf27ed1f83031f9d71cad8f3f4388f57b85 data/create/advancements/recipes/misc/smelting/ingot_aluminum_compat_immersiveengineering.json
2b6b739a2f0ad1f33db8090aa0e77c8149d67dbf data/create/advancements/recipes/misc/smelting/ingot_lead_compat_immersiveengineering.json
7392d585e5409438f70ddb43ebba58b35609265b data/create/advancements/recipes/misc/smelting/ingot_lead_compat_mekanism.json
@ -246,7 +246,7 @@ b8d5ef1eba4521441658d4c051861ecf9cc96102 data/create/advancements/recipes/misc/s
42f1375bf3004cfd891a5fbb05352f578636dd75 data/create/advancements/recipes/misc/smoking/bread.json
3c9dcf347eef42d0cca69ae5bc4a61fe90fb27c8 data/create/recipes/blasting/copper_ingot_from_crushed.json
cbd86c583643e65a0d9b7950dcf593cdf6d43d77 data/create/recipes/blasting/gold_ingot_from_crushed.json
053d94339f3b64e02b0eae56fe714b6f4a05986f data/create/recipes/blasting/ingot_aluminum_compat_ic2.json
4dccb0aaf5316c75f4dd03b497fb43bf20f7e279 data/create/recipes/blasting/ingot_aluminium_compat_ic2.json
5b1b7981636b211a956e37356423c2ba65c8042c data/create/recipes/blasting/ingot_aluminum_compat_immersiveengineering.json
f794d2eab3922ea7765866d473eb61c74a2678c5 data/create/recipes/blasting/ingot_lead_compat_immersiveengineering.json
7acb7c5bc88b238e914abc07f979c33f8d33123e data/create/recipes/blasting/ingot_lead_compat_mekanism.json
@ -451,7 +451,7 @@ d849fafedd10c68e6bc6dc1e5a85be82aae1b139 data/create/recipes/crafting/palettes/s
9a687ee9dab44c439ab669aa596117064fb13457 data/create/recipes/crafting/schematics/schematicannon.json
4a20356c9ce01ebfbcacbdc5d3c31094a5599a17 data/create/recipes/crafting/schematics/schematic_and_quill.json
4a297162a630b48407dbc8ff8ca713387dcd3206 data/create/recipes/crafting/schematics/schematic_table.json
dd2b5bfb7ebd836e8b5639894736c226f2cac8c0 data/create/recipes/crafting/tree_fertilizer.json
2cf06129b47d1a2b733619514dc9e8cf1d8967f2 data/create/recipes/crafting/tree_fertilizer.json
78526658ca5ccaa3729c967b5283069945d183b7 data/create/recipes/smelting/bread.json
04bb0c80f3b5a6fe86fc4a8ed5293fc74c2d9aba data/create/recipes/smelting/copper_ingot_from_crushed.json
d5b29fa27977691c3c50eb36c28bfe33b8462d09 data/create/recipes/smelting/glass_from_framed_glass.json
@ -463,7 +463,7 @@ ab1a181eb787f501ae7b8a8c6da2d3adb35a8f2b data/create/recipes/smelting/glass_pane
ad412d18c2084dc74fff8a079a2e7ffb20f9a0c6 data/create/recipes/smelting/glass_pane_from_tiled_glass_pane.json
67c1143c7aac88a9cc91b98dbca60770cb1422a5 data/create/recipes/smelting/glass_pane_from_vertical_framed_glass_pane.json
461e4dede50a4a318281ae9c086c8094470e21a1 data/create/recipes/smelting/gold_ingot_from_crushed.json
ae05209f9f639c7709bb25d0ff5f09f1af6cffcf data/create/recipes/smelting/ingot_aluminum_compat_ic2.json
0ceeee303ca8993c394fc597cdd7c5ef44d84ad0 data/create/recipes/smelting/ingot_aluminium_compat_ic2.json
fa0d3d6f50d344aa83ddf4ac8abf4a80deb9fb32 data/create/recipes/smelting/ingot_aluminum_compat_immersiveengineering.json
4e8cf8775719219849b1a0e95903a3605b665015 data/create/recipes/smelting/ingot_lead_compat_immersiveengineering.json
cfa90e7ba56d1ec6caa11bd019244bddd51da841 data/create/recipes/smelting/ingot_lead_compat_mekanism.json

View file

@ -1,4 +1,4 @@
// 1.20.1 2024-09-02T22:36:27.3560692 Create's Damage Type Tags
// 1.20.1 2024-10-09T12:24:59.2656887 Create's Damage Type Tags
7884716b2f4bb1330ff215366bb4bab06e4728c2 data/minecraft/tags/damage_type/bypasses_armor.json
1fcad1f89265fba8bdb05b03a1dfcc88d7b7a550 data/minecraft/tags/damage_type/is_explosion.json
08324c61115b72bb8a6370d7f34d84d9a31afd16 data/minecraft/tags/damage_type/is_fire.json

View file

@ -1,4 +1,4 @@
// 1.20.1 2024-09-02T22:36:27.2901169 Create's Processing Recipes
// 1.20.1 2024-10-09T12:24:59.1833995 Create's Processing Recipes
3c94326fb730f68c1e44fe1e2ef09c9db6ffd92b data/create/recipes/compacting/andesite_from_flint.json
8d3d5b31f3601b9f681ff710e0545a483a1494c6 data/create/recipes/compacting/blaze_cake.json
8bd7f4e3a686ab520b2d55594d2018d0e9a50c91 data/create/recipes/compacting/chocolate.json
@ -792,22 +792,22 @@ e383106ff8f877b5995e20c03af5e41e3db541d9 data/create/recipes/milling/compat/biom
213e079f32baa2879702b72bdf08f146877a0bb9 data/create/recipes/milling/compat/biomesoplenty/violet.json
b3f041e005491582f055da15871891357908d998 data/create/recipes/milling/compat/biomesoplenty/wildflower.json
d08c4fcebb79e2e02ac9cb4623124332a05ed661 data/create/recipes/milling/compat/biomesoplenty/wilted_lily.json
ca03746c39143de7867aeab2fb450fe0a67b69e3 data/create/recipes/milling/compat/botania/black_petal.json
3192777eeb363a55174a0eb58197ee686b2e02c7 data/create/recipes/milling/compat/botania/blue_petal.json
ee99c9bdcc4da8d160fc762ce7b394848d6a86d1 data/create/recipes/milling/compat/botania/brown_petal.json
1d8dab24913945268f819c24e132d8bb74f792c2 data/create/recipes/milling/compat/botania/cyan_petal.json
010a111f9810f142315bc94dfb1be03ee02508c4 data/create/recipes/milling/compat/botania/gray_petal.json
dee8b4c26d6b78aceeb8e5a264693dad4e81dbcb data/create/recipes/milling/compat/botania/green_petal.json
285a24e440d6a8cf34f2925a3eed7fa1d16e102b data/create/recipes/milling/compat/botania/light_blue_petal.json
3cc232966240394aaf5a3a5d16a3ceebd41597a0 data/create/recipes/milling/compat/botania/light_gray_petal.json
1225119a7dc1f69dfaf2cec32a0267b1d47ef72d data/create/recipes/milling/compat/botania/lime_petal.json
09e114685483329a78c3cecf8b312f16d26cd981 data/create/recipes/milling/compat/botania/magenta_petal.json
ae3e7eb55dda1846b8fd849ea1c8f1cbd37b9fca data/create/recipes/milling/compat/botania/orange_petal.json
bf13e9807a96efc1ef684f0129cc21110e44cc4c data/create/recipes/milling/compat/botania/pink_petal.json
7e0a167201b9c915579ede71ee7128bccdeee9c2 data/create/recipes/milling/compat/botania/purple_petal.json
4e7c1ae95f10bb3466dd542a2e04c726c599ecd9 data/create/recipes/milling/compat/botania/red_petal.json
28cbeb278022b2ac62cae2f3deaa65cb375c6456 data/create/recipes/milling/compat/botania/white_petal.json
dd1e35234c419b1576410a2590fd33d88c8bb9bd data/create/recipes/milling/compat/botania/yellow_petal.json
4994095300eabfe98a86036e7fbba6c12cddb078 data/create/recipes/milling/compat/botania/black_petal.json
3516555e62ce7d6f0b5a57375339e69b4de41f83 data/create/recipes/milling/compat/botania/blue_petal.json
deb37dcb4b323590fbb76f21732e5b9016028f7d data/create/recipes/milling/compat/botania/brown_petal.json
d831337c28b89ce25a2be50e06719ab3be9400b6 data/create/recipes/milling/compat/botania/cyan_petal.json
1ec99d5ee65becc6c921827956e26f286398b1ba data/create/recipes/milling/compat/botania/gray_petal.json
7bcbd91fae49452fe30966b350c6830ad5bb588c data/create/recipes/milling/compat/botania/green_petal.json
5819b1ff0c54851d4bf7c60228ce2e31b8d8ffee data/create/recipes/milling/compat/botania/light_blue_petal.json
94b6cb826923907527c57e079d08fb410720b008 data/create/recipes/milling/compat/botania/light_gray_petal.json
4fe3b309902b0d59971d351d6e4a8066908df195 data/create/recipes/milling/compat/botania/lime_petal.json
b8f8ea5d52ae9cbdd59d60aabbac660859190855 data/create/recipes/milling/compat/botania/magenta_petal.json
eab4d51ba92d5a2f172de76bca72cf2746359b68 data/create/recipes/milling/compat/botania/orange_petal.json
c8cf3978e3bf0ffeccd18c1b16ea26c5e1c18634 data/create/recipes/milling/compat/botania/pink_petal.json
9ee958eb5fb176902255aa606517a362670f3d60 data/create/recipes/milling/compat/botania/purple_petal.json
3239b0a1ef91f61ab32f42ac3935ee99316089c5 data/create/recipes/milling/compat/botania/red_petal.json
15afbebf247ea66e0b023ea84aa5c5dad8ac8466 data/create/recipes/milling/compat/botania/white_petal.json
9c500a9d6cadb4f673ca63de38c1d3713dab061c data/create/recipes/milling/compat/botania/yellow_petal.json
c7d2b07396448628123b81e1f34a8b131aa99c83 data/create/recipes/milling/compat/buzzier_bees/buttercup.json
0c4a3c7da1e151868740db2037504e35a02af3d0 data/create/recipes/milling/compat/buzzier_bees/pink_clover.json
355e89a3e003ae65ff06a9277c05699220eec569 data/create/recipes/milling/compat/buzzier_bees/white_clover.json
@ -1033,7 +1033,7 @@ e3f12ec5d449caa54ebe1c453a89373492b8f48a data/create/recipes/splashing/endergeti
64535aaa3a5d4b98791337b1a8ce50ad3d39a8ac data/create/recipes/splashing/gravel.json
dd9508767f68cc8b5cc2f642690961e0c22c9985 data/create/recipes/splashing/gray_concrete_powder.json
8908b452e6bc1290ebb8cfefc2c066460de93bff data/create/recipes/splashing/green_concrete_powder.json
869a639fd7069495693fd2106165b57ce674201b data/create/recipes/splashing/ic2/crushed_raw_aluminum.json
9764857ea6ee8d31ec37e6022f89dbe662e88591 data/create/recipes/splashing/ic2/crushed_raw_aluminum.json
6fd01478f838507f9e0daf7eb0a19e8315e03cb8 data/create/recipes/splashing/ic2/crushed_raw_silver.json
b5a0a0fc79bf310965aa16e78044b3f6a8a9998f data/create/recipes/splashing/ic2/crushed_raw_tin.json
00b8d0c2577cc36da1c862234b61fb7d1cfe3e65 data/create/recipes/splashing/ic2/crushed_raw_uranium.json

View file

@ -1,2 +1,2 @@
// 1.20.1 2024-09-02T22:36:27.3041196 Create's Custom Sounds
// 1.20.1 2024-10-09T12:24:59.2018604 Create's Custom Sounds
bcfd9320f8ed54f3282b1757a41da0d1753e1754 assets/create/sounds.json

View file

@ -1,2 +1,2 @@
// 1.20.1 2024-09-02T22:36:27.3550723 Create's Recipe Serializer Tags
// 1.20.1 2024-10-09T12:24:59.2646915 Create's Recipe Serializer Tags
0d8718f7383761bc5d7bc45306ed266ebf25dc1d data/create/tags/recipe_serializer/automation_ignore.json

View file

@ -1,4 +1,4 @@
// 1.20.1 2024-09-02T22:36:27.3570669 Create's Generated Registry Entries
// 1.20.1 2024-10-09T12:24:59.2666858 Create's Generated Registry Entries
030ede1044384c4117ac1e491bf5c78bbd2842f5 data/create/damage_type/crush.json
92b0416950ffeb3ba68811e587177c2f8811c2c5 data/create/damage_type/cuckoo_surprise.json
d2a4fdb64f4ba817e13a7b20c73fd1ca34b825fc data/create/damage_type/fan_fire.json

View file

@ -15,7 +15,7 @@
},
"has_the_recipe": {
"conditions": {
"recipe": "create:blasting/ingot_aluminum_compat_ic2"
"recipe": "create:blasting/ingot_aluminium_compat_ic2"
},
"trigger": "minecraft:recipe_unlocked"
}
@ -28,7 +28,7 @@
],
"rewards": {
"recipes": [
"create:blasting/ingot_aluminum_compat_ic2"
"create:blasting/ingot_aluminium_compat_ic2"
]
},
"sends_telemetry_event": false

View file

@ -15,7 +15,7 @@
},
"has_the_recipe": {
"conditions": {
"recipe": "create:smelting/ingot_aluminum_compat_ic2"
"recipe": "create:smelting/ingot_aluminium_compat_ic2"
},
"trigger": "minecraft:recipe_unlocked"
}
@ -28,7 +28,7 @@
],
"rewards": {
"recipes": [
"create:smelting/ingot_aluminum_compat_ic2"
"create:smelting/ingot_aluminium_compat_ic2"
]
},
"sends_telemetry_event": false

View file

@ -12,5 +12,5 @@
"ingredient": {
"item": "create:crushed_raw_aluminum"
},
"result": "ic2:ingot_aluminum"
"result": "ic2:ingot_aluminium"
}

View file

@ -1,6 +1,12 @@
{
"type": "minecraft:crafting_shapeless",
"category": "misc",
"conditions": [
{
"type": "forge:mod_loaded",
"modid": "upgrade_aquatic"
}
],
"ingredients": [
{
"tag": "minecraft:small_flowers"

View file

@ -1,5 +1,11 @@
{
"type": "create:milling",
"conditions": [
{
"type": "forge:mod_loaded",
"modid": "botania"
}
],
"ingredients": [
{
"tag": "botania:petals/black"

View file

@ -1,5 +1,11 @@
{
"type": "create:milling",
"conditions": [
{
"type": "forge:mod_loaded",
"modid": "botania"
}
],
"ingredients": [
{
"tag": "botania:petals/blue"

View file

@ -1,5 +1,11 @@
{
"type": "create:milling",
"conditions": [
{
"type": "forge:mod_loaded",
"modid": "botania"
}
],
"ingredients": [
{
"tag": "botania:petals/brown"

View file

@ -1,5 +1,11 @@
{
"type": "create:milling",
"conditions": [
{
"type": "forge:mod_loaded",
"modid": "botania"
}
],
"ingredients": [
{
"tag": "botania:petals/cyan"

View file

@ -1,5 +1,11 @@
{
"type": "create:milling",
"conditions": [
{
"type": "forge:mod_loaded",
"modid": "botania"
}
],
"ingredients": [
{
"tag": "botania:petals/gray"

View file

@ -1,5 +1,11 @@
{
"type": "create:milling",
"conditions": [
{
"type": "forge:mod_loaded",
"modid": "botania"
}
],
"ingredients": [
{
"tag": "botania:petals/green"

View file

@ -1,5 +1,11 @@
{
"type": "create:milling",
"conditions": [
{
"type": "forge:mod_loaded",
"modid": "botania"
}
],
"ingredients": [
{
"tag": "botania:petals/light_blue"

View file

@ -1,5 +1,11 @@
{
"type": "create:milling",
"conditions": [
{
"type": "forge:mod_loaded",
"modid": "botania"
}
],
"ingredients": [
{
"tag": "botania:petals/light_gray"

View file

@ -1,5 +1,11 @@
{
"type": "create:milling",
"conditions": [
{
"type": "forge:mod_loaded",
"modid": "botania"
}
],
"ingredients": [
{
"tag": "botania:petals/lime"

View file

@ -1,5 +1,11 @@
{
"type": "create:milling",
"conditions": [
{
"type": "forge:mod_loaded",
"modid": "botania"
}
],
"ingredients": [
{
"tag": "botania:petals/magenta"

View file

@ -1,5 +1,11 @@
{
"type": "create:milling",
"conditions": [
{
"type": "forge:mod_loaded",
"modid": "botania"
}
],
"ingredients": [
{
"tag": "botania:petals/orange"

View file

@ -1,5 +1,11 @@
{
"type": "create:milling",
"conditions": [
{
"type": "forge:mod_loaded",
"modid": "botania"
}
],
"ingredients": [
{
"tag": "botania:petals/pink"

View file

@ -1,5 +1,11 @@
{
"type": "create:milling",
"conditions": [
{
"type": "forge:mod_loaded",
"modid": "botania"
}
],
"ingredients": [
{
"tag": "botania:petals/purple"

View file

@ -1,5 +1,11 @@
{
"type": "create:milling",
"conditions": [
{
"type": "forge:mod_loaded",
"modid": "botania"
}
],
"ingredients": [
{
"tag": "botania:petals/red"

View file

@ -1,5 +1,11 @@
{
"type": "create:milling",
"conditions": [
{
"type": "forge:mod_loaded",
"modid": "botania"
}
],
"ingredients": [
{
"tag": "botania:petals/white"

View file

@ -1,5 +1,11 @@
{
"type": "create:milling",
"conditions": [
{
"type": "forge:mod_loaded",
"modid": "botania"
}
],
"ingredients": [
{
"tag": "botania:petals/yellow"

View file

@ -12,5 +12,5 @@
"ingredient": {
"item": "create:crushed_raw_aluminum"
},
"result": "ic2:ingot_aluminum"
"result": "ic2:ingot_aluminium"
}

View file

@ -14,7 +14,7 @@
"results": [
{
"count": 9,
"item": "ic2:nugget_aluminum"
"item": "ic2:nugget_aluminium"
}
]
}

View file

@ -1143,6 +1143,7 @@ public abstract class Contraption {
if (blockEntity instanceof IMultiBlockEntityContainer) {
if (tag.contains("LastKnownPos") || capturedMultiblocks.isEmpty()) {
tag.put("LastKnownPos", NbtUtils.writeBlockPos(BlockPos.ZERO.below(Integer.MAX_VALUE - 1)));
tag.remove("Controller");
}
}
@ -1199,6 +1200,9 @@ public abstract class Contraption {
// swap nbt data to the new controller position
StructureBlockInfo prevControllerInfo = blocks.get(controllerPos);
StructureBlockInfo newControllerInfo = blocks.get(otherPos);
if (prevControllerInfo == null || newControllerInfo == null)
return;
blocks.put(otherPos, new StructureBlockInfo(newControllerInfo.pos(), newControllerInfo.state(), prevControllerInfo.nbt()));
blocks.put(controllerPos, new StructureBlockInfo(prevControllerInfo.pos(), prevControllerInfo.state(), newControllerInfo.nbt()));
});
@ -1384,6 +1388,9 @@ public abstract class Contraption {
private void gatherBBsOffThread() {
getContraptionWorld();
if (simplifiedEntityColliderProvider != null) {
simplifiedEntityColliderProvider.cancel(false);
}
simplifiedEntityColliderProvider = CompletableFuture.supplyAsync(() -> {
VoxelShape combinedShape = Shapes.empty();
for (Entry<BlockPos, StructureBlockInfo> entry : blocks.entrySet()) {
@ -1400,7 +1407,6 @@ public abstract class Contraption {
})
.thenAccept(r -> {
simplifiedEntityColliders = Optional.of(r);
simplifiedEntityColliderProvider = null;
});
}

View file

@ -2,6 +2,7 @@ package com.simibubi.create.content.contraptions;
import com.simibubi.create.AllBlockEntityTypes;
import com.simibubi.create.AllTags.AllBlockTags;
import com.simibubi.create.content.equipment.toolbox.ToolboxInventory;
import com.simibubi.create.content.kinetics.crafter.MechanicalCrafterBlockEntity;
import com.simibubi.create.content.logistics.crate.BottomlessItemHandler;
import com.simibubi.create.content.logistics.vault.ItemVaultBlockEntity;
@ -177,6 +178,8 @@ public class MountedStorage {
CompoundTag tag = handler.serializeNBT();
if (noFuel)
NBTHelper.putMarker(tag, "NoFuel");
if (handler instanceof ToolboxInventory)
NBTHelper.putMarker(tag, "Toolbox");
if (!(handler instanceof BottomlessItemHandler))
return tag;
@ -191,6 +194,9 @@ public class MountedStorage {
storage.handler = new ItemStackHandler();
if (nbt == null)
return storage;
if (nbt.contains("Toolbox"))
storage.handler = new ToolboxInventory(null);
storage.valid = true;
storage.noFuel = nbt.contains("NoFuel");

View file

@ -68,6 +68,8 @@ public class ClipboardBlockEntity extends SmartBlockEntity {
protected void read(CompoundTag tag, boolean clientPacket) {
super.read(tag, clientPacket);
dataContainer = ItemStack.of(tag.getCompound("Item"));
if (!AllBlocks.CLIPBOARD.isIn(dataContainer))
dataContainer = AllBlocks.CLIPBOARD.asStack();
if (clientPacket)
DistExecutor.unsafeRunWhenOn(Dist.CLIENT, () -> () -> readClientSide(tag));

View file

@ -52,19 +52,13 @@ public class SymmetryHandler {
if (event.getLevel()
.isClientSide())
return;
if (!(event.getEntity() instanceof Player))
if (!(event.getEntity() instanceof Player player))
return;
Player player = (Player) event.getEntity();
Inventory inv = player.getInventory();
for (int i = 0; i < Inventory.getSelectionSize(); i++) {
if (!inv.getItem(i)
.isEmpty()
&& inv.getItem(i)
.getItem() == AllItems.WAND_OF_SYMMETRY.get()) {
for (int i = 0; i < Inventory.getSelectionSize(); i++)
if (AllItems.WAND_OF_SYMMETRY.isIn(inv.getItem(i)))
SymmetryWandItem.apply(player.level(), inv.getItem(i), player, event.getPos(), event.getPlacedBlock());
}
}
}
@SubscribeEvent(priority = EventPriority.LOWEST)
@ -75,12 +69,9 @@ public class SymmetryHandler {
Player player = event.getPlayer();
Inventory inv = player.getInventory();
for (int i = 0; i < Inventory.getSelectionSize(); i++) {
if (!inv.getItem(i)
.isEmpty() && AllItems.WAND_OF_SYMMETRY.isIn(inv.getItem(i))) {
for (int i = 0; i < Inventory.getSelectionSize(); i++)
if (AllItems.WAND_OF_SYMMETRY.isIn(inv.getItem(i)))
SymmetryWandItem.remove(player.level(), inv.getItem(i), player, event.getPos());
}
}
}
@OnlyIn(Dist.CLIENT)

View file

@ -9,6 +9,7 @@ import java.util.function.Consumer;
import javax.annotation.Nonnull;
import com.simibubi.create.AllBlocks;
import com.simibubi.create.AllItems;
import com.simibubi.create.AllPackets;
import com.simibubi.create.content.contraptions.mounted.CartAssemblerBlock;
import com.simibubi.create.content.equipment.symmetryWand.mirror.CrossPlaneMirror;
@ -27,6 +28,7 @@ import net.minecraft.nbt.CompoundTag;
import net.minecraft.world.InteractionHand;
import net.minecraft.world.InteractionResult;
import net.minecraft.world.InteractionResultHolder;
import net.minecraft.world.entity.player.Inventory;
import net.minecraft.world.entity.player.Player;
import net.minecraft.world.item.BlockItem;
import net.minecraft.world.item.Item;
@ -328,5 +330,13 @@ public class SymmetryWandItem extends Item {
public void initializeClient(Consumer<IClientItemExtensions> consumer) {
consumer.accept(SimpleCustomRenderer.create(this, new SymmetryWandItemRenderer()));
}
public static boolean presentInHotbar(Player player) {
Inventory inv = player.getInventory();
for (int i = 0; i < Inventory.getSelectionSize(); i++)
if (AllItems.WAND_OF_SYMMETRY.isIn(inv.getItem(i)))
return true;
return false;
}
}

View file

@ -83,7 +83,7 @@ public class ToolboxInventory extends ItemStackHandler {
}
}
settling = false;
blockEntity.sendData();
notifyUpdate();
}
@Override
@ -109,7 +109,7 @@ public class ToolboxInventory extends ItemStackHandler {
if (!stack.isEmpty() && filters.get(compartment)
.isEmpty()) {
filters.set(compartment, ItemHandlerHelper.copyStackWithSize(stack, 1));
blockEntity.sendData();
notifyUpdate();
}
}
@ -121,7 +121,7 @@ public class ToolboxInventory extends ItemStackHandler {
if (!stack.isEmpty() && filters.get(compartment)
.isEmpty()) {
filters.set(compartment, ItemHandlerHelper.copyStackWithSize(stack, 1));
blockEntity.sendData();
notifyUpdate();
}
}
return insertItem;
@ -136,10 +136,9 @@ public class ToolboxInventory extends ItemStackHandler {
@Override
protected void onContentsChanged(int slot) {
if (!settling && !blockEntity.getLevel().isClientSide)
if (!settling && (blockEntity == null || !blockEntity.getLevel().isClientSide))
settle(slot / STACKS_PER_COMPARTMENT);
blockEntity.sendData();
blockEntity.setChanged();
notifyUpdate();
super.onContentsChanged(slot);
}
@ -208,4 +207,9 @@ public class ToolboxInventory extends ItemStackHandler {
return ItemHandlerHelper.canItemStacksStack(stack1, stack2);
}
private void notifyUpdate() {
if (blockEntity != null)
blockEntity.notifyUpdate();
}
}

View file

@ -2,6 +2,7 @@ package com.simibubi.create.content.fluids.drain;
import com.simibubi.create.content.fluids.transfer.GenericItemEmptying;
import com.simibubi.create.content.kinetics.belt.transport.TransportedItemStack;
import com.simibubi.create.foundation.item.ItemHelper;
import net.minecraft.core.Direction;
import net.minecraft.world.item.ItemStack;
@ -38,7 +39,8 @@ public class ItemDrainItemHandler implements IItemHandler {
if (stack.getCount() > 1 && GenericItemEmptying.canItemBeEmptied(blockEntity.getLevel(), stack)) {
returned = ItemHandlerHelper.copyStackWithSize(stack, stack.getCount() - 1);
stack = ItemHandlerHelper.copyStackWithSize(stack, 1);
}
} else
returned = ItemHelper.limitCountToMaxStackSize(stack, simulate);
if (!simulate) {
TransportedItemStack heldItem = new TransportedItemStack(stack);

View file

@ -3,6 +3,7 @@ package com.simibubi.create.content.fluids.tank;
import com.simibubi.create.AllBlockEntityTypes;
import com.simibubi.create.AllBlocks;
import com.simibubi.create.api.connectivity.ConnectivityHandler;
import com.simibubi.create.content.equipment.symmetryWand.SymmetryWandItem;
import net.minecraft.core.BlockPos;
import net.minecraft.core.Direction;
@ -75,6 +76,8 @@ public class FluidTankItem extends BlockItem {
if (!FluidTankBlock.isTank(placedOnState))
return;
if (SymmetryWandItem.presentInHotbar(player))
return;
boolean creative = getBlock().equals(AllBlocks.CREATIVE_FLUID_TANK.get());
FluidTankBlockEntity tankAt = ConnectivityHandler.partAt(
creative ? AllBlockEntityTypes.CREATIVE_FLUID_TANK.get() : AllBlockEntityTypes.FLUID_TANK.get(), world, placedOnPos

View file

@ -73,9 +73,8 @@ public abstract class GeneratingKineticBlockEntity extends KineticBlockEntity {
float speed = getTheoreticalSpeed();
if (speed != getGeneratedSpeed() && speed != 0)
stressBase *= getGeneratedSpeed() / speed;
speed = Math.abs(speed);
float stressTotal = stressBase * speed;
float stressTotal = Math.abs(stressBase * speed);
Lang.number(stressTotal)
.translate("generic.unit.stress")

View file

@ -218,6 +218,8 @@ public class BeltBlock extends HorizontalKineticBlock
.copy(), false);
if (remainder.isEmpty())
itemEntity.discard();
else if (remainder.getCount() != itemEntity.getItem().getCount())
itemEntity.setItem(remainder);
});
return;
}

View file

@ -239,7 +239,7 @@ public class BeltRenderer extends SafeBlockEntityRenderer<BeltBlockEntity> {
be.getBlockPos().getZ())
.add(offsetVec);
if (this.shouldCullItem(itemPos)) {
if (this.shouldCullItem(itemPos, be.getLevel())) {
continue;
}

View file

@ -1,5 +1,7 @@
package com.simibubi.create.content.kinetics.belt.transport;
import com.simibubi.create.foundation.item.ItemHelper;
import net.minecraft.world.item.ItemStack;
import net.minecraftforge.items.IItemHandler;
@ -29,6 +31,7 @@ public class ItemHandlerBeltSegment implements IItemHandler {
@Override
public ItemStack insertItem(int slot, ItemStack stack, boolean simulate) {
if (this.beltInventory.canInsertAt(offset)) {
ItemStack remainder = ItemHelper.limitCountToMaxStackSize(stack, simulate);
if (!simulate) {
TransportedItemStack newStack = new TransportedItemStack(stack);
newStack.insertedAt = offset;
@ -38,7 +41,7 @@ public class ItemHandlerBeltSegment implements IItemHandler {
this.beltInventory.belt.setChanged();
this.beltInventory.belt.sendData();
}
return ItemStack.EMPTY;
return remainder;
}
return stack;
}

View file

@ -120,6 +120,12 @@ public class MechanicalCrafterBlockEntity extends KineticBlockEntity {
registerAwardables(behaviours, AllAdvancements.CRAFTER, AllAdvancements.CRAFTER_LAZY);
}
@Override
public void invalidateCaps() {
inserting.removeListener();
super.invalidateCaps();
}
@Override
public void onSpeedChanged(float previousSpeed) {
super.onSpeedChanged(previousSpeed);
@ -132,6 +138,7 @@ public class MechanicalCrafterBlockEntity extends KineticBlockEntity {
public void blockChanged() {
removeBehaviour(InvManipulationBehaviour.TYPE);
inserting.removeListener();
inserting = new InvManipulationBehaviour(this, this::getTargetFace);
attachBehaviourLate(inserting);
}

View file

@ -1,6 +1,7 @@
package com.simibubi.create.content.kinetics.deployer;
import com.simibubi.create.foundation.blockEntity.behaviour.filtering.FilteringBehaviour;
import com.simibubi.create.foundation.item.ItemHelper;
import net.minecraft.world.InteractionHand;
import net.minecraft.world.item.ItemStack;
@ -52,9 +53,10 @@ public class DeployerItemHandler implements IItemHandlerModifiable {
ItemStack held = getHeld();
if (held.isEmpty()) {
ItemStack remainder = ItemHelper.limitCountToMaxStackSize(stack, simulate);
if (!simulate)
set(stack);
return ItemStack.EMPTY;
return remainder;
}
if (!ItemHandlerHelper.canItemStacksStack(held, stack))

View file

@ -1,5 +1,7 @@
package com.simibubi.create.content.logistics.chute;
import com.simibubi.create.foundation.item.ItemHelper;
import net.minecraft.world.item.ItemStack;
import net.minecraftforge.items.IItemHandler;
@ -25,9 +27,10 @@ public class ChuteItemHandler implements IItemHandler {
public ItemStack insertItem(int slot, ItemStack stack, boolean simulate) {
if (!blockEntity.canAcceptItem(stack))
return stack;
ItemStack remainder = ItemHelper.limitCountToMaxStackSize(stack, simulate);
if (!simulate)
blockEntity.setItem(stack);
return ItemStack.EMPTY;
return remainder;
}
@Override

View file

@ -93,7 +93,7 @@ public abstract class FunnelBlock extends AbstractDirectionalFunnelBlock {
withBlockEntityDo(worldIn, pos, be -> {
ItemStack toInsert = heldItem.copy();
ItemStack remainder = tryInsert(worldIn, pos, toInsert, false);
if (!ItemStack.matches(remainder, toInsert))
if (!ItemStack.matches(remainder, toInsert) || remainder.getCount() != heldItem.getCount())
player.setItemInHand(handIn, remainder);
});
return InteractionResult.SUCCESS;

View file

@ -273,6 +273,12 @@ public class FunnelBlockEntity extends SmartBlockEntity implements IHaveHovering
registerAwardables(behaviours, AllAdvancements.FUNNEL);
}
@Override
public void invalidateCaps() {
invManipulation.removeListener();
super.invalidateCaps();
}
private boolean supportsAmountOnFilter() {
BlockState blockState = getBlockState();
boolean beltFunnelsupportsAmount = false;

View file

@ -1,5 +1,7 @@
package com.simibubi.create.content.logistics.tunnel;
import com.simibubi.create.foundation.item.ItemHelper;
import net.minecraft.world.item.ItemStack;
import net.minecraftforge.common.util.LazyOptional;
import net.minecraftforge.items.IItemHandler;
@ -33,9 +35,11 @@ public class BrassTunnelItemHandler implements IItemHandler {
if (!blockEntity.canTakeItems())
return stack;
ItemStack remainder = ItemHelper.limitCountToMaxStackSize(stack, simulate);
if (!simulate)
blockEntity.setStackToDistribute(stack, null);
return ItemStack.EMPTY;
return remainder;
}
@Override

View file

@ -2,6 +2,7 @@ package com.simibubi.create.content.logistics.vault;
import com.simibubi.create.AllBlockEntityTypes;
import com.simibubi.create.api.connectivity.ConnectivityHandler;
import com.simibubi.create.content.equipment.symmetryWand.SymmetryWandItem;
import com.simibubi.create.foundation.utility.VecHelper;
import net.minecraft.core.BlockPos;
@ -65,6 +66,8 @@ public class ItemVaultItem extends BlockItem {
if (!ItemVaultBlock.isVault(placedOnState))
return;
if (SymmetryWandItem.presentInHotbar(player))
return;
ItemVaultBlockEntity tankAt = ConnectivityHandler.partAt(AllBlockEntityTypes.ITEM_VAULT.get(), world, placedOnPos);
if (tankAt == null)
return;

View file

@ -411,7 +411,8 @@ public class BasinBlockEntity extends SmartBlockEntity implements IHaveGoggleInf
if (filter != null && !filter.test(itemStack))
continue;
visualizedOutputItems.add(IntAttached.withZero(itemStack));
if (visualizedOutputItems.size() < 3)
visualizedOutputItems.add(IntAttached.withZero(itemStack));
update = true;
remainder = ItemHandlerHelper.insertItemStacked(targetInv, itemStack.copy(), false);
@ -445,7 +446,8 @@ public class BasinBlockEntity extends SmartBlockEntity implements IHaveGoggleInf
update = true;
iterator.remove();
visualizedOutputFluids.add(IntAttached.withZero(fluidStack));
if (visualizedOutputFluids.size() < 3)
visualizedOutputFluids.add(IntAttached.withZero(fluidStack));
}
}

View file

@ -13,6 +13,7 @@ import com.simibubi.create.content.trains.display.FlapDisplayBlockEntity;
import com.simibubi.create.content.trains.display.FlapDisplayLayout;
import com.simibubi.create.foundation.gui.ModularGuiLineBuilder;
import com.simibubi.create.foundation.utility.Components;
import com.simibubi.create.foundation.utility.NBTProcessors;
import net.minecraft.network.chat.Component;
import net.minecraft.network.chat.MutableComponent;
@ -38,6 +39,12 @@ public abstract class DisplaySource extends DisplayBehaviour {
List<MutableComponent> text = provideText(context, stats);
if (text.isEmpty())
text = EMPTY;
if (activeTarget.requiresComponentSanitization())
for (MutableComponent component : text)
if (NBTProcessors.textComponentHasClickEvent(component))
return; // Naughty
activeTarget.acceptText(line, text, context);
}

View file

@ -67,5 +67,9 @@ public abstract class DisplayTarget extends DisplayBehaviour {
tag.remove("DisplayLink");
return false;
}
public boolean requiresComponentSanitization() {
return false;
}
}

View file

@ -80,5 +80,10 @@ public class LecternDisplayTarget extends DisplayTarget {
return written;
}
@Override
public boolean requiresComponentSanitization() {
return true;
}
}

View file

@ -41,5 +41,10 @@ public class SignDisplayTarget extends DisplayTarget {
public DisplayTargetStats provideStats(DisplayLinkContext context) {
return new DisplayTargetStats(4, 15, this);
}
@Override
public boolean requiresComponentSanitization() {
return true;
}
}

View file

@ -32,10 +32,10 @@ public class SmartObserverBlockEntity extends SmartBlockEntity {
private FilteringBehaviour filtering;
private InvManipulationBehaviour observedInventory;
private TankManipulationBehaviour observedTank;
private VersionedInventoryTrackerBehaviour invVersionTracker;
private boolean sustainSignal;
public int turnOffTicks = 0;
public SmartObserverBlockEntity(BlockEntityType<?> type, BlockPos pos, BlockState state) {
@ -56,13 +56,20 @@ public class SmartObserverBlockEntity extends SmartBlockEntity {
behaviours.add(observedTank = new TankManipulationBehaviour(this, towardBlockFacing).bypassSidedness());
}
@Override
public void invalidateCaps() {
observedInventory.removeListener();
observedTank.removeListener();
super.invalidateCaps();
}
@Override
public void tick() {
super.tick();
if (level.isClientSide())
return;
BlockState state = getBlockState();
if (turnOffTicks > 0) {
turnOffTicks--;

View file

@ -233,6 +233,13 @@ public class ThresholdSwitchBlockEntity extends SmartBlockEntity {
behaviours.add(observedTank = new TankManipulationBehaviour(this, towardBlockFacing).bypassSidedness());
}
@Override
public void invalidateCaps() {
observedInventory.removeListener();
observedTank.removeListener();
super.invalidateCaps();
}
public float getLevelForDisplay() {
return currentLevel == -1 ? 0 : currentLevel;
}

View file

@ -10,6 +10,8 @@ import java.util.function.Predicate;
import java.util.stream.Stream;
import com.simibubi.create.Create;
import com.simibubi.create.foundation.blockEntity.IMultiBlockEntityContainer;
import com.simibubi.create.foundation.blockEntity.SmartBlockEntity;
import com.simibubi.create.foundation.utility.BBHelper;
import com.simibubi.create.foundation.utility.NBTProcessors;
import com.simibubi.create.foundation.utility.worldWrappers.WrappedWorld;
@ -251,5 +253,25 @@ public class SchematicWorld extends WrappedWorld implements ServerLevelAccessor
}
throw new IllegalStateException("Cannot use IServerWorld#getWorld in a client environment");
}
public void fixControllerBlockEntities() {
for (BlockEntity blockEntity : blockEntities.values()) {
if (!(blockEntity instanceof IMultiBlockEntityContainer multiBlockEntity))
continue;
BlockPos lastKnown = multiBlockEntity.getLastKnownPos();
BlockPos current = blockEntity.getBlockPos();
if (lastKnown == null || current == null)
continue;
if (multiBlockEntity.isController())
continue;
if (!lastKnown.equals(current)) {
BlockPos newControllerPos = multiBlockEntity.getController()
.offset(current.subtract(lastKnown));
if (multiBlockEntity instanceof SmartBlockEntity sbe)
sbe.markVirtual();
multiBlockEntity.setController(newControllerPos);
}
}
}
}

View file

@ -169,6 +169,7 @@ public class SchematicHandler implements IGuiOverlay {
schematic.placeInWorld(w, pos, pos, placementSettings, w.getRandom(), Block.UPDATE_CLIENTS);
for (BlockEntity blockEntity : w.getBlockEntities())
blockEntity.setLevel(w);
w.fixControllerBlockEntities();
} catch (Exception e) {
Minecraft.getInstance().player.displayClientMessage(Lang.translate("schematic.error")
.component(), false);
@ -183,6 +184,7 @@ public class SchematicHandler implements IGuiOverlay {
placementSettings.getMirror());
for (BlockEntity be : wMirroredFB.getRenderedBlockEntities())
transform.apply(be);
wMirroredFB.fixControllerBlockEntities();
placementSettings.setMirror(Mirror.LEFT_RIGHT);
pos = BlockPos.ZERO.south(size.getZ() - 1);
@ -191,6 +193,7 @@ public class SchematicHandler implements IGuiOverlay {
placementSettings.getMirror());
for (BlockEntity be : wMirroredLR.getRenderedBlockEntities())
transform.apply(be);
wMirroredLR.fixControllerBlockEntities();
renderers.get(0)
.display(w);

View file

@ -80,6 +80,10 @@ public abstract class CapManipulationBehaviourBase<T, S extends CapManipulationB
targetCapability = LazyOptional.empty();
}
public void removeListener() {
targetCapability.removeListener(new HashableNonNullConsumer<>(this::onHandlerInvalidated, this));
}
@Override
public void lazyTick() {
super.lazyTick();

View file

@ -2,10 +2,13 @@ package com.simibubi.create.foundation.blockEntity.renderer;
import com.mojang.blaze3d.vertex.PoseStack;
import com.simibubi.create.foundation.ponder.PonderWorld;
import net.minecraft.client.Minecraft;
import net.minecraft.client.renderer.MultiBufferSource;
import net.minecraft.client.renderer.blockentity.BlockEntityRenderer;
import net.minecraft.client.renderer.culling.Frustum;
import net.minecraft.world.level.Level;
import net.minecraft.world.level.block.Blocks;
import net.minecraft.world.level.block.entity.BlockEntity;
import net.minecraft.world.phys.AABB;
@ -28,7 +31,10 @@ public abstract class SafeBlockEntityRenderer<T extends BlockEntity> implements
.getBlock() == Blocks.AIR;
}
public boolean shouldCullItem(Vec3 itemPos) {
public boolean shouldCullItem(Vec3 itemPos, Level level) {
if (level instanceof PonderWorld)
return false;
Frustum frustum = Minecraft.getInstance().levelRenderer.capturedFrustum != null ?
Minecraft.getInstance().levelRenderer.capturedFrustum :
Minecraft.getInstance().levelRenderer.cullingFrustum;

View file

@ -32,6 +32,12 @@ public enum CompatMetals {
public String getName() {
return name;
}
public String getName(Mods mod) {
if (this == ALUMINUM && mod == IC2) // include in mods.builder if this happens again
return "aluminium";
return name;
}
/**
* These mods must provide an ingot and nugget variant of the corresponding metal.

View file

@ -817,7 +817,8 @@ public class MillingRecipeGen extends ProcessingRecipeGen {
create(Mods.BTN.recipeId(color + "_petal"), b -> b.duration(50)
.require(AllTags.optionalTag(ForgeRegistries.ITEMS,
new ResourceLocation(Mods.BTN.getId(), "petals/" + color)))
.output(Mods.MC, color + "_dye"));
.output(Mods.MC, color + "_dye")
.whenModLoaded(Mods.BTN.getId()));
}
return null;
}
@ -850,7 +851,7 @@ public class MillingRecipeGen extends ProcessingRecipeGen {
public MillingRecipeGen(PackOutput output) {
super(output);
}
@Override
protected AllRecipeTypes getRecipeType() {
return AllRecipeTypes.MILLING;

View file

@ -59,6 +59,8 @@ import net.minecraftforge.common.crafting.conditions.ICondition;
import net.minecraftforge.common.crafting.conditions.ModLoadedCondition;
import net.minecraftforge.common.crafting.conditions.NotCondition;
import org.jetbrains.annotations.NotNull;
@SuppressWarnings("unused")
public class StandardRecipeGen extends CreateRecipeProvider {
@ -1178,7 +1180,8 @@ public class StandardRecipeGen extends CreateRecipeProvider {
.inBlastFurnace(),
UA_TREE_FERTILIZER = create(AllItems.TREE_FERTILIZER::get).returns(2)
.whenModLoaded(Mods.UA.getId()).unlockedBy(() -> Items.BONE_MEAL)
.unlockedBy(() -> Items.BONE_MEAL)
.whenModLoaded(Mods.UA.getId())
.viaShapeless(b -> b.requires(Ingredient.of(ItemTags.SMALL_FLOWERS), 2)
.requires(AllItemTags.UA_CORAL.tag).requires(Items.BONE_MEAL))
@ -1224,8 +1227,8 @@ public class StandardRecipeGen extends CreateRecipeProvider {
}
GeneratedRecipe blastModdedCrushedMetal(ItemEntry<? extends Item> ingredient, CompatMetals metal) {
String metalName = metal.getName();
for (Mods mod : metal.getMods()) {
String metalName = metal.getName(mod);
ResourceLocation ingot = mod.ingotOf(metalName);
String modId = mod.getId();
create(ingot).withSuffix("_compat_" + modId)
@ -1375,7 +1378,12 @@ public class StandardRecipeGen extends CreateRecipeProvider {
ShapelessRecipeBuilder b = builder.apply(ShapelessRecipeBuilder.shapeless(RecipeCategory.MISC, result.get(), amount));
if (unlockedBy != null)
b.unlockedBy("has_item", inventoryTrigger(unlockedBy.get()));
b.save(consumer, createLocation("crafting"));
b.save(result -> {
consumer.accept(
!recipeConditions.isEmpty() ? new ConditionSupportingShapelessRecipeResult(result, recipeConditions)
: result);
}, createLocation("crafting"));
});
}
@ -1478,10 +1486,10 @@ public class StandardRecipeGen extends CreateRecipeProvider {
SimpleCookingRecipeBuilder b = builder.apply(SimpleCookingRecipeBuilder.generic(ingredient.get(),
RecipeCategory.MISC, isOtherMod ? Items.DIRT : result.get(), exp,
(int) (cookingTime * cookingTimeModifier), serializer));
if (unlockedBy != null)
b.unlockedBy("has_item", inventoryTrigger(unlockedBy.get()));
b.save(result -> {
consumer.accept(
isOtherMod ? new ModdedCookingRecipeResult(result, compatDatagenOutput, recipeConditions)
@ -1502,19 +1510,39 @@ public class StandardRecipeGen extends CreateRecipeProvider {
super(p_i48262_1_);
}
private static class ModdedCookingRecipeResult implements FinishedRecipe {
private record ModdedCookingRecipeResult(FinishedRecipe wrapped, ResourceLocation outputOverride, List<ICondition> conditions) implements FinishedRecipe {
@Override
public ResourceLocation getId() {
return wrapped.getId();
}
private FinishedRecipe wrapped;
private ResourceLocation outputOverride;
private List<ICondition> conditions;
@Override
public RecipeSerializer<?> getType() {
return wrapped.getType();
}
public ModdedCookingRecipeResult(FinishedRecipe wrapped, ResourceLocation outputOverride,
List<ICondition> conditions) {
this.wrapped = wrapped;
this.outputOverride = outputOverride;
this.conditions = conditions;
@Override
public JsonObject serializeAdvancement() {
return wrapped.serializeAdvancement();
}
@Override
public ResourceLocation getAdvancementId() {
return wrapped.getAdvancementId();
}
@Override
public void serializeRecipeData(JsonObject object) {
wrapped.serializeRecipeData(object);
object.addProperty("result", outputOverride.toString());
JsonArray conds = new JsonArray();
conditions.forEach(c -> conds.add(CraftingHelper.serialize(c)));
object.add("conditions", conds);
}
}
private record ConditionSupportingShapelessRecipeResult(FinishedRecipe wrapped, List<ICondition> conditions) implements FinishedRecipe {
@Override
public ResourceLocation getId() {
return wrapped.getId();
@ -1536,15 +1564,12 @@ public class StandardRecipeGen extends CreateRecipeProvider {
}
@Override
public void serializeRecipeData(JsonObject object) {
wrapped.serializeRecipeData(object);
object.addProperty("result", outputOverride.toString());
public void serializeRecipeData(@NotNull JsonObject pJson) {
wrapped.serializeRecipeData(pJson);
JsonArray conds = new JsonArray();
conditions.forEach(c -> conds.add(CraftingHelper.serialize(c)));
object.add("conditions", conds);
pJson.add("conditions", conds);
}
}
}

View file

@ -133,8 +133,8 @@ public class WashingRecipeGen extends ProcessingRecipeGen {
}
public GeneratedRecipe moddedCrushedOre(ItemEntry<? extends Item> crushed, CompatMetals metal) {
String metalName = metal.getName();
for (Mods mod : metal.getMods()) {
String metalName = metal.getName(mod);
ResourceLocation nugget = mod.nuggetOf(metalName);
create(mod.getId() + "/" + crushed.getId()
.getPath(),

View file

@ -284,4 +284,16 @@ public class ItemHelper {
}
return -1;
}
public static ItemStack limitCountToMaxStackSize(ItemStack stack, boolean simulate) {
int count = stack.getCount();
int max = stack.getMaxStackSize();
if (count <= max)
return ItemStack.EMPTY;
ItemStack remainder = ItemHandlerHelper.copyStackWithSize(stack, count - max);
if (!simulate)
stack.setCount(max);
return remainder;
}
}

View file

@ -9,7 +9,6 @@ import net.minecraft.world.item.BlockItem;
import net.minecraft.world.item.context.BlockPlaceContext;
import net.minecraft.world.level.block.Blocks;
import net.minecraft.world.level.block.state.BlockState;
import org.spongepowered.asm.mixin.Mixin;
@ -22,7 +21,7 @@ public class BlockItemMixin {
@Inject(method = "place", at = @At("HEAD"), cancellable = true)
private void create$fixDeployerPlacement(BlockPlaceContext pContext, CallbackInfoReturnable<InteractionResult> cir) {
BlockState state = pContext.getLevel().getBlockState(((UseOnContextAccessor) pContext).create$getHitResult().getBlockPos());
if (state != Blocks.AIR.defaultBlockState() && pContext.getPlayer() instanceof DeployerFakePlayer) {
if (!state.canBeReplaced() && pContext.getPlayer() instanceof DeployerFakePlayer) {
cir.setReturnValue(InteractionResult.PASS);
}
}

View file

@ -14,7 +14,6 @@ import com.mojang.blaze3d.vertex.PoseStack;
import com.simibubi.create.content.kinetics.belt.BeltBlock;
import com.simibubi.create.content.kinetics.belt.BeltBlockEntity;
import com.simibubi.create.content.schematics.SchematicWorld;
import com.simibubi.create.foundation.blockEntity.IMultiBlockEntityContainer;
import com.simibubi.create.foundation.blockEntity.SmartBlockEntity;
import com.simibubi.create.foundation.mixin.accessor.ParticleEngineAccessor;
import com.simibubi.create.foundation.ponder.element.WorldSectionElement;
@ -259,38 +258,22 @@ public class PonderWorld extends SchematicWorld {
smartBlockEntity.markVirtual();
}
@Override
public void fixControllerBlockEntities() {
super.fixControllerBlockEntities();
for (BlockEntity blockEntity : blockEntities.values()) {
if (blockEntity instanceof BeltBlockEntity) {
BeltBlockEntity beltBlockEntity = (BeltBlockEntity) blockEntity;
if (!beltBlockEntity.isController())
if (!(blockEntity instanceof BeltBlockEntity beltBlockEntity))
continue;
if (!beltBlockEntity.isController())
continue;
BlockPos controllerPos = blockEntity.getBlockPos();
for (BlockPos blockPos : BeltBlock.getBeltChain(this, controllerPos)) {
BlockEntity blockEntity2 = getBlockEntity(blockPos);
if (!(blockEntity2 instanceof BeltBlockEntity))
continue;
BlockPos controllerPos = blockEntity.getBlockPos();
for (BlockPos blockPos : BeltBlock.getBeltChain(this, controllerPos)) {
BlockEntity blockEntity2 = getBlockEntity(blockPos);
if (!(blockEntity2 instanceof BeltBlockEntity))
continue;
BeltBlockEntity belt2 = (BeltBlockEntity) blockEntity2;
belt2.setController(controllerPos);
}
BeltBlockEntity belt2 = (BeltBlockEntity) blockEntity2;
belt2.setController(controllerPos);
}
if (blockEntity instanceof IMultiBlockEntityContainer) {
IMultiBlockEntityContainer multiBlockEntity = (IMultiBlockEntityContainer) blockEntity;
BlockPos lastKnown = multiBlockEntity.getLastKnownPos();
BlockPos current = blockEntity.getBlockPos();
if (lastKnown == null || current == null)
continue;
if (multiBlockEntity.isController())
continue;
if (!lastKnown.equals(current)) {
BlockPos newControllerPos = multiBlockEntity.getController()
.offset(current.subtract(lastKnown));
multiBlockEntity.setController(newControllerPos);
}
}
}
}

View file

@ -12,6 +12,7 @@ import com.simibubi.create.content.kinetics.base.KineticBlockEntity;
import com.simibubi.create.content.processing.burner.BlazeBurnerBlock;
import com.simibubi.create.content.processing.burner.BlazeBurnerBlock.HeatLevel;
import com.simibubi.create.foundation.blockEntity.IMergeableBE;
import com.simibubi.create.foundation.blockEntity.IMultiBlockEntityContainer;
import net.minecraft.core.BlockPos;
import net.minecraft.core.Direction;
@ -19,6 +20,7 @@ import net.minecraft.core.SectionPos;
import net.minecraft.core.particles.ParticleTypes;
import net.minecraft.core.registries.Registries;
import net.minecraft.nbt.CompoundTag;
import net.minecraft.nbt.NbtUtils;
import net.minecraft.server.level.ServerLevel;
import net.minecraft.sounds.SoundEvents;
import net.minecraft.sounds.SoundSource;
@ -312,8 +314,11 @@ public class BlockHelper {
data.putInt("x", target.getX());
data.putInt("y", target.getY());
data.putInt("z", target.getZ());
if (blockEntity instanceof KineticBlockEntity)
((KineticBlockEntity) blockEntity).warnOfMovement();
if (blockEntity instanceof KineticBlockEntity kbe)
kbe.warnOfMovement();
if (blockEntity instanceof IMultiBlockEntityContainer imbe)
if (!imbe.isController())
data.put("Controller", NbtUtils.writeBlockPos(imbe.getController()));
blockEntity.load(data);
}
}

View file

@ -59,8 +59,26 @@ public final class NBTProcessors {
});
addProcessor(AllBlockEntityTypes.CREATIVE_CRATE.get(), itemProcessor("Filter"));
addProcessor(AllBlockEntityTypes.PLACARD.get(), itemProcessor("Item"));
addProcessor(AllBlockEntityTypes.CLIPBOARD.get(), data -> {
if (!data.contains("Item", Tag.TAG_COMPOUND))
return data;
CompoundTag book = data.getCompound("Item");
if (!book.contains("tag", Tag.TAG_COMPOUND))
return data;
CompoundTag itemData = book.getCompound("tag");
for (List<String> entries : NBTHelper.readCompoundList(itemData.getList("Pages", Tag.TAG_COMPOUND),
pageTag -> NBTHelper.readCompoundList(pageTag.getList("Entries", Tag.TAG_COMPOUND),
tag -> tag.getString("Text")))) {
for (String entry : entries)
if (textComponentHasClickEvent(entry))
return null;
}
return data;
});
}
// Triggered by block tag, not BE type
private static final UnaryOperator<CompoundTag> signProcessor = data -> {
for (String key : List.of("front_text", "back_text")) {
@ -72,6 +90,8 @@ public final class NBTProcessors {
if (textComponentHasClickEvent(stringTag.getAsString()))
return null;
}
if (data.contains("front_item") || data.contains("back_item"))
return null; // "Amendments" compat: sign data contains itemstacks
return data;
};
@ -94,14 +114,22 @@ public final class NBTProcessors {
}
public static ItemStack withUnsafeNBTDiscarded(ItemStack stack) {
if (stack.getTag() == null)
CompoundTag tag = stack.getTag();
if (tag == null)
return stack;
ItemStack copy = stack.copy();
stack.getTag()
.getAllKeys()
copy.setTag(withUnsafeNBTDiscarded(tag));
return copy;
}
public static CompoundTag withUnsafeNBTDiscarded(CompoundTag tag) {
if (tag == null)
return null;
CompoundTag copy = tag.copy();
tag.getAllKeys()
.stream()
.filter(NBTProcessors::isUnsafeItemNBTKey)
.forEach(copy::removeTagKey);
.forEach(copy::remove);
return copy;
}
@ -120,7 +148,13 @@ public final class NBTProcessors {
}
public static boolean textComponentHasClickEvent(String json) {
Component component = Component.Serializer.fromJson(json.isEmpty() ? "\"\"" : json);
return textComponentHasClickEvent(Component.Serializer.fromJson(json.isEmpty() ? "\"\"" : json));
}
public static boolean textComponentHasClickEvent(Component component) {
for (Component sibling : component.getSiblings())
if (textComponentHasClickEvent(sibling))
return true;
return component != null && component.getStyle() != null && component.getStyle()
.getClickEvent() != null;
}

View file

@ -19,7 +19,7 @@ Technology that empowers the player.'''
[[dependencies.create]]
modId="forge"
mandatory=true
versionRange="[47.0.0,)"
versionRange="[47.1.43,)"
ordering="NONE"
side="BOTH"