From a3305f8dec26751a7d486d976dcabb6ed0815ced Mon Sep 17 00:00:00 2001 From: SpeeeDCraft <52341158+SpeeeDCraft@users.noreply.github.com> Date: Mon, 23 Oct 2023 21:25:35 +0700 Subject: [PATCH] recreate veins for kjs --- config/xaerominimap_entities.json | 4 +- kubejs/README.txt | 15 - kubejs/server_scripts/example.js | 3 - kubejs/server_scripts/mainServerScript.js | 5 + .../tfc/{veins.js => veinGenerator.js} | 24 +- kubejs/startup_scripts/constants.js | 1514 +++++++++++++++++ .../{materials.js => customMaterials.js} | 7 +- .../{stonetypes.js => customStoneTypes.js} | 5 +- .../gregtech/customTagPrefixes.js | 17 + kubejs/startup_scripts/mainStartupScript.js | 10 + kubejs/startup_scripts/tfc/constants.js | 125 -- 11 files changed, 1573 insertions(+), 156 deletions(-) delete mode 100644 kubejs/README.txt delete mode 100644 kubejs/server_scripts/example.js create mode 100644 kubejs/server_scripts/mainServerScript.js rename kubejs/server_scripts/tfc/{veins.js => veinGenerator.js} (74%) create mode 100644 kubejs/startup_scripts/constants.js rename kubejs/startup_scripts/gregtech/{materials.js => customMaterials.js} (52%) rename kubejs/startup_scripts/gregtech/{stonetypes.js => customStoneTypes.js} (85%) create mode 100644 kubejs/startup_scripts/gregtech/customTagPrefixes.js create mode 100644 kubejs/startup_scripts/mainStartupScript.js delete mode 100644 kubejs/startup_scripts/tfc/constants.js diff --git a/config/xaerominimap_entities.json b/config/xaerominimap_entities.json index 485d87e8f..f7ab2ff22 100644 --- a/config/xaerominimap_entities.json +++ b/config/xaerominimap_entities.json @@ -18,12 +18,12 @@ "displayNameWhenIconFails": true, "entityNumber": 1000.0, "alwaysDisplayNametags": false, - "dotSize": 2.0, "startFadingAt": 0.0, + "dotSize": 2.0, "renderOverMinimapFrame": 1.0, "icons": 1.0, - "names": 0.0, "heightLimit": 20.0, + "names": 0.0, "iconScale": 1.0 }, "subCategories": [ diff --git a/kubejs/README.txt b/kubejs/README.txt deleted file mode 100644 index 5cf0fdf1d..000000000 --- a/kubejs/README.txt +++ /dev/null @@ -1,15 +0,0 @@ -Find out more info on the website: https://kubejs.com/ - -Directory information: - -assets - Acts as a resource pack, you can put any client resources in here, like textures, models, etc. Example: assets/kubejs/textures/item/test_item.png -data - Acts as a datapack, you can put any server resources in here, like loot tables, functions, etc. Example: data/kubejs/loot_tables/blocks/test_block.json - -startup_scripts - Scripts that get loaded once during game startup - Used for adding items and other things that can only happen while the game is loading (Can be reloaded with /kubejs reload_startup_scripts, but it may not work!) -server_scripts - Scripts that get loaded every time server resources reload - Used for modifying recipes, tags, loot tables, and handling server events (Can be reloaded with /reload) -client_scripts - Scripts that get loaded every time client resources reload - Used for JEI events, tooltips and other client side things (Can be reloaded with F3+T) - -config - KubeJS config storage. This is also the only directory that scripts can access other than world directory -exported - Data dumps like texture atlases end up here - -You can find type-specific logs in logs/kubejs/ directory \ No newline at end of file diff --git a/kubejs/server_scripts/example.js b/kubejs/server_scripts/example.js deleted file mode 100644 index aa648c0e8..000000000 --- a/kubejs/server_scripts/example.js +++ /dev/null @@ -1,3 +0,0 @@ -// priority: 0 - -// script.. \ No newline at end of file diff --git a/kubejs/server_scripts/mainServerScript.js b/kubejs/server_scripts/mainServerScript.js new file mode 100644 index 000000000..b51da02f9 --- /dev/null +++ b/kubejs/server_scripts/mainServerScript.js @@ -0,0 +1,5 @@ +// priority: 0 + +ServerEvents.highPriorityData(event => { + addOreVeins(event); +}) \ No newline at end of file diff --git a/kubejs/server_scripts/tfc/veins.js b/kubejs/server_scripts/tfc/veinGenerator.js similarity index 74% rename from kubejs/server_scripts/tfc/veins.js rename to kubejs/server_scripts/tfc/veinGenerator.js index 664f62ca9..4e92cce8b 100644 --- a/kubejs/server_scripts/tfc/veins.js +++ b/kubejs/server_scripts/tfc/veinGenerator.js @@ -1,7 +1,6 @@ // priority: 0 -ServerEvents.highPriorityData(event => { - +const addOreVeins = (event) => { const veinsJson = { replace: true, values: [] @@ -12,7 +11,7 @@ ServerEvents.highPriorityData(event => { const placedFeatureVeinJson = { feature: `tfc:vein/${vein.random_name}`, placement: [] - } + } const configuredFeatureVeinJson = { type: vein.veinType, @@ -27,8 +26,21 @@ ServerEvents.highPriorityData(event => { size: vein.size, density: vein.density, blocks: [], + random_name: vein.random_name, + + // may be empty indicator: vein.indicator, - random_name: vein.random_name + biomes: vein.biomes, // not work (maybe tfc bug) + + // disc vein stuff + height: vein.height, + + // pipe vein stuff + radius: vein.radius, + minSkew: vein.minSkew, + maxSkew: vein.maxSkew, + minSlant: vein.minSlant, + maxSlant: vein.maxSlant } } @@ -51,10 +63,10 @@ ServerEvents.highPriorityData(event => { }) veinsJson.values.push(`tfc:vein/${vein.random_name}`) - + console.log(configuredFeatureVeinJson) event.addJson(`tfc:worldgen/configured_feature/vein/${vein.random_name}`, configuredFeatureVeinJson) event.addJson(`tfc:worldgen/placed_feature/vein/${vein.random_name}`, placedFeatureVeinJson) }) event.addJson(`tfc:tags/worldgen/placed_feature/in_biome/veins`, veinsJson) -}) \ No newline at end of file +} \ No newline at end of file diff --git a/kubejs/startup_scripts/constants.js b/kubejs/startup_scripts/constants.js new file mode 100644 index 000000000..467c9373a --- /dev/null +++ b/kubejs/startup_scripts/constants.js @@ -0,0 +1,1514 @@ +// priority: 1000 + +global.allTFCStoneTypeNames = [ + 'gabbro', + 'shale', + 'claystone', + 'limestone', + 'conglomerate', + 'dolomite', + 'chert', + 'chalk', + 'rhyolite', + 'dacite', + 'quartzite', + 'slate', + 'phyllite', + 'schist', + 'gneiss', + 'marble', + 'basalt', + 'diorite', + 'andesite', + 'granite' +]; + +global.allTFCStoneTypeNamesWithoutDups = [ + 'gabbro', + 'shale', + 'claystone', + 'limestone', + 'conglomerate', + 'dolomite', + 'chert', + 'chalk', + 'rhyolite', + 'dacite', + 'quartzite', + 'slate', + 'phyllite', + 'schist', + 'gneiss', + 'marble' +]; + +global.allTFCStoneTypeNamesOnlyDups = [ + 'basalt', + 'diorite', + 'andesite', + 'granite' +]; + +global.veins = [ + { + random_name: "tfc:cluster_vein", + veinType: "", + rarity: 0, + maxY: 0, + minY: 0, + size: 0, + density: 0.0, + stoneTypes: [""], + ores: [ + { + weight: 0, + material: "" + } + ], + + indicator: { + rarity: 0, + blocks: [ + { + block: "" + } + ] + } + }, + { + random_name: "basaltic_sands", + veinType: "tfc:disc_vein", + rarity: 80, + maxY: 60, + minY: 15, + size: 24, + density: 0.2, + stoneTypes: ["granite", "basalt"], + ores: [ + { + weight: 35, + material: "basaltic_mineral_sand" + }, + { + weight: 25, + material: "granitic_mineral_sand" + }, + { + weight: 25, + material: "fullers_earth" + }, + { + weight: 15, + material: "gypsum" + } + ], + + height: 3 + }, + { + random_name: "bauxite", + veinType: "tfc:cluster_vein", + rarity: 85, + maxY: 80, + minY: 10, + size: 30, + density: 0.3, + stoneTypes: ["shale", "claystone", "limestone", "conglomerate", "dolomite", "chert", "chalk"], + ores: [ + { + weight: 45, + material: "bauxite" + }, + { + weight: 30, + material: "ilmenite" + }, + { + weight: 25, + material: "aluminium" + } + ] + }, + { + random_name: "beryllium", + veinType: "tfc:cluster_vein", + rarity: 130, + maxY: 10, + minY: -64, + size: 40, + density: 0.35, + stoneTypes: ["rhyolite"], + ores: [ + { + weight: 65, + material: "beryllium" + }, + { + weight: 35, + material: "emerald" + } + ] + }, + { + random_name: "certus_quartz", + veinType: "tfc:cluster_vein", + rarity: 35, + maxY: 100, + minY: -20, + size: 45, + density: 0.4, + stoneTypes: ["shale", "quartzite", "schist", "gneiss"], + ores: [ + { + weight: 45, + material: "quartzite" + }, + { + weight: 30, + material: "certus_quartz" + }, + { + weight: 15, + material: "barite" + }, + { + weight: 10, + material: "nether_quartz" + } + ] + }, + { + random_name: "coal", + veinType: "tfc:cluster_vein", + rarity: 115, + maxY: 210, + minY: 0, + size: 60, + density: 0.6, + stoneTypes: ["shale", "claystone", "limestone", "conglomerate", "dolomite", "chert", "chalk"], + ores: [ + { + weight: 97, + material: "coal" + }, + { + weight: 3, + material: "diamond" + } + ] + }, + { + random_name: "deep_gold", + veinType: "tfc:cluster_vein", + rarity: 110, + maxY: 30, + minY: -64, + size: 45, + density: 0.7, + stoneTypes: ["rhyolite", "basalt", "andesite", "dacite", "granite", "diorite", "gabbro"], + ores: [ + { + weight: 5, + material: "goethite" + }, + { + weight: 5, + material: "yellow_limonite" + }, + { + weight: 15, + material: "hematite" + }, + { + weight: 75, + material: "gold" + } + ], + + indicator: { + rarity: 12, + blocks: [ + { + block: "tfc:ore/small_native_gold" + } + ] + } + }, + { + random_name: "deep_hematite", + veinType: "tfc:cluster_vein", + rarity: 100, + maxY: 30, + minY: -64, + size: 50, + density: 0.8, + stoneTypes: ["rhyolite", "basalt", "andesite", "dacite"], + ores: [ + { + weight: 25, + material: "goethite" + }, + { + weight: 15, + material: "yellow_limonite" + }, + { + weight: 35, + material: "hematite" + }, + { + weight: 5, + material: "gold" + }, + { + weight: 20, + material: "ruby" + } + ], + + indicator: { + rarity: 12, + blocks: [ + { + block: "tfc:ore/small_hematite" + } + ] + } + }, + { + random_name: "deep_limonite", + veinType: "tfc:cluster_vein", + rarity: 100, + maxY: 30, + minY: -64, + size: 50, + density: 0.8, + stoneTypes: ["shale", "claystone", "limestone", "conglomerate", "dolomite", "chert", "chalk"], + ores: [ + { + weight: 50, + material: "goethite" + }, + { + weight: 15, + material: "yellow_limonite" + }, + { + weight: 15, + material: "hematite" + }, + { + weight: 20, + material: "malachite" + } + ], + + indicator: { + rarity: 12, + blocks: [ + { + block: "tfc:ore/small_limonite" + } + ] + } + }, + { + random_name: "deep_magnetite", + veinType: "tfc:cluster_vein", + rarity: 100, + maxY: 30, + minY: -64, + size: 55, + density: 0.7, + stoneTypes: ["shale", "claystone", "limestone", "conglomerate", "dolomite", "chert", "chalk"], + ores: [ + { + weight: 5, + material: "magnetite" + }, + { + weight: 15, + material: "vanadium_magnetite" + }, + { + weight: 60, + material: "chromite" + }, + { + weight: 15, + material: "gold" + }, + { + weight: 5, + material: "sapphire" + } + ], + + indicator: { + rarity: 12, + blocks: [ + { + block: "tfc:ore/small_magnetite" + } + ] + } + }, + { + random_name: "diamond", + veinType: "tfc:pipe_vein", + rarity: 60, + maxY: 100, + minY: -64, + size: 60, + density: 0.4, + stoneTypes: ["gabbro"], + ores: [ + { + weight: 45, + material: "graphite" + }, + { + weight: 25, + material: "diamond" + }, + { + weight: 30, + material: "coal" + } + ], + + min_skew: 5, + max_skew: 13, + min_slant: 0, + max_slant: 2 + }, + { + random_name: "garnet_amethyst", + veinType: "tfc:disc_vein", + rarity: 14, + maxY: 60, + minY: 40, + size: 8, + density: 0.2, + stoneTypes: ["shale", "claystone", "limestone", "conglomerate", "dolomite", "chert", "chalk", "quartzite", "slate", "phyllite", "schist", "gneiss", "marble"], + ores: [ + { + weight: 5, + material: "red_garnet" + }, + { + weight: 15, + material: "yellow_garnet" + }, + { + weight: 65, + material: "amethyst" + }, + { + weight: 15, + material: "opal" + } + ], + + biomes: "#tfc:is_river", + height: 4 + }, + { + random_name: "garnet_opal", + veinType: "tfc:disc_vein", + rarity: 14, + maxY: 60, + minY: 40, + size: 8, + density: 0.2, + stoneTypes: ["rhyolite", "basalt", "andesite", "dacite", "granite", "diorite", "gabbro"], + ores: [ + { + weight: 5, + material: "red_garnet" + }, + { + weight: 15, + material: "yellow_garnet" + }, + { + weight: 25, + material: "amethyst" + }, + { + weight: 55, + material: "opal" + } + ], + + biomes: "#tfc:is_river", + height: 4 + }, + { + random_name: "lapis", + veinType: "tfc:cluster_vein", + rarity: 70, + maxY: 10, + minY: -60, + size: 40, + density: 0.25, + stoneTypes: ["quartzite", "slate", "phyllite", "schist", "gneiss", "marble"], + ores: [ + { + weight: 35, + material: "lazurite" + }, + { + weight: 25, + material: "sodalite" + }, + { + weight: 25, + material: "lapis" + }, + { + weight: 15, + material: "calcite" + } + ] + }, + { + random_name: "manganese", + veinType: "tfc:cluster_vein", + rarity: 70, + maxY: 0, + minY: -30, + size: 35, + density: 0.25, + stoneTypes: ["rhyolite", "basalt", "andesite", "dacite", "shale", "claystone", "limestone", "conglomerate", "dolomite", "chert", "chalk"], + ores: [ + { + weight: 30, + material: "grossular" + }, + { + weight: 20, + material: "spessartine" + }, + { + weight: 20, + material: "pyrolusite" + }, + { + weight: 10, + material: "tantalite" + } + ] + }, + { + random_name: "molydbenum", + veinType: "tfc:cluster_vein", + rarity: 150, + maxY: 50, + minY: -64, + size: 25, + density: 0.25, + stoneTypes: ["rhyolite", "basalt", "andesite", "dacite", "granite", "diorite", "gabbro"], + ores: [ + { + weight: 40, + material: "wulfenite" + }, + { + weight: 30, + material: "molybdenite" + }, + { + weight: 15, + material: "molybdenum" + }, + { + weight: 15, + material: "powellite" + } + ] + }, + { + random_name: "monazite", + veinType: "tfc:cluster_vein", + rarity: 80, + maxY: 40, + minY: -50, + size: 25, + density: 0.25, + stoneTypes: ["granite", "diorite", "gabbro"], + ores: [ + { + weight: 50, + material: "bastnasite" + }, + { + weight: 25, + material: "molybdenum" + }, + { + weight: 25, + material: "neodymium" + } + ] + }, + { + random_name: "naquadah", + veinType: "tfc:cluster_vein", + rarity: 300, + maxY: -10, + minY: -64, + size: 25, + density: 0.05, + stoneTypes: ["quartzite", "slate", "phyllite", "schist", "gneiss", "marble"], + ores: [ + { + weight: 75, + material: "naquadah" + }, + { + weight: 25, + material: "plutonium" + } + ] + }, + { + random_name: "normal_bismuth", + veinType: "tfc:cluster_vein", + rarity: 60, + maxY: 75, + minY: -32, + size: 40, + density: 0.6, + stoneTypes: ["granite", "diorite", "gabbro", "shale", "claystone", "limestone", "conglomerate", "dolomite", "chert", "chalk"], + ores: [ + { + weight: 80, + material: "bismuth" + }, + { + weight: 9, + material: "sulfur" + }, + { + weight: 11, + material: "lead" + } + ], + + indicator: { + rarity: 12, + blocks: [ + { + block: "tfc:ore/small_bismuthinite" + } + ] + } + }, + { + random_name: "normal_cassiterite", + veinType: "tfc:cluster_vein", + rarity: 60, + maxY: 75, + minY: -32, + size: 40, + density: 0.6, + stoneTypes: ["granite", "diorite", "gabbro"], + ores: [ + { + weight: 40, + material: "cassiterite" + }, + { + weight: 60, + material: "tin" + } + ], + + indicator: { + rarity: 12, + blocks: [ + { + block: "tfc:ore/small_cassiterite" + } + ] + } + }, + { + random_name: "normal_copper", + veinType: "tfc:cluster_vein", + rarity: 60, + maxY: 75, + minY: -32, + size: 40, + density: 0.6, + stoneTypes: ["rhyolite", "basalt", "andesite", "dacite"], + ores: [ + { + weight: 20, + material: "chalcopyrite" + }, + { + weight: 5, + material: "iron" + }, + { + weight: 10, + material: "pyrite" + }, + { + weight: 65, + material: "copper" + } + ], + + indicator: { + rarity: 12, + blocks: [ + { + block: "tfc:ore/small_native_copper" + } + ] + } + }, + { + random_name: "normal_garnierite", + veinType: "tfc:cluster_vein", + rarity: 70, + maxY: 60, + minY: -32, + size: 35, + density: 0.6, + stoneTypes: ["gabbro"], + ores: [ + { + weight: 40, + material: "garnierite" + }, + { + weight: 10, + material: "nickel" + }, + { + weight: 20, + material: "cobaltite" + }, + { + weight: 30, + material: "pentlandite" + } + ], + + indicator: { + rarity: 12, + blocks: [ + { + block: "tfc:ore/small_garnierite" + } + ] + } + }, + { + random_name: "normal_gold", + veinType: "tfc:cluster_vein", + rarity: 70, + maxY: 60, + minY: -32, + size: 35, + density: 0.6, + stoneTypes: ["rhyolite", "basalt", "andesite", "dacite", "granite", "diorite", "gabbro"], + ores: [ + { + weight: 5, + material: "goethite" + }, + { + weight: 20, + material: "yellow_limonite" + }, + { + weight: 20, + material: "hematite" + }, + { + weight: 55, + material: "gold" + } + ], + + indicator: { + rarity: 12, + blocks: [ + { + block: "tfc:ore/small_native_gold" + } + ] + } + }, + { + random_name: "normal_hematite", + veinType: "tfc:cluster_vein", + rarity: 60, + maxY: 75, + minY: -32, + size: 40, + density: 0.6, + stoneTypes: ["rhyolite", "basalt", "andesite", "dacite"], + ores: [ + { + weight: 15, + material: "goethite" + }, + { + weight: 30, + material: "yellow_limonite" + }, + { + weight: 50, + material: "hematite" + }, + { + weight: 5, + material: "gold" + } + ], + + indicator: { + rarity: 12, + blocks: [ + { + block: "tfc:ore/small_hematite" + } + ] + } + }, + { + random_name: "normal_limonite", + veinType: "tfc:cluster_vein", + rarity: 60, + maxY: 75, + minY: -32, + size: 40, + density: 0.6, + stoneTypes: ["shale", "claystone", "limestone", "conglomerate", "dolomite", "chert", "chalk"], + ores: [ + { + weight: 15, + material: "goethite" + }, + { + weight: 50, + material: "yellow_limonite" + }, + { + weight: 20, + material: "hematite" + }, + { + weight: 15, + material: "malachite" + } + ], + + indicator: { + rarity: 12, + blocks: [ + { + block: "tfc:ore/small_limonite" + } + ] + } + }, + { + random_name: "normal_magnetite", + veinType: "tfc:cluster_vein", + rarity: 60, + maxY: 75, + minY: -32, + size: 40, + density: 0.6, + stoneTypes: ["shale", "claystone", "limestone", "conglomerate", "dolomite", "chert", "chalk"], + ores: [ + { + weight: 65, + material: "magnetite" + }, + { + weight: 25, + material: "vanadium_magnetite" + }, + { + weight: 10, + material: "gold" + } + ], + + indicator: { + rarity: 12, + blocks: [ + { + block: "tfc:ore/small_magnetite" + } + ] + } + }, + { + random_name: "galena", + veinType: "tfc:cluster_vein", + rarity: 60, + maxY: 75, + minY: -32, + size: 40, + density: 0.6, + stoneTypes: ["granite", "gneiss"], + ores: [ + { + weight: 30, + material: "galena" + }, + { + weight: 15, + material: "silver" + }, + { + weight: 55, + material: "lead" + } + ], + + indicator: { + rarity: 12, + blocks: [ + { + block: "tfc:ore/small_native_silver" + } + ] + } + }, + { + random_name: "normal_sphalerite", + veinType: "tfc:cluster_vein", + rarity: 60, + maxY: 75, + minY: -32, + size: 40, + density: 0.6, + stoneTypes: ["quartzite", "slate", "phyllite", "schist", "gneiss", "marble"], + ores: [ + { + weight: 0, + material: "sulfur" + }, + { + weight: 0, + material: "sphalerite" + }, + { + weight: 0, + material: "pyrite" + } + ], + + indicator: { + rarity: 12, + blocks: [ + { + block: "tfc:ore/small_sphalerite" + } + ] + } + }, + { + random_name: "normal_tetrahedrite", + veinType: "tfc:cluster_vein", + rarity: 60, + maxY: 75, + minY: -32, + size: 40, + density: 0.6, + stoneTypes: ["quartzite", "slate", "phyllite", "schist", "gneiss", "marble"], + ores: [ + { + weight: 35, + material: "tetrahedrite" + }, + { + weight: 40, + material: "copper" + }, + { + weight: 25, + material: "stibnite" + } + ], + + indicator: { + rarity: 12, + blocks: [ + { + block: "tfc:ore/small_tetrahedrite" + } + ] + } + }, + { + random_name: "pitchblende", + veinType: "tfc:cluster_vein", + rarity: 200, + maxY: 20, + minY: -50, + size: 22, + density: 0.1, + stoneTypes: ["granite", "diorite", "gabbro", "quartzite", "slate", "phyllite", "schist", "gneiss", "marble"], + ores: [ + { + weight: 50, + material: "pitchblende" + }, + { + weight: 50, + material: "uraninite" + } + ] + }, + { + random_name: "redstone", + veinType: "tfc:cluster_vein", + rarity: 90, + maxY: 100, + minY: -48, + size: 25, + density: 0.6, + stoneTypes: ["granite"], + ores: [ + { + weight: 45, + material: "redstone" + }, + { + weight: 35, + material: "ruby" + }, + { + weight: 20, + material: "cinnabar" + } + ], + + indicator: { + rarity: 12, + blocks: [ + { + block: "tfc:ore/small_cryolite" + } + ] + } + }, + { + random_name: "salt", + veinType: "tfc:cluster_vein", + rarity: 80, + maxY: 70, + minY: 30, + size: 30, + density: 0.2, + stoneTypes: ["shale", "claystone", "limestone"], + ores: [ + { + weight: 40, + material: "rock_salt" + }, + { + weight: 30, + material: "salt" + }, + { + weight: 15, + material: "lepidolite" + }, + { + weight: 15, + material: "borax" + } + ] + }, + { + random_name: "saltpeter", + veinType: "tfc:cluster_vein", + rarity: 50, + maxY: 40, + minY: -55, + size: 50, + density: 0.1, + stoneTypes: ["granite", "diorite", "gabbro", "quartzite", "slate", "phyllite", "schist", "gneiss", "marble"], + ores: [ + { + weight: 35, + material: "saltpeter" + }, + { + weight: 25, + material: "diatomite" + }, + { + weight: 25, + material: "electrotine" + }, + { + weight: 25, + material: "alunite" + } + ] + }, + { + random_name: "scheelite", + veinType: "tfc:cluster_vein", + rarity: 125, + maxY: 30, + minY: -30, + size: 30, + density: 0.3, + stoneTypes: ["granite", "diorite", "gabbro"], + ores: [ + { + weight: 45, + material: "scheelite" + }, + { + weight: 35, + material: "tungstate" + }, + { + weight: 20, + material: "lithium" + } + ] + }, + { + random_name: "sheldonite", + veinType: "tfc:cluster_vein", + rarity: 55, + maxY: 40, + minY: -50, + size: 14, + density: 0.4, + stoneTypes: ["quartzite", "slate", "phyllite", "schist", "gneiss", "marble"], + ores: [ + { + weight: 35, + material: "bornite" + }, + { + weight: 25, + material: "cooperite" + }, + { + weight: 25, + material: "platinum" + }, + { + weight: 15, + material: "palladium" + } + ] + }, + { + random_name: "surface_bismuth", + veinType: "tfc:cluster_vein", + rarity: 20, + maxY: 210, + minY: 60, + size: 20, + density: 0.2, + stoneTypes: ["granite", "diorite", "gabbro", "shale", "claystone", "limestone", "conglomerate", "dolomite", "chert", "chalk"], + ores: [ + { + weight: 90, + material: "bismuth" + }, + { + weight: 3, + material: "sulfur" + }, + { + weight: 7, + material: "lead" + } + ], + + indicator: { + rarity: 12, + blocks: [ + { + block: "tfc:ore/small_bismuthinite" + } + ] + } + }, + { + random_name: "surface_cassiterite", + veinType: "tfc:cluster_vein", + rarity: 20, + maxY: 210, + minY: 60, + size: 20, + density: 0.4, + stoneTypes: ["granite", "diorite", "gabbro"], + ores: [ + { + weight: 60, + material: "cassiterite" + }, + { + weight: 40, + material: "tin" + } + ], + + indicator: { + rarity: 12, + blocks: [ + { + block: "tfc:ore/small_cassiterite" + } + ] + } + }, + { + random_name: "surface_cooper", + veinType: "tfc:cluster_vein", + rarity: 20, + maxY: 210, + minY: 60, + size: 20, + density: 0.4, + stoneTypes: ["rhyolite", "basalt", "andesite", "dacite"], + ores: [ + { + weight: 70, + material: "chalcopyrite" + }, + { + weight: 15, + material: "zeolite" + }, + { + weight: 5, + material: "cassiterite" + }, + { + weight: 10, + material: "realgar" + } + ], + + indicator: { + rarity: 12, + blocks: [ + { + block: "tfc:ore/small_native_copper" + } + ] + } + }, + { + random_name: "surface_sphalerite", + veinType: "tfc:cluster_vein", + rarity: 20, + maxY: 210, + minY: 60, + size: 20, + density: 0.4, + stoneTypes: ["quartzite", "slate", "phyllite", "schist", "gneiss", "marble", "rhyolite", "basalt", "andesite", "dacite"], + ores: [ + { + weight: 55, + material: "sulfur" + }, + { + weight: 40, + material: "sphalerite" + }, + { + weight: 5, + material: "pyrite" + } + ], + + indicator: { + rarity: 12, + blocks: [ + { + block: "tfc:ore/small_sphalerite" + } + ] + } + }, + { + random_name: "surface_tetrahedrite", + veinType: "tfc:cluster_vein", + rarity: 20, + maxY: 210, + minY: 60, + size: 20, + density: 0.5, + stoneTypes: ["quartzite", "slate", "phyllite", "schist", "gneiss", "marble", ""], + ores: [ + { + weight: 60, + material: "tetrahedrite" + }, + { + weight: 10, + material: "copper" + }, + { + weight: 30, + material: "stibnite" + } + ], + + indicator: { + rarity: 12, + blocks: [ + { + block: "tfc:ore/small_tetrahedrite" + } + ] + } + }, + { + random_name: "tfc:cluster_vein", + veinType: "sulfur", + rarity: 90, + maxY: 210, + minY: 0, + size: 15, + density: 0.6, + stoneTypes: ["rhyolite", "basalt", "andesite", "dacite"], + ores: [ + { + weight: 50, + material: "sulfur" + }, + { + weight: 35, + material: "pyrite" + }, + { + weight: 15, + material: "sphalerite" + } + ] + }, + { + random_name: "tfc:cluster_vein", + veinType: "topaz", + rarity: 30, + maxY: -30, + minY: -50, + size: 15, + density: 0.3, + stoneTypes: ["quartzite", "slate", "phyllite", "schist", "gneiss", "marble"], + ores: [ + { + weight: 35, + material: "blue_topaz" + }, + { + weight: 25, + material: "topaz" + }, + { + weight: 25, + material: "chalcocite" + }, + { + weight: 15, + material: "bornite" + } + ] + }, + { + random_name: "tfc:cluster_vein", + veinType: "apatite", + rarity: 90, + maxY: 20, + minY: -40, + size: 32, + density: 0.25, + stoneTypes: ["granite", "diorite", "gabbro", "quartzite", "slate", "phyllite", "schist", "gneiss", "marble"], + ores: [ + { + weight: 50, + material: "apatite" + }, + { + weight: 35, + material: "tricalcium_phospate" + }, + { + weight: 15, + material: "pyrochlore" + } + ] + }, + { + random_name: "tfc:cluster_vein", + veinType: "garnet_tin", + rarity: 300, + maxY: 65, + minY: -20, + size: 36, + density: 0.1, + stoneTypes: ["rhyolite", "basalt", "andesite", "daceite", "granite", "diorite", "gabbro", "quartzite", "slate", + "phyllite", "schist", "gneiss", "marble", "shale", "claystone", + "limestone", "conglomerate", "dolomite", "chert", "chalk"], + ores: [ + { + weight: 35, + material: "cassiterite_sand" + }, + { + weight: 25, + material: "garnet_sand" + }, + { + weight: 25, + material: "asbestos" + }, + { + weight: 15, + material: "diatomite" + } + ] + }, + { + random_name: "tfc:cluster_vein", + veinType: "lubricant", + rarity: 90, + maxY: 50, + minY: -40, + size: 22, + density: 0.2, + stoneTypes: ["granite", "diorite", "gabbro"], + ores: [ + { + weight: 35, + material: "soapstone" + }, + { + weight: 25, + material: "talc" + }, + { + weight: 25, + material: "glauconite_sand" + }, + { + weight: 15, + material: "pentlandite" + } + ] + }, + { + random_name: "tfc:cluster_vein", + veinType: "mica", + rarity: 90, + maxY: 210, + minY: 0, + size: 24, + density: 0.6, + stoneTypes: ["granite", "diorite", "gabbro", "quartzite", "slate", "phyllite", "schist", "gneiss", "marble"], + ores: [ + { + weight: 35, + material: "kyanite" + }, + { + weight: 25, + material: "mica" + }, + { + weight: 25, + material: "bauxite" + }, + { + weight: 15, + material: "pollucite" + } + ] + }, + { + random_name: "tfc:cluster_vein", + veinType: "sylvite", + rarity: 90, + maxY: 210, + minY: 0, + size: 10, + density: 0.6, + stoneTypes: ["shale", "claystone", "chert"], + ores: [ + { + weight: 100, + material: "sylvite" + } + ] + }, + { + random_name: "tfc:cluster_vein", + veinType: "olivine", + rarity: 70, + maxY: 10, + minY: -20, + size: 30, + density: 0.25, + stoneTypes: ["rhyolite", "basalt", "andesite", "dacite", "granite", "diorite", "gabbro"], + ores: [ + { + weight: 35, + material: "bentonite" + }, + { + weight: 25, + material: "magnetite" + }, + { + weight: 25, + material: "olivine" + }, + { + weight: 15, + material: "glauconite_sand" + } + ] + }, + { + random_name: "tfc:cluster_vein", + veinType: "sapphire", + rarity: 20, + maxY: 40, + minY: 0, + size: 22, + density: 0.35, + stoneTypes: ["rhyolite", "basalt", "andesite", "dacite"], + ores: [ + { + weight: 35, + material: "almandine" + }, + { + weight: 25, + material: "pyrope" + }, + { + weight: 15, + material: "sapphire" + }, + { + weight: 15, + material: "green_sapphire" + } + ] + }, +] \ No newline at end of file diff --git a/kubejs/startup_scripts/gregtech/materials.js b/kubejs/startup_scripts/gregtech/customMaterials.js similarity index 52% rename from kubejs/startup_scripts/gregtech/materials.js rename to kubejs/startup_scripts/gregtech/customMaterials.js index 3929a146b..62b6d0da6 100644 --- a/kubejs/startup_scripts/gregtech/materials.js +++ b/kubejs/startup_scripts/gregtech/customMaterials.js @@ -1,6 +1,9 @@ const $OreProperty = Java.loadClass("com.gregtechceu.gtceu.api.data.chemical.material.properties.OreProperty") const $OrePropertyKey = Java.loadClass("com.gregtechceu.gtceu.api.data.chemical.material.properties.PropertyKey") -GTCEuStartupEvents.registry('gtceu:material', event => { +const registerMaterials = (event) => { //GTMaterials.Bismuth.setProperty($OrePropertyKey.ORE, new $OreProperty()); -}) \ No newline at end of file + //GTMaterials.Gypsum.setProperty($OrePropertyKey.ORE, new $OreProperty()); + //GTMaterials.Borax.setProperty($OrePropertyKey.ORE, new $OreProperty()); + //GTMaterials.Sylvite.setProperty($OrePropertyKey.ORE, new $OreProperty()); +} \ No newline at end of file diff --git a/kubejs/startup_scripts/gregtech/stonetypes.js b/kubejs/startup_scripts/gregtech/customStoneTypes.js similarity index 85% rename from kubejs/startup_scripts/gregtech/stonetypes.js rename to kubejs/startup_scripts/gregtech/customStoneTypes.js index 16d422a8a..7b6539d0d 100644 --- a/kubejs/startup_scripts/gregtech/stonetypes.js +++ b/kubejs/startup_scripts/gregtech/customStoneTypes.js @@ -1,7 +1,6 @@ // priority: 0 -// Replace -GTCEuStartupEvents.registry('gtceu:tag_prefix', event => { +const registerStoneTypes = (event) => { global.allTFCStoneTypeNames.forEach(stoneTypeName => { event.create("tfc_" + stoneTypeName, 'ore') .stateSupplier(() => Block.getBlock('tfc:rock/raw/' + stoneTypeName).defaultBlockState()) @@ -10,5 +9,5 @@ GTCEuStartupEvents.registry('gtceu:tag_prefix', event => { .materialIconType(GTMaterialIconType.ore) .generationCondition(ItemGenerationCondition.hasOreProperty) }); -}) +} diff --git a/kubejs/startup_scripts/gregtech/customTagPrefixes.js b/kubejs/startup_scripts/gregtech/customTagPrefixes.js new file mode 100644 index 000000000..b318473ef --- /dev/null +++ b/kubejs/startup_scripts/gregtech/customTagPrefixes.js @@ -0,0 +1,17 @@ +// priority: 0 + +const registerTagPrefixes = (event) => { + event.create('poor_raw_ore') + .unificationEnabled(true) + .generateItem(true) + .materialIconType(GTMaterialIconType.rawOre) + .generationCondition(ItemGenerationCondition.hasOreProperty) + .register(); + + event.create('rich_raw_ore') + .unificationEnabled(true) + .generateItem(true) + .materialIconType(GTMaterialIconType.rawOre) + .generationCondition(ItemGenerationCondition.hasOreProperty) + .register(); +} \ No newline at end of file diff --git a/kubejs/startup_scripts/mainStartupScript.js b/kubejs/startup_scripts/mainStartupScript.js new file mode 100644 index 000000000..f6733f305 --- /dev/null +++ b/kubejs/startup_scripts/mainStartupScript.js @@ -0,0 +1,10 @@ +// priority: 0 + +GTCEuStartupEvents.registry('gtceu:material', event => { + registerMaterials(event); +}) + +GTCEuStartupEvents.registry('gtceu:tag_prefix', event => { + registerStoneTypes(event); + registerTagPrefixes(event); +}) \ No newline at end of file diff --git a/kubejs/startup_scripts/tfc/constants.js b/kubejs/startup_scripts/tfc/constants.js deleted file mode 100644 index 7e8cde58c..000000000 --- a/kubejs/startup_scripts/tfc/constants.js +++ /dev/null @@ -1,125 +0,0 @@ -// priority: 1000 - -global.allTFCStoneTypeNames = [ - 'gabbro', - 'shale', - 'claystone', - 'limestone', - 'conglomerate', - 'dolomite', - 'chert', - 'chalk', - 'rhyolite', - 'dacite', - 'quartzite', - 'slate', - 'phyllite', - 'schist', - 'gneiss', - 'marble', - 'basalt', - 'diorite', - 'andesite', - 'granite' -]; - -global.allTFCStoneTypeNamesWithoutDups = [ - 'gabbro', - 'shale', - 'claystone', - 'limestone', - 'conglomerate', - 'dolomite', - 'chert', - 'chalk', - 'rhyolite', - 'dacite', - 'quartzite', - 'slate', - 'phyllite', - 'schist', - 'gneiss', - 'marble' -]; - -global.allTFCStoneTypeNamesOnlyDups = [ - 'basalt', - 'diorite', - 'andesite', - 'granite' -]; - -global.veins = [ - { - random_name: "normal_gold", - veinType: "tfc:disc_vein", - rarity: 70, - maxY: 60, - minY: -32, - size: 35, - density: 0.6, - stoneTypes: ["rhyolite", "basalt", "andesite", "dacite", "granite", "diorite", "gabbro"], - ores: [ - { - weight: 5, - material: "goethite" - }, - { - weight: 20, - material: "yellow_limonite" - }, - { - weight: 20, - material: "hematite" - }, - { - weight: 55, - material: "gold" - } - ], - indicator: { - rarity: 12, - blocks: [ - { - block: "tfc:ore/small_native_gold" - } - ] - } - } - /*, - { - name: "", - veinType: "tfc:disc_vein", - rarity: "", - maxY: 0, - minY: 0, - size: 0, - density: 0.0, - stoneTypes: ["marble", "diorite"], - ores: [ - { - weight: 0, - ore: "" - } - ], - customOreRules: [ - { - stoneType: "", - ores: [ - { - weight: 0, - ore: "" - } - ] - } - ], - indicator: { - rarity: 12, - blocks: [ - { - block: "tfc:ore/small_native_gold" - } - ] - } - }*/ -] \ No newline at end of file