Minecraft Data Packs / Game Mechanic

ACv4 (Auto-Crafting version 4)

  • check_circle Functions
  • 12,905 views, 14 today
  • 1,699 downloads, 1 today
  • 58
  • 40
  • 44
Smokyoatmeal's Avatar Smokyoatmeal
Level 31 : Artisan Engineer
19
Welcome to ACv4
ACv4 brings with it full support for all vanilla recipes (Barring edge exceptions that will be touched upon later), and does so in an easy to use, efficient, and extensive mannerism.

The Goal
The goals for the AC project were admittedly simple;
  1. Produce an auto-crafter that functions exactly as would be expected, with the end user in mind.
  2. Utilize as unobtrusive and simplistic an interface as possible, so that anyone can use the pack, regardless of their technical familiarities.
  3. Offer as complete support for all items as Minecraft's current Datapack environment allows.
  4. Develop a backend generator to allow for on-demand pack regeneration, hotfixes, and customization.
  5. And finally, do so with an uncompromising pursuit of lag efficiency and innovation.
I feel confident in saying that come the fourth generation of the AC project, ACv4, all of the above standards have been achieved in excess.

How to use
Enough buzz words, how do we use the pack?

How to download and install:
  1. Navigate to the Mediafire downloads page, open the folder for your desired version, and download the zippered folder within. Note: The "Deprecated versions" folders contain outdated and unsupported legacy versions of ACv4, which contain glitches patched by future versions, and as such their use is not encouraged.
  2. Once downloaded, install the zippered Datapack into your chosen world's "datapacks" folder.
  3. Open the world, or, if it's already opened, run "/reload".

How to use the auto-crafters:
  1. Simply place an item frame (Normal or Glowing) on a crafting table, and insert the item to craft into the frame.
  2. This will create a chat notification, which, when hovered over, will clarify the required ingredients for the selected item.
  3. If the selected item has more than one recipe (Eg. Bone Meal being crafted from both Bones, and Bone Blocks), simply spin the item in the frame to update the active recipe, and check the updated notification to ensure you've selected the correct recipe.
  4. Once your desired recipe has been selected- you're good to go! Simply use the crafting table like any other storage block in the game. Use hoppers to push the required items into the crafting table, and use a hopper to suck the crafted items out the bottom, or, just let them fall onto the ground!
  5. The only unusual aspect of this system at this point is that if you click the crafting table, you won't see the input items. This is because crafting tables actually don't have an inventory. Which means everything your crafter is doing is entirely emulated! From organizing items, the actual crafting, and even the hopper interactions, everything is handled internally by your crafter!
  6. And finally, if you want to ensure the table is empty, simply spin the item frame, and all the items held within will be jettisoned onto the ground around the crafter.
Limitations
Beyond the crafter inventory being emulated, and therefore not showing up inside the crafting grid, the only other notable limitations, are;
  1. Droppers will not function with the auto-crafters. This is just due to the way droppers work, and the presence of instant dropper lines. Technically speaking, it's not within the scope of ACv4 to offer support for droppers at this time.
  2. A limitation of not just ACv4, but all auto-crafting Datapacks, is the limited implementation of recipes that employ Java functions.
    You heard right, some recipes, like firework rocket combinations, colouring shulkers, and combining tools, aren't truthfully crafting recipes. At least, not in the usual sense.
    Their complexity exceeds that of the implemented crafting system minecraft supports (There are about 29 quintillion possible firework combinations), and are therefore handled by a Java function designed to process that specific recipe.
    Datapack driven autocrafters also come up against a wall when it comes to these recipes. Not always an unscalable wall, but one that requires a unique workaround.
    From implementing a unique engine to handle colouring shulkers, to simply creating firework models by hand for the three basic rockets, you can sometimes find a workaround.
    The unfortunate truth of the matter though, is not always.
    Because of this, there are certain items ACv4 just doesn't have the capacity to make. You can't auto-craft dyed armours, combine tools, or fancy firework stars/rockets. It's an unfortunate limitation due to the current inflexibility of commands.
All that said, this really shouldn't be an issue for 99.9% of people. But, if it is for you, fear not! There are plenty of high-quality mod driven auto-crafters (Forge/Fabric/Plugin) that offer a similar experience, with complete support!

