1
0
mirror of https://github.com/SquidDev-CC/CC-Tweaked synced 2025-10-29 12:57:46 +00:00

Update to 1.20

- Use GuiGraphics for rendering UI elements. Almost definitely some
   z-fighting issues slipped in here.

 - Use Forge's loot modifier system for handling treasure disks. I have
   mixed feelings about this - it's a nice system, but also is far less
   efficient than the previous approach.

 - Regenerate data. This is the brunt of the commit, but nothing
   especially interesting here.
This commit is contained in:
Jonathan Coates
2023-06-08 09:48:37 +01:00
parent ef19988c37
commit ff1e5f6823
218 changed files with 742 additions and 476 deletions

View File

@@ -42,10 +42,13 @@ dependencies {
exclude("net.fabricmc", "fabric-loader")
exclude("net.fabricmc.fabric-api")
}
/*
modClientRuntimeOnly(libs.bundles.externalMods.fabric.runtime) {
exclude("net.fabricmc", "fabric-loader")
exclude("net.fabricmc.fabric-api")
}
*/
"modTestWithSodium"(libs.sodium)
"modTestWithIris"(libs.iris)

View File

@@ -11,5 +11,6 @@
}
},
"requirements": [["has_monitor", "has_the_recipe"]],
"rewards": {"recipes": ["computercraft:skull_cloudy"]}
"rewards": {"recipes": ["computercraft:skull_cloudy"]},
"sends_telemetry_event": false
}

View File

@@ -11,5 +11,6 @@
}
},
"requirements": [["has_computer", "has_the_recipe"]],
"rewards": {"recipes": ["computercraft:skull_dan200"]}
"rewards": {"recipes": ["computercraft:skull_dan200"]},
"sends_telemetry_event": false
}

View File

@@ -12,5 +12,6 @@
"has_the_recipe": {"conditions": {"recipe": "computercraft:cable"}, "trigger": "minecraft:recipe_unlocked"}
},
"requirements": [["has_computer", "has_modem", "has_the_recipe"]],
"rewards": {"recipes": ["computercraft:cable"]}
"rewards": {"recipes": ["computercraft:cable"]},
"sends_telemetry_event": false
}

View File

@@ -11,5 +11,6 @@
}
},
"requirements": [["has_components", "has_the_recipe"]],
"rewards": {"recipes": ["computercraft:computer_advanced"]}
"rewards": {"recipes": ["computercraft:computer_advanced"]},
"sends_telemetry_event": false
}

View File

@@ -11,5 +11,6 @@
}
},
"requirements": [["has_components", "has_the_recipe"]],
"rewards": {"recipes": ["computercraft:computer_advanced_upgrade"]}
"rewards": {"recipes": ["computercraft:computer_advanced_upgrade"]},
"sends_telemetry_event": false
}

View File

@@ -11,5 +11,6 @@
}
},
"requirements": [["has_components", "has_the_recipe"]],
"rewards": {"recipes": ["computercraft:computer_command"]}
"rewards": {"recipes": ["computercraft:computer_command"]},
"sends_telemetry_event": false
}

View File

@@ -11,5 +11,6 @@
}
},
"requirements": [["has_redstone", "has_the_recipe"]],
"rewards": {"recipes": ["computercraft:computer_normal"]}
"rewards": {"recipes": ["computercraft:computer_normal"]},
"sends_telemetry_event": false
}

View File

@@ -8,5 +8,6 @@
"has_the_recipe": {"conditions": {"recipe": "computercraft:disk_1"}, "trigger": "minecraft:recipe_unlocked"}
},
"requirements": [["has_drive", "has_the_recipe"]],
"rewards": {"recipes": ["computercraft:disk_1"]}
"rewards": {"recipes": ["computercraft:disk_1"]},
"sends_telemetry_event": false
}

View File

@@ -8,5 +8,6 @@
"has_the_recipe": {"conditions": {"recipe": "computercraft:disk_10"}, "trigger": "minecraft:recipe_unlocked"}
},
"requirements": [["has_drive", "has_the_recipe"]],
"rewards": {"recipes": ["computercraft:disk_10"]}
"rewards": {"recipes": ["computercraft:disk_10"]},
"sends_telemetry_event": false
}

View File

