net.minecraft.world.gen.structure.StructureVillagePieces Java Examples

The following examples show how to use net.minecraft.world.gen.structure.StructureVillagePieces. 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: TofuVillagerHouse.java    From TofuCraftReload with MIT License 5 votes vote down vote up
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 #2
Source File: WAVillagerHouse.java    From Sakura_mod with MIT License 5 votes vote down vote up
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 #3
Source File: VillageHandlerGuardTower2.java    From ToroQuest with GNU General Public License v3.0 5 votes vote down vote up
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 #4
Source File: VillageHandlerKeep.java    From ToroQuest with GNU General Public License v3.0 5 votes vote down vote up
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 #5
Source File: TofuVillagerHouse.java    From TofuCraftReload with MIT License 4 votes vote down vote up
public TofuVillagerHouse(StructureVillagePieces.Start start, int type, Random rand, StructureBoundingBox p_i45571_4_, EnumFacing facing) {
    super(start, type);
    this.setCoordBaseMode(facing);
    this.boundingBox = p_i45571_4_;
}
 
Example #6
Source File: VillagerCreationTofu.java    From TofuCraftReload with MIT License 4 votes vote down vote up
@Override
public StructureVillagePieces.PieceWeight getVillagePieceWeight(Random random, int i) {
    return new PieceWeight(TofuVillagerHouse.class, 45, MathHelper.getInt(random, i, 4 + i));
}
 
Example #7
Source File: VillagerCreationTofu.java    From TofuCraftReload with MIT License 4 votes vote down vote up
@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 #8
Source File: WAVillagerHouse.java    From Sakura_mod with MIT License 4 votes vote down vote up
public WAVillagerHouse(StructureVillagePieces.Start start, int type, Random rand, StructureBoundingBox p_i45571_4_, EnumFacing facing)
{
    super(start, type);
    this.setCoordBaseMode(facing);
    this.boundingBox = p_i45571_4_;
}
 
Example #9
Source File: VillageHandlerBarracks.java    From ToroQuest with GNU General Public License v3.0 4 votes vote down vote up
public static VillagePieceBarracks 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 VillagePieceBarracks(start, p_175850_7_, rand, bounds, facing) : null;
}
 
Example #10
Source File: VillageHandlerGuardTower.java    From ToroQuest with GNU General Public License v3.0 4 votes vote down vote up
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 #11
Source File: VillagePieceBlockMap.java    From ToroQuest with GNU General Public License v3.0 4 votes vote down vote up
public VillagePieceBlockMap(String name, StructureVillagePieces.Start start, int type, Random rand, StructureBoundingBox bounds, EnumFacing facing) {
	super(start, type);
	this.name = name;
	this.setCoordBaseMode(facing);
	this.boundingBox = bounds;
}
 
Example #12
Source File: VillageHandlerShop.java    From ToroQuest with GNU General Public License v3.0 4 votes vote down vote up
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 #13
Source File: VillageHandlerTrophy.java    From ToroQuest with GNU General Public License v3.0 4 votes vote down vote up
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 #14
Source File: VillageHandlerCabin.java    From ToroQuest with GNU General Public License v3.0 3 votes vote down vote up
public static VillagePieceCabin 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 VillagePieceCabin(start, p_175850_7_, rand, bounds, facing) : null;
		}