replace materialNamed calls with refs to the Block object's ID
This commit is contained in:
parent
a12dfdf29a
commit
00c3514e36
@ -31,9 +31,9 @@ def genericFlipRotation(cls):
|
|||||||
|
|
||||||
class Torch:
|
class Torch:
|
||||||
blocktypes = [
|
blocktypes = [
|
||||||
alphaMaterials.materialNamed("Torch"),
|
alphaMaterials.Torch.ID,
|
||||||
alphaMaterials.materialNamed("Redstone Torch (on)"),
|
alphaMaterials.RedstoneTorchOn.ID,
|
||||||
alphaMaterials.materialNamed("Redstone Torch (off)"),
|
alphaMaterials.RedstoneTorchOff.ID,
|
||||||
]
|
]
|
||||||
|
|
||||||
South = 1
|
South = 1
|
||||||
@ -44,7 +44,7 @@ class Torch:
|
|||||||
genericFlipRotation(Torch)
|
genericFlipRotation(Torch)
|
||||||
|
|
||||||
class Ladder:
|
class Ladder:
|
||||||
blocktypes = [alphaMaterials.materialNamed("Ladder")]
|
blocktypes = [alphaMaterials.Ladder.ID]
|
||||||
|
|
||||||
East = 2
|
East = 2
|
||||||
West = 3
|
West = 3
|
||||||
@ -54,8 +54,8 @@ genericFlipRotation(Ladder)
|
|||||||
|
|
||||||
class Stair:
|
class Stair:
|
||||||
blocktypes = [
|
blocktypes = [
|
||||||
alphaMaterials.materialNamed("Wooden Stairs"),
|
alphaMaterials.WoodenStairs.ID,
|
||||||
alphaMaterials.materialNamed("Stone Stairs"),
|
alphaMaterials.StoneStairs.ID,
|
||||||
]
|
]
|
||||||
|
|
||||||
South = 0
|
South = 0
|
||||||
@ -65,7 +65,7 @@ class Stair:
|
|||||||
genericFlipRotation(Stair)
|
genericFlipRotation(Stair)
|
||||||
|
|
||||||
class WallSign:
|
class WallSign:
|
||||||
blocktypes = [alphaMaterials.materialNamed("Wall Sign")]
|
blocktypes = [alphaMaterials.WallSign.ID]
|
||||||
|
|
||||||
East = 2
|
East = 2
|
||||||
West = 3
|
West = 3
|
||||||
@ -75,8 +75,8 @@ genericFlipRotation(WallSign)
|
|||||||
|
|
||||||
class Furnace:
|
class Furnace:
|
||||||
blocktypes = [
|
blocktypes = [
|
||||||
alphaMaterials.materialNamed("Furnace"),
|
alphaMaterials.Furnace.ID,
|
||||||
alphaMaterials.materialNamed("Lit Furnace"),
|
alphaMaterials.LitFurnace.ID,
|
||||||
]
|
]
|
||||||
East = 2
|
East = 2
|
||||||
West = 3
|
West = 3
|
||||||
@ -86,14 +86,14 @@ genericFlipRotation(Furnace)
|
|||||||
|
|
||||||
class Dispenser(Furnace):
|
class Dispenser(Furnace):
|
||||||
blocktypes = [
|
blocktypes = [
|
||||||
alphaMaterials.materialNamed("Dispenser"),
|
alphaMaterials.Dispenser.ID,
|
||||||
]
|
]
|
||||||
genericFlipRotation(Dispenser)
|
genericFlipRotation(Dispenser)
|
||||||
|
|
||||||
class Pumpkin:
|
class Pumpkin:
|
||||||
blocktypes = [
|
blocktypes = [
|
||||||
alphaMaterials.materialNamed("Pumpkin"),
|
alphaMaterials.Pumpkin.ID,
|
||||||
alphaMaterials.materialNamed("Jack-o'-Lantern"),
|
alphaMaterials.JackOLantern.ID,
|
||||||
]
|
]
|
||||||
|
|
||||||
East = 0
|
East = 0
|
||||||
@ -103,7 +103,7 @@ class Pumpkin:
|
|||||||
genericFlipRotation(Pumpkin)
|
genericFlipRotation(Pumpkin)
|
||||||
|
|
||||||
class Rail:
|
class Rail:
|
||||||
blocktypes = [alphaMaterials.materialNamed("Rail")]
|
blocktypes = [alphaMaterials.Rail.ID]
|
||||||
|
|
||||||
EastWest = 0
|
EastWest = 0
|
||||||
NorthSouth = 1
|
NorthSouth = 1
|
||||||
@ -142,7 +142,7 @@ def applyThrownBit(array):
|
|||||||
array[8:16] = array[0:8] | 0x8
|
array[8:16] = array[0:8] | 0x8
|
||||||
|
|
||||||
class Lever:
|
class Lever:
|
||||||
blocktypes = [alphaMaterials.materialNamed("Lever")]
|
blocktypes = [alphaMaterials.Lever.ID]
|
||||||
ThrownBit = 0x8
|
ThrownBit = 0x8
|
||||||
South = 1
|
South = 1
|
||||||
North = 2
|
North = 2
|
||||||
@ -161,7 +161,7 @@ applyThrownBit(Lever.flipNorthSouth)
|
|||||||
rotationClasses.append(Lever)
|
rotationClasses.append(Lever)
|
||||||
|
|
||||||
class Button:
|
class Button:
|
||||||
blocktypes = [alphaMaterials.materialNamed("Button")]
|
blocktypes = [alphaMaterials.Button.ID]
|
||||||
PressedBit = 0x8
|
PressedBit = 0x8
|
||||||
South = 1
|
South = 1
|
||||||
North = 2
|
North = 2
|
||||||
@ -176,7 +176,7 @@ applyThrownBit(Button.flipNorthSouth)
|
|||||||
rotationClasses.append(Button)
|
rotationClasses.append(Button)
|
||||||
|
|
||||||
class SignPost:
|
class SignPost:
|
||||||
blocktypes = [alphaMaterials.materialNamed("Sign")]
|
blocktypes = [alphaMaterials.Sign.ID]
|
||||||
#west is 0, increasing clockwise
|
#west is 0, increasing clockwise
|
||||||
|
|
||||||
rotateLeft = arange(16, dtype='uint8')
|
rotateLeft = arange(16, dtype='uint8')
|
||||||
@ -191,8 +191,8 @@ rotationClasses.append(SignPost)
|
|||||||
|
|
||||||
class Door:
|
class Door:
|
||||||
blocktypes = [
|
blocktypes = [
|
||||||
alphaMaterials.materialNamed("Iron Door"),
|
alphaMaterials.IronDoor.ID,
|
||||||
alphaMaterials.materialNamed("Wooden Door"),
|
alphaMaterials.WoodenDoor.ID,
|
||||||
]
|
]
|
||||||
TopHalfBit = 0x8
|
TopHalfBit = 0x8
|
||||||
SwungCCWBit = 0x4
|
SwungCCWBit = 0x4
|
||||||
|
Reference in New Issue
Block a user