@@ -8,5 +8,6 @@
"has_the_recipe": {"conditions": {"recipe": "computercraft:disk_11"}, "trigger": "minecraft:recipe_unlocked"}
},
"requirements": [["has_drive", "has_the_recipe"]],
"rewards": {"recipes": ["computercraft:disk_11"]}
"rewards": {"recipes": ["computercraft:disk_11"]},
"sends_telemetry_event": false
}

View File

@@ -8,5 +8,6 @@
"has_the_recipe": {"conditions": {"recipe": "computercraft:disk_12"}, "trigger": "minecraft:recipe_unlocked"}
},
"requirements": [["has_drive", "has_the_recipe"]],
"rewards": {"recipes": ["computercraft:disk_12"]}
"rewards": {"recipes": ["computercraft:disk_12"]},
"sends_telemetry_event": false
}

View File

@@ -8,5 +8,6 @@
"has_the_recipe": {"conditions": {"recipe": "computercraft:disk_13"}, "trigger": "minecraft:recipe_unlocked"}
},
"requirements": [["has_drive", "has_the_recipe"]],
"rewards": {"recipes": ["computercraft:disk_13"]}
"rewards": {"recipes": ["computercraft:disk_13"]},
"sends_telemetry_event": false
}

View File

@@ -8,5 +8,6 @@
"has_the_recipe": {"conditions": {"recipe": "computercraft:disk_14"}, "trigger": "minecraft:recipe_unlocked"}
},
"requirements": [["has_drive", "has_the_recipe"]],
"rewards": {"recipes": ["computercraft:disk_14"]}
"rewards": {"recipes": ["computercraft:disk_14"]},
"sends_telemetry_event": false
}

View File

@@ -8,5 +8,6 @@
"has_the_recipe": {"conditions": {"recipe": "computercraft:disk_15"}, "trigger": "minecraft:recipe_unlocked"}
},
"requirements": [["has_drive", "has_the_recipe"]],
"rewards": {"recipes": ["computercraft:disk_15"]}
"rewards": {"recipes": ["computercraft:disk_15"]},
"sends_telemetry_event": false
}

View File

@@ -8,5 +8,6 @@
"has_the_recipe": {"conditions": {"recipe": "computercraft:disk_16"}, "trigger": "minecraft:recipe_unlocked"}
},
"requirements": [["has_drive", "has_the_recipe"]],
"rewards": {"recipes": ["computercraft:disk_16"]}
"rewards": {"recipes": ["computercraft:disk_16"]},
"sends_telemetry_event": false
}

View File

@@ -8,5 +8,6 @@
"has_the_recipe": {"conditions": {"recipe": "computercraft:disk_2"}, "trigger": "minecraft:recipe_unlocked"}
},
"requirements": [["has_drive", "has_the_recipe"]],
"rewards": {"recipes": ["computercraft:disk_2"]}
"rewards": {"recipes": ["computercraft:disk_2"]},
"sends_telemetry_event": false
}

View File

@@ -8,5 +8,6 @@
"has_the_recipe": {"conditions": {"recipe": "computercraft:disk_3"}, "trigger": "minecraft:recipe_unlocked"}
},
"requirements": [["has_drive", "has_the_recipe"]],
"rewards": {"recipes": ["computercraft:disk_3"]}
"rewards": {"recipes": ["computercraft:disk_3"]},
"sends_telemetry_event": false
}

View File

@@ -8,5 +8,6 @@
"has_the_recipe": {"conditions": {"recipe": "computercraft:disk_4"}, "trigger": "minecraft:recipe_unlocked"}
},
"requirements": [["has_drive", "has_the_recipe"]],
"rewards": {"recipes": ["computercraft:disk_4"]}
"rewards": {"recipes": ["computercraft:disk_4"]},
"sends_telemetry_event": false
}

View File

@@ -8,5 +8,6 @@
"has_the_recipe": {"conditions": {"recipe": "computercraft:disk_5"}, "trigger": "minecraft:recipe_unlocked"}
},
"requirements": [["has_drive", "has_the_recipe"]],
"rewards": {"recipes": ["computercraft:disk_5"]}
"rewards": {"recipes": ["computercraft:disk_5"]},
"sends_telemetry_event": false
}

View File

