GithubHelp home page GithubHelp logo

crafttweaker / crafttweaker-documentation Goto Github PK

View Code? Open in Web Editor NEW
70.0 5.0 130.0 24.17 MB

Documentation for CraftTweaker

License: MIT License

TypeScript 100.00%
hacktoberfest crafttweaker-documentation

crafttweaker-documentation's Introduction

CraftTweaker-Documentation

Documentation for CraftTweaker

This is the source code for the documentation, you can find the actual site and documentation here

Setup:

Requires npm and nodejs

git submodule init 
git submodule update
npm install
cd site/
npm install

Build

npm run build

View Results

cd site
npm run dev

Look at the url that appears on your console, should contain localhost, paste that on the browser. Ctrl C twice will stop the execution.

crafttweaker-documentation's People

Contributors

bconlon1 avatar buuz135 avatar crafttweakerbot avatar darkhax avatar democat3457 avatar desht avatar efimero avatar gblodb avatar girafistudios avatar jaredlll08 avatar justinrusso avatar kindlich avatar lanse505 avatar lasmgratel avatar masterbobli avatar mrthomas20121 avatar noobanidus avatar ordinatorstouff avatar primetoxinz avatar prospectpyxis avatar pupnewfster avatar remplerus avatar riernar avatar skysom avatar superfluke avatar teamdman avatar therandomlabs avatar wielde-r avatar witixin1512 avatar xt9 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

crafttweaker-documentation's Issues

Outdated Pictures in Contribution section

When I was translating the wiki, I had to translate some text on the picture. The original picture looks like this.
771548235375_ pic
But when I replicate it myself, I took a screenshot and found that the title of the commit box is different.
781548235379_ pic
Clearly, the commit box's title "Commit changes" is replaced by "propose file change".
So I think it could be necessary to replace these pictures with the updated ones and change the wording in relevant sections of the wiki.

Error parsing script:

