Fix blocktypes in testFill()
This commit is contained in:
parent
f0b3f79a32
commit
d92ad6ec12
@ -82,7 +82,7 @@ def testFill(world):
|
|||||||
box = BoundingBox(bounds.origin + (bounds.size / 2), (64, bounds.height / 2, 64))
|
box = BoundingBox(bounds.origin + (bounds.size / 2), (64, bounds.height / 2, 64))
|
||||||
x, y, z = numpy.array(list(box.positions)).transpose()
|
x, y, z = numpy.array(list(box.positions)).transpose()
|
||||||
|
|
||||||
dim.fillBlocks(box, world.blocktypes.OakWoodPlanks)
|
dim.fillBlocks(box, world.blocktypes["planks"])
|
||||||
|
|
||||||
def checkEqual(a, b):
|
def checkEqual(a, b):
|
||||||
"""
|
"""
|
||||||
@ -99,28 +99,28 @@ def testFill(world):
|
|||||||
for cy in chunk.bounds.sectionPositions(*cp):
|
for cy in chunk.bounds.sectionPositions(*cp):
|
||||||
assert chunk.getSection(cy) is not None, "Section %s not found" % cy
|
assert chunk.getSection(cy) is not None, "Section %s not found" % cy
|
||||||
|
|
||||||
checkEqual(dim.getBlocks(x, y, z).Blocks, world.blocktypes.OakWoodPlanks.ID)
|
checkEqual(dim.getBlocks(x, y, z).Blocks, world.blocktypes["planks"].ID)
|
||||||
|
|
||||||
dim.fillBlocks(box, world.blocktypes.Stone, [world.blocktypes.OakWoodPlanks])
|
dim.fillBlocks(box, world.blocktypes["stone"], [world.blocktypes["planks"]])
|
||||||
world.saveChanges()
|
world.saveChanges()
|
||||||
world.close()
|
world.close()
|
||||||
|
|
||||||
filename = world.filename
|
filename = world.filename
|
||||||
world = WorldEditor(filename)
|
world = WorldEditor(filename)
|
||||||
checkEqual(world.getDimension().getBlocks(x, y, z).Blocks, world.blocktypes.Stone.ID)
|
checkEqual(world.getDimension().getBlocks(x, y, z).Blocks, world.blocktypes["stone"].ID)
|
||||||
|
|
||||||
|
|
||||||
def testOldReplace(world):
|
def testOldReplace(world):
|
||||||
dim = world.getDimension()
|
dim = world.getDimension()
|
||||||
dim.fillBlocks(BoundingBox((-11, 0, -7), (38, dim.bounds.height, 25)), world.blocktypes.OakWoodPlanks,
|
dim.fillBlocks(BoundingBox((-11, 0, -7), (38, dim.bounds.height, 25)), world.blocktypes["planks"],
|
||||||
[world.blocktypes.Dirt, world.blocktypes.Grass])
|
[world.blocktypes["dirt"], world.blocktypes["grass"]])
|
||||||
|
|
||||||
|
|
||||||
def testMultiReplace(world):
|
def testMultiReplace(world):
|
||||||
dim = world.getDimension()
|
dim = world.getDimension()
|
||||||
dim.fillBlocks(BoundingBox((-11, 0, -7), (38, dim.bounds.height, 25)),
|
dim.fillBlocks(BoundingBox((-11, 0, -7), (38, dim.bounds.height, 25)),
|
||||||
[(world.blocktypes.OakWoodPlanks, world.blocktypes.Dirt),
|
[(world.blocktypes["planks"], world.blocktypes["dirt"]),
|
||||||
(world.blocktypes.Grass, world.blocktypes.IronOre)])
|
(world.blocktypes["grass"], world.blocktypes["iron_ore"])])
|
||||||
|
|
||||||
|
|
||||||
def testImport(world, sourceLevel):
|
def testImport(world, sourceLevel):
|
||||||
|
Reference in New Issue
Block a user