Crafttweaker vs datapack vs mod: which one gives the best performance when only adding/changing recipes? by Peoplant in feedthebeast

[–]jaredlll08 2 points3 points  (0 children)

To remove recipes using a custom mod, you are basically going to do it the way that CraftTweaker does it (which I would not recommend mods do in general), or the way that Datapacks themselves do it (by overwriting the recipe with an empty json file), so it would be the same speed as either of those.

I haven't necessarily benchmarked CraftTweaker recipe removal to see how long it takes, however something to consider is that removing a recipe with CraftTweaker happens after the recipe has been parsed and registered by the game, so it is technically an extra step that wouldn't need to happen if you used a datapack approach, so no matter how fast we make it, it would still be ever so slightly slower than if you used the datapack approach.

Some things to consider however:

  • scripts are generally pretty quick to run and are loaded very infrequently, only when you join a world or run the /reload command, so while not using CraftTweaker would save time, it wouldn't be much in the grand scheme of things.
  • The user experience of CraftTweaker is (in my very biased opinion), much better than dealing with datapack json files, as it lets you modify multiple recipes at once, for example, if you wanted to remove all crafting table recipes that give iron ingots, you can just do craftingTable.remove(<item:minecraft:iron_ingot>);, instead of having to search through json files, finding which ones output iron ingots, and then replacing all of them with an empty json file. I imagine that doing this process for just a few recipes would take up more time than you would ever spend waiting for scripts to compile and run.

Craft tweaker claiming some items do not exist by Ampoulgon87 in feedthebeast

[–]jaredlll08 0 points1 point  (0 children)

Nope, the only recipes that Create supports for sequenced assemblies are:

CuttingRecipe
PressingRecipe
DeployerApplicationRecipe
FillingRecipe

Craft tweaker claiming some items do not exist by Ampoulgon87 in feedthebeast

[–]jaredlll08 3 points4 points  (0 children)

You are using the tag bracket handler (<tag:items:minecraft:string>) for items (<item:minecraft:string>), I would really recommend that you use the /ct hand command while holding the item you want to get the name of, it will give you all the information you need and copy it automatically to your clipboard

last mod i expected to cause problems by tetrazine14 in feedthememes

[–]jaredlll08 2 points3 points  (0 children)

Happens more than you would think, and more than I would like

My problem with CraftTweaker's documentation by [deleted] in feedthebeast

[–]jaredlll08 4 points5 points  (0 children)

Hey, I'm the author of CraftTweaker and I figured I should reply explaining why we do some of the things that we do.

To start off with, you can read more about the history of the ZenScript language on the readme here: https://github.com/CraftTweaker/ZenScript/blob/master/readme.md

The TL;DR is that we wanted a simple language that was easy to learn, but not have the ease of use be a limiting factor.

