当前位置: 首页>>代码示例>>Java>>正文


Java StructureComponent.findIntersecting方法代码示例

本文整理汇总了Java中net.minecraft.world.gen.structure.StructureComponent.findIntersecting方法的典型用法代码示例。如果您正苦于以下问题:Java StructureComponent.findIntersecting方法的具体用法?Java StructureComponent.findIntersecting怎么用?Java StructureComponent.findIntersecting使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在net.minecraft.world.gen.structure.StructureComponent的用法示例。


在下文中一共展示了StructureComponent.findIntersecting方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: buildComponent

import net.minecraft.world.gen.structure.StructureComponent; //导入方法依赖的package包/类
@SuppressWarnings("rawtypes")
@Override
public Object buildComponent(PieceWeight villagePiece, Start startPiece, List pieces, Random random, int x, int y, int z, int coordBaseMode, int p5) {
  
  
  IStructureTemplate template = null;
  if(startPiece.inDesert && !desertTemplates.isEmpty()) {
    template = WeightedTemplate.getTemplate(desertTemplates);      
  } 
  if(template == null) {
    template = WeightedTemplate.getTemplate(templates);
  }
  if(template == null) {
    return null;
  }
  VillageHouse comp = new VillageHouse(template,villagerSpawnLocation, villagerId, x, y, z, coordBaseMode);
  VillageHouse res = canVillageGoDeeper(comp.getBoundingBox()) && StructureComponent.findIntersecting(pieces, comp.getBoundingBox()) == null
      ? comp : null;
  
  return res;
}
 
开发者ID:SleepyTrousers,项目名称:Structures,代码行数:22,代码来源:CreationHandler.java

示例2: func_74992_a

import net.minecraft.world.gen.structure.StructureComponent; //导入方法依赖的package包/类
public static StructureBoundingBox func_74992_a(List<StructureComponent> par1List, Random par1Random, int par2, int par3, int par4, EnumFacing par6)
{
	StructureBoundingBox structureboundingbox = StructureBoundingBox.getComponentToAddBoundingBox(par2, par3, par4, -1, -1, 0, 5, 5, 4, par6);
	StructureComponent structurecomponent = StructureComponent.findIntersecting(par1List, structureboundingbox);

	if (structurecomponent == null)
		return null;
	else
	{
		if (structurecomponent.getBoundingBox().minY == structureboundingbox.minY)
			for (int i1 = 3; i1 >= 1; --i1)
			{
				structureboundingbox = StructureBoundingBox.getComponentToAddBoundingBox(par2, par3, par4, -1, -1, 0, 5, 5, i1 - 1, par6);

				if (!structurecomponent.getBoundingBox().intersectsWith(structureboundingbox))
					return StructureBoundingBox.getComponentToAddBoundingBox(par2, par3, par4, -1, -1, 0, 5, 5, i1, par6);
			}

		return null;
	}
}
 
开发者ID:Shinoow,项目名称:AbyssalCraft,代码行数:22,代码来源:StructureAbyStrongholdPieces.java

示例3: buildComponent

import net.minecraft.world.gen.structure.StructureComponent; //导入方法依赖的package包/类
@Override
public Village buildComponent(PieceWeight villagePiece, Start startPiece, List<StructureComponent> pieces,
		Random random, int p1, int p2, int p3, EnumFacing facing, int p5) {
	StructureBoundingBox structureboundingbox = StructureBoundingBox.getComponentToAddBoundingBox(p1, p2, p3, 0,
			0, 0, 14, 16, 11, facing);
	return canVillageGoDeeper(structureboundingbox)
			&& StructureComponent.findIntersecting(pieces, structureboundingbox) == null
					? new MannCoBuilding(startPiece, p5, random, structureboundingbox, facing) : null;
}
 
开发者ID:rafradek,项目名称:Mods,代码行数:10,代码来源:MannCoBuilding.java

示例4: func_74933_a

import net.minecraft.world.gen.structure.StructureComponent; //导入方法依赖的package包/类
@SuppressWarnings("rawtypes")
public static StructureBoundingBox func_74933_a(StructureComponentVillageStartPiece par0ComponentVillageStartPiece, List par1List, Random par2Random, int par3, int par4, int par5, int par6)
{
    for (int var7 = 7 * MathHelper.getRandomIntegerInRange(par2Random, 3, 5); var7 >= 7; var7 -= 7)
    {
        final StructureBoundingBox var8 = StructureBoundingBox.getComponentToAddBoundingBox(par3, par4, par5, 0, 0, 0, 3, 3, var7, par6);

        if (StructureComponent.findIntersecting(par1List, var8) == null)
        {
            return var8;
        }
    }

    return null;
}
 
