MTUtils
Hello! It's minetweaker plugin for Minecraft 1.7.10. All script put in MineTweaker script folder
Link to GitHub: https://github.com/LionZXY/MTUtils/
This mod may be helpful for modpack creators. With this mod you can change some items & blocks properties. Also you can transfer value to value (Ex. String to IFormatedText, String to Int).
You can set special block drops for another Item (Ex. If dig wood with axe drop Wood, but without item drop Planks)
Command List
Import:
import mods.MTUtils;
Items:
MTUtils.setItemMaxDamage(itemstack, damage);
MTUtils.getItemMaxDamage(itemstack); (Return int)
MTUtils.getItemDamage(itemstack); (Return int)
Blocks:
MTUtils.setHarvestLevel(itemstack, String tooltip, int harvestLevel);
MTUtils.setBlockUnbreakable(itemstack);
MTUtils.setHardness(itemstack, float hardness;
MTUtils.setLightLevel(itemstack, float lightLevel);
MTUtils.setLightOpacity(itemstack, int lightOpacity);
MTUtils.setResistance(itemstack, float resistance);
MTUtils.setTextureName(itemstack, String texturename);
MTUtils.getHarvestLevel(itemstack); (Return int)
MTUtils.getHarvestTool(itemstack); (Return String)
MTUtils.getTextureName(itemstack, int side); (Return String)
Utils:
MTUtils.getIntFromString(string); (Return int)
MTUtils.getFloatFromString(string); (Return float)
MTUtils.getStringFromInt(int); (Return String)
MTUtils.getStringFromFloat(float); (Return String)
MTUtils.getStringFromFormattedText(IFormattedText text); (Return String)
MTUtils.getStringFromFormattedString(IMCFormattedString text); (Return String)
MTUtils.getCrossMatch(IOreDictEntry ... oreDictEntries); (Return IItemStack[])
MTUtils.getIngredientFromString(String in); (Return IIngredient)
MTUtils.getItemStackFromString(String in); (Return IItemStack)
MTUtils.getIOreDictEntryFromString(String in); (Return IOreDictEntry)
MTUtils.getIFormatedTextFromString(String in); (Return IFormattedText)
MTUtils.getIMCFormattedTextFromString(String in); (Return IMCFormattedString)
Drops:
MTUtils.clearDrops(); // Recreated HashMap drops
MTUtils.setBlockDrops(@Nullable IItemStack harvester, IItemStack block, IItemStack drops[], float quantiDrop[], IItemStack falseDrops[]);
Gregtech
Thanks for PR @zetti68
Import
import mods.MTUtilsGT;
All added or removed recipes will reset after start of reload of MineTweaker.
Get a key for a GT machine
/MTUtils
is the registered command, alias: /mtutils
, /mtu
To get the key, use in game command "/MTUtils GTkey "Canner"". Double quotes are only necessary with spaces in GT machine name. Name is case insensitive, regular expressions are allowed.
To show all possible keys use /MTUtils GTKeys [1...]
[optional select the first, second... block of ten keys] First call uses only one input and one output liquid, second works with arrays.
Recipes
Add a recipe to the Canner.
Fluids are optional, please note, "null" as fluids input AND "null" as fluids output dosn't work. Use call without fluids in this case.
MTUtilsGT.addCustomRecipe("gt.recipe.canner", false, 128, 128, [10000], [<minecraft:cobblestone>], <liquid:soda>*500, <liquid:water>*500, [<minecraft:diamond>]);
MTUtilsGT.addCustomRecipe("gt.recipe.canner", false, 128, 128, [10000], [<minecraft:cobblestone>], [<liquid:soda>*500], [<liquid:water>*500], [<minecraft:diamond>]);
Fluid
Use alternate fluid in GT's recipes. First parameter is the current fluid, second the replacement. First fluid will be replaced in all GT's recipes. The result of the second call is the same like the first. But is possible to add more than one combination in one step. There is a little difference between first and second call. If there are more fluids to map in one recipe after the second only adds recipe with the completely mapped fluid. First calls would add mixed recipes too (one fluid mapped, second not).
Do not call multiple times the mapping of same fluid. It will add more than one same recipe. GT and MTUtilsGT do not check it.
MTUtilsGT.addFluidInput(<liquid:soda>,<liquid:mineralsoda>);
MTUtilsGT.addFluidInput([
[<liquid:soda>,<liquid:mineralsoda>]
]);
Minechem Gregtech
We have a server with gregtech and minechem mods. The minechem fluids are mapped to new gregtech fluids, but without any usage in its recipes.
We want to use also minechem fluids in greg's recipes.
To find all used fluids of all gregtech machines, use: Chat command: /MTUtils GTfluids
The MTUtils command MTUtilsGT.addFluidInput(...)
adds all recipes with completly replaced fluids. The first fluid is the gregtech fluid, the second one the minechem.
All mapped fluids are combined in an array to reduce runtime.
MTUtilsGT.addFluidInput([
[<liquid:molten.aluminium>, <liquid:element.al>],
[<liquid:molten.antimony>, <liquid:element.sb>],
[<liquid:argon>, <liquid:element.ar>],
[<liquid:molten.bismuth>, <liquid:element.bi>],
[<liquid:molten.lead>, <liquid:element.pb>],
[<liquid:bromine>, <liquid:element.br>],
[<liquid:butane>, <liquid:molecule.butene>],
[<liquid:chlorine>, <liquid:element.cl>],
[<liquid:molten.chromium>, <liquid:element.cr>],
[<liquid:molten.cobalt>, <liquid:element.co>],
[<liquid:molten.iron>, <liquid:element.fe>],
[<liquid:bioethanol>, <liquid:molecule.ethanol>],
[<liquid:fluorine>, <liquid:element.f>],
[<liquid:molten.gold>, <liquid:element.au>],
[<liquid:helium>, <liquid:element.he>],
[<liquid:molten.iridium>, <liquid:element.ir>],
[<liquid:carbondioxide>, <liquid:molecule.carbondioxide>],
[<liquid:krypton>, <liquid:element.kr>],
[<liquid:molten.copper>, <liquid:element.cu>],
[<liquid:molten.magnesium>, <liquid:element.mg>],
[<liquid:molten.manganese>, <liquid:element.mn>],
[<liquid:neon>, <liquid:element.ne>],
[<liquid:molten.nickel>, <liquid:element.ni>],
[<liquid:molten.osmiumelemental>, <liquid:element.os>],
[<liquid:molten.platinum>, <liquid:element.pt>],
[<liquid:propane>, <liquid:molecule.propane>],
[<liquid:radon>, <liquid:element.rn>],
[<liquid:oxygen>, <liquid:element.o>],
[<liquid:molten.silver>, <liquid:element.ag>],
[<liquid:molten.titanium>, <liquid:element.ti>],
[<liquid:molten.vanadium>, <liquid:element.v>],
[<liquid:hydrogen>, <liquid:element.h>],
[<liquid:hydrogenperoxide>, <liquid:molecule.hperox>],
[<liquid:molten.tungsten>, <liquid:element.w>],
[<liquid:xenon>, <liquid:element.xe>],
[<liquid:molten.zinc>, <liquid:element.zn>],
[<liquid:molten.tin>, <liquid:element.sn>]
]);
Undeground Biomes Constructs API
In config file:
[
{
"name":"exampleblock",
"nameid":"minecraft:iron_ore",
"texturepath":"minecraft:iron_ore"
}
]
I am releasing a modpack on Curse with your mod MUTils 1.7.
I see the latest version you released on Curse is 1.6.
Can you update that? Because many GT Tweaker functions won't work in 1.6.
Thank you.
Does this work with Crafttweaker?
(3/18/2020) Also, can I change the hardness of a block with this?
Tell me please, in which file I should write all this staff for recipe changing?
А если есть русские то лучше отвечать по русски.
Повторяю на всяк случай. В каком файле надо писать всю эту фигню для изменения рецептов в гречке?
In reply to Steel_Fist:
Почему <ore:craftingToolAxe> вместо изначального
не работает?
Можно сделать подобное, используя ZenScript циклы
I'm trying to remove some recipes from gregtech but didn't seems to work. These recipes are the ones to break the coagulator in the shredder and in the crucible.
the code I'm using is:
MTUtilsGT.removeCustomRecipe("sShredderRecipes",[<gregtech:gt.meta.dustSmall:8636>]);
MTUtilsGT.removeCustomRecipe("sCrucibleSmelting",[<gregtech:gt.meta.chunkGt:8636>]);
Use github issues system
Sry but i don't get it :-P
I want to change all the UBC Stones Hardness to Minecraft Clean Stone Hardness (1.5)
Thats my ubc.json File:
MTUtils.setHardness(<UndergroundBiomes:sedimentaryStone:1>, 50);
Test with Soapstone But it doesn't change anything.
Pls help
thx
EDIT:
Never mind,
Did some research in minetweaker wiki and figured it out myself.
Thx for this wonderful addon to minetweaker
EDIT2:
Sadly it seems not to work with Haste 2 (hardness keeps the same as without haste)
Also hardness changing is not working at all with all UBC Half Slabs, full slabs, Stairs, Buttons, Walls
Sorry, what is IItemStack falseDrops[] and how to use it in setBlockDrops?
It drop if you broke block with invalid item
Thanks, and how to add several lines of drops for grass drop (seeds), so as to they drop with special chance and not all at once?
quantiDrop array
Thanks very much
Hi LionZXY,
If I wanted to use the UBC Ore API with Gregtech5, I would need to create the overlays textures from scratch since GT creates all of the ore textures from a single white ore texture when it loads correct?
If so, is there an easier way to get GT5 working?
What you see when clicking on ore block with Loupe from Simply Hammers?
Simply hammers? am I supposed to be using that?
No. It for detected texturepath.
This is what it says the texture path for gt ores is: http://imgur.com/4bIFPvY
It's probably because GT renders an overlay onto a normal stone block
:(