The water and river water textures are completely opaque, which is annoying since it makes it so you can't see through water. This simple script fixes it (run in the Hand Painted Pack by Drummyfish directory):
#!/usr/bin/env perl
use strict;
use warnings;
my $convert = 'mogrify';
foreach (@ARGV ? @ARGV : <default_*water*.png>) {
# Transparency of river water is 160, transparency of regular
# water is 191. Values taken from the textures in Minetest Game.
my $transparency = (/river/i ? 160 : 191)/255;
my @cmd = ($convert, qw(-background none -channel A -evaluate multiply),
$transparency, qw(+channel), $_);
print "Processing $_ (transparency $transparency)\n";
if (system $convert @cmd) {
die "Could not execute $convert: $!\n" if $? == -1;
die "@cmd died with signal " . ($? & 127) . ' with' .
($? & 128 ? '' : 'out') . ' coredump\n' if $? & 127;
die "@cmd exited with value " . ($? >> 8) . "\n" if $?;
}
}
I can also provide a patch, but it's a bit large (2.3M).
The water and river water textures are completely opaque, which is annoying since it makes it so you can't see through water. This simple script fixes it (run in the
Hand Painted Pack by Drummyfish
directory):I can also provide a patch, but it's a bit large (2.3M).