Closing notes
ACv4 strives to offer the best, unwavering auto-crafting experience you can get with Datapacks in vanilla Minecraft right now.
And as such, the UI is completely vanilla. No resource packs needed!
Heavy inspiration belongs to KleinGrrmpf for his introduction of the item frame as the item designator!

This has been an awesome project, through it's ups and downs since it's inception in early 2023, and I've loved every minute of it.
I've had to engineer my own solutions to problems I never even considered a possibility, and learned so much, even in the broader fields of computer science.

If you come across anything you deem to be bugs or unintended features, or just have general feedback, don't hesitate to leave a comment or send me a direct message.

Happy crafting!
-S
CompatibilityMinecraft 1.18
toMinecraft 1.20
Tags

11 Update Logs

Update 11 : by Smokyoatmeal 09/16/2023 12:31:03 amSep 16th, 2023

Changes made in ACv4 subversion 3.5 (ACv4.3.5):

-Patched unloading bug:
  Remedied unintended behaviour where an auto-crafter with the frame on the top of the table wouldn't unload crafted items when a hopper was below it.
  This has been patched and should behave as expected.

Small update, but figured it was significant enough to publish it now before waiting for a bigger problem to arise.
Have a great night!
LOAD MORE LOGS

Create an account or sign in to comment.

2
12/12/2023 1:29 am
Level 1 : New Miner
taksinutofficial
taksinutofficial's Avatar
I found some bug (on spigot server)
---> How can I disable a reward massage (advancement) cuz it alway spam the massage how can i disable it?
1
12/12/2023 11:42 am
Level 31 : Artisan Engineer
Smokyoatmeal
Smokyoatmeal's Avatar
Hey!

I'm sorry to hear you're encountering such an error, but I'm pretty certain it isn't coming from ACv4. ACv4 doesn't contain any references to the advancement command, and it doesn't introduce any new advancements of it's own.
It seems to either be a bug or compatibility issue from another datapack/plugin.

Double check what else you have installed, but it simply isn't possible for ACv4 to trigger anything advancement related.