@@ -8,5 +8,6 @@
"has_the_recipe": {"conditions": {"recipe": "computercraft:disk_6"}, "trigger": "minecraft:recipe_unlocked"}
},
"requirements": [["has_drive", "has_the_recipe"]],
"rewards": {"recipes": ["computercraft:disk_6"]}
"rewards": {"recipes": ["computercraft:disk_6"]},
"sends_telemetry_event": false
}

View File

@@ -8,5 +8,6 @@
"has_the_recipe": {"conditions": {"recipe": "computercraft:disk_7"}, "trigger": "minecraft:recipe_unlocked"}
},
"requirements": [["has_drive", "has_the_recipe"]],
"rewards": {"recipes": ["computercraft:disk_7"]}
"rewards": {"recipes": ["computercraft:disk_7"]},
"sends_telemetry_event": false
}

View File

@@ -8,5 +8,6 @@
"has_the_recipe": {"conditions": {"recipe": "computercraft:disk_8"}, "trigger": "minecraft:recipe_unlocked"}
},
"requirements": [["has_drive", "has_the_recipe"]],
"rewards": {"recipes": ["computercraft:disk_8"]}
"rewards": {"recipes": ["computercraft:disk_8"]},
"sends_telemetry_event": false
}

View File

@@ -8,5 +8,6 @@
"has_the_recipe": {"conditions": {"recipe": "computercraft:disk_9"}, "trigger": "minecraft:recipe_unlocked"}
},
"requirements": [["has_drive", "has_the_recipe"]],
"rewards": {"recipes": ["computercraft:disk_9"]}
"rewards": {"recipes": ["computercraft:disk_9"]},
"sends_telemetry_event": false
}

View File

@@ -8,5 +8,6 @@
"has_the_recipe": {"conditions": {"recipe": "computercraft:disk_drive"}, "trigger": "minecraft:recipe_unlocked"}
},
"requirements": [["has_computer", "has_the_recipe"]],
"rewards": {"recipes": ["computercraft:disk_drive"]}
"rewards": {"recipes": ["computercraft:disk_drive"]},
"sends_telemetry_event": false
}

View File

@@ -11,5 +11,6 @@
}
},
"requirements": [["has_computer", "has_the_recipe"]],
"rewards": {"recipes": ["computercraft:monitor_advanced"]}
"rewards": {"recipes": ["computercraft:monitor_advanced"]},
"sends_telemetry_event": false
}

View File

@@ -11,5 +11,6 @@
}
},
"requirements": [["has_computer", "has_the_recipe"]],
"rewards": {"recipes": ["computercraft:monitor_normal"]}
"rewards": {"recipes": ["computercraft:monitor_normal"]},
"sends_telemetry_event": false
}

View File

@@ -13,5 +13,6 @@
}
},
"requirements": [["has_items", "has_the_recipe"]],
"rewards": {"recipes": ["computercraft:pocket_advanced/computercraft/speaker"]}
"rewards": {"recipes": ["computercraft:pocket_advanced/computercraft/speaker"]},
"sends_telemetry_event": false
}

View File

@@ -16,5 +16,6 @@
}
},
"requirements": [["has_items", "has_the_recipe"]],
"rewards": {"recipes": ["computercraft:pocket_advanced/computercraft/wireless_modem_advanced"]}
"rewards": {"recipes": ["computercraft:pocket_advanced/computercraft/wireless_modem_advanced"]},
"sends_telemetry_event": false
}

View File

@@ -16,5 +16,6 @@
}
},
"requirements": [["has_items", "has_the_recipe"]],
"rewards": {"recipes": ["computercraft:pocket_advanced/computercraft/wireless_modem_normal"]}
"rewards": {"recipes": ["computercraft:pocket_advanced/computercraft/wireless_modem_normal"]},
"sends_telemetry_event": false
}

View File

@@ -15,5 +15,6 @@
}
},
"requirements": [["has_computer", "has_apple", "has_the_recipe"]],
"rewards": {"recipes": ["computercraft:pocket_computer_advanced"]}
"rewards": {"recipes": ["computercraft:pocket_computer_advanced"]},
"sends_telemetry_event": false
}

View File

@@ -11,5 +11,6 @@
}
},
"requirements": [["has_components", "has_the_recipe"]],
"rewards": {"recipes": ["computercraft:pocket_computer_advanced_upgrade"]}
"rewards": {"recipes": ["computercraft:pocket_computer_advanced_upgrade"]},
"sends_telemetry_event": false
}