开发者ID:4Space,项目名称:4Space-5,代码行数:16,代码来源:StructureComponentVillagePathGen.java

示例5: func_74933_a

import net.minecraft.world.gen.structure.StructureComponent; //导入方法依赖的package包/类
@SuppressWarnings("rawtypes")
public static StructureBoundingBox func_74933_a(VillageStructureComponentStartPiece par0ComponentVillageStartPiece, List par1List, Random par2Random, int par3, int par4, int par5, int par6) {
	for (int var7 = 7 * MathHelper.getRandomIntegerInRange(par2Random, 3, 5); var7 >= 7; var7 -= 7) {
		final StructureBoundingBox var8 = StructureBoundingBox.getComponentToAddBoundingBox(par3, par4, par5, 0, 0, 0, 3, 3, var7, par6);

		if (StructureComponent.findIntersecting(par1List, var8) == null) {
			return var8;
		}
	}

	return null;
}
 
开发者ID:4Space,项目名称:4Space-5,代码行数:13,代码来源:VillageStructureComponentPathGen.java

示例6: createPiece

import net.minecraft.world.gen.structure.StructureComponent; //导入方法依赖的package包/类
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;
}
 
开发者ID:ToroCraft,项目名称:ToroQuest,代码行数:9,代码来源:VillageHandlerGuardTower2.java

示例7: buildComponent

import net.minecraft.world.gen.structure.StructureComponent; //导入方法依赖的package包/类
public static StructureVillagePieces.Village buildComponent(StructureVillagePieces.Start startPiece, 
		@SuppressWarnings("rawtypes") List pieces, Random random, int x, int y, int z, int direction, int type) {
       StructureBoundingBox _boundingBox = StructureBoundingBox.getComponentToAddBoundingBox(x, y, z, 0, 0, 0, 5, 8, 5, direction);
       if (canVillageGoDeeper(_boundingBox)) { 
       	if (StructureComponent.findIntersecting(pieces, _boundingBox) == null) {
       		return new CatapultTower(startPiece, type, random, _boundingBox, direction);
       	}
       }
	return null;
}
 
开发者ID:DracoAnimus,项目名称:Coding,代码行数:11,代码来源:CatapultTower.java

示例8: buildComponent

import net.minecraft.world.gen.structure.StructureComponent; //导入方法依赖的package包/类
public static StructureVillagePieces.Village buildComponent(StructureVillagePieces.Start startPiece, 
		@SuppressWarnings("rawtypes") List pieces, Random random, int x, int y, int z, int direction, int type) {
       StructureBoundingBox _boundingBox = StructureBoundingBox.getComponentToAddBoundingBox(x, y, z, 0, 0, 0, 5, 8, 5, direction);
       if (canVillageGoDeeper(_boundingBox)) { 
       	if (StructureComponent.findIntersecting(pieces, _boundingBox) == null) {
       		return new BallistaTower(startPiece, type, random, _boundingBox, direction);
       	}
       }
	return null;
}
 
开发者ID:DracoAnimus,项目名称:Coding,代码行数:11,代码来源:BallistaTower.java

示例9: buildComponent

import net.minecraft.world.gen.structure.StructureComponent; //导入方法依赖的package包/类
public static StructureVillagePieces.Village buildComponent(StructureVillagePieces.Start startPiece, 
		@SuppressWarnings("rawtypes") List pieces, Random random, int x, int y, int z, int direction, int type) {
       StructureBoundingBox _boundingBox = StructureBoundingBox.getComponentToAddBoundingBox(x, y, z, 0, 0, 0, 7, 14, 6, direction);
       if (canVillageGoDeeper(_boundingBox)) { 
       	if (StructureComponent.findIntersecting(pieces, _boundingBox) == null) {
       		return new VillageGuardTower(startPiece, type, _boundingBox, direction);
       	}
       }
	return null;
}
 
开发者ID:DracoAnimus,项目名称:Coding,代码行数:11,代码来源:VillageGuardTower.java

示例10: buildComponent

import net.minecraft.world.gen.structure.StructureComponent; //导入方法依赖的package包/类
public static StructureVillagePieces.Village buildComponent(StructureVillagePieces.Start startPiece, 
		@SuppressWarnings("rawtypes") List pieces, Random random, int x, int y, int z, int direction, int type) {
       StructureBoundingBox _boundingBox = StructureBoundingBox.getComponentToAddBoundingBox(x, y, z, 0, 0, 0, 23, 12, 21, direction);
       if (canVillageGoDeeper(_boundingBox)) { 
       	if (StructureComponent.findIntersecting(pieces, _boundingBox) == null) {
       		return new VillageKingCastle(startPiece, type, random, _boundingBox, direction);
       	}
       }
	return null;
}
 