Here is the script: (What's wrong with it?)

import crafttweaker.item.IItemStack;
import mods.jei.JEI;

var bronze as IItemStack;
var table as IItemStack;
var tooltable as IItemStack;
var saw as IItemStack;
var log as IItemStack;
var workb as IItemStack;

bronze = ore:ingotBronze;
table = ore:worktableShelf;
tooltable = tconstruct:tooltables;
saw = microblockcbe:saw_stone;
log = ore:logSplit;
workb = ore:workbench;

recipes.addShaped(tconstruct:tools/table/crafting_station,tooltable,
[[bronze,table,bronze],[log,saw,log]]);
recipes.removeShapeless(tooltable, workb);

Question about mob drops

Hello, CraftTweaker devs. I was wondering if it was possible to target every single mob in the game (or just a mod at a time), and add all the items of a certain mod as drops to them? I know how to apply all items of a mod to a mob, but targeting every single mob doesn't seem to be possible. Is it?

Setting amount for output stack

The wiki lists two different methods under IItemStack amounts - .amount(int amount) and .withAmount(int amount) - but doesn't explain the difference (is there one?) between them. The "returns" line only reads A new IItemStack with the changed property. In (much) older version, I recall that one of them was for an input filter and one was to set an output stack's quantity, is this still true or are they now equivalent?

[Suggestion] Furnace Removal Based On Input

Hey there, I was curious, is it possible you could implement a script that allows the user to remove a furnace recipe based on the input, this would combat the issues with outputs from mods such as Tough As Nails that are awkward if not impossible to remove
(Tough As Nails pure water bucket cannot be removed because the item ID is just forge:bucketFilled, Some other mods would have this issue)
It would also allows users to remove recipes with multiple outputs, Eg:
Mod A implements a recipe using quarts to make silicon
Mod B implements a recipe using quartz to make coal

using a script along the lines of this would allow all recipes using quartz to be removed
furnace.removeInput(minecraft:quartz)

Thanks for the work done to the mod so far! -UnlimatedStone9

Trouble with zs files

I had some trouble with your discord server, and so I just wanted to know how to make a zs file. There doesn't seem to be any major code-based services that let me make them that are not worth money. What are other people using?

Item conditions don't work with ore dictionary

It's very simple . . . I want the recipe to use the ore dictionary since I have a TON of hatchets and axes in my pack that I want the recipe to work with. I ALSO want the recipe to ignore damage.

This should be a simple matter of using the ore dictionary and then adding the ".anyDamage()" after the item. The problem is it doesn't work.

2019-09-25_12 34 55

I've tried every way I can figure out, including simply putting .* after the ore dictionary entry. None of it has worked. That's a huge problem since if I can't use a damaged tool the recipe is broken, and if I have to put in separate recipes for EVERY ax and hatchet in my patch it's simply going to take forever . . . that's why we have ore dictionary in the first place. lol

I'm extremely frustrated.

recipes.addShapeless(primal:worktable_shelf, [ore:toolHatchet.anyDamage(), ore:logWood]);

Thaumcraft infusion recipes - aspect amounts

Hello. I know very little about scripting, as my example below will probably tell. Regardless, I successfully made a Thaumcraft 6 infusion recipe. It works mostly as intended... except I'm not sure how to change the required amount of aspects.

Here's the example given:

//mods.thaumcraft.Infusion.registerRecipe(String name, String research, IItemStack output, int instability, CTAspectStack[] aspects, IIngredient centralItem, IIngredient[] recipe);

And here's my script:

import mods.thaumcraft.Infusion;

mods.thaumcraft.Infusion.registerRecipe("mithhelm", "", <thaumadditions:mithminite_hood>, 100, [<aspect:aer>, <aspect:ignis>], <spectrite:spectrite_helmet>, [<thaumadditions:mithminite_fabric>, <thaumadditions:mithminite_fabric>]);

I'm not sure where CTAspectStack fits in, or how I'd have to format it. Any help would be appreciated.

gaps in documentation about onlyDamaged() and similar

The item.onlyDamaged(), item.onlyDamageAtLeast(value) and maybe similar are not match items with isDamageable=true, for example, <thaumcraft:primordial_pearl> (Thaumcraft-1.12.2-6.1) so recipe isn't working despite of it's visibility in JEI. To be clear, I'll bring here my example, which craft isn't working:

//restore durability of one thaumcraft primordial pearl at cost of durability another
val tpp = <thaumcraft:primordial_pearl>;
recipes.addShapeless("p_pearl-reconst",
tpp, [tpp.onlyDamaged().marked("same").noReturn(), tpp.anyDamage().transformDamage()], function(output, inputs, crafting)
{
return inputs.same.withDamage(max(0, inputs.same.damage - 1));
},
null);

But, when I specified "tpp.anyDamage().onlyDamaged()" or "<thaumcraft:primordial_pearl:*>.onlyDamaged()" instead of "tpp.onlyDamaged()", it's become fine. So, I suggest to explicitly specify in documentation, that damage matching functions require item.anyDamage() as well.
BTW, when there was no ".noReturn()" in my example, sometimes first p.pearl was remain in craft grid (causing dupe!), sometimes - not. Looks like CraftTweaker bug. Or maybe not - maybe my fault. It isn't clear. If it is bug so maybe I have to post it there?

version: CraftTweaker2-1.12-4.1.13

Minor error in MobStages documentation

I was directed by Jared to put this here, so it's (mostly) copy-pasted directly from what i put in the discord.

the example scripts under "Global Options" for MobStages are written incorrectly
// mod.MobStages.addReplacement(String entityId, String replacementId); mod.MobStages.addReplacement("minecraft:zombie, "minecraft:slime); example

all of them have the mod.MobStages, which should be mods.MobStages

and the ("minecraft:zombie, "minecraft:slime); are both missing a " on the ends of both entries.

Can you add a way to remove a specific Tooltips

Hello,
I want to remove somes tooltips added directly by the mod author, because it doesn't work like it the tooltips said, but, the only function I can see on the CraftTweaker Wiki remove ALL tooltips, incliding the Item Name, the IItemStack ID, the mod name and everithing... A function like that, look to me completly useless...

So, only 2 thing I can do, for what I see, adding back manually ALL tootlips or, adding a tootips which contradicts the first one...

Minecraft: 1.12.2
Crafttweaker: 4.1.14
Just Enough Items: 4.14.4.267

Thank's
Fireztonez

problem with documentation for immersive engineering

I have been trying to add custom minerals and the documentation doesn't seem to be correct.
here what i have
import mods.immersiveengineering.Excavator;

mods.immersiveengineering.Excavator.addMineral("Africite", 50, 0.0005, ["ore:orevibranium", "ore:oreDiamond","ore:orepalladium","ore:oreTitanium"], [35, 15, 25, 25]);
i also tried the ore dictionary names
which didnt work

[Suggestion] be able to make 2 different items into the same without oredict

hey im making a private modpack for me & some friends with some recipe changes and also
replace some Ores/Metals(that only 1 mod uses) into more common ones
like make silver alot more usefull and turn mekanism´s osmium & afew other mod´s metal into silver (via add silver to theirs oredict)

but than i came across matter overdrive´s recipes that use tritanium & Dilithium crystal that i wanted to turn into Redstone Repository´s ingot & gem
turns out matter overdrive mod dont have ore:Dilithium or ore:tritanium in its recipe but just use matteroverdrive:tritanium_ingot instead of ore:ingotTritanium
so even if i add Redstone Repository´s ingot & gem to ore:Dilithium or ore:tritanium oredict it wont change the recipe at all so it can use both
unless i manual change every single recipe in the mod

so i was wondering if a idea like this script code here:
redstonerepository:material:1 = matteroverdrive:tritanium_ingot
can be possible
aswell as "remove" matteroverdrive:tritanium_ingot mostly from the game(from JEI/recipe viewing) and make only use of redstonerepository:material:1
so all recipes with matteroverdrive:tritanium_ingot use redstonerepository:material:1 now
(craftingtable, furnace, machines & etc.) instead of i have to manual change every recipes becuase a mod dont use oredict in its recipes

same for oredict like
ore:ingotOsmium = ore:ingotsilver
remove ore:ingotOsmium

so every recipe with ore:ingotOsmium got replaced to silver ingot and removed ore:ingotOsmium from showing in JEI/recipe viewer
so basicalled replaced Osmium ingots (& others osmium stuff) with Silver
even set the Osmium ingot item icon into like thermalfoundation´s silver ingot/name
to truely replace Osmium with Silver (same for Non oredict items ofc) so now every recipes with Osmium ingot now use Silver ingots too and a Renamed Osmium ingot to Silver ingot that use thermalfoundation´s silver´s item icon
so Osmium ingot is basically gone(for the Non modpack maker´s point of view)
aswell as some way to Mass rename items
like Replace every "Osmium" to "Silver"
Osmium dust,ingot,block, everything is now named Silver dust,ingot,block
via afew line of codes in the script instead of codes for Every osmium thing

im sure a idea like this can be used for more than my example too
to turn 1 item(osmium) complety into a other item(Silver) via crafttweaker
and now that 1 item(osmium)
can now be used everywhere where the other item(silver) is used and visa versa
while that 1 item(osmium) is named and looking like the other item(silver)

[Addition] Thermal Expansion recipes

I don't use github enough to reliably make a pull request or whatever it's called, so I'll simply do it like this instead.

Talked with jaredlll08 for an issue I was having with TE using modtweaker. The issue isn't really important, rather the solution.

Thermal expansion uses remove by input, not remove by output, so removing the coin won't do anything, as the recipe doesn't exist.

Please add a note or something to the TE entries of the Modtweaker section in the CraftTweaker docs, that the recipes work by removing inputs, not outputs.

IMaterial has wrong namespace

The examples for usage of IMaterial all refer to crafttweaker.blocks.[...] (wrong) instead of crafttweaker.block.[...] (correct)

Commands

Add documentation for how to use Minecraft commands from zs file?

No member `recipestages` in mods

I've been struggling with this for some time. Below is my code, and Minecraft keeps telling me recipestages does not exist in mods. I'm running Minecraft 1.12.2 with forge 14.23.5.2837.

import crafttweaker.item.IItemStack;
import mods.jei.JEI;

val craftingLevels = {
    "blacksmith_1" : [
        <minecraft:iron_sword>,
        <minecraft:iron_pickaxe>,
        <minecraft:iron_axe>,
        <minecraft:iron_hoe>,
        <minecraft:iron_shovel>,
        <minecraft:iron_boots>,
        <minecraft:iron_leggings>,
        <minecraft:iron_chestplate>,
        <minecraft:iron_helmet>,
    ] as IItemStack[]
} as IItemStack[][string];

for level in craftingLevels
{
    for recipe in craftingLevels[level]
    {
        mods.recipestages.Recipes.setRecipeStage(level, recipe);
    }
}

Suggestions: CrT 1.14 wiki

For CrT 1.14, the wiki currently is a blank slate.
In the past some people had issues finding the wiki pages they needed, so this is an oppurtunity to re-structure where wiki files are put to make it easier to find everything.

Just comment if you have a valid suggestion.

How to inherit an IItemStack's texture

I'm looking to do something that -- I think -- should be very basic and well within the capabilities of CraftTweaker. Unfortunately, it is not well within my capabilities, lol. I've scoured the documentation, but can't figure it out.

Here's my script:

import crafttweaker.item.IItemDefinition;
import crafttweaker.item.IItemStack;

val geodeDefinition = <thermalfoundation:geode>.definition;

geodeDefinition.makeStack(1);
<thermalfoundation:geode:1>.displayName = "Firey Geode";

Basically, Thermal Foundation's geodes exist only as a metadata-0 item. I'm looking to create variants of them that can be found in different biomes (using Dropt to edit mining drops).

When I run the game with the above script, I get mixed results:

  1. The Firey Geode does not appear in JEI or Creative Tabs (bad, I guess? Not very important to me.)
  2. When I use /nbtedit item to change a geode in my hand to metadata-1, it renames itself Firey Geode (good!)
  3. It loses both the model and the texture of the base geode, becoming a pink and black box (very bad)

I was under the (apparently mistaken) impression that starting the creation with the original geode's definition would cause it to automatically inherit any elements that I didn't specifically change, such as the texturing.

How far am I from being able to live my dream of geode variants as biome-specific loot?

Minor Spelling Mistake

At line 11 of CraftTweaker-Documentation/docs/Vanilla/Blocks/IMobilityFlag.md, you wrote "chek" instead of check.

`setRecipeStageByMod` Uses same example as `setRecipeStage`

In the documentation for GameStages, we see the below:

Sets the stage of all recipes that make items from a certain mod.

//mods.recipestages.Recipes.setRecipeStage(String name, String recipeName);
//This sets the stage of all recipes who's name only contains numbers to stage "one"

mods.recipestages.Recipes.setRecipeStageByMod("one", "^[0-9]*$");

Does IWorld has getBlock()?

I have a question.

I am translating IBlock.md to Korean then just saw this sentence.

  • Using the getBlock(x,y,z) on an IWorld.

I checked IWorld page but it does not have getBlock method.

Which one is right?

Update or delete Artisan Worktables documentation

I tried to use gamestage integration for a long time, but an error occurred. I tried unsuccessfully to fix it and was so upset that I decided to write to mod developer. On his discord server I found out that your wiki is out of date.

Please, update or delete this wiki pages.

NOTE: I was very angry, so consider that all the text is written through CAPSLOCK and there are curses

Advanced recipie NBT append or replace

If you already have this feature and I missed it, I apologize. I am trying to define crafting recipes that either replaces or append NBT data from one of the input items to the output.

Example:
recipe.addShapeless(minecraft:diamond_sword.appendTag(allEnchanments),
[minacraft:golden_sword.withTag(allEnchantments), minecraft:diamond_block]);

recipe.addShaped(minecraft:diamond_sword.replaceTag(allEnchanments(1,1)),
[null, null, null],
[null, minacraft:golden_sword.withTag(allEnchantments), minecraft:diamond_block],
[null, null, null]
]);