View File

@@ -15,5 +15,6 @@
}
},
"requirements": [["has_computer", "has_apple", "has_the_recipe"]],
"rewards": {"recipes": ["computercraft:pocket_computer_normal"]}
"rewards": {"recipes": ["computercraft:pocket_computer_normal"]},
"sends_telemetry_event": false
}

View File

@@ -13,5 +13,6 @@
}
},
"requirements": [["has_items", "has_the_recipe"]],
"rewards": {"recipes": ["computercraft:pocket_normal/computercraft/speaker"]}
"rewards": {"recipes": ["computercraft:pocket_normal/computercraft/speaker"]},
"sends_telemetry_event": false
}

View File

@@ -16,5 +16,6 @@
}
},
"requirements": [["has_items", "has_the_recipe"]],
"rewards": {"recipes": ["computercraft:pocket_normal/computercraft/wireless_modem_advanced"]}
"rewards": {"recipes": ["computercraft:pocket_normal/computercraft/wireless_modem_advanced"]},
"sends_telemetry_event": false
}

View File

@@ -16,5 +16,6 @@
}
},
"requirements": [["has_items", "has_the_recipe"]],
"rewards": {"recipes": ["computercraft:pocket_normal/computercraft/wireless_modem_normal"]}
"rewards": {"recipes": ["computercraft:pocket_normal/computercraft/wireless_modem_normal"]},
"sends_telemetry_event": false
}

View File

@@ -11,5 +11,6 @@
}
},
"requirements": [["has_printer", "has_the_recipe"]],
"rewards": {"recipes": ["computercraft:printed_book"]}
"rewards": {"recipes": ["computercraft:printed_book"]},
"sends_telemetry_event": false
}

View File

@@ -11,5 +11,6 @@
}
},
"requirements": [["has_printer", "has_the_recipe"]],
"rewards": {"recipes": ["computercraft:printed_pages"]}
"rewards": {"recipes": ["computercraft:printed_pages"]},
"sends_telemetry_event": false
}

View File

@@ -8,5 +8,6 @@
"has_the_recipe": {"conditions": {"recipe": "computercraft:printer"}, "trigger": "minecraft:recipe_unlocked"}
},
"requirements": [["has_computer", "has_the_recipe"]],
"rewards": {"recipes": ["computercraft:printer"]}
"rewards": {"recipes": ["computercraft:printer"]},
"sends_telemetry_event": false
}

View File

@@ -8,5 +8,6 @@
"has_the_recipe": {"conditions": {"recipe": "computercraft:speaker"}, "trigger": "minecraft:recipe_unlocked"}
},
"requirements": [["has_computer", "has_the_recipe"]],
"rewards": {"recipes": ["computercraft:speaker"]}
"rewards": {"recipes": ["computercraft:speaker"]},
"sends_telemetry_event": false
}

View File

@@ -11,5 +11,6 @@
}
},
"requirements": [["has_computer", "has_the_recipe"]],
"rewards": {"recipes": ["computercraft:turtle_advanced"]}
"rewards": {"recipes": ["computercraft:turtle_advanced"]},
"sends_telemetry_event": false
}

View File

@@ -13,5 +13,6 @@
}
},
"requirements": [["has_items", "has_the_recipe"]],
"rewards": {"recipes": ["computercraft:turtle_advanced/computercraft/speaker"]}
"rewards": {"recipes": ["computercraft:turtle_advanced/computercraft/speaker"]},
"sends_telemetry_event": false
}

View File

@@ -16,5 +16,6 @@
}
},
"requirements": [["has_items", "has_the_recipe"]],
"rewards": {"recipes": ["computercraft:turtle_advanced/computercraft/wireless_modem_advanced"]}
"rewards": {"recipes": ["computercraft:turtle_advanced/computercraft/wireless_modem_advanced"]},
"sends_telemetry_event": false
}

View File

@@ -16,5 +16,6 @@
}
},
"requirements": [["has_items", "has_the_recipe"]],
"rewards": {"recipes": ["computercraft:turtle_advanced/computercraft/wireless_modem_normal"]}
"rewards": {"recipes": ["computercraft:turtle_advanced/computercraft/wireless_modem_normal"]},
"sends_telemetry_event": false
}

View File

