public void loadData(NbtCompound tag) { foreach (NbtCompound compound in tag.Get <NbtList>("mineshafts")) { StructureMineshaft mineshaft = new StructureMineshaft(); mineshaft.readFromNbt(compound); this.mineshaftList.Add(mineshaft); } }
public override void readFromNbt(NbtCompound tag) { base.readFromNbt(tag); //this.stoneLayers.readFromNbt(tag.Get<NbtCompound>("stoneLayers")); foreach (NbtCompound compound in tag.Get <NbtList>("mineshafts")) { StructureMineshaft s = new StructureMineshaft(); s.readFromNbt(compound); this.mineshaftList.Add(s); } }
public PieceOrginBase(StructureMineshaft shaft, BlockPos shaftCenter) : base(shaft, new BlockPos(shaftCenter.x + 4, shaftCenter.y, shaftCenter.z)) { int i = 2; // this.shaft.rnd.Next(0, 5); if (i < 2) // 0, 1 { this.right = true; } else if (i == 2) // 2 { this.right = true; this.left = true; } else if (i > 2) // 3, 4 { this.left = true; } this.floorType = this.shaft.rnd.Next(0, 4) == 0 ? 1 : 0; }
public PieceOrginStorage(StructureMineshaft shaft, BlockPos shaftCenter) : base(shaft, shaftCenter) { this.unitsLong = this.shaft.rnd.Next(0, 2) + 2; this.calculateBounds(); }
public PieceOrginBedroom(StructureMineshaft shaft, BlockPos shaftCenter) : base(shaft, shaftCenter) { this.length = 7 + (this.shaft.rnd.Next(0, 3) * 2); this.calculateBounds(); }
public PieceSmallShaft(StructureMineshaft shaft, BlockPos orgin, int height, bool isBottom) : base(shaft, orgin) { this.height = height; this.isBottom = isBottom; this.calculateBounds(); }