コード例 #1
0
ファイル: worldeditor.py プロジェクト: Xelloss-HC/mcedit2
    def addTileEntity(self, ref):
        x, y, z = ref.Position
        cx, cz = chunk_pos(x, z)
        chunk = self.getChunk(cx, cz, create=True)
        existing = [old for old in chunk.TileEntities if old.Position == (x, y, z)]
        for e in existing:
            chunk.removeTileEntity(e)

        chunk.addTileEntity(ref.copy())
コード例 #2
0
ファイル: worldeditor.py プロジェクト: nikitakit/mcedit2
    def addTileEntity(self, ref):
        x, y, z = ref.Position
        cx, cz = chunk_pos(x, z)
        chunk = self.getChunk(cx, cz, create=True)
        existing = [old for old in chunk.TileEntities
                    if old.Position == (x, y, z)]
        for e in existing:
            chunk.removeTileEntity(e)

        chunk.addTileEntity(ref.copy())
コード例 #3
0
ファイル: worldeditor.py プロジェクト: pamunoz/mcedit2
 def addEntity(self, ref):
     x, y, z = ref.Position
     cx, cz = chunk_pos(x, z)
     chunk = self.getChunk(cx, cz, create=True)
     chunk.addEntity(ref.copy())
コード例 #4
0
 def addEntity(self, ref):
     x, y, z = ref.Position
     cx, cz = chunk_pos(x, z)
     chunk = self.getChunk(cx, cz, create=True)
     chunk.addEntity(ref.copy())