[Mod] Block painting (block_painting) [v0.3]

Post Reply
User avatar
davidthecreator
Member
Posts: 452
Joined: Mon Aug 18, 2014 19:48
GitHub: daviddoesminetest
In-game: DavidDoesMinetest
Location: Lithuania

[Mod] Block painting (block_painting) [v0.3]

by davidthecreator » Post

Image

This mod adds paint and a paintbrushes to minetest
Image

which allows you to paint blocks
Image
(all blocks that don't have "paramtype2" by default should be supported)

almost all of the paints are crafted out of 3 same dyes, 1 steel ingot and 2 flour...

to craft darker or lighter paint, add 1 black or white dye in the top middle of crafting grid, along with the regular recipe in the bottom.
Image

but there's a few exceptions...
Image
Light blue paint uses 2 blue dyes and 1 white dye,
Salad paint uses 2 green and 1 yellow,
and paint stripper(used for clearing painted blocks) is crafted out of 3 jungle grass instead of 3 dyes.
Image


Image

How does this mod work:

1. You craft yourself a brush and the colour of paint that you like.
2. you make sure the paint is next to your brush in the hotbar
3. you punch a block with the paintbrush and if that block is paintable, it gets painted.

It will probably be impossible to paint blocks in a protected area, to which you don't have access... atleast I tried to implement that, but didn't test it...

Optional Depends: default(for crafting), farming(for crafting), dye(for crafting).

license: CC-BY-SA 4.0
Supports minetest 0.4.17 and greater
Attachments
block_painting v0.3.zip
(18.89 KiB) Downloaded 109 times
block_painting v0.2.zip
(59.06 KiB) Downloaded 45 times
block_painting.zip
(55.89 KiB) Downloaded 92 times
Last edited by davidthecreator on Sat Mar 06, 2021 17:02, edited 2 times in total.

User avatar
StarNinjas
Member
Posts: 411
Joined: Wed Mar 14, 2018 00:32
GitHub: starninjas
IRC: StarNinjas
In-game: J1
Location: Terrarca
Contact:

Re: [Mod] Block painting (block_painting) [v0.1]

by StarNinjas » Post

awesome ill have to try it out!
Don't go to bed tonight, without knowing what would happen if you died. https://thegospelfilm.org/

User avatar
runs
Member
Posts: 3225
Joined: Sat Oct 27, 2018 08:32

Re: [Mod] Block painting (block_painting) [v0.1]

by runs » Post

Cool for artists :-)

User avatar
Hume2
Member
Posts: 709
Joined: Tue Jun 19, 2018 08:24
GitHub: Hume2
In-game: Hume2
Location: Czech Republic

Re: [Mod] Block painting (block_painting) [v0.1]

by Hume2 » Post

Good mod but please improve your coding style.

in init.lua:
Lines 2-43: Why is there everything twice?
Lines 64-80: Correct indentation please.
Lines 90-473: You use the same pattern over and over. Better make a function with parameters.
If you lack the reality, go on a trip or find a job.

User avatar
GamingAssociation39
Member
Posts: 858
Joined: Mon Apr 25, 2016 16:09
GitHub: Gerold55
IRC: Gerold55
In-game: Gerold55
Location: Maryland, USA

Re: [Mod] Block painting (block_painting) [v0.1]

by GamingAssociation39 » Post

I've tried to add my own blocks to it that wasn't default and it wouldn't work.
Jesus Is Lord and Savior!!!

User avatar
davidthecreator
Member
Posts: 452
Joined: Mon Aug 18, 2014 19:48
GitHub: daviddoesminetest
In-game: DavidDoesMinetest
Location: Lithuania

Re: [Mod] Block painting (block_painting) [v0.2]

by davidthecreator » Post

update v0.2

*Improved the code and now the mod should automatically support every registered node that didn't come with "paramtype2" from the beginning, with ability to sacrifice node's old "paramtype2" by adding it to "force_paintable_nodes" table to make the node paintable instead (by default the table has all default wood types and bricks inside, which makes them no longer rotatable, but paintable instead)
*Added a magical paintbrush that is capable of painting liquids
*if you try to paint a block that already has the same color you are trying to apply, you will not consume any paint.

User avatar
davidthecreator
Member
Posts: 452
Joined: Mon Aug 18, 2014 19:48
GitHub: daviddoesminetest
In-game: DavidDoesMinetest
Location: Lithuania

Re: [Mod] Block painting (block_painting) [v0.3]

by davidthecreator » Post

v0.3 update (noticed a bug that caused leaves and apples to become greener after being placed a little too late, so I made a new update so quickly to fix it and I added some other improvements along with that)

*Fixed the bug that caused placed leaves and apples to get painted green out of nowhere
*removed most of the textures and just used minetest itself to generate coloured paint item textures out of 2 pictures, to reduce file size
*made paintbrushes take time to dig instatly-diggable nodes, so that it would be possible to actually paint them.
*added darker and lighter versions of all paints
Image

Loadstoner
New member
Posts: 1
Joined: Wed May 25, 2022 14:18

Re: [Mod] Block painting (block_painting) [v0.3]

by Loadstoner » Post

i know this is an older post, but i decided to try out the block painting mod and in its current state it does everything its stated to do, is a good mod. What im after is when i try to use it with another mod, say the moreblocks mod, im not saying that block painting or more blocks has a prob but, my issue is im not able to paint slope blocks. Would this be because maybe the slopes are not paintable in their current state or would it be that block painting only paints blocks ?

User avatar
davidthecreator
Member
Posts: 452
Joined: Mon Aug 18, 2014 19:48
GitHub: daviddoesminetest
In-game: DavidDoesMinetest
Location: Lithuania

Re: [Mod] Block painting (block_painting) [v0.3]

by davidthecreator » Post

Loadstoner wrote:
Wed May 25, 2022 14:29
i know this is an older post, but i decided to try out the block painting mod and in its current state it does everything its stated to do, is a good mod. What im after is when i try to use it with another mod, say the moreblocks mod, im not saying that block painting or more blocks has a prob but, my issue is im not able to paint slope blocks. Would this be because maybe the slopes are not paintable in their current state or would it be that block painting only paints blocks ?
Those slopes are rotatable and with the way minetest node registration works, I must use the same variable to handle paint, that node rotations use and there's no way around that and even if it is possible to use that same variable for both paint and rotations, it would limit the amount of paints the block supports ...

So rotatable nodes are not paintable.

User avatar
MisterE
Member
Posts: 693
Joined: Sun Feb 16, 2020 21:06
GitHub: MisterE123
IRC: MisterE
In-game: MisterE

Re: [Mod] Block painting (block_painting) [v0.3]

by MisterE » Post

isn't there a colorfacedir paramtype now?
I think it supports fewer colors but also supprts rotation

User avatar
davidthecreator
Member
Posts: 452
Joined: Mon Aug 18, 2014 19:48
GitHub: daviddoesminetest
In-game: DavidDoesMinetest
Location: Lithuania

Re: [Mod] Block painting (block_painting) [v0.3]

by davidthecreator » Post

Yeah, but that's the thing...

It would really limit the amount of paints that actually work on the node... So it could be kinda confusing and I'd have to decide which of all paints should be usable for that

Post Reply

Who is online

Users browsing this forum: Google [Bot] and 10 guests