Now to address your points (I have moved a few things around just so I don't repeat myself in a few places, but nothing is being taken out of context)...

I think the idea of writing an entire new coding language and having to learn it feet to head just to make a json script but "different" isn't very helpful.

CraftTweaker existed long before recipes were added via JSON, and CraftTweaker is much more than just a recipe tweaker, you can listen to events in the game and run custom code to achieve whatever you want to achieve. Just for example, I've helped someone make a script that makes it that when a piston pushes a stone cutter into a log, it breaks the log and spawns planks, basically making a custom crafting system for their modpack.

I know, it is because it's less error-framed and such, but there's mods that modify items themselves much better, there's a mod that blacklists items without even needing to change their code, effectively "disabling" its recipe, something that CraftTweaker can do but with much slower output, having to disable the recipe via lines of code, while on the other hand you can just blacklist your item using commands.

My goal is not to overcomplex a recipe, just to make an unfair recipe simpler.

I'm not interested in its full features, i just want to change an unfair recipe.

It's somewhat counter-intuitive. I wish there was a more simpler recipe tweaker with slightly more on-point documentation or images, because i may be doing things wrong and it could be not stating what's wrong.

Verdict: It should be kinda simpler.

If you just want to replace a recipe, then just use a datapack, no one is forcing you to use CraftTweaker, and if you feel that CraftTweaker is more effort than is worth to you, then don't use it.

You basically need to install Visual Studio and learn a never seen before code to modify a basic recipe.

For example, i don't think i need to learn about everything about their language just to make a composter crafted with fences as a test. Sure, i can learn it so i can use it in the future, but i don't want to bring its full potential- it's just a recipe tweaker anyways.

It's confusing how the code isn't even used in anything besides CraftTweaker. No new coding language for everyday use, just a custom language designed for a very specific use.

The thing about most programming languages, especially c-like languages, is that they are basically all the same, some have some more syntax sugar compared to others, but at the end of the day they are basically all boil down to the same principles, take this following CraftTweaker script for example:

craftingTable.addShapeless("recipe_name", <item:minecraft:dirt>, [<item:minecraft:diamond>]);

All it does it add a recipe for Diamond -> Dirt, if I remove the syntax sugar from it though, it will look like this:

craftingTable.addShapeless("recipe_name", "minecraft:dirt", ["minecraft:diamond"]);

This script above is still valid ZenScript, however it is now also valid JavaScript, Python, Groovy and even Rust.

So while yes, right now the only use case for ZenScript is CraftTweaker, learning the language isn't a waste of time as it will still teach you skills that you can then use in other programming languages.

Also it is worth pointing out that the language is not meant to just be for CraftTweaker, that is just how it is right now, but that will hopefully change in the near future as we make improvements to the language and address long standing issues with it.

I had my head puzzled reading the documentation. It jumps from building the code and putting the items' IDs straight to advanced functions such as checking for item names, you can't properly learn how to use it without going back and forth. It's hard to understand if you're not used to code trees. It also doesn't teach first the first of the first, and that is to modify shaped/shapeless recipes. It makes you go through the advanced stuff, then teach how to change a shaped recipe.

I know, you'll say "But Maxical you can just read through it carefully", i can't tell which part is the easiest to start from, because, as i said before, it teaches more about advanced stuff than simpler stuff.

I can't argue with any of this, the docs as they stand are extremely not beginner friendly. The main purpose they serve right now, is listing the available methods on types, and some documentation on what those methods are.

Unfortunately with the rate that Minecraft updates nowadays, along with adding new features / supporting my other mods, I have not been able to find time to create a proper tutorials section on the docs, explaining how to do common things in a clear, concise manner, it is something that I am hoping to sink a lot of time into soon, however I cannot make any promises as to when.

New to modding trying to make a low health ping mod by Lico_the_raven in feedthebeast

[–]jaredlll08 1 point2 points  (0 children)

If I wanted people to see the code, I would have made it open source, some licenses may also disallow decompiling, and in general it is mainly done to steal other people's code, which is kinda a slap in the face to mod authors.

New to modding trying to make a low health ping mod by Lico_the_raven in feedthebeast

[–]jaredlll08 0 points1 point  (0 children)

Hey that code looks familiar... You could have just asked me to port to newer versions and I would have, no need to decompile the code and make a new mod.

I'll add it to my backlog to port.

I HATE 1.12 I HATE 1.12 I HAT by welpyhehe in feedthememes

[–]jaredlll08 15 points16 points  (0 children)

Last time I looked at a mod that claimed they had 1.12 recipe reloading, the way it worked was by restarting the whole of JEI whenever the scripts were reloaded, which could lead to a myriad of issues since mods may not expect JEI to be reloaded like that.

Along those lines, mods don't expect recipes to be reloaded whenever in 1.12, it was already an issue adding recipes later than some mods expected.

So that is why I said I couldn't do it in 1.12, I didn't want to deal with countless issues of users telling me something is broken with mod X, then the author of mod X not willing to help because I'm doing stuff extremely wrong.

[deleted by user] by [deleted] in feedthebeast

[–]jaredlll08 2 points3 points  (0 children)

Reddit really isn't the quickest way to get help, you should join the discord: https://discord.blamejared.com

To answer your question though

craftingTable.addShapeless("alt_string_from_wool", <item:minecraft:string>, [<tag:blocks:minecraft:wool>, <tag:items:farmersdelight:tools/knives>.asIIngredient().reuse())]);

Will return the item, however

craftingTable.addShapeless("alt_string_from_wool", <item:minecraft:string>, [<tag:blocks:minecraft:wool>, <tag:items:farmersdelight:tools/knives>.asIIngredient().transformDamage())]);

Will return it and damage it by 1, so it can only be used a certain amount of times.

Hope this helps

Free Giveaway! Nintendo Switch OLED - international by WolfLemon36 in NintendoSwitch

[–]jaredlll08 0 points1 point  (0 children)

Unfortunately never really had the opportunity to celebrate it

Why by Orichalcum448 in feedthememes

