soul lightning
This commit is contained in:
@@ -306,6 +306,10 @@ enum mc_block_id {
|
||||
block_crying_obsidian = 1035,
|
||||
block_lodestone = 1036,
|
||||
block_respawn_anchor = 1037,
|
||||
// soul lightning
|
||||
block_soul_lantern = 1038,
|
||||
block_soul_torch = 1039,
|
||||
block_soul_fire = 1040,
|
||||
|
||||
// adding a gap in the numbering of walls to keep them all
|
||||
// in one numbering block starting at 1792
|
||||
|
||||
@@ -31,7 +31,7 @@
|
||||
|
||||
// increment this value if you've made a change to the c extension
|
||||
// and want to force users to rebuild
|
||||
#define OVERVIEWER_EXTENSION_VERSION 94
|
||||
#define OVERVIEWER_EXTENSION_VERSION 95
|
||||
|
||||
#include <stdbool.h>
|
||||
#include <stdint.h>
|
||||
|
||||
@@ -402,6 +402,17 @@ class Textures(object):
|
||||
self.firetexture = firetexture
|
||||
return firetexture
|
||||
|
||||
def load_soul_fire(self):
|
||||
"""Special-case function for loading soul_fire."""
|
||||
soul_firetexture = getattr(self, "soul_firetexture", None)
|
||||
if soul_firetexture:
|
||||
return soul_firetexture
|
||||
fireNS = self.load_image_texture("assets/minecraft/textures/block/soul_fire_0.png")
|
||||
fireEW = self.load_image_texture("assets/minecraft/textures/block/soul_fire_1.png")
|
||||
soul_firetexture = (fireNS, fireEW)
|
||||
self.soul_firetexture = soul_firetexture
|
||||
return soul_firetexture
|
||||
|
||||
def load_portal(self):
|
||||
"""Special-case function for loading portal."""
|
||||
portaltexture = getattr(self, "portaltexture", None)
|
||||
@@ -1794,8 +1805,8 @@ block(blockid=48, top_image="assets/minecraft/textures/block/mossy_cobblestone.p
|
||||
# obsidian
|
||||
block(blockid=49, top_image="assets/minecraft/textures/block/obsidian.png")
|
||||
|
||||
# torch, redstone torch (off), redstone torch(on)
|
||||
@material(blockid=[50, 75, 76], data=[1, 2, 3, 4, 5], transparent=True)
|
||||
# torch, redstone torch (off), redstone torch(on), soul_torch
|
||||
@material(blockid=[50, 75, 76, 1039], data=[1, 2, 3, 4, 5], transparent=True)
|
||||
def torches(self, blockid, data):
|
||||
# first, rotations
|
||||
if self.rotation == 1:
|
||||
@@ -1819,9 +1830,10 @@ def torches(self, blockid, data):
|
||||
small = self.load_image_texture("assets/minecraft/textures/block/torch.png")
|
||||
elif blockid == 75: # off redstone torch
|
||||
small = self.load_image_texture("assets/minecraft/textures/block/redstone_torch_off.png")
|
||||
else: # on redstone torch
|
||||
elif blockid == 76: # on redstone torch
|
||||
small = self.load_image_texture("assets/minecraft/textures/block/redstone_torch.png")
|
||||
|
||||
elif blockid == 1039: # soul torch
|
||||
small= self.load_image_texture("assets/minecraft/textures/block/soul_torch.png")
|
||||
# compose a torch bigger than the normal
|
||||
# (better for doing transformations)
|
||||
torch = Image.new("RGBA", (16,16), self.bgcolor)
|
||||
@@ -1865,10 +1877,14 @@ def torches(self, blockid, data):
|
||||
return img
|
||||
|
||||
# lantern
|
||||
@material(blockid=11373, data=[0, 1], transparent=True)
|
||||
@material(blockid=[11373, 1038], data=[0, 1], transparent=True)
|
||||
def lantern(self, blockid, data):
|
||||
# get the multipart texture of the lantern
|
||||
inputtexture = self.load_image_texture("assets/minecraft/textures/block/lantern.png")
|
||||
if blockid == 11373:
|
||||
inputtexture = self.load_image_texture("assets/minecraft/textures/block/lantern.png")
|
||||
if blockid == 1038:
|
||||
inputtexture = self.load_image_texture("assets/minecraft/textures/block/soul_lantern.png")
|
||||
|
||||
|
||||
# # now create a textures, using the parts defined in lantern.json
|
||||
|
||||
@@ -2004,12 +2020,18 @@ def composter(self, blockid, data):
|
||||
alpha_over(img, img2, (0, 0), img2)
|
||||
return img
|
||||
|
||||
# fire
|
||||
@material(blockid=51, data=list(range(16)), transparent=True)
|
||||
# fire and soul_fire
|
||||
@material(blockid=[51, 1040], data=list(range(16)), transparent=True)
|
||||
def fire(self, blockid, data):
|
||||
firetextures = self.load_fire()
|
||||
side1 = self.transform_image_side(firetextures[0])
|
||||
side2 = self.transform_image_side(firetextures[1]).transpose(Image.FLIP_LEFT_RIGHT)
|
||||
if blockid == 51:
|
||||
firetextures = self.load_fire()
|
||||
side1 = self.transform_image_side(firetextures[0])
|
||||
side2 = self.transform_image_side(firetextures[1]).transpose(Image.FLIP_LEFT_RIGHT)
|
||||
elif blockid == 1040:
|
||||
soul_firetextures = self.load_soul_fire()
|
||||
side1 = self.transform_image_side(soul_firetextures[0])
|
||||
side2 = self.transform_image_side(soul_firetextures[1]).transpose(Image.FLIP_LEFT_RIGHT)
|
||||
|
||||
|
||||
img = Image.new("RGBA", (24,24), self.bgcolor)
|
||||
|
||||
|
||||
@@ -758,6 +758,11 @@ class RegionSet(object):
|
||||
'minecraft:crying_obsidian': (1035, 0),
|
||||
'minecraft:lodestone': (1036, 0),
|
||||
'minecraft:respawn_anchor': (1037, 0),
|
||||
# soul lightning
|
||||
'minecraft:soul_lantern': (1038, 0),
|
||||
'minecraft:soul_wall_torch': (1039, 0),
|
||||
'minecraft:soul_torch': (1039, 5),
|
||||
'minecraft:soul_fire': (1040, 0),
|
||||
|
||||
# New blocks
|
||||
'minecraft:carved_pumpkin': (11300, 0),
|
||||
@@ -1129,7 +1134,8 @@ class RegionSet(object):
|
||||
elif key == 'minecraft:basalt' or key == 'minecraft:polished_basalt':
|
||||
axis = palette_entry['Properties']['axis']
|
||||
data = {'y': 0, 'x': 1, 'z': 2}[axis]
|
||||
elif key in ['minecraft:redstone_torch','minecraft:redstone_wall_torch','minecraft:wall_torch']:
|
||||
elif key in ['minecraft:redstone_torch','minecraft:redstone_wall_torch','minecraft:wall_torch',
|
||||
'minecraft:soul_torch', 'minecraft:soul_wall_torch']:
|
||||
if key.startswith('minecraft:redstone_') and palette_entry['Properties']['lit'] == 'true':
|
||||
block += 1
|
||||
if key.endswith('wall_torch'):
|
||||
@@ -1207,7 +1213,7 @@ class RegionSet(object):
|
||||
'minecraft:pumpkin_stem', 'minecraft:potatoes', 'minecraft:carrots',
|
||||
'minecraft:sweet_berry_bush']:
|
||||
data = palette_entry['Properties']['age']
|
||||
elif key == 'minecraft:lantern':
|
||||
elif key in ['minecraft:lantern', 'minecraft:soul_lantern']:
|
||||
if palette_entry['Properties']['hanging'] == 'true':
|
||||
data = 1
|
||||
else:
|
||||
|
||||
Reference in New Issue
Block a user