Where the (1,1) is the row and column of the crafting table counting [0-2 x 0-2] rows & columns.

Incorrect links in Wiki for Artisan Worktables

What happens:

The links listed for Artisan Worktables are for the Advanced Mortar mod instead.

Artisan Worktables
Information:

Artisan Worktables adds a wide arrangement of custom Crafting Tables that requires “Tools” for the Crafting Process. This mod has both JEI and GameStages support, as well as quite robust CraftTweaker Integration!
For More Information:

https://minecraft.curseforge.com/projects/advanced-mortars
Bug Reports:

https://github.com/codetaylor/advancedmortars/issues

What you expected to happen:

The links should be for Artisan Worktables and not Advanced Mortars.

https://minecraft.curseforge.com/projects/artisan-worktables

https://github.com/codetaylor/artisan-worktables/issues

[pastebin/gist/etc link here]
https://crafttweaker.readthedocs.io/en/latest/#Mods/Artisan_Worktables/Artisan_Worktables/

Expand ContentTweaker documentation.

ContentTweaker documentation only gives enough information for making standard blocks. But gives no information on how to make something like stairs or slabs. And the jsons are not explained at all.

Please offer an offline version of the wiki

Please offer an offline version of the wiki.
The change to the wiki's current form broke it for my site ripper.
I need an offline version of the wiki for when I'm stuck offline but want to work on my modpack anyway.
I have to have the wiki as a manual or I can't do anything more than basic recipe addition/removal.
I have to be able to refer to the wiki as a manual for all of the mod support stuff.
I need an official offline version, as the change to the wiki's current form broke the copy that the site ripper I use makes.

Missing ContentTweaker documentation for onFoodItemEaten

The documentation for food items only list 4 zenproperties for them. However, there are actually five properties - onFoodItemEaten is missing. This is a pretty important method as well, as it allows you to apply potion effects to the player, among other things.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.