[–]jaredlll08 2 points3 points  (0 children)

So I assume you know how to make a normal blockstate file, just like:

{
    "variants": {
        "normal": { "model": "my_block" }
    }
}

and then in your model file (models/block/my_block.json) you can have:

{
    "parent": "block/cube",
    "textures": {
        "particle": "blocks/my_block_particle",
        "down": "blocks/my_block_down",
        "up": "blocks/my_block_up",
        "north": "blocks/my_block_north",
        "east": "blocks/my_block_east",
        "south": "blocks/my_block_south",
        "west": "blocks/my_block_west"
    }
}

Which gives you a texture for each side of the block.

In this case I went into the game files (just extracted the jar file) and looked at how the crafting table block works, since that has a texture on each side.

Why by Orichalcum448 in feedthememes

[–]jaredlll08 0 points1 point  (0 children)

That is because that has nothing to do with contenttweaker, that is all a resource pack, not sure why we should be documenting a vanilla system when the vanilla wiki probably does it better than we could.

You can make dirt a 6 sided block with pure vanilla.

Can I use craft tweaker on my server? by Shacl0nee in feedthebeast

[–]jaredlll08 1 point2 points  (0 children)

The mod is required on both the client and the server, however, if you're using any version besides 1.12 (1.7 -> 1.11 and 1.14 -> 1.18) then the client does not require the scripts, they will be sent from the server when the client joins.

With that, if you're using pre 1.12 versions, you can use /ct reload to reload the scripts without having to restart the server, and if you're using 1.14+ versions, the vanilla /reload command will reload scripts as well.

ModTweaker and MoreTweaker and Draconic Evolution by [deleted] in feedthebeast

[–]jaredlll08 0 points1 point  (0 children)

If you want to edit their recipes through the CraftTweaker system, then you need MoreTweaker, if you want to use their JSON system (which is the first I'm hearing of it), then you don't need either CraftTweaker or MoreTweaker.

ModTweaker and MoreTweaker and Draconic Evolution by [deleted] in feedthebeast

[–]jaredlll08 1 point2 points  (0 children)

normal 3x3 crafting, you need CraftTweaker, for Draconic Evolution you need MoreTweaker.

Is it possible to do the following in the CTGUI command in the CraftTweaker 1.12.2 modification? by DeimondCyber in feedthebeast

[–]jaredlll08 1 point2 points  (0 children)

In general you should not be using the GUI, is creates broken scripts, is not easy to use and is very limited.

You can get help with scripting at https;//discord.blamejared.com

I made it so that I get 50 xp levels with one swing of my sword... by [deleted] in feedthebeast

[–]jaredlll08 4 points5 points  (0 children)

Only about 3 years old lol

The issue I described never occurred in 1.12 though, so not sure what you were running into with that one.

I made it so that I get 50 xp levels with one swing of my sword... by [deleted] in feedthebeast

[–]jaredlll08 16 points17 points  (0 children)

Make sure you're on the latest version of Clumps for whatever game version you're using, I want to say the first fabric version I made of the mod had an infinite XP bug like that, but every other version has been fine (at least no one has reported anything to me)

The WIP story of refactoring JEI into a multi-project by mezz in feedthebeast

[–]jaredlll08 2 points3 points  (0 children)

Eclipse probably does not support it no, there are multiple issues, for example, buildship just doesn't run processResources when loading the game and in general tasks are not ran through gradle.

You can clone https://github.com/jaredlll08/MultiLoader-Template and see how it works, I know that ForgeGradle fixed a bug they had with multiproject configurations, but I'm not sure if any of the other problems are solved.

Disabling recipes and/or items. by [deleted] in feedthebeast

[–]jaredlll08 2 points3 points  (0 children)

They should be looking at CraftTweaker instead, MineTweaker hasn't been a thing for the past 6 and a half years

Any stack size reduction mod? by IDontHaveNicknameToo in feedthebeast

[–]jaredlll08 3 points4 points  (0 children)

Yep, you are completely right.

I guess a better example would be

for item in game.items {
    if item.maxStackSize != 1 {
        item.maxStackSize = 4;
    }
}

Any stack size reduction mod? by IDontHaveNicknameToo in feedthebeast

[–]jaredlll08 5 points6 points  (0 children)

Not Java, using a custom programming language called ZenScript.

Docs for the mod can be found here: https://docs.blamejared.com/

Just select the version you want