Create MCL5 own mcl_end_crystal_beam texture

This commit is contained in:
kay27 2022-04-23 22:01:51 +03:00
parent d0a8848487
commit b70ae30fda
2 changed files with 28 additions and 0 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 635 B

After

Width:  |  Height:  |  Size: 939 B

View File

@ -0,0 +1,28 @@
import png
from random import randrange
w, h = 16, 256;
s = [[int(0) for c in range(w)] for c in range(h)]
def drawpixel(x, y, t):
if (x >= 0) and (x < w) and (y >= 0) and (y < h):
s[y][x] = t
# R, G, B, Alpha (0xFF = opaque):
palette=[
(0x00,0x00,0x00,0x00),
(0xFF,0xFF,0x70,0xCC),
(0xFF,0x80,0xDF,0xCC),
(0x80,0xFF,0xDF,0xCC)
]
for x in range(w):
for y in range(h):
n = randrange(4)
if n == 1:
drawpixel(x, y, randrange(3) + 1)
w = png.Writer(len(s[0]), len(s), palette=palette, bitdepth=2)
f = open('mcl_end_crystal_beam.png', 'wb')
w.write(f, s)