开发者ID:DracoAnimus,项目名称:Coding,代码行数:11,代码来源:VillageKingCastle.java

示例11: buildComponent

import net.minecraft.world.gen.structure.StructureComponent; //导入方法依赖的package包/类
public static StructureVillagePieces.Village buildComponent(StructureVillagePieces.Start startPiece, 
		@SuppressWarnings("rawtypes") List pieces, Random random, int x, int y, int z, int direction, int type) {
       StructureBoundingBox _boundingBox = StructureBoundingBox.getComponentToAddBoundingBox(x, y, z, 0, 0, 0, 5, 10, 5, direction);
       if (canVillageGoDeeper(_boundingBox)) { 
       	if (StructureComponent.findIntersecting(pieces, _boundingBox) == null) {
       		return new TestBallistaTower(startPiece, type, random, _boundingBox, direction);
       	}
       }
	return null;
}
 
开发者ID:DracoAnimus,项目名称:Coding,代码行数:11,代码来源:TestBallistaTower.java

示例12: buildComponent

import net.minecraft.world.gen.structure.StructureComponent; //导入方法依赖的package包/类
public static StructureVillagePieces.Village buildComponent(StructureVillagePieces.Start startPiece, @SuppressWarnings("rawtypes") List pieces, Random random, int x, int y, int z, int direction, int type) {
       StructureBoundingBox _boundingBox = StructureBoundingBox.getComponentToAddBoundingBox(x, y, z, 0, 0, 0, 11, 6, 11, direction);
       if(canVillageGoDeeper(_boundingBox)){ 
       	if(StructureComponent.findIntersecting(pieces, _boundingBox) == null){
       		return new ComponentBakery(startPiece, type, random, _boundingBox, direction);
       	}
       }
	return null;
}
 
开发者ID:DracoAnimus,项目名称:Coding,代码行数:10,代码来源:ComponentBakery.java

示例13: buildComponent

import net.minecraft.world.gen.structure.StructureComponent; //导入方法依赖的package包/类
public static StructureVillagePieces.Village buildComponent(Start startPiece, @SuppressWarnings("rawtypes") List pieces, Random random, int x, int y, int z, int direction, int type) {
       StructureBoundingBox _boundingBox = StructureBoundingBox.getComponentToAddBoundingBox(x, y, z, 0, 0, 0, 14, 10, 8, direction);
       if(canVillageGoDeeper(_boundingBox)){ 
       	if(StructureComponent.findIntersecting(pieces, _boundingBox) == null){
       		return new VillageTavern(startPiece, type, random, _boundingBox, direction);
       	}
       }
	return null;
}
 
开发者ID:DracoAnimus,项目名称:Coding,代码行数:10,代码来源:VillageTavern.java

示例14: buildComponent

import net.minecraft.world.gen.structure.StructureComponent; //导入方法依赖的package包/类
public static StructureVillagePieces.Village buildComponent(StructureVillagePieces.Start startPiece, 
		@SuppressWarnings("rawtypes") List pieces, Random random, int x, int y, int z, int direction, int type) {
       StructureBoundingBox _boundingBox = StructureBoundingBox.getComponentToAddBoundingBox(x, y, z, 0, 0, 0, 5, 10, 5, direction);
       if (canVillageGoDeeper(_boundingBox)) { 
       	if (StructureComponent.findIntersecting(pieces, _boundingBox) == null) {
       		return new TestCatapultTower(startPiece, type, random, _boundingBox, direction);
       	}
       }
	return null;
}
 
开发者ID:DracoAnimus,项目名称:Coding,代码行数:11,代码来源:TestCatapultTower.java

示例15: buildComponent

import net.minecraft.world.gen.structure.StructureComponent; //导入方法依赖的package包/类
public static StructureVillagePieces.Village buildComponent(StructureVillagePieces.Start startPiece, @SuppressWarnings("rawtypes") List pieces, Random random, int x, int y, int z, int direction, int type) {
       StructureBoundingBox _boundingBox = StructureBoundingBox.getComponentToAddBoundingBox(x, y, z, 0, 0, 0, 14, 10, 8, direction);
       if(canVillageGoDeeper(_boundingBox)){ 
       	if(StructureComponent.findIntersecting(pieces, _boundingBox) == null){
       		return new VillageWall(startPiece, type, random, _boundingBox, direction);
       	}
       }
	return null;
}
 
开发者ID:DracoAnimus,项目名称:Coding,代码行数:10,代码来源:VillageWall.java


注:本文中的net.minecraft.world.gen.structure.StructureComponent.findIntersecting方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。