[Feature] Allow painting facades without the Machines module (through Crafting or an Anvil, perhaps).
brisingraerowing opened this issue · 23 comments
Issue Description:
I would like to use the Conduits module by itself (I'm adding recipes to other mods to make the various materials), as I just needed hideable item / fluid / power pipes for my personal pack, but there seems to be no way to paint the facades without the machines module. I would try to add a dynamic recipe with CraftTweaker, but I have no idea how to do that, or even if it's possible.
What happens:
Can't paint facades without machines module
What you expected to happen:
Some way to paint facades without machines module.
Steps to reproduce:
- Install EC, EIO Base, and EIO Conduits
- Try to paint a facade
- ...
Profit!Can't do that.
Affected Versions (Do not use "latest"):
- EnderIO: 5.0.33
- EnderCore: 0.5.39
- Minecraft: 1.12.2
- Forge: 2760
- SpongeForge? no
- Optifine? no
- Single Player and/or Server? SP
Your most recent log file where the issue was present:
I don't think this is applicable, but will attach one if requested.
It probably would be relatively easy to put the painting machine into its own sub-mod. Just convince me it'd be worth my time to do it ;)
I can try and write a simple mod to do this. Is there a maven for EIO so I can use that for dependency stuff?
@brisingraerowing Did you have a chance to create such a machine? I am currently in the same situation. I make do with CraftTweaker/EIO provided methods to basicly remove all of stuff the EIO machine module adds aside from the painting machine but it is a rather unsatisfactory solution.
I'd also like to voice my support for this feature request.
I wasn't able to figure out how to make it work (I was trying to do a crafting recipe with a facade and any valid block). I've kind of given up on it for now.
The conduits module actually has the lowest number of paintable blocks of all modules that have some. And, btw, the only reason the cap banks are in there is that they have special code to work with conduits.
So (1) is out.
(2) would duplicate the painter into a custom recipe. Plenty of work. plenty of duplicated code. (and don't forget the JEI recipe)...
(3) Would also be a 1:1 copy of the painter. why should we...
Moving the painting machine into a sub-mod doesn't sound like a good idea.
As far as i can tell there are a few solutions here:
-
Move Painting machine to the Conduit module. I always viewed it as a conduit addition to paint the facades to hide them. I know that it can do more but i feel most people see it related more to the conduits than to the machine module. The Conduit module already has some machine (like?) blocks so it wouldn't hurt.
-
Add a crafting recipe like Facade + Block ->Facade block with texture and Facade with texture -> Facade + Block (I think this is an elegant solution but I guess it would require some work..) OR just a recipe that applies the texture and leaves the block behind
-
Create a new "machine" which only allows to paint facades and add that to the conduit module and if the machine module is present deactivate it. (Don't think this is really the way to go)
-
Do nothing (please don't :D )
For those (most probably future readers) interested in the crafting recipe approach. I managed to get it working with Crafttweaker usibng the withTag option, but it is a major PITA cause you have to use the painting machine to get the painted facade with the right NBT tags and then add a recipe for the facade. With upwards 1000 blocks in modded packs this is painful and slow!
Well then. I have said that some of these proposals aren't that great ;) And moving the painter to its own sub-mod kinda feels like (1) from above doesn't it?
Looking at other mods i see 2 other solutions to "copy", but i'm sure there are other ways i haven't thought about:
-
A chisel like tool: If i were to implement it, it would be similar to the painting machine just in an item form but there are multiple ways to go about this i guess. It could also be deactivated if the machine module is loaded as well for consistency’s sake.
-
A tool like the obscurator from IC2. Take the texture from a block and apply it to the facade, maybe with a custom recipe (no idea if this is even possible without creating a JEI mess) or by in-world interaction like right clicking the placed facade (Haven't looked at the facade code much so no idea if those would need an adjustment as well for this kind of interaction).
I got my recipe to work! Now all I have to do is figure out how to return the block used to paint.
I was an idiot and applied the paint to the original facade instance instead of the copy I made for the result.
Are you using the normal painting recipes to do the actual work? In that case it may be an idea to publish that recipe as a standalone addon to curseforge. I would link to it in our module/addon list.
This is just a normal crafting recipe. I copied the painting code from the painting recipe, though. It does work, though it psuedo-duplicated the paint source and left the facade as well. I'm testing a rewrite of that now to see if I fixed it.
I mean, are you going through MachineRecipeRegistry.instance.getRecipeForInputs()
(or MachineRecipeRegistry.instance.getRecipesForMachine()
) or are you twiddeling with the nbt manually?
I wasn't aware of that. I'm using PaintUtil to apply the paint to the facade. I'll look into the MachineRecipeRegistry. That should simplify the code a bit.
some pointers:
TileEntityPainter line 38 is looping over all painting recipes to fin if something can be used to paint.
AbstractPoweredTaskEntity line 270 is fetching a recipe for specific inputs. Line 158 executes the recipe.
I couldn't get the machine recipe to work, and IntelliJ just crashed and wrote gibberish to the code files I had open. I'm not sure if I'll rebuild this or not.
I got it working. Took some time until I wrapped my head around how recipe factories work. By the way, why do painted blocks initially have 2 NBT tags (paintSource and blockstate) and 1 after you break them (when they were place in the world)?
Now I need to look into JEI to get a proper display of the recipes.
We added the second tag late to enable JEI recipes to be created on-demand. Never got around to store it in the blocks.
Ok good, then I'm not crazy.
Got the "Mod" working so far. There are still some things that need a little touch up but it is in a state where i think i can release it for now (haven't got the time for those last bits (only JEI related stuff) to get to a "perfect" result, it'll have to wait till after my exams). Will create a CurseForge page and link it in the readme once done:
Nice! I'll definitely be using it (If I can just get the motivation to complete the pack I'm working on. Playing Paper Mario: Color Splash right now).
Also: Good luck with exams!
@HenryLoenwind The mod is now online as a beta: https://minecraft.curseforge.com/projects/facade-painter
Just as a FYI ;) Thanks for the tip about the MachineRecipeRegistry
Feel free to create your own Painting Machine. All methods you need to do so (e.g. for applying paint) are in PaintUtil.