From f1a8bf76fc618018be1a3a187e06101f7129cb3d Mon Sep 17 00:00:00 2001 From: David Vierra Date: Mon, 12 Dec 2011 19:07:26 -1000 Subject: [PATCH] Set HeightMap to all zeros in the Nether to match what the game does. Otherwise, Nether Wart won't plant in low light. --- infiniteworld.py | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/infiniteworld.py b/infiniteworld.py index 6a01244..2024fcc 100644 --- a/infiniteworld.py +++ b/infiniteworld.py @@ -38,8 +38,12 @@ SizeOnDisk = 'SizeOnDisk' #maybe update this? Time = 'Time' Player = 'Player' +DIM_NETHER = -1 +DIM_END = 1 + __all__ = ["ZeroChunk", "InfdevChunk", "ChunkedLevelMixin", "MCInfdevOldLevel", "MCAlphaDimension", "ZipSchematic"] + import re convert = lambda text: int(text) if text.isdigit() else text @@ -853,7 +857,10 @@ class InfdevChunk(EntityLevel): return self.isLoaded() and self.root_tag == None def generateHeightMap(self): - extractLightMap(self.materials, self.Blocks, self.HeightMap) + if self.world.dimNo == DIM_NETHER: + self.HeightMap[:] = 0 + else: + extractLightMap(self.materials, self.Blocks, self.HeightMap) def chunkChanged(self, calcLighting=True): """ You are required to call this function after you are done modifying