@@ -13,5 +13,6 @@
}
},
"requirements": [["has_items", "has_the_recipe"]],
"rewards": {"recipes": ["computercraft:turtle_advanced/minecraft/crafting_table"]}
"rewards": {"recipes": ["computercraft:turtle_advanced/minecraft/crafting_table"]},
"sends_telemetry_event": false
}

View File

@@ -13,5 +13,6 @@
}
},
"requirements": [["has_items", "has_the_recipe"]],
"rewards": {"recipes": ["computercraft:turtle_advanced/minecraft/diamond_axe"]}
"rewards": {"recipes": ["computercraft:turtle_advanced/minecraft/diamond_axe"]},
"sends_telemetry_event": false
}

View File

@@ -13,5 +13,6 @@
}
},
"requirements": [["has_items", "has_the_recipe"]],
"rewards": {"recipes": ["computercraft:turtle_advanced/minecraft/diamond_hoe"]}
"rewards": {"recipes": ["computercraft:turtle_advanced/minecraft/diamond_hoe"]},
"sends_telemetry_event": false
}

View File

@@ -13,5 +13,6 @@
}
},
"requirements": [["has_items", "has_the_recipe"]],
"rewards": {"recipes": ["computercraft:turtle_advanced/minecraft/diamond_pickaxe"]}
"rewards": {"recipes": ["computercraft:turtle_advanced/minecraft/diamond_pickaxe"]},
"sends_telemetry_event": false
}

View File

@@ -13,5 +13,6 @@
}
},
"requirements": [["has_items", "has_the_recipe"]],
"rewards": {"recipes": ["computercraft:turtle_advanced/minecraft/diamond_shovel"]}
"rewards": {"recipes": ["computercraft:turtle_advanced/minecraft/diamond_shovel"]},
"sends_telemetry_event": false
}

View File

@@ -13,5 +13,6 @@
}
},
"requirements": [["has_items", "has_the_recipe"]],
"rewards": {"recipes": ["computercraft:turtle_advanced/minecraft/diamond_sword"]}
"rewards": {"recipes": ["computercraft:turtle_advanced/minecraft/diamond_sword"]},
"sends_telemetry_event": false
}

View File

@@ -12,5 +12,6 @@
}
},
"requirements": [["has_turtle", "has_dye", "has_the_recipe"]],
"rewards": {"recipes": ["computercraft:turtle_advanced_overlays/turtle_rainbow_overlay"]}
"rewards": {"recipes": ["computercraft:turtle_advanced_overlays/turtle_rainbow_overlay"]},
"sends_telemetry_event": false
}

View File

@@ -12,5 +12,6 @@
}
},
"requirements": [["has_turtle", "has_dye", "has_the_recipe"]],
"rewards": {"recipes": ["computercraft:turtle_advanced_overlays/turtle_trans_overlay"]}
"rewards": {"recipes": ["computercraft:turtle_advanced_overlays/turtle_trans_overlay"]},
"sends_telemetry_event": false
}

View File

@@ -11,5 +11,6 @@
}
},
"requirements": [["has_components", "has_the_recipe"]],
"rewards": {"recipes": ["computercraft:turtle_advanced_upgrade"]}
"rewards": {"recipes": ["computercraft:turtle_advanced_upgrade"]},
"sends_telemetry_event": false
}

View File

@@ -11,5 +11,6 @@
}
},
"requirements": [["has_computer", "has_the_recipe"]],
"rewards": {"recipes": ["computercraft:turtle_normal"]}
"rewards": {"recipes": ["computercraft:turtle_normal"]},
"sends_telemetry_event": false
}

View File

@@ -13,5 +13,6 @@
}
},
"requirements": [["has_items", "has_the_recipe"]],
"rewards": {"recipes": ["computercraft:turtle_normal/computercraft/speaker"]}
"rewards": {"recipes": ["computercraft:turtle_normal/computercraft/speaker"]},
"sends_telemetry_event": false
}

View File

@@ -16,5 +16,6 @@
}
},
"requirements": [["has_items", "has_the_recipe"]],
"rewards": {"recipes": ["computercraft:turtle_normal/computercraft/wireless_modem_advanced"]}
"rewards": {"recipes": ["computercraft:turtle_normal/computercraft/wireless_modem_advanced"]},
"sends_telemetry_event": false
}

View File

