net.minecraft.world.gen.structure.StructureComponent Java Examples
The following examples show how to use
net.minecraft.world.gen.structure.StructureComponent.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: StructureTofuVillagePieces.java From TofuCraftReload with MIT License | 6 votes |
private static StructureComponent generateAndAddComponent(Start start, List<StructureComponent> structureComponents, Random rand, int structureMinX, int structureMinY, int structureMinZ, EnumFacing facing, int componentType) { if (componentType > 50) { return null; } else if (Math.abs(structureMinX - start.getBoundingBox().minX) <= 112 && Math.abs(structureMinZ - start.getBoundingBox().minZ) <= 112) { StructureComponent structurecomponent = generateComponent(start, structureComponents, rand, structureMinX, structureMinY, structureMinZ, facing, componentType + 1); if (structurecomponent != null) { structureComponents.add(structurecomponent); start.pendingHouses.add(structurecomponent); return structurecomponent; } else { return null; } } else { return null; } }
Example #2
Source File: StructureTofuMineshaftStart.java From TofuCraftReload with MIT License | 6 votes |
public StructureTofuMineshaftStart(World p_i47149_1_, Random p_i47149_2_, int p_i47149_3_, int p_i47149_4_, MapGenTofuMineshaft.Type p_i47149_5_) { super(p_i47149_3_, p_i47149_4_); this.mineShaftType = p_i47149_5_; StructureTofuMineshaftPieces.Room structuremineshaftpieces$room = new StructureTofuMineshaftPieces.Room(0, p_i47149_2_, (p_i47149_3_ << 4) + 2, (p_i47149_4_ << 4) + 2, this.mineShaftType); this.components.add(structuremineshaftpieces$room); structuremineshaftpieces$room.buildComponent(structuremineshaftpieces$room, this.components, p_i47149_2_); this.updateBoundingBox(); if (p_i47149_5_ == MapGenTofuMineshaft.Type.BUILDING) { int j = p_i47149_1_.getSeaLevel() - this.boundingBox.maxY + this.boundingBox.getYSize() / 2 - -5; this.boundingBox.offset(0, j, 0); for (StructureComponent structurecomponent : this.components) { structurecomponent.offset(0, j, 0); } } else { this.markAvailableHeight(p_i47149_1_, p_i47149_2_, 10); } }
Example #3
Source File: StructureTofuMineshaftPieces.java From TofuCraftReload with MIT License | 6 votes |
/** * Initiates construction of the Structure Component picked, at the current Location of StructGen */ public void buildComponent(StructureComponent componentIn, List<StructureComponent> listIn, Random rand) { int i = this.getComponentType(); EnumFacing enumfacing = this.getCoordBaseMode(); if (enumfacing != null) { switch (enumfacing) { case NORTH: default: StructureTofuMineshaftPieces.generateAndAddPiece(componentIn, listIn, rand, this.boundingBox.minX, this.boundingBox.minY, this.boundingBox.minZ - 1, EnumFacing.NORTH, i); break; case SOUTH: StructureTofuMineshaftPieces.generateAndAddPiece(componentIn, listIn, rand, this.boundingBox.minX, this.boundingBox.minY, this.boundingBox.maxZ + 1, EnumFacing.SOUTH, i); break; case WEST: StructureTofuMineshaftPieces.generateAndAddPiece(componentIn, listIn, rand, this.boundingBox.minX - 1, this.boundingBox.minY, this.boundingBox.minZ, EnumFacing.WEST, i); break; case EAST: StructureTofuMineshaftPieces.generateAndAddPiece(componentIn, listIn, rand, this.boundingBox.maxX + 1, this.boundingBox.minY, this.boundingBox.minZ, EnumFacing.EAST, i); } } }
Example #4
Source File: StructureTofuMineshaftPieces.java From TofuCraftReload with MIT License | 6 votes |
public static StructureBoundingBox findStairs(List<StructureComponent> listIn, Random rand, int x, int y, int z, EnumFacing facing) { StructureBoundingBox structureboundingbox = new StructureBoundingBox(x, y - 5, z, x, y + 2, z); switch (facing) { case NORTH: default: structureboundingbox.maxX = x + 2; structureboundingbox.minZ = z - 8; break; case SOUTH: structureboundingbox.maxX = x + 2; structureboundingbox.maxZ = z + 8; break; case WEST: structureboundingbox.minX = x - 8; structureboundingbox.maxZ = z + 2; break; case EAST: structureboundingbox.maxX = x + 8; structureboundingbox.maxZ = z + 2; } return StructureComponent.findIntersecting(listIn, structureboundingbox) != null ? null : structureboundingbox; }
Example #5
Source File: StructureTofuVillagePieces.java From TofuCraftReload with MIT License | 6 votes |
/** * Gets the next village component, with the bounding box shifted -1 in the X and Z direction. */ protected StructureComponent getNextComponentNN(Start start, List<StructureComponent> structureComponents, Random rand, int p_74891_4_, int p_74891_5_) { EnumFacing enumfacing = this.getCoordBaseMode(); if (enumfacing != null) { switch (enumfacing) { case NORTH: default: return generateAndAddComponent(start, structureComponents, rand, this.boundingBox.minX - 1, this.boundingBox.minY + p_74891_4_, this.boundingBox.minZ + p_74891_5_, EnumFacing.WEST, this.getComponentType()); case SOUTH: return generateAndAddComponent(start, structureComponents, rand, this.boundingBox.minX - 1, this.boundingBox.minY + p_74891_4_, this.boundingBox.minZ + p_74891_5_, EnumFacing.WEST, this.getComponentType()); case WEST: return generateAndAddComponent(start, structureComponents, rand, this.boundingBox.minX + p_74891_5_, this.boundingBox.minY + p_74891_4_, this.boundingBox.minZ - 1, EnumFacing.NORTH, this.getComponentType()); case EAST: return generateAndAddComponent(start, structureComponents, rand, this.boundingBox.minX + p_74891_5_, this.boundingBox.minY + p_74891_4_, this.boundingBox.minZ - 1, EnumFacing.NORTH, this.getComponentType()); } } else { return null; } }
Example #6
Source File: StructureTofuVillagePieces.java From TofuCraftReload with MIT License | 6 votes |
/** * Gets the next village component, with the bounding box shifted +1 in the X and Z direction. */ protected StructureComponent getNextComponentPP(Start start, List<StructureComponent> structureComponents, Random rand, int p_74894_4_, int p_74894_5_) { EnumFacing enumfacing = this.getCoordBaseMode(); if (enumfacing != null) { switch (enumfacing) { case NORTH: default: return generateAndAddComponent(start, structureComponents, rand, this.boundingBox.maxX + 1, this.boundingBox.minY + p_74894_4_, this.boundingBox.minZ + p_74894_5_, EnumFacing.EAST, this.getComponentType()); case SOUTH: return generateAndAddComponent(start, structureComponents, rand, this.boundingBox.maxX + 1, this.boundingBox.minY + p_74894_4_, this.boundingBox.minZ + p_74894_5_, EnumFacing.EAST, this.getComponentType()); case WEST: return generateAndAddComponent(start, structureComponents, rand, this.boundingBox.minX + p_74894_5_, this.boundingBox.minY + p_74894_4_, this.boundingBox.maxZ + 1, EnumFacing.SOUTH, this.getComponentType()); case EAST: return generateAndAddComponent(start, structureComponents, rand, this.boundingBox.minX + p_74894_5_, this.boundingBox.minY + p_74894_4_, this.boundingBox.maxZ + 1, EnumFacing.SOUTH, this.getComponentType()); } } else { return null; } }
Example #7
Source File: StructureTofuMineshaftPieces.java From TofuCraftReload with MIT License | 6 votes |
private static StructureTofuMineshaftPieces.Peice generateAndAddPiece(StructureComponent p_189938_0_, List<StructureComponent> p_189938_1_, Random p_189938_2_, int p_189938_3_, int p_189938_4_, int p_189938_5_, EnumFacing p_189938_6_, int p_189938_7_) { if (p_189938_7_ > 8) { return null; } else if (Math.abs(p_189938_3_ - p_189938_0_.getBoundingBox().minX) <= 80 && Math.abs(p_189938_5_ - p_189938_0_.getBoundingBox().minZ) <= 80) { MapGenTofuMineshaft.Type mapgenmineshaft$type = ((StructureTofuMineshaftPieces.Peice) p_189938_0_).mineShaftType; StructureTofuMineshaftPieces.Peice structuremineshaftpieces$peice = createRandomShaftPiece(p_189938_1_, p_189938_2_, p_189938_3_, p_189938_4_, p_189938_5_, p_189938_6_, p_189938_7_ + 1, mapgenmineshaft$type); if (structuremineshaftpieces$peice != null) { p_189938_1_.add(structuremineshaftpieces$peice); structuremineshaftpieces$peice.buildComponent(p_189938_0_, p_189938_1_, p_189938_2_); } return structuremineshaftpieces$peice; } else { return null; } }
Example #8
Source File: StructureTofuMineshaftPieces.java From TofuCraftReload with MIT License | 6 votes |
private static StructureTofuMineshaftPieces.Peice createRandomShaftPiece(List<StructureComponent> p_189940_0_, Random p_189940_1_, int p_189940_2_, int p_189940_3_, int p_189940_4_, @Nullable EnumFacing p_189940_5_, int p_189940_6_, MapGenTofuMineshaft.Type p_189940_7_) { int i = p_189940_1_.nextInt(100); if (i >= 80) { StructureBoundingBox structureboundingbox = StructureTofuMineshaftPieces.Cross.findCrossing(p_189940_0_, p_189940_1_, p_189940_2_, p_189940_3_, p_189940_4_, p_189940_5_); if (structureboundingbox != null) { return new StructureTofuMineshaftPieces.Cross(p_189940_6_, p_189940_1_, structureboundingbox, p_189940_5_, p_189940_7_); } } else if (i >= 70) { StructureBoundingBox structureboundingbox1 = StructureTofuMineshaftPieces.Stairs.findStairs(p_189940_0_, p_189940_1_, p_189940_2_, p_189940_3_, p_189940_4_, p_189940_5_); if (structureboundingbox1 != null) { return new StructureTofuMineshaftPieces.Stairs(p_189940_6_, p_189940_1_, structureboundingbox1, p_189940_5_, p_189940_7_); } } else { StructureBoundingBox structureboundingbox2 = StructureTofuMineshaftPieces.Corridor.findCorridorSize(p_189940_0_, p_189940_1_, p_189940_2_, p_189940_3_, p_189940_4_, p_189940_5_); if (structureboundingbox2 != null) { return new StructureTofuMineshaftPieces.Corridor(p_189940_6_, p_189940_1_, structureboundingbox2, p_189940_5_, p_189940_7_); } } return null; }
Example #9
Source File: StructureTofuMineshaftPieces.java From TofuCraftReload with MIT License | 5 votes |
public static StructureBoundingBox findCrossing(List<StructureComponent> listIn, Random rand, int x, int y, int z, EnumFacing facing) { StructureBoundingBox structureboundingbox = new StructureBoundingBox(x, y, z, x, y + 2, z); if (rand.nextInt(4) == 0) { structureboundingbox.maxY += 4; } switch (facing) { case NORTH: default: structureboundingbox.minX = x - 1; structureboundingbox.maxX = x + 3; structureboundingbox.minZ = z - 4; break; case SOUTH: structureboundingbox.minX = x - 1; structureboundingbox.maxX = x + 3; structureboundingbox.maxZ = z + 3 + 1; break; case WEST: structureboundingbox.minX = x - 4; structureboundingbox.minZ = z - 1; structureboundingbox.maxZ = z + 3; break; case EAST: structureboundingbox.maxX = x + 3 + 1; structureboundingbox.minZ = z - 1; structureboundingbox.maxZ = z + 3; } return StructureComponent.findIntersecting(listIn, structureboundingbox) != null ? null : structureboundingbox; }
Example #10
Source File: VillageHandlerKeep.java From ToroQuest with GNU General Public License v3.0 | 5 votes |
public static VillagePieceKeep createPiece(StructureVillagePieces.Start start, List<StructureComponent> structures, Random rand, int x, int y, int z, EnumFacing facing, int p_175850_7_) { BlockPos size = new BlockMapMeasurer(NAME).measure(); StructureBoundingBox bounds = StructureBoundingBox.getComponentToAddBoundingBox(x, y, z, 0, 0, 0, size.getX(), size.getY(), size.getZ(), facing); return canVillageGoDeeper(bounds) && StructureComponent.findIntersecting(structures, bounds) == null ? new VillagePieceKeep(start, p_175850_7_, rand, bounds, facing) : null; }
Example #11
Source File: VillageHandlerGuardTower2.java From ToroQuest with GNU General Public License v3.0 | 5 votes |
public static VillagePieceGuardTower2 createPiece(StructureVillagePieces.Start start, List<StructureComponent> structures, Random rand, int x, int y, int z, EnumFacing facing, int p_175850_7_) { BlockPos size = new BlockMapMeasurer(NAME).measure(); StructureBoundingBox bounds = StructureBoundingBox.getComponentToAddBoundingBox(x, y, z, 0, 0, 0, size.getX(), size.getY(), size.getZ(), facing); return canVillageGoDeeper(bounds) && StructureComponent.findIntersecting(structures, bounds) == null ? new VillagePieceGuardTower2(start, p_175850_7_, rand, bounds, facing) : null; }
Example #12
Source File: WAVillagerHouse.java From Sakura_mod with MIT License | 5 votes |
public static WAVillagerHouse createPiece(StructureVillagePieces.Start start, List<StructureComponent> list, Random rand, int minX, int minY, int minZ, EnumFacing facing, int type) { StructureBoundingBox box = StructureBoundingBox .getComponentToAddBoundingBox(minX, minY, minZ, 0, 0, 0, 9, 9, 6, facing); return StructureComponent.findIntersecting(list, box) != null ? null : new WAVillagerHouse(start, type, rand, box, facing); }
Example #13
Source File: MapGenTofuCastle.java From TofuCraftReload with MIT License | 5 votes |
/** * Keeps iterating Structure Pieces and spawning them until the checks tell it to stop */ public void generateStructure(World worldIn, Random rand, StructureBoundingBox structurebb) { super.generateStructure(worldIn, rand, structurebb); int i = this.boundingBox.minY; for (int j = structurebb.minX; j <= structurebb.maxX; ++j) { for (int k = structurebb.minZ; k <= structurebb.maxZ; ++k) { BlockPos blockpos = new BlockPos(j, i, k); if (!worldIn.isAirBlock(blockpos) && this.boundingBox.isVecInside(blockpos)) { boolean flag = false; for (StructureComponent structurecomponent : this.components) { if (structurecomponent.getBoundingBox().isVecInside(blockpos)) { flag = true; break; } } if (flag) { for (int l = i - 1; l > 1; --l) { BlockPos blockpos1 = new BlockPos(j, l, k); if (!worldIn.isAirBlock(blockpos1) && !worldIn.getBlockState(blockpos1).getMaterial().isLiquid()) { break; } worldIn.setBlockState(blockpos1, BlockLoader.tofuTerrain.getDefaultState(), 2); } } } } } }
Example #14
Source File: TofuVillagerHouse.java From TofuCraftReload with MIT License | 5 votes |
public static TofuVillagerHouse createPiece(StructureVillagePieces.Start start, List<StructureComponent> list, Random rand, int minX, int minY, int minZ, EnumFacing facing, int type) { StructureBoundingBox box = StructureBoundingBox .getComponentToAddBoundingBox(minX, minY, minZ, 0, 0, 0, 6, 10, 6, facing); return StructureComponent.findIntersecting(list, box) != null ? null : new TofuVillagerHouse(start, type, rand, box, facing); }
Example #15
Source File: StructureTofuMineshaftPieces.java From TofuCraftReload with MIT License | 5 votes |
public static StructureBoundingBox findCorridorSize(List<StructureComponent> p_175814_0_, Random rand, int x, int y, int z, EnumFacing facing) { StructureBoundingBox structureboundingbox = new StructureBoundingBox(x, y, z, x, y + 2, z); int i; for (i = rand.nextInt(3) + 2; i > 0; --i) { int j = i * 5; switch (facing) { case NORTH: default: structureboundingbox.maxX = x + 2; structureboundingbox.minZ = z - (j - 1); break; case SOUTH: structureboundingbox.maxX = x + 2; structureboundingbox.maxZ = z + (j - 1); break; case WEST: structureboundingbox.minX = x - (j - 1); structureboundingbox.maxZ = z + 2; break; case EAST: structureboundingbox.maxX = x + (j - 1); structureboundingbox.maxZ = z + 2; } if (StructureComponent.findIntersecting(p_175814_0_, structureboundingbox) == null) { break; } } return i > 0 ? structureboundingbox : null; }
Example #16
Source File: MapGenTofuVillage.java From TofuCraftReload with MIT License | 5 votes |
public Start(World worldIn, Random rand, int x, int z, int size) { super(x, z); List<StructureTofuVillagePieces.PieceWeight> list = StructureTofuVillagePieces.getStructureVillageWeightedPieceList(rand, size); StructureTofuVillagePieces.Start structurevillagepieces$start = new StructureTofuVillagePieces.Start(worldIn.getBiomeProvider(), 0, rand, (x << 4) + 2, (z << 4) + 2, list, size); this.components.add(structurevillagepieces$start); structurevillagepieces$start.buildComponent(structurevillagepieces$start, this.components, rand); List<StructureComponent> list1 = structurevillagepieces$start.pendingRoads; List<StructureComponent> list2 = structurevillagepieces$start.pendingHouses; while (!list1.isEmpty() || !list2.isEmpty()) { if (list1.isEmpty()) { int i = rand.nextInt(list2.size()); StructureComponent structurecomponent = list2.remove(i); structurecomponent.buildComponent(structurevillagepieces$start, this.components, rand); } else { int j = rand.nextInt(list1.size()); StructureComponent structurecomponent2 = list1.remove(j); structurecomponent2.buildComponent(structurevillagepieces$start, this.components, rand); } } this.updateBoundingBox(); int k = 0; for (StructureComponent structurecomponent1 : this.components) { if (!(structurecomponent1 instanceof StructureTofuVillagePieces.Road)) { ++k; } } this.hasMoreThanTwoComponents = k > 2; }
Example #17
Source File: StructureTofuVillagePieces.java From TofuCraftReload with MIT License | 5 votes |
/** * Initiates construction of the Structure Component picked, at the current Location of StructGen */ public void buildComponent(StructureComponent componentIn, List<StructureComponent> listIn, Random rand) { generateAndAddRoadPiece((Start) componentIn, listIn, rand, this.boundingBox.minX - 1, this.boundingBox.maxY - 4, this.boundingBox.minZ + 1, EnumFacing.WEST, this.getComponentType()); generateAndAddRoadPiece((Start) componentIn, listIn, rand, this.boundingBox.maxX + 1, this.boundingBox.maxY - 4, this.boundingBox.minZ + 1, EnumFacing.EAST, this.getComponentType()); generateAndAddRoadPiece((Start) componentIn, listIn, rand, this.boundingBox.minX + 1, this.boundingBox.maxY - 4, this.boundingBox.minZ - 1, EnumFacing.NORTH, this.getComponentType()); generateAndAddRoadPiece((Start) componentIn, listIn, rand, this.boundingBox.minX + 1, this.boundingBox.maxY - 4, this.boundingBox.maxZ + 1, EnumFacing.SOUTH, this.getComponentType()); }
Example #18
Source File: StructureTofuVillagePieces.java From TofuCraftReload with MIT License | 5 votes |
public static StructureBoundingBox findPieceBox(Start start, List<StructureComponent> p_175848_1_, Random rand, int p_175848_3_, int p_175848_4_, int p_175848_5_, EnumFacing facing) { for (int i = 7 * MathHelper.getInt(rand, 3, 5); i >= 7; i -= 7) { StructureBoundingBox structureboundingbox = StructureBoundingBox.getComponentToAddBoundingBox(p_175848_3_, p_175848_4_, p_175848_5_, 0, 0, 0, 3, 3, i, facing); if (StructureComponent.findIntersecting(p_175848_1_, structureboundingbox) == null) { return structureboundingbox; } } return null; }
Example #19
Source File: StructureTofuVillagePieces.java From TofuCraftReload with MIT License | 5 votes |
private static StructureComponent generateAndAddRoadPiece(Start start, List<StructureComponent> p_176069_1_, Random rand, int p_176069_3_, int p_176069_4_, int p_176069_5_, EnumFacing facing, int p_176069_7_) { if (p_176069_7_ > 3 + start.terrainType) { return null; } else if (Math.abs(p_176069_3_ - start.getBoundingBox().minX) <= 112 && Math.abs(p_176069_5_ - start.getBoundingBox().minZ) <= 112) { StructureBoundingBox structureboundingbox = Path.findPieceBox(start, p_176069_1_, rand, p_176069_3_, p_176069_4_, p_176069_5_, facing); if (structureboundingbox != null && structureboundingbox.minY > 10) { StructureComponent structurecomponent = new Path(start, p_176069_7_, rand, structureboundingbox, facing); p_176069_1_.add(structurecomponent); start.pendingRoads.add(structurecomponent); return structurecomponent; } else { return null; } } else { return null; } }
Example #20
Source File: StructureTofuVillagePieces.java From TofuCraftReload with MIT License | 5 votes |
private static Village findAndCreateComponentFactory(Start start, PieceWeight weight, List<StructureComponent> structureComponents, Random rand, int structureMinX, int structureMinY, int structureMinZ, EnumFacing facing, int componentType) { Class<? extends StructureTofuVillagePieces.Village> oclass = weight.villagePieceClass; // StructureBoundingBox structureboundingbox = Torch.findPieceBox(start, structureComponents, rand, structureMinX, structureMinY, structureMinZ, facing); Object village = null; if (oclass == StructureTofuVillagePieces.WoodHut.class) { village = WoodHut.createPiece(start, structureComponents, rand, structureMinX, structureMinY, structureMinZ, facing, componentType); } else if (oclass == StructureTofuVillagePieces.House.class) { village = House.createPiece(start, structureComponents, rand, structureMinX, structureMinY, structureMinZ, facing, componentType); } else if (oclass == StructureTofuVillagePieces.FarmLand.class) { village = FarmLand.createPiece(start, structureComponents, rand, structureMinX, structureMinY, structureMinZ, facing, componentType); } else if (oclass == StructureTofuVillagePieces.TorchNew.class) { village = TorchNew.createPiece(start, structureComponents, rand, structureMinX, structureMinY, structureMinZ, facing, componentType); } else if (oclass == StructureTofuVillagePieces.TallTofuHouse.class) { village = StructureTofuVillagePieces.TallTofuHouse.createPiece(start, structureComponents, rand, structureMinX, structureMinY, structureMinZ, facing, componentType); } return (Village) village; }
Example #21
Source File: VillagerCreationWA.java From Sakura_mod with MIT License | 4 votes |
@Override public Village buildComponent(PieceWeight villagePiece, Start startPiece, List<StructureComponent> pieces, Random random, int p1, int p2, int p3, EnumFacing facing, int p5) { return WAVillagerHouse.createPiece(startPiece, pieces, random, p1, p2, p3, facing, p5); }
Example #22
Source File: VillagerCreationTofu.java From TofuCraftReload with MIT License | 4 votes |
@Override public Village buildComponent(StructureVillagePieces.PieceWeight villagePiece, StructureVillagePieces.Start startPiece, List<StructureComponent> pieces, Random random, int p1, int p2, int p3, EnumFacing facing, int p5) { return TofuVillagerHouse.createPiece(startPiece, pieces, random, p1, p2, p3, facing, p5); }
Example #23
Source File: VillageHandlerKeep.java From ToroQuest with GNU General Public License v3.0 | 4 votes |
@Override public Village buildComponent(PieceWeight villagePiece, Start startPiece, List<StructureComponent> pieces, Random random, int p1, int p2, int p3, EnumFacing facing, int p5) { return VillagePieceKeep.createPiece(startPiece, pieces, random, p1, p2, p3, facing, p5); }
Example #24
Source File: VillageHandlerTrophy.java From ToroQuest with GNU General Public License v3.0 | 4 votes |
public static VillagePieceTrophy createPiece(StructureVillagePieces.Start start, List<StructureComponent> structures, Random rand, int x, int y, int z, EnumFacing facing, int p_175850_7_) { BlockPos size = new BlockMapMeasurer(NAME).measure(); StructureBoundingBox bounds = StructureBoundingBox.getComponentToAddBoundingBox(x, y, z, 0, 0, 0, size.getX(), size.getY(), size.getZ(), facing); return canVillageGoDeeper(bounds) && StructureComponent.findIntersecting(structures, bounds) == null ? new VillagePieceTrophy(start, p_175850_7_, rand, bounds, facing) : null; }
Example #25
Source File: VillageHandlerTrophy.java From ToroQuest with GNU General Public License v3.0 | 4 votes |
@Override public Village buildComponent(PieceWeight villagePiece, Start startPiece, List<StructureComponent> pieces, Random random, int p1, int p2, int p3, EnumFacing facing, int p5) { return VillagePieceTrophy.createPiece(startPiece, pieces, random, p1, p2, p3, facing, p5); }
Example #26
Source File: VillageHandlerShop.java From ToroQuest with GNU General Public License v3.0 | 4 votes |
public static VillagePieceShop createPiece(StructureVillagePieces.Start start, List<StructureComponent> structures, Random rand, int x, int y, int z, EnumFacing facing, int p_175850_7_) { BlockPos size = new BlockMapMeasurer(NAME).measure(); StructureBoundingBox bounds = StructureBoundingBox.getComponentToAddBoundingBox(x, y, z, 0, 0, 0, size.getX(), size.getY(), size.getZ(), facing); return canVillageGoDeeper(bounds) && StructureComponent.findIntersecting(structures, bounds) == null ? new VillagePieceShop(start, p_175850_7_, rand, bounds, facing) : null; }
Example #27
Source File: VillageHandlerShop.java From ToroQuest with GNU General Public License v3.0 | 4 votes |
@Override public Village buildComponent(PieceWeight villagePiece, Start startPiece, List<StructureComponent> pieces, Random random, int p1, int p2, int p3, EnumFacing facing, int p5) { return VillagePieceShop.createPiece(startPiece, pieces, random, p1, p2, p3, facing, p5); }
Example #28
Source File: VillageHandlerGuardTower.java From ToroQuest with GNU General Public License v3.0 | 4 votes |
public static VillagePieceGuardTower createPiece(StructureVillagePieces.Start start, List<StructureComponent> structures, Random rand, int x, int y, int z, EnumFacing facing, int p_175850_7_) { BlockPos size = new BlockMapMeasurer(NAME).measure(); StructureBoundingBox bounds = StructureBoundingBox.getComponentToAddBoundingBox(x, y, z, 0, 0, 0, size.getX(), size.getY(), size.getZ(), facing); return canVillageGoDeeper(bounds) && StructureComponent.findIntersecting(structures, bounds) == null ? new VillagePieceGuardTower(start, p_175850_7_, rand, bounds, facing) : null; }
Example #29
Source File: VillageHandlerGuardTower.java From ToroQuest with GNU General Public License v3.0 | 4 votes |
@Override public Village buildComponent(PieceWeight villagePiece, Start startPiece, List<StructureComponent> pieces, Random random, int p1, int p2, int p3, EnumFacing facing, int p5) { return VillagePieceGuardTower.createPiece(startPiece, pieces, random, p1, p2, p3, facing, p5); }
Example #30
Source File: VillageHandlerCabin.java From ToroQuest with GNU General Public License v3.0 | 4 votes |
@Override public Village buildComponent(PieceWeight villagePiece, Start startPiece, List<StructureComponent> pieces, Random random, int p1, int p2, int p3, EnumFacing facing, int p5) { return VillagePieceCabin.createPiece(startPiece, pieces, random, p1, p2, p3, facing, p5); }