Amend anvil texture generation
- Fix gap between sides & top in anvil texture
This commit is contained in:
@@ -4619,10 +4619,10 @@ def crops4(self, blockid, data):
|
||||
alpha_over(img, crop3, (6,3), crop3)
|
||||
return img
|
||||
|
||||
# anvils
|
||||
@material(blockid=145, data=list(range(12)), transparent=True)
|
||||
def anvil(self, blockid, data):
|
||||
|
||||
# anvils
|
||||
@material(blockid=145, data=list(range(12)), transparent=True, nospawn=True)
|
||||
def anvil(self, blockid, data):
|
||||
# anvils only have two orientations, invert it for rotations 1 and 3
|
||||
orientation = data & 0x1
|
||||
if self.rotation in (1, 3):
|
||||
@@ -4661,12 +4661,12 @@ def anvil(self, blockid, data):
|
||||
if orientation == 1: # bottom-left top-right
|
||||
top = top.rotate(90)
|
||||
left_side = small_side
|
||||
left_pos = (1,7)
|
||||
left_pos = (1, 6)
|
||||
right_side = big_side
|
||||
right_pos = (10, 5)
|
||||
else: # top-left bottom-right
|
||||
right_side = small_side
|
||||
right_pos = (12,7)
|
||||
right_pos = (12, 6)
|
||||
left_side = big_side
|
||||
left_pos = (3, 5)
|
||||
|
||||
@@ -4694,6 +4694,7 @@ def anvil(self, blockid, data):
|
||||
alpha_over(img, base_d, (0, 10), base_d)
|
||||
alpha_over(img, small_base, (0, 10), small_base)
|
||||
|
||||
alpha_over(img, top, (0, 1), top) # Fix gap between block edges
|
||||
alpha_over(img, top, (0, 0), top)
|
||||
|
||||
left_side = self.transform_image_side(left_side)
|
||||
|
||||
Reference in New Issue
Block a user