@@ -16,5 +16,6 @@
}
},
"requirements": [["has_items", "has_the_recipe"]],
"rewards": {"recipes": ["computercraft:turtle_normal/computercraft/wireless_modem_normal"]}
"rewards": {"recipes": ["computercraft:turtle_normal/computercraft/wireless_modem_normal"]},
"sends_telemetry_event": false
}

View File

@@ -13,5 +13,6 @@
}
},
"requirements": [["has_items", "has_the_recipe"]],
"rewards": {"recipes": ["computercraft:turtle_normal/minecraft/crafting_table"]}
"rewards": {"recipes": ["computercraft:turtle_normal/minecraft/crafting_table"]},
"sends_telemetry_event": false
}

View File

@@ -13,5 +13,6 @@
}
},
"requirements": [["has_items", "has_the_recipe"]],
"rewards": {"recipes": ["computercraft:turtle_normal/minecraft/diamond_axe"]}
"rewards": {"recipes": ["computercraft:turtle_normal/minecraft/diamond_axe"]},
"sends_telemetry_event": false
}

View File

@@ -13,5 +13,6 @@
}
},
"requirements": [["has_items", "has_the_recipe"]],
"rewards": {"recipes": ["computercraft:turtle_normal/minecraft/diamond_hoe"]}
"rewards": {"recipes": ["computercraft:turtle_normal/minecraft/diamond_hoe"]},
"sends_telemetry_event": false
}

View File

@@ -13,5 +13,6 @@
}
},
"requirements": [["has_items", "has_the_recipe"]],
"rewards": {"recipes": ["computercraft:turtle_normal/minecraft/diamond_pickaxe"]}
"rewards": {"recipes": ["computercraft:turtle_normal/minecraft/diamond_pickaxe"]},
"sends_telemetry_event": false
}

View File

@@ -13,5 +13,6 @@
}
},
"requirements": [["has_items", "has_the_recipe"]],
"rewards": {"recipes": ["computercraft:turtle_normal/minecraft/diamond_shovel"]}
"rewards": {"recipes": ["computercraft:turtle_normal/minecraft/diamond_shovel"]},
"sends_telemetry_event": false
}

View File

@@ -13,5 +13,6 @@
}
},
"requirements": [["has_items", "has_the_recipe"]],
"rewards": {"recipes": ["computercraft:turtle_normal/minecraft/diamond_sword"]}
"rewards": {"recipes": ["computercraft:turtle_normal/minecraft/diamond_sword"]},
"sends_telemetry_event": false
}

View File

@@ -12,5 +12,6 @@
}
},
"requirements": [["has_turtle", "has_dye", "has_the_recipe"]],
"rewards": {"recipes": ["computercraft:turtle_normal_overlays/turtle_rainbow_overlay"]}
"rewards": {"recipes": ["computercraft:turtle_normal_overlays/turtle_rainbow_overlay"]},
"sends_telemetry_event": false
}

View File

@@ -12,5 +12,6 @@
}
},
"requirements": [["has_turtle", "has_dye", "has_the_recipe"]],
"rewards": {"recipes": ["computercraft:turtle_normal_overlays/turtle_trans_overlay"]}
"rewards": {"recipes": ["computercraft:turtle_normal_overlays/turtle_trans_overlay"]},
"sends_telemetry_event": false
}

View File

@@ -15,5 +15,6 @@
}
},
"requirements": [["has_computer", "has_cable", "has_the_recipe"]],
"rewards": {"recipes": ["computercraft:wired_modem"]}
"rewards": {"recipes": ["computercraft:wired_modem"]},
"sends_telemetry_event": false
}

View File

@@ -11,5 +11,6 @@
}
},
"requirements": [["has_modem", "has_the_recipe"]],
"rewards": {"recipes": ["computercraft:wired_modem_full_from"]}
"rewards": {"recipes": ["computercraft:wired_modem_full_from"]},
"sends_telemetry_event": false
}

View File

@@ -11,5 +11,6 @@
}
},
"requirements": [["has_modem", "has_the_recipe"]],
"rewards": {"recipes": ["computercraft:wired_modem_full_to"]}
"rewards": {"recipes": ["computercraft:wired_modem_full_to"]},
"sends_telemetry_event": false
}

View File

