Skip to content

Commit

Permalink
combine all of the EMC blocks into one
Browse files Browse the repository at this point in the history
  • Loading branch information
DonovanDMC committed Apr 8, 2022
1 parent 9a97686 commit 0597612
Show file tree
Hide file tree
Showing 152 changed files with 1,637 additions and 1,532 deletions.
5 changes: 5 additions & 0 deletions src/main/generation/generators/block/emc_link.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
const { mkdirSync } = require("fs");
const { genericBlock } = require("../../util");

const BASE = `${__dirname}/emc_link.json`;
module.exports = (outDir) => genericBlock(outDir, "emc_link", BASE);
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"parent": "minecraft:block/cube_all",
"textures": {
"all": "projectexpansion:block/emc_link"
"all": "projectexpansion:block/emc_link/$TIER$"
}
}
}
4 changes: 4 additions & 0 deletions src/main/generation/generators/blockstate/emc_link.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
const { generic } = require("../../util");

const BASE = `${__dirname}/emc_link.json`;
module.exports = (outDir) => generic(outDir, "emc_link", BASE);
7 changes: 7 additions & 0 deletions src/main/generation/generators/blockstate/emc_link.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"variants": {
"": {
"model": "projectexpansion:block/emc_link/$TIER$"
}
}
}

This file was deleted.

This file was deleted.

This file was deleted.

4 changes: 4 additions & 0 deletions src/main/generation/generators/item/emc_link.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
const { generic } = require("../../util");

const BASE = `${__dirname}/emc_link.json`;
module.exports = (outDir) => generic(outDir, "emc_link", BASE);
3 changes: 3 additions & 0 deletions src/main/generation/generators/item/emc_link.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"parent": "projectexpansion:block/emc_link/$TIER$"
}
3 changes: 0 additions & 3 deletions src/main/generation/generators/item/single/emc_export.json

This file was deleted.

3 changes: 0 additions & 3 deletions src/main/generation/generators/item/single/emc_import.json

This file was deleted.

3 changes: 0 additions & 3 deletions src/main/generation/generators/item/single/emc_link.json

This file was deleted.

28 changes: 28 additions & 0 deletions src/main/generation/generators/lang/en_US/block/emc_link.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
{
"block.projectexpansion.emc_link.tooltip": "Imports both emc & items, and exports items.",
"block.projectexpansion.emc_link.limit_items": "Import/Export Limit: %s/s",
"block.projectexpansion.emc_link.limit_emc": "EMC Limit: %s/s",
"block.projectexpansion.emc_link.not_owner": "You do not own this, %s does.",
"block.projectexpansion.emc_link.not_set": "An export item has not been set.",
"block.projectexpansion.emc_link.already_set": "An export item has already been set, clear the current export first.",
"block.projectexpansion.emc_link.empty_hand": "Empty your hand to retrieve items.",
"block.projectexpansion.emc_link.cleared": "Export item has been cleared.",
"block.projectexpansion.emc_link.not_enough_emc": "You do not have enough emc to purchase this, you need %s.",
"block.projectexpansion.emc_link.set": "Export item has been set to %s.",
"block.projectexpansion.basic_emc_link": "Basic EMC Link [MK 1]",
"block.projectexpansion.dark_emc_link": "Dark EMC Link [MK 2]",
"block.projectexpansion.red_emc_link": "Red EMC Link [MK 3]",
"block.projectexpansion.magenta_emc_link": "Magenta EMC Link [MK 4]",
"block.projectexpansion.pink_emc_link": "Pink EMC Link [MK 5]",
"block.projectexpansion.purple_emc_link": "Purple EMC Link [MK 6]",
"block.projectexpansion.violet_emc_link": "Violet EMC Link [MK 7]",
"block.projectexpansion.blue_emc_link": "Blue EMC Link [MK 8]",
"block.projectexpansion.cyan_emc_link": "Cyan EMC Link [MK 9]",
"block.projectexpansion.green_emc_link": "Green EMC Link [MK 10]",
"block.projectexpansion.lime_emc_link": "Lime EMC Link [MK 11]",
"block.projectexpansion.yellow_emc_link": "Yellow EMC Link [MK 12]",
"block.projectexpansion.orange_emc_link": "Orange EMC Link [MK 13]",
"block.projectexpansion.white_emc_link": "White EMC Link [MK 14]",
"block.projectexpansion.fading_emc_link": "Fading EMC Link [MK 15]",
"block.projectexpansion.final_emc_link": "Final EMC Link [MK 16]"
}
8 changes: 0 additions & 8 deletions src/main/generation/generators/lang/en_US/block/misc.json
Original file line number Diff line number Diff line change
@@ -1,13 +1,5 @@
{
"block.projectexpansion.arcane_table": "Arcane Table",
"block.projectexpansion.emc_link": "EMC Link",
"block.projectexpansion.emc_link.tooltip": "This block will transfer emc from nearby blocks into your transmutation inventory.",
"block.projectexpansion.emc_export": "EMC Export",
"block.projectexpansion.emc_export.tooltip": "Exports items, using your emc.",
"block.projectexpansion.emc_export.not_owner": "You are not the owner of this, %s is.",
"block.projectexpansion.emc_import": "EMC Import",
"block.projectexpansion.emc_import.tooltip": "Import items directly into your emc.",
"block.projectexpansion.emc_import.not_owner": "You are not the owner of this, %s is.",
"block.projectexpansion.transmutation_interface": "Transmutation Interface",
"block.projectexpansion.transmutation_interface.tooltip": "This can be used with compatible mods like Refined Storage to access your transmutation inventory."
}
30 changes: 15 additions & 15 deletions src/main/generation/generators/lang/en_US/gui.json
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
{
"gui.projectexpansion.config.title": "Project Expansion Config",
"gui.projectexpansion.config.tick_delay": "Tick Delay",
"gui.projectexpansion.config.tick_delay.desc": "The delay between mod operations (in ticks, default 20) - this will slightly effect the amount of emc generated via rounding - increase if you're noticing lag",
"gui.projectexpansion.config.format_emc": "Format EMC",
"gui.projectexpansion.config.format_emc.desc": "If EMC should be formatted as M/B/T/etc",
"gui.projectexpansion.config.full_number_names": "Full Number Names",
"gui.projectexpansion.config.full_number_names.desc": "If full number names (Million/Billion/Trillion) should be used instead of abbreviations",
"gui.projectexpansion.config.emc_display": "EMC Display",
"gui.projectexpansion.config.emc_display.desc": "Displays your current emc and gained emc per second in the top left corner.",
"gui.projectexpansion.config.powerflower_multiplier": "Power Flower Multiplier",
"gui.projectexpansion.config.powerflower_multiplier.desc": "Multiplies the output of Power Flowers.",
"gui.projectexpansion.config.notify_emc_changes": "Notify EMC Changes",
"gui.projectexpansion.config.notify_emc_changes.desc": "Notify users when their emc is changed via /emc add|remove|set",
"gui.projectexpansion.emc_link": "Personal Link",
"gui.projectexpansion.emc_gain": "EMC Gain"
"gui.projectexpansion.config.title": "Project Expansion Config",
"gui.projectexpansion.config.tick_delay": "Tick Delay",
"gui.projectexpansion.config.tick_delay.desc": "The delay between mod operations (in ticks, default 20) - this will slightly effect the amount of emc generated via rounding - increase if you're noticing lag",
"gui.projectexpansion.config.format_emc": "Format EMC",
"gui.projectexpansion.config.format_emc.desc": "If EMC should be formatted as M/B/T/etc",
"gui.projectexpansion.config.full_number_names": "Full Number Names",
"gui.projectexpansion.config.full_number_names.desc": "If full number names (Million/Billion/Trillion) should be used instead of abbreviations",
"gui.projectexpansion.config.emc_display": "EMC Display",
"gui.projectexpansion.config.emc_display.desc": "Displays your current emc and gained emc per second in the top left corner.",
"gui.projectexpansion.config.powerflower_multiplier": "Power Flower Multiplier",
"gui.projectexpansion.config.powerflower_multiplier.desc": "Multiplies the output of Power Flowers.",
"gui.projectexpansion.config.notify_emc_changes": "Notify EMC Changes",
"gui.projectexpansion.config.notify_emc_changes.desc": "Notify users when their emc is changed via /emc add|remove|set",
"gui.projectexpansion.emc_link": "Personal Link",
"gui.projectexpansion.emc_gain": "EMC Gain"
}
4 changes: 4 additions & 0 deletions src/main/generation/generators/loot_tables/emc_link.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
const { generic } = require("../../util");

const BASE = `${__dirname}/emc_link.json`;
module.exports = (outDir) => generic(outDir, "emc_link", BASE);
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"entries": [
{
"type": "minecraft:item",
"name": "projectexpansion:emc_link"
"name": "projectexpansion:$TIER$_emc_link"
}
],
"conditions": [
Expand All @@ -16,4 +16,4 @@
]
}
]
}
}
13 changes: 13 additions & 0 deletions src/main/generation/generators/recipes/emc_link.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
const { mkdirSync, readFileSync, existsSync, writeFileSync } = require("fs");
const { MATTER_TIERS } = require("../../util");

const BASE = `${__dirname}/emc_link.json`;
module.exports = function run(outDir) {
if(!existsSync(`${outDir}/emc_link`)) mkdirSync(`${outDir}/emc_link`);
const base = readFileSync(BASE).toString();
return MATTER_TIERS.filter(tier => !["basic", "dark", "red", "final"].includes(tier)).map((tier, index, arr) => {
if(tier === "magenta") return; // we still need it for pink
writeFileSync(`${outDir}/emc_link/${tier}.json`, base.replace(/\$TIER\$/g, tier).replace(/\$PREV\$/g, arr[index - 1]));
return [BASE, `${outDir}/emc_link/${tier}.json`];
}).filter(Boolean);
}
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
{
"type": "minecraft:crafting_shaped",
"group": "projectexpansion:matter/$TIER$",
"pattern": [
"LMH",
"SRS",
"CPC",
"HML"
],
"key": {
Expand All @@ -15,14 +16,14 @@
"H": {
"item": "projecte:high_covalence_dust"
},
"S": {
"tag": "forge:stone"
"P": {
"item": "projectexpansion:$PREV$_emc_link"
},
"R": {
"item": "projecte:red_matter"
"C": {
"item": "projectexpansion:$TIER$_compressed_collector"
}
},
"result": {
"item": "projectexpansion:emc_link"
"item": "projectexpansion:$TIER$_emc_link"
}
}
2 changes: 1 addition & 1 deletion src/main/generation/generators/recipes/power_flower.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
],
"key": {
"L": {
"item": "projectexpansion:emc_link"
"item": "projectexpansion:$TIER$_emc_link"
},
"C": {
"item": "projectexpansion:$TIER$_compressed_collector"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
{
"type": "minecraft:crafting_shaped",
"group": "projectexpansion:matter/basic",
"pattern": [
"LMH",
"SRS",
"TAT",
"HML"
],
"key": {
Expand All @@ -15,14 +16,14 @@
"H": {
"item": "projecte:high_covalence_dust"
},
"S": {
"tag": "forge:stone"
"T": {
"item": "projecte:transmutation_tablet"
},
"R": {
"item": "projectexpansion:cyan_matter"
"A": {
"item": "projecte:aeternalis_fuel_block"
}
},
"result": {
"item": "projectexpansion:emc_import"
"item": "projectexpansion:basic_emc_link"
}
}
29 changes: 29 additions & 0 deletions src/main/generation/generators/recipes/single/emc_link/dark.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
{
"type": "minecraft:crafting_shaped",
"group": "projectexpansion:matter/dark",
"pattern": [
"LMH",
"TPT",
"HML"
],
"key": {
"L": {
"item": "projecte:low_covalence_dust"
},
"M": {
"item": "projecte:medium_covalence_dust"
},
"H": {
"item": "projecte:high_covalence_dust"
},
"T": {
"item": "projecte:transmutation_tablet"
},
"P": {
"item": "projectexpansion:basic_emc_link"
}
},
"result": {
"item": "projectexpansion:dark_emc_link"
}
}
29 changes: 29 additions & 0 deletions src/main/generation/generators/recipes/single/emc_link/final.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
{
"type": "minecraft:crafting_shaped",
"group": "projectexpansion:matter/dark",
"pattern": [
"LMH",
"SPS",
"HML"
],
"key": {
"L": {
"item": "projecte:low_covalence_dust"
},
"M": {
"item": "projecte:medium_covalence_dust"
},
"H": {
"item": "projecte:high_covalence_dust"
},
"S": {
"item": "projectexpansion:final_star_shard"
},
"P": {
"item": "projectexpansion:dark_emc_link"
}
},
"result": {
"item": "projectexpansion:final_emc_link"
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
{
"type": "minecraft:crafting_shaped",
"group": "projectexpansion:matter/magenta",
"pattern": [
"LMH",
"TPT",
"HML"
],
"key": {
"L": {
"item": "projecte:low_covalence_dust"
},
"M": {
"item": "projecte:medium_covalence_dust"
},
"H": {
"item": "projecte:high_covalence_dust"
},
"T": {
"item": "projecte:transmutation_tablet"
},
"P": {
"item": "projectexpansion:red_emc_link"
}
},
"result": {
"item": "projectexpansion:magenta_emc_link"
}
}
29 changes: 29 additions & 0 deletions src/main/generation/generators/recipes/single/emc_link/red.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
{
"type": "minecraft:crafting_shaped",
"group": "projectexpansion:matter/red",
"pattern": [
"LMH",
"TPT",
"HML"
],
"key": {
"L": {
"item": "projecte:low_covalence_dust"
},
"M": {
"item": "projecte:medium_covalence_dust"
},
"H": {
"item": "projecte:high_covalence_dust"
},
"T": {
"item": "projecte:transmutation_tablet"
},
"P": {
"item": "projectexpansion:dark_emc_link"
}
},
"result": {
"item": "projectexpansion:red_emc_link"
}
}
Loading

0 comments on commit 0597612

Please sign in to comment.