From 2d1a2f14e5a4993d69878398b771edfab9b5a764 Mon Sep 17 00:00:00 2001 From: Wroclaw Date: Sun, 13 Nov 2022 07:51:29 +0100 Subject: [PATCH 1/5] Add ore indicators as items placed on the ground Item placing on the ground is added by Draconic Evolution, I used a janky way to setblock generated indicator to that tile. That tile needs nbt so I had to set a block using execute as setblock command, which is bad, because it spams logs and operators chat --- config/oreveins/ore_veins.json | 16 ++++++- index.toml | 10 ++++- pack.toml | 2 +- scripts/ore_veins/indicators.1.zs | 71 +++++++++++++++++++++++++++++++ scripts/ore_veins/indicators.2.zs | 5 +++ 5 files changed, 100 insertions(+), 4 deletions(-) create mode 100644 scripts/ore_veins/indicators.1.zs create mode 100644 scripts/ore_veins/indicators.2.zs diff --git a/config/oreveins/ore_veins.json b/config/oreveins/ore_veins.json index f5cd122..fb23352 100644 --- a/config/oreveins/ore_veins.json +++ b/config/oreveins/ore_veins.json @@ -5,6 +5,12 @@ "block": "thermalfoundation:ore", "meta": 0 }, + "indicator": { + "blocks": "contenttweaker:juice/internal/indicator/copper", + "ignore_vegatation": false, + "ignore_liquids": false, + "rarity": 24 + }, "stone": "minecraft:stone", "rarity": 160, "min_y": 8, @@ -20,6 +26,12 @@ "block": "forestry:resources", "meta": 0 }, + "indicator": { + "blocks": "contenttweaker:juice/internal/indicator/apatite", + "ignore_vegatation": false, + "ignore_liquids": false, + "rarity": 24 + }, "stone": "minecraft:stone", "rarity": "100", "min_y": -10, @@ -35,9 +47,9 @@ "ore": "minecraft:gold_ore", "stone": "minecraft:stone", "indicator": { - "blocks": "minecraft:gold_ore", + "blocks": "contenttweaker:juice/internal/indicator/gold", "ignore_vegatation": false, - "ignore_liquids": true, + "ignore_liquids": false, "rarity": 24 }, "rarity": 170, diff --git a/index.toml b/index.toml index a5991da..024a896 100644 --- a/index.toml +++ b/index.toml @@ -302,7 +302,7 @@ hash = "5046cde3673ccd62ba2209aaab9a917b3e1b0da7f521477e89f68bdba1648187" [[files]] file = "config/oreveins/ore_veins.json" -hash = "214f7142f586483b47112fa0e39fc24a693e512634a71f3851e5cefbd4dbf6bb" +hash = "44c43ee20b7998d261565da99b0a54ad268eaa1f44bc14d323489a885a5a246c" [[files]] file = "config/sereneseasons/biome_info.json" @@ -1539,3 +1539,11 @@ hash = "b4aea7892748ecfa5cf775fb0a18f0909795c0b025666ecaea88bb3a923b4194" [[files]] file = "scripts/nc_script_addons/MoarRealisticRadiation/rad_qmd.zs" hash = "a07879875ad20ae8e285c3cb39beeee648bd080ec12985b76583ad707a3de3ee" + +[[files]] +file = "scripts/ore_veins/indicators.1.zs" +hash = "eee1737869c3a9a2d2261894b32f09d8dee48df55f07393eec54ba8748a13d79" + +[[files]] +file = "scripts/ore_veins/indicators.2.zs" +hash = "08d456f730c1a797aab31811ba5a24e319ce35d000c4af80348a964a6c471898" diff --git a/pack.toml b/pack.toml index bc18b45..4f20fe7 100644 --- a/pack.toml +++ b/pack.toml @@ -6,7 +6,7 @@ pack-format = "packwiz:1.1.0" [index] file = "index.toml" hash-format = "sha256" -hash = "1d97754f0f1410e1990d6465b9d99ad55e152fa11804dd642f72013a1acb0503" +hash = "dadadd056bd26d8a241d36194b27f48fe13db960074ae4a2475f8afe66af4ba6" [versions] forge = "14.23.5.2860" diff --git a/scripts/ore_veins/indicators.1.zs b/scripts/ore_veins/indicators.1.zs new file mode 100644 index 0000000..f0cee4f --- /dev/null +++ b/scripts/ore_veins/indicators.1.zs @@ -0,0 +1,71 @@ +#loader contenttweaker + +import mods.contenttweaker.Block; +import mods.contenttweaker.DropHandler; +import mods.contenttweaker.ResourceLocation; +import mods.contenttweaker.VanillaFactory; + +var nugget_table as string[][] = [ + # [name, id, meta] + ["copper", "thermalfoundation:ore", "0"], + ["apatite", "forestry:resources", "0"], + ["gold", "minecraft:gold_ore", "0"] +]; + +function replaceCommand(blockName as string, item as string, meta as string, blockPos as mods.contenttweaker.BlockPos) as string { + return "execute @a " + + blockPos.getX() as string + " " + + blockPos.getY() as string + " " + + blockPos.getZ() as string + " " + + "detect " + + blockPos.getX() as string + " " + + blockPos.getY() as string + " " + + blockPos.getZ() as string + " " + + "contenttweaker:" + blockName + " * " + + "setblock " + + blockPos.getX() as string + " " + + blockPos.getY() as string + " " + + blockPos.getZ() as string + " " + + "draconicevolution:placed_item " + + "0 " + + "replace " + + "{InventoryStacks: [{ id: \"" + item + "\", Count: 1, Damage: " + meta as string + " }]}"; +} + +for i in nugget_table { + var blockName as string = "juice/internal/indicator/" + i[0]; + var item as string = i[1]; + var meta as string = i[2]; + print("Adding internal ore indicator block: " + i[0]); + var block = VanillaFactory.createBlock(blockName, ); + block.setTextureLocation(ResourceLocation.create("contenttweaker:blocks/ore_nugget")); + block.setToolLevel(0); + # block.setAxisAlignedBB(mods.contenttweaker.AxisAlignedBB.create(0.375f, 0.0f, 0.375f, 0.625f, 0.125f, 0.625f)); + block.setEnumBlockRenderType("MODEL"); + block.setBlockHardness(0.1); + block.setBlockLayer("CUTOUT"); + block.setBlockResistance(0); + block.setDropHandler(function(drops, world, position, state, fortune) { drops.clear(); }); + block.setFullBlock(false); + block.setLightOpacity(0); + block.setPassable(true); + block.setReplaceable(true); + + # janky hack, mate + block.setOnBlockPlace(function(world, blockPos, blockState) { + var command as string = replaceCommand(blockName, item, meta, blockPos); + server.commandManager.executeCommand(server, command); + }); + + block.setOnRandomTick(function(world, blockPos, blockState) { + var command as string = replaceCommand(blockName, item, meta, blockPos); + server.commandManager.executeCommand(server, command); + }); + + block.setOnUpdateTick(function(world, blockPos, blockState) { + var command as string = replaceCommand(blockName, item, meta, blockPos); + server.commandManager.executeCommand(server, command); + }); + + block.register(); +} diff --git a/scripts/ore_veins/indicators.2.zs b/scripts/ore_veins/indicators.2.zs new file mode 100644 index 0000000..fb1c711 --- /dev/null +++ b/scripts/ore_veins/indicators.2.zs @@ -0,0 +1,5 @@ +for i in loadedMods["contenttweaker"].items { + if (i.definition.name.contains("internal")) { + mods.jei.JEI.hide(i); + } +} From f1ac9603769e0fb22b58f2e9cd953b14a7695e20 Mon Sep 17 00:00:00 2001 From: Wroclaw Date: Sun, 13 Nov 2022 18:04:42 +0100 Subject: [PATCH 2/5] Use indicators from contenttweaker script in ore veins --- config/oreveins/ore_veins.json | 165 ++++++++++-------------------- index.toml | 4 +- pack.toml | 2 +- scripts/ore_veins/indicators.1.zs | 30 +++++- 4 files changed, 83 insertions(+), 118 deletions(-) diff --git a/config/oreveins/ore_veins.json b/config/oreveins/ore_veins.json index 9b7159b..b09b871 100644 --- a/config/oreveins/ore_veins.json +++ b/config/oreveins/ore_veins.json @@ -69,12 +69,9 @@ }, "stone": "minecraft:stone", "indicator": { - "blocks": { - "block": "thermalfoundation:ore", - "meta": 2 - }, + "blocks": "contenttweaker:juice/internal/indicator/silver", "ignore_vegatation": false, - "ignore_liquids": true, + "ignore_liquids": false, "rarity": 24 }, "rarity": 240, @@ -93,12 +90,9 @@ }, "stone": "minecraft:stone", "indicator": { - "blocks": { - "block": "thermalfoundation:ore", - "meta": 6 - }, + "blocks": "contenttweaker:juice/internal/indicator/platinium", "ignore_vegatation": false, - "ignore_liquids": true, + "ignore_liquids": false, "rarity": 24 }, "rarity": 300, @@ -117,12 +111,9 @@ }, "stone": "minecraft:stone", "indicator": { - "blocks": { - "block": "mekanism:oreblock", - "meta": 2 - }, + "blocks": "contenttweaker:juice/internal/indicator/tin", "ignore_vegatation": false, - "ignore_liquids": true, + "ignore_liquids": false, "rarity": 24 }, "rarity": 180, @@ -142,12 +133,9 @@ }, "stone": "minecraft:stone", "indicator": { - "blocks": { - "block": "thermalfoundation:ore", - "meta": 4 - }, + "blocks": "contenttweaker:juice/internal/indicator/aluminium", "ignore_vegatation": false, - "ignore_liquids": true, + "ignore_liquids": false, "rarity": 24 }, "rarity": 190, @@ -166,12 +154,9 @@ }, "stone": "minecraft:stone", "indicator": { - "blocks": { - "block": "thermalfoundation:ore", - "meta": 5 - }, + "blocks": "contenttweaker:juice/internal/indicator/nickel", "ignore_vegatation": false, - "ignore_liquids": true, + "ignore_liquids": false, "rarity": 24 }, "rarity": 210, @@ -190,12 +175,9 @@ }, "stone": "minecraft:stone", "indicator": { - "blocks": { - "block": "minecraft:redstone_ore", - "meta": 0 - }, + "blocks": "contenttweaker:juice/internal/indicator/redstone", "ignore_vegatation": false, - "ignore_liquids": true, + "ignore_liquids": false, "rarity": 24 }, "rarity": 170, @@ -213,9 +195,9 @@ }, "stone": "minecraft:stone", "indicator": { - "blocks": "mekanism:oreblock", + "blocks": "contenttweaker:juice/internal/indicator/osmium", "ignore_vegatation": false, - "ignore_liquids": true, + "ignore_liquids": false, "rarity": 24 }, "rarity": 190, @@ -234,12 +216,9 @@ }, "stone": "minecraft:stone", "indicator": { - "blocks": { - "block": "nuclearcraft:ore", - "meta": 7 - }, + "blocks": "contenttweaker:juice/internal/indicator/magnesium", "ignore_vegatation": false, - "ignore_liquids": true, + "ignore_liquids": false, "rarity": 24 }, "rarity": 255, @@ -258,12 +237,9 @@ }, "stone": "minecraft:stone", "indicator": { - "blocks": { - "block": "nuclearcraft:ore", - "meta": 5 - }, + "blocks": "contenttweaker:juice/internal/indicator/boron", "ignore_vegatation": false, - "ignore_liquids": true, + "ignore_liquids": false, "rarity": 24 }, "rarity": 280, @@ -282,10 +258,9 @@ }, "stone": "minecraft:stone", "indicator": { - "blocks": "nuclearcraft:ore", - "meta": 6, + "blocks": "contenttweaker:juice/internal/indicator/lithium", "ignore_vegatation": false, - "ignore_liquids": true, + "ignore_liquids": false, "rarity": 24 }, "rarity": 255, @@ -304,12 +279,9 @@ }, "stone": "minecraft:stone", "indicator": { - "blocks": { - "block": "nuclearcraft:ore", - "meta": 4 - }, + "blocks": "contenttweaker:juice/internal/indicator/uranium", "ignore_vegatation": false, - "ignore_liquids": true, + "ignore_liquids": false, "rarity": 24 }, "rarity": 260, @@ -327,9 +299,9 @@ }, "stone": "minecraft:stone", "indicator": { - "blocks": "minecraft:coal_ore", + "blocks": "contenttweaker:juice/internal/indicator/coal", "ignore_vegatation": false, - "ignore_liquids": true, + "ignore_liquids": false, "rarity": 24 }, "rarity": 90, @@ -348,9 +320,9 @@ }, "stone": "minecraft:stone", "indicator": { - "blocks": "minecraft:iron_ore", + "blocks": "contenttweaker:juice/internal/indicator/iron", "ignore_vegatation": false, - "ignore_liquids": true, + "ignore_liquids": false, "rarity": 24 }, "rarity": 160, @@ -368,9 +340,9 @@ }, "stone": "minecraft:stone", "indicator": { - "blocks": "minecraft:diamond_ore", + "blocks": "contenttweaker:juice/internal/indicator/diamond", "ignore_vegatation": false, - "ignore_liquids": true, + "ignore_liquids": false, "rarity": 24 }, "rarity": 300, @@ -388,9 +360,9 @@ }, "stone": "minecraft:stone", "indicator": { - "blocks": "minecraft:lapis_ore", + "blocks": "contenttweaker:juice/internal/indicator/lapis", "ignore_vegatation": false, - "ignore_liquids": true, + "ignore_liquids": false, "rarity": 24 }, "rarity": 150, @@ -409,12 +381,9 @@ }, "stone": "minecraft:stone", "indicator": { - "blocks": { - "block": "galacticraftcore:basic_block_core", - "meta": 8 - }, + "blocks": "contenttweaker:juice/internal/indicator/silicon", "ignore_vegatation": false, - "ignore_liquids": true, + "ignore_liquids": false, "rarity": 24 }, "rarity": 210, @@ -432,12 +401,9 @@ }, "stone": "minecraft:stone", "indicator": { - "blocks": { - "block": "thermalfoundation:ore", - "meta": 3 - }, + "blocks": "contenttweaker:juice/internal/indicator/lead", "ignore_vegatation": false, - "ignore_liquids": true, + "ignore_liquids": false, "rarity": 24 }, "rarity": 185, @@ -455,12 +421,9 @@ }, "stone": "minecraft:stone", "indicator": { - "blocks": { - "block": "thermalfoundation:ore", - "meta": 7 - }, + "blocks": "contenttweaker:juice/internal/indicator/iridium", "ignore_vegatation": false, - "ignore_liquids": true, + "ignore_liquids": false, "rarity": 24 }, "rarity": 360, @@ -479,12 +442,9 @@ }, "stone": "minecraft:stone", "indicator": { - "blocks": { - "block": "actuallyadditions:block_misc", - "meta": 3 - }, + "blocks": "contenttweaker:juice/internal/indicator/blackquartz", "ignore_vegatation": false, - "ignore_liquids": true, + "ignore_liquids": false, "rarity": 24 }, "rarity": 265, @@ -503,12 +463,9 @@ }, "stone": "minecraft:stone", "indicator": { - "blocks": { - "block": "biomesoplenty:gem_ore", - "meta": 1 - }, + "blocks": "contenttweaker:juice/internal/indicator/ruby", "ignore_vegatation": false, - "ignore_liquids": true, + "ignore_liquids": false, "rarity": 24 }, "rarity": 310, @@ -526,12 +483,9 @@ }, "stone": "minecraft:stone", "indicator": { - "blocks": { - "block": "biomesoplenty:gem_ore", - "meta": 7 - }, + "blocks": "contenttweaker:juice/internal/indicator/amber", "ignore_vegatation": false, - "ignore_liquids": true, + "ignore_liquids": false, "rarity": 24 }, "rarity": 275, @@ -549,12 +503,9 @@ }, "stone": "minecraft:stone", "indicator": { - "blocks": { - "block": "biomesoplenty:gem_ore", - "meta": 6 - }, + "blocks": "contenttweaker:juice/internal/indicator/sapphire", "ignore_vegatation": false, - "ignore_liquids": true, + "ignore_liquids": false, "rarity": 24 }, "rarity": 310, @@ -572,12 +523,9 @@ }, "stone": "minecraft:stone", "indicator": { - "blocks": { - "block": "biomesoplenty:gem_ore", - "meta": 2 - }, + "blocks": "contenttweaker:juice/internal/indicator/peridot", "ignore_vegatation": false, - "ignore_liquids": true, + "ignore_liquids": false, "rarity": 24 }, "rarity": 300, @@ -595,12 +543,9 @@ }, "stone": "minecraft:stone", "indicator": { - "blocks": { - "block": "biomesoplenty:gem_ore", - "meta": 5 - }, + "blocks": "contenttweaker:juice/internal/indicator/malachite", "ignore_vegatation": false, - "ignore_liquids": true, + "ignore_liquids": false, "rarity": 24 }, "rarity": 270, @@ -618,12 +563,9 @@ }, "stone": "minecraft:stone", "indicator": { - "blocks": { - "block": "biomesoplenty:gem_ore", - "meta": 3 - }, + "blocks": "contenttweaker:juice/internal/indicator/tanzite", "ignore_vegatation": false, - "ignore_liquids": true, + "ignore_liquids": false, "rarity": 24 }, "rarity": 295, @@ -647,12 +589,9 @@ ], "stone": "minecraft:stone", "indicator": { - "blocks": { - "block": "biomesoplenty:gem_ore", - "meta": 3 - }, + "blocks": "contenttweaker:juice/internal/indicator/certus_quartz", "ignore_vegatation": false, - "ignore_liquids": true, + "ignore_liquids": false, "rarity": 24 }, "rarity": 330, diff --git a/index.toml b/index.toml index b997bbe..c3de786 100644 --- a/index.toml +++ b/index.toml @@ -1146,7 +1146,7 @@ hash = "5046cde3673ccd62ba2209aaab9a917b3e1b0da7f521477e89f68bdba1648187" [[files]] file = "config/oreveins/ore_veins.json" -hash = "6aef59bcddb88b84152ccb47e6ebcb1933782a4dbfb498e7a8fb7c13cf3f77a2" +hash = "e1b2b9e15458917be388f68454e78dec70d299e82525f35233d817ea9e2b03cf" [[files]] file = "config/sereneseasons/biome_info.json" @@ -2396,7 +2396,7 @@ hash = "a07879875ad20ae8e285c3cb39beeee648bd080ec12985b76583ad707a3de3ee" [[files]] file = "scripts/ore_veins/indicators.1.zs" -hash = "eee1737869c3a9a2d2261894b32f09d8dee48df55f07393eec54ba8748a13d79" +hash = "e1c7d1f08c0c54de9b6f9be8c29b3fe4c6f35bc3c8e917d06aaf7bf4fd182a2a" [[files]] file = "scripts/ore_veins/indicators.2.zs" diff --git a/pack.toml b/pack.toml index 33bbaba..4659ff7 100644 --- a/pack.toml +++ b/pack.toml @@ -6,7 +6,7 @@ pack-format = "packwiz:1.1.0" [index] file = "index.toml" hash-format = "sha256" -hash = "69b89b211686f3c98af33f370e9224b6a33e0c55d930d9efbe8884d8eddad297" +hash = "d16c25fabb4e0584e25d5d3196037dcfd66ecf74bb6b569e9e8a4bec59e90d11" [versions] forge = "14.23.5.2860" diff --git a/scripts/ore_veins/indicators.1.zs b/scripts/ore_veins/indicators.1.zs index f0cee4f..5a2b4d8 100644 --- a/scripts/ore_veins/indicators.1.zs +++ b/scripts/ore_veins/indicators.1.zs @@ -7,9 +7,35 @@ import mods.contenttweaker.VanillaFactory; var nugget_table as string[][] = [ # [name, id, meta] - ["copper", "thermalfoundation:ore", "0"], + ["copper", "ic2:resource", "1"], ["apatite", "forestry:resources", "0"], - ["gold", "minecraft:gold_ore", "0"] + ["gold", "minecraft:gold_ore", "0"], + ["silver", "thermalfoundation:ore", "2"], + ["platinium", "thermalfoundation:ore", "6"], + ["tin", "mekanism:oreblock", "2"], + ["aliminium", "thermalfoundation:ore", "4"], + ["nickel", "thermalfoundation:ore", "5"], + ["redstone", "minecraft:redstone_ore", "0"], + ["osmium", "mekanism:oreblock", "0"], + ["magnesium", "nuclearcraft:ore", "7"], + ["boron", "nuclearcraft:ore", "5"], + ["lithium", "nuclearcraft:ore", "6"], + ["uranium", "nuclearcraft:ore", "4"], + ["coal", "minecarft:coal_ore", "0"], + ["iron", "minecraft:iron_ore", "0"], + ["diamond", "minecraft:diamond_ore", "0"], + ["lapis", "minecraft:lapis_ore", "0"], + ["silicon", "galacticraftcore:basic_block_core", "8"], + ["lead", "thermalfoundation:ore", "3"], + ["iridium", "thermalfoundation:ore", "7"], + ["blackquartz", "actuallyadditions:block_misc", "3"], + ["ruby", "biomesofplenty:gem_ore", "1"], + ["amber", "biomesofplenty:gem_ore", "7"], + ["sapphire", "biomesofplenty:gem_ore", "6"], + ["peridot", "biomesofplenty:gem_ore", "2"], + ["malachite", "biomesofplenty:gem_ore", "5"], + ["tanzite", "biomesofplenty:gem_ore", "4"], + ["certus_quartz", "appliedenegistics2:material", "0"] ]; function replaceCommand(blockName as string, item as string, meta as string, blockPos as mods.contenttweaker.BlockPos) as string { From f9838106208d415c87e83f56236cf5a17cc893e8 Mon Sep 17 00:00:00 2001 From: Wroclaw Date: Sun, 13 Nov 2022 18:41:15 +0100 Subject: [PATCH 3/5] Add Chat Tweaks and hide "Block placed" messages --- config/ChatTweaks/views.json | 51 ++++++++++++++++++++++++++++++++++++ index.toml | 9 +++++++ mods/chat-tweaks.pw.toml | 13 +++++++++ pack.toml | 2 +- 4 files changed, 74 insertions(+), 1 deletion(-) create mode 100644 config/ChatTweaks/views.json create mode 100644 mods/chat-tweaks.pw.toml diff --git a/config/ChatTweaks/views.json b/config/ChatTweaks/views.json new file mode 100644 index 0000000..f9edff0 --- /dev/null +++ b/config/ChatTweaks/views.json @@ -0,0 +1,51 @@ +{ + "views": [ + { + "name": "*", + "filterPattern": "", + "outputFormat": "$0", + "style": "Chat", + "isExclusive": false, + "isMuted": false, + "channels": [ + "main", + "interaction", + "system", + "death" + ] + }, + { + "name": "ore veins indicators setblock spam", + "filterPattern": "^\\[[a-zA-Z0-9_]{2,16}: Block placed\\]$", + "outputFormat": "", + "style": "Hidden", + "isExclusive": true, + "isMuted": false, + "channels": [ + "system" + ] + }, + { + "name": "system", + "filterPattern": "", + "outputFormat": "$0", + "style": "Side", + "isExclusive": true, + "isMuted": false, + "channels": [ + "system" + ] + }, + { + "name": "interaction", + "filterPattern": "", + "outputFormat": "$0", + "style": "Bottom", + "isExclusive": true, + "isMuted": false, + "channels": [ + "interaction" + ] + } + ] +} \ No newline at end of file diff --git a/index.toml b/index.toml index c3de786..353a6cd 100644 --- a/index.toml +++ b/index.toml @@ -8,6 +8,10 @@ hash = "cd20deace73b9632c228f75f3740fb7fcd03acabc44e91b25c56e98de19f23de" file = "config/AsmodeusCore/core.conf" hash = "c01c2587ea013f8aac6d534041d631d99ad7d05ae1583fbd139be4ff57bfea56" +[[files]] +file = "config/ChatTweaks/views.json" +hash = "e732ee836fca9e69a06c1793860d06f2ddff619d01c4972bc3409e3388f7c7da" + [[files]] file = "config/ExtraPlanets.cfg" hash = "3ab88bac6026c888eed64172d6d964dd6adff421fab8e55b40b2e75aefc39bcf" @@ -1353,6 +1357,11 @@ file = "mods/chameleon.pw.toml" hash = "305815006195c0647af38ea5d8c03cd6c652c77bf975e3e967b754bc3b9ac569" metafile = true +[[files]] +file = "mods/chat-tweaks.pw.toml" +hash = "36b4d3a36e0556b9c5b9fd329c9d5737af36e41dbc22f4adfa1fbd475017107e" +metafile = true + [[files]] file = "mods/chicken-chunks-1-8.pw.toml" hash = "8c1cd98cbd76ccba330c24575c02edd0ede38a08330a843f9874efee8a1738dd" diff --git a/mods/chat-tweaks.pw.toml b/mods/chat-tweaks.pw.toml new file mode 100644 index 0000000..3c73b0a --- /dev/null +++ b/mods/chat-tweaks.pw.toml @@ -0,0 +1,13 @@ +name = "Chat Tweaks" +filename = "ChatTweaks_1.12.2-5.1.25.jar" +side = "both" + +[download] +hash-format = "sha1" +hash = "79f0d53ac10f149e48e45fae09de3798fe9c8478" +mode = "metadata:curseforge" + +[update] +[update.curseforge] +file-id = 2990969 +project-id = 243506 diff --git a/pack.toml b/pack.toml index 4659ff7..b5e4e9c 100644 --- a/pack.toml +++ b/pack.toml @@ -6,7 +6,7 @@ pack-format = "packwiz:1.1.0" [index] file = "index.toml" hash-format = "sha256" -hash = "d16c25fabb4e0584e25d5d3196037dcfd66ecf74bb6b569e9e8a4bec59e90d11" +hash = "8a795bf3e23ba6d38c80d575d0b7e9d724d0372854f5a6836fecfa3cd2865adf" [versions] forge = "14.23.5.2860" From 08e56ccc405d91e63711a6f1dba0a0c60375e50c Mon Sep 17 00:00:00 2001 From: Wroclaw Date: Tue, 15 Nov 2022 22:24:45 +0100 Subject: [PATCH 4/5] fix typos --- config/oreveins/ore_veins.json | 4 ++-- index.toml | 4 ++-- pack.toml | 2 +- scripts/ore_veins/indicators.1.zs | 20 ++++++++++---------- 4 files changed, 15 insertions(+), 15 deletions(-) diff --git a/config/oreveins/ore_veins.json b/config/oreveins/ore_veins.json index b09b871..360679e 100644 --- a/config/oreveins/ore_veins.json +++ b/config/oreveins/ore_veins.json @@ -434,7 +434,7 @@ "horizontal_size": 4 }, - "blackquartz_ore": { + "black_quartz_ore": { "type": "cluster", "ore": { "block": "actuallyadditions:block_misc", @@ -442,7 +442,7 @@ }, "stone": "minecraft:stone", "indicator": { - "blocks": "contenttweaker:juice/internal/indicator/blackquartz", + "blocks": "contenttweaker:juice/internal/indicator/black_quartz", "ignore_vegatation": false, "ignore_liquids": false, "rarity": 24 diff --git a/index.toml b/index.toml index 353a6cd..093bcae 100644 --- a/index.toml +++ b/index.toml @@ -1150,7 +1150,7 @@ hash = "5046cde3673ccd62ba2209aaab9a917b3e1b0da7f521477e89f68bdba1648187" [[files]] file = "config/oreveins/ore_veins.json" -hash = "e1b2b9e15458917be388f68454e78dec70d299e82525f35233d817ea9e2b03cf" +hash = "1863ec33cc86c4c6d8adde5500a5fc6c959948177d9b85c9153c95821f75b4e6" [[files]] file = "config/sereneseasons/biome_info.json" @@ -2405,7 +2405,7 @@ hash = "a07879875ad20ae8e285c3cb39beeee648bd080ec12985b76583ad707a3de3ee" [[files]] file = "scripts/ore_veins/indicators.1.zs" -hash = "e1c7d1f08c0c54de9b6f9be8c29b3fe4c6f35bc3c8e917d06aaf7bf4fd182a2a" +hash = "5ddde773d2f8fe5bac324bb03497776b694eadbef6626f23cf7a9e755f4009ee" [[files]] file = "scripts/ore_veins/indicators.2.zs" diff --git a/pack.toml b/pack.toml index b5e4e9c..192cb79 100644 --- a/pack.toml +++ b/pack.toml @@ -6,7 +6,7 @@ pack-format = "packwiz:1.1.0" [index] file = "index.toml" hash-format = "sha256" -hash = "8a795bf3e23ba6d38c80d575d0b7e9d724d0372854f5a6836fecfa3cd2865adf" +hash = "504d3886965baa0eab50adab674ea9afbcc3ec12472a90c8c91ce91958499dcf" [versions] forge = "14.23.5.2860" diff --git a/scripts/ore_veins/indicators.1.zs b/scripts/ore_veins/indicators.1.zs index 5a2b4d8..2733429 100644 --- a/scripts/ore_veins/indicators.1.zs +++ b/scripts/ore_veins/indicators.1.zs @@ -13,7 +13,7 @@ var nugget_table as string[][] = [ ["silver", "thermalfoundation:ore", "2"], ["platinium", "thermalfoundation:ore", "6"], ["tin", "mekanism:oreblock", "2"], - ["aliminium", "thermalfoundation:ore", "4"], + ["aluminium", "thermalfoundation:ore", "4"], ["nickel", "thermalfoundation:ore", "5"], ["redstone", "minecraft:redstone_ore", "0"], ["osmium", "mekanism:oreblock", "0"], @@ -21,21 +21,21 @@ var nugget_table as string[][] = [ ["boron", "nuclearcraft:ore", "5"], ["lithium", "nuclearcraft:ore", "6"], ["uranium", "nuclearcraft:ore", "4"], - ["coal", "minecarft:coal_ore", "0"], + ["coal", "minecraft:coal_ore", "0"], ["iron", "minecraft:iron_ore", "0"], ["diamond", "minecraft:diamond_ore", "0"], ["lapis", "minecraft:lapis_ore", "0"], ["silicon", "galacticraftcore:basic_block_core", "8"], ["lead", "thermalfoundation:ore", "3"], ["iridium", "thermalfoundation:ore", "7"], - ["blackquartz", "actuallyadditions:block_misc", "3"], - ["ruby", "biomesofplenty:gem_ore", "1"], - ["amber", "biomesofplenty:gem_ore", "7"], - ["sapphire", "biomesofplenty:gem_ore", "6"], - ["peridot", "biomesofplenty:gem_ore", "2"], - ["malachite", "biomesofplenty:gem_ore", "5"], - ["tanzite", "biomesofplenty:gem_ore", "4"], - ["certus_quartz", "appliedenegistics2:material", "0"] + ["black_quartz", "actuallyadditions:block_misc", "3"], + ["ruby", "biomesoplenty:gem_ore", "1"], + ["amber", "biomesoplenty:gem_ore", "7"], + ["sapphire", "biomesoplenty:gem_ore", "6"], + ["peridot", "biomesoplenty:gem_ore", "2"], + ["malachite", "biomesoplenty:gem_ore", "5"], + ["tanzite", "biomesoplenty:gem_ore", "4"], + ["certus_quartz", "appliedenergistics2:material", "0"] ]; function replaceCommand(blockName as string, item as string, meta as string, blockPos as mods.contenttweaker.BlockPos) as string { From 3f08eebabecd944a5cdf61e08ac8d1884a24d52b Mon Sep 17 00:00:00 2001 From: Wroclaw Date: Sat, 19 Nov 2022 21:55:52 +0100 Subject: [PATCH 5/5] oreveins indicators: use api to replace block instead of chat command. --- index.toml | 2 +- pack.toml | 2 +- scripts/ore_veins/indicators.1.zs | 58 ++++++++++++++++++------------- 3 files changed, 35 insertions(+), 27 deletions(-) diff --git a/index.toml b/index.toml index 093bcae..f8320fa 100644 --- a/index.toml +++ b/index.toml @@ -2405,7 +2405,7 @@ hash = "a07879875ad20ae8e285c3cb39beeee648bd080ec12985b76583ad707a3de3ee" [[files]] file = "scripts/ore_veins/indicators.1.zs" -hash = "5ddde773d2f8fe5bac324bb03497776b694eadbef6626f23cf7a9e755f4009ee" +hash = "36e4b9ee448ad7503f5df16b788e95a0f69bb24a55041c33a87b45c347e57d7f" [[files]] file = "scripts/ore_veins/indicators.2.zs" diff --git a/pack.toml b/pack.toml index 192cb79..a242d70 100644 --- a/pack.toml +++ b/pack.toml @@ -6,7 +6,7 @@ pack-format = "packwiz:1.1.0" [index] file = "index.toml" hash-format = "sha256" -hash = "504d3886965baa0eab50adab674ea9afbcc3ec12472a90c8c91ce91958499dcf" +hash = "42ca8e723c1e0761d17e371bcd988f0fe299aa09f3c914f0c1183e7c85099d96" [versions] forge = "14.23.5.2860" diff --git a/scripts/ore_veins/indicators.1.zs b/scripts/ore_veins/indicators.1.zs index 2733429..0985180 100644 --- a/scripts/ore_veins/indicators.1.zs +++ b/scripts/ore_veins/indicators.1.zs @@ -1,9 +1,16 @@ #loader contenttweaker +import crafttweaker.block.IBlock; +import crafttweaker.block.IBlockState; +import crafttweaker.data.IData; +import crafttweaker.world.IBlockPos; +import crafttweaker.world.IWorld; import mods.contenttweaker.Block; +import mods.contenttweaker.BlockPos; import mods.contenttweaker.DropHandler; import mods.contenttweaker.ResourceLocation; import mods.contenttweaker.VanillaFactory; +import mods.contenttweaker.World; var nugget_table as string[][] = [ # [name, id, meta] @@ -38,24 +45,29 @@ var nugget_table as string[][] = [ ["certus_quartz", "appliedenergistics2:material", "0"] ]; -function replaceCommand(blockName as string, item as string, meta as string, blockPos as mods.contenttweaker.BlockPos) as string { - return "execute @a " + - blockPos.getX() as string + " " + - blockPos.getY() as string + " " + - blockPos.getZ() as string + " " + - "detect " + - blockPos.getX() as string + " " + - blockPos.getY() as string + " " + - blockPos.getZ() as string + " " + - "contenttweaker:" + blockName + " * " + - "setblock " + - blockPos.getX() as string + " " + - blockPos.getY() as string + " " + - blockPos.getZ() as string + " " + - "draconicevolution:placed_item " + - "0 " + - "replace " + - "{InventoryStacks: [{ id: \"" + item + "\", Count: 1, Damage: " + meta as string + " }]}"; +function replace( + item as string, + meta as string, + blockPos as mods.contenttweaker.BlockPos, + world as World +) +{ + if (world.isRemote()) { return null; } + + # janky hack, mate + var trueWorld as IWorld = IWorld.getFromID(world.getDimension()); + + var nbt as IData = { + Facing: 0 as byte, + InventoryStacks: [{ + id: item as string, + Count: 1 as byte, + Damage: meta as short + }] + }; + + var position as IBlockPos = crafttweaker.util.Position3f.create(blockPos.getX(), blockPos.getY(), blockPos.getZ()).asBlockPos(); + trueWorld.setBlockState(, nbt, position); } for i in nugget_table { @@ -77,20 +89,16 @@ for i in nugget_table { block.setPassable(true); block.setReplaceable(true); - # janky hack, mate block.setOnBlockPlace(function(world, blockPos, blockState) { - var command as string = replaceCommand(blockName, item, meta, blockPos); - server.commandManager.executeCommand(server, command); + replace(item, meta, blockPos, world); }); block.setOnRandomTick(function(world, blockPos, blockState) { - var command as string = replaceCommand(blockName, item, meta, blockPos); - server.commandManager.executeCommand(server, command); + replace(item, meta, blockPos, world); }); block.setOnUpdateTick(function(world, blockPos, blockState) { - var command as string = replaceCommand(blockName, item, meta, blockPos); - server.commandManager.executeCommand(server, command); + replace(item, meta, blockPos, world); }); block.register();