@@ -15,5 +15,6 @@
}
},
"requirements": [["has_computer", "has_wireless", "has_the_recipe"]],
"rewards": {"recipes": ["computercraft:wireless_modem_advanced"]}
"rewards": {"recipes": ["computercraft:wireless_modem_advanced"]},
"sends_telemetry_event": false
}

View File

@@ -11,5 +11,6 @@
}
},
"requirements": [["has_computer", "has_the_recipe"]],
"rewards": {"recipes": ["computercraft:wireless_modem_normal"]}
"rewards": {"recipes": ["computercraft:wireless_modem_normal"]},
"sends_telemetry_event": false
}

View File

@@ -5,7 +5,7 @@
"bonus_rolls": 0.0,
"conditions": [
{
"condition": "minecraft:alternative",
"condition": "minecraft:any_of",
"terms": [
{"condition": "computercraft:block_named"},
{"condition": "computercraft:has_id"},

View File

@@ -5,7 +5,7 @@
"bonus_rolls": 0.0,
"conditions": [
{
"condition": "minecraft:alternative",
"condition": "minecraft:any_of",
"terms": [
{"condition": "computercraft:block_named"},
{"condition": "computercraft:has_id"},

View File

@@ -5,7 +5,7 @@
"bonus_rolls": 0.0,
"conditions": [
{
"condition": "minecraft:alternative",
"condition": "minecraft:any_of",
"terms": [
{"condition": "computercraft:block_named"},
{"condition": "computercraft:has_id"},

View File

@@ -5,7 +5,7 @@
"bonus_rolls": 0.0,
"conditions": [
{
"condition": "minecraft:alternative",
"condition": "minecraft:any_of",
"terms": [
{"condition": "computercraft:block_named"},
{"condition": "computercraft:has_id"},

View File

@@ -5,7 +5,7 @@
"bonus_rolls": 0.0,
"conditions": [
{
"condition": "minecraft:alternative",
"condition": "minecraft:any_of",
"terms": [
{"condition": "computercraft:block_named"},
{"condition": "computercraft:has_id"},

View File

@@ -48,7 +48,7 @@ public class FabricDataGenerators implements DataGeneratorEntrypoint {
for (var table : tables) {
generator.addProvider((FabricDataOutput out) -> new SimpleFabricLootTableProvider(out, table.paramSet()) {
@Override
public void accept(BiConsumer<ResourceLocation, LootTable.Builder> exporter) {
public void generate(BiConsumer<ResourceLocation, LootTable.Builder> exporter) {
table.provider().get().generate(exporter);
}
});

View File

@@ -26,7 +26,6 @@ import net.fabricmc.fabric.api.event.lifecycle.v1.ServerLifecycleEvents;
import net.fabricmc.fabric.api.event.lifecycle.v1.ServerTickEvents;
import net.fabricmc.fabric.api.event.player.PlayerBlockBreakEvents;
import net.fabricmc.fabric.api.event.player.UseBlockCallback;
import net.fabricmc.fabric.api.itemgroup.v1.FabricItemGroup;
import net.fabricmc.fabric.api.loot.v2.LootTableEvents;
import net.fabricmc.fabric.api.resource.IdentifiableResourceReloadListener;
import net.fabricmc.fabric.api.resource.ResourceManagerHelper;
@@ -38,6 +37,9 @@ import net.minecraft.server.packs.resources.ResourceManager;
import net.minecraft.util.profiling.ProfilerFiller;
import net.minecraft.world.level.block.entity.BlockEntityType;
import net.minecraft.world.level.storage.LevelResource;
import net.minecraft.world.level.storage.loot.LootPool;
import net.minecraft.world.level.storage.loot.entries.LootTableReference;
import net.minecraft.world.level.storage.loot.providers.number.ConstantValue;
import java.util.concurrent.CompletableFuture;
import java.util.concurrent.Executor;
@@ -49,7 +51,6 @@ public class ComputerCraft {
NetworkHandler.init();
ModRegistry.register();
ModRegistry.registerMainThread();
ModRegistry.registerCreativeTab(FabricItemGroup.builder(new ResourceLocation(ComputerCraftAPI.MOD_ID, "tab"))).build();
// Register peripherals
PeripheralLookup.get().registerForBlockEntity((b, d) -> b.peripheral(), ModRegistry.BlockEntities.COMPUTER_NORMAL.get());
@@ -94,8 +95,10 @@ public class ComputerCraft {
UseBlockCallback.EVENT.register(FabricCommonHooks::useOnBlock);
LootTableEvents.MODIFY.register((resourceManager, lootManager, id, tableBuilder, source) -> {
var pool = CommonHooks.getExtraLootPool(id);
if (pool != null) tableBuilder.withPool(pool);
if (!id.getNamespace().equals("minecraft") || !CommonHooks.TREASURE_DISK_LOOT_TABLES.contains(id)) return;
tableBuilder.withPool(LootPool.lootPool()
.add(LootTableReference.lootTableReference(CommonHooks.TREASURE_DISK_LOOT))
.setRolls(ConstantValue.exactly(1)));
});
CommonHooks.onDatapackReload((name, listener) -> ResourceManagerHelper.get(PackType.SERVER_DATA).registerReloadListener(new ReloadListener(name, listener)));

View File

@@ -23,6 +23,7 @@ import dan200.computercraft.shared.util.InventoryUtil;
import net.fabricmc.fabric.api.event.player.AttackEntityCallback;
import net.fabricmc.fabric.api.event.player.UseBlockCallback;
import net.fabricmc.fabric.api.event.player.UseEntityCallback;
import net.fabricmc.fabric.api.itemgroup.v1.FabricItemGroup;
import net.fabricmc.fabric.api.lookup.v1.block.BlockApiCache;
import net.fabricmc.fabric.api.lookup.v1.block.BlockApiLookup;
import net.fabricmc.fabric.api.object.builder.v1.block.entity.FabricBlockEntityTypeBuilder;
@@ -256,10 +257,9 @@ public class PlatformHelperImpl implements PlatformHelper {
return fuel == null ? 0 : fuel;
}
@Nullable
@Override
public ResourceLocation getCreativeTabId(CreativeModeTab tab) {
return tab.getId();
public CreativeModeTab.Builder newCreativeModeTab() {
return FabricItemGroup.builder();
}
@Override
@@ -295,24 +295,24 @@ public class PlatformHelperImpl implements PlatformHelper {
@Override
public InteractionResult canAttackEntity(ServerPlayer player, Entity entity) {
return AttackEntityCallback.EVENT.invoker().interact(player, player.level, InteractionHand.MAIN_HAND, entity, null);
return AttackEntityCallback.EVENT.invoker().interact(player, player.level(), InteractionHand.MAIN_HAND, entity, null);
}
@Override
public boolean interactWithEntity(ServerPlayer player, Entity entity, Vec3 hitPos) {
return UseEntityCallback.EVENT.invoker().interact(player, entity.level, InteractionHand.MAIN_HAND, entity, new EntityHitResult(entity, hitPos)).consumesAction() ||
return UseEntityCallback.EVENT.invoker().interact(player, entity.level(), InteractionHand.MAIN_HAND, entity, new EntityHitResult(entity, hitPos)).consumesAction() ||
entity.interactAt(player, hitPos.subtract(entity.position()), InteractionHand.MAIN_HAND).consumesAction() ||
player.interactOn(entity, InteractionHand.MAIN_HAND).consumesAction();
}
@Override
public InteractionResult useOn(ServerPlayer player, ItemStack stack, BlockHitResult hit, Predicate<BlockState> canUseBlock) {
var result = UseBlockCallback.EVENT.invoker().interact(player, player.level, InteractionHand.MAIN_HAND, hit);
var result = UseBlockCallback.EVENT.invoker().interact(player, player.level(), InteractionHand.MAIN_HAND, hit);
if (result != InteractionResult.PASS) return result;
var block = player.level.getBlockState(hit.getBlockPos());
var block = player.level().getBlockState(hit.getBlockPos());
if (!block.isAir() && canUseBlock.test(block)) {
var useResult = block.use(player.level, player, InteractionHand.MAIN_HAND, hit);
var useResult = block.use(player.level(), player, InteractionHand.MAIN_HAND, hit);
if (useResult.consumesAction()) return useResult;
}

View File

@@ -46,9 +46,9 @@
}
],
"depends": {
"fabricloader": ">=0.14.17",
"fabric-api": ">=0.80.0",
"minecraft": ">=1.19.4 <1.20"
"fabricloader": ">=0.14.21",
"fabric-api": ">=0.83.0",
"minecraft": ">=1.20 <1.21"
},
"accessWidener": "computercraft.accesswidener"
}