Thanks for reaching out, and I hope you can sort out the issue!
2
10/29/2023 12:25 pm
Level 1 : New Explorer
4GdaTim
4GdaTim's Avatar
What a cool addition! Doesn't add complex and game changing mechanics, just straight foward a simple autocrafter.
I have some suggestions for this:
  • If another autocrafter is below, the items crafted above will pass to the autocrafter below (For example: Iron nugget input -> Iron bar -> Iron block output. Would require 2 autocrafters and 2 hoppers, but hoppers can get very slow if there is a big number of items coming, so instead get two autocrafters connected together to craft 1 item (Iron block)
  • (This one is another method of doing the above one) If the item inside an item frame requires two crafts related to the input (For example: Iron nugget input -> Iron block output), then it will craft first the iron bar, secondly the iron block, and then it will output the item as iron block (For it to work, you rotate the item frame first, so it doesn't craft an iron bar instead)
  • (This one is not a preference) Add a custom texture within the datapack that changes the texture of the crafting table if it detects there is an item frame connected to it
  • (This one i don't know if it is already added) Add compatibility for custom craftings (For example: Vanilla tweaks)
I absolutely loved this datapack, gonna add it to my minecraft server right now, great job!
1
11/02/2023 6:47 pm
Level 31 : Artisan Engineer
Smokyoatmeal
Smokyoatmeal's Avatar
Hey, thanks for the kind words!

I'll try to answer your questions here;
1. It's a cool idea for sure, and would require a hefty rework of the existing system so crafters would be aware of each other relationally. Not impossible at all- would just be a significant directional jump for the pack.
2. That's definitely an interesting approach to simplifying the user's crafting process. I'll have to take a peek at the source code to see how compatible multi stage recipes would be
3. I understand some people prefer resourcepacks, and I may be able to ship out a version that comes bundled with custom resources. But, the hard truth is adding a resourcepack makes your pack less appealing to the general public, just because it takes more effort to use. Nice recommendation though, I'll think about it!
4. Haha yes, I did have a generator in the works before I left for the military. My time has been extremely limited, so I haven't had a chance to pull my computer out for two or so months at this point. The plan is to eventually hand out a generator, so people can just make their own recipes. The generation process can be complex depending on your technical prowess, and involves retrieving your desired version's .JAR file for decompression purposes. It's long, generates something like 13,000 files at this point, and will only get bigger. Needless to say, you can't just manually add a recipe; each recipe is spread intelligently across some 50 or 60 files, some independent of eachother, and some private to the recipe. It's a chaotic zoo from the outside, but every file is organized and purposeful.

With the coming version, 1.21, they are adding official support for auto-crafting, so ACv4 may see the end of it's life cycle shortly. Who knows, but thanks for stopping by when you did! 😄
2
09/16/2023 11:00 am
Level 1 : New Miner
Olaf_DerEchte
Olaf_DerEchte's Avatar
Great Datapack
But on my server there is a bug where if u connect a chest and hopper with the autocrafter the output hoppers just get desroyed i dont know why
2
09/16/2023 11:19 amhistory
Level 31 : Artisan Engineer
Smokyoatmeal
Smokyoatmeal's Avatar
Hey, sorry to hear that!

I did a sweep of the whole project, and ACv4 doesn't contain any setblock commands at all, so it can't destroy any hoppers. Really wierd.

I can say pretty confidently that the issue isn't with ACv4- do you have any plugins installed? If so, are there any that could affect/regulate block interactions?

That would be my only guess, I'm really not sure.

Sorry again, and I hope it can be figured out!
2
09/17/2023 4:10 pm
Level 1 : New Miner
Olaf_DerEchte
Olaf_DerEchte's Avatar
I have world guard installed and i tried to use the auto crafters at the server spawn that was my mistake
they work just fine in the regular world

thx for the support
2
09/14/2023 8:53 amhistory
Level 1 : New Miner
smittel
smittel's Avatar
Hi there,

First off, thanks. The other Autocrafters were just kinda weird and extra, or dont work, this is nice and straightforward.

I did however notice one in my opinion pretty major issue, that being that if you use a hopper minecart to pull out the crafted items, it basically acts like a duper. Not for all recipes, i havent done enough testing, but for example:


Making a line of autocrafters, where bonemeal is crafted into bone blocks, pulled out by a hopper minecart, then crafted back into bonemeal, you get 5 bonemeal out for every one you put in. Same is true for granite (and im assuming all similar recipes), where you get back 10 polished granite for every 4 you put in.

(Further testing revealed that the hopper minecarts were not the issue, its having the items drop on the floor at all)

Diamond pickaxes were not duplicated, neither were redstone blocks, however, crafting redstone blocks back into redstone did the same as with the bone blocks, my theory is that it has to do with recipes that return more than one item.

the amount of items you get back follows a pattern of of adding the numbers up to n where n is the number of items you WOULD get back

1 -> 1
2 -> 3
3 -> 6
4 -> 10
6 -> 21
9 -> 45
16 -> 136

as you can see this gets pretty insane pretty fast with rails being essentially free for example. It doesnt happen when using a hopper directly, leading me to suspect that it first tries to push one item into a hopper, when that fails, it dumps its inventory but only reduces its inventory by one, rinse and repeat. Keeping track of the number of items dropped at any iteration, it drops 16, then 15 and so on.

I did not look at what the functions do, so this is just by best guess.


v4.3.3, mc-1.20.1, fabric-0.14.22
1
09/14/2023 10:23 am
Level 31 : Artisan Engineer
Smokyoatmeal
Smokyoatmeal's Avatar
Hey! Thanks for the info!

I think your observation is spot on, especially the limit function idea.

I'm away from my computer at the moment, but to give you the basic rundown of what I think is happening, I'd say;

1 summon dud item
2 copy nbt from desired item to the dud item to clone it
3 set dud item's count to 1
4 if the dud item is collected, decrease the progenitor item's count by 1
5 repeat

My guess is that step 3 is being bypassed, which would allow for your suggestion to play out 100% accurately. I'm not sure what would've caused the issue to arise, as I remember coding in the exception, but, I know where it's coming from.

I'll work on it when I get home, thanks again for the heads up!
1
09/14/2023 4:20 pm
Level 31 : Artisan Engineer
Smokyoatmeal
Smokyoatmeal's Avatar
Alright, just as a heads up, it's all patched out! Famous last words lol.

It was exactly what I'd expected.
There are two routines- One for unloading with a hopper, and one without.
The one for managing unloading without a hopper was missing the instruction.
The appropriate changes should have been applied, and you should be good to go.

Again, thanks for the heads up!

If you find any more issues, please don't hesitate to reach out!
Planet Minecraft

Website

© 2010 - 2024
www.planetminecraft.com

Welcome