• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

Java StructureStart类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了Java中net.minecraft.world.gen.structure.StructureStart的典型用法代码示例。如果您正苦于以下问题:Java StructureStart类的具体用法?Java StructureStart怎么用?Java StructureStart使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



StructureStart类属于net.minecraft.world.gen.structure包,在下文中一共展示了StructureStart类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。

示例1: generateStructuresInChunk

import net.minecraft.world.gen.structure.StructureStart; //导入依赖的package包/类
public boolean generateStructuresInChunk(World par1World, Random par2Random, int par3, int par4) {
	final int var5 = (par3 << 4) + 8;
	final int var6 = (par4 << 4) + 8;
	boolean var7 = false;
	final Iterator<?> var8 = this.structureMap.values().iterator();

	while (var8.hasNext()) {
		final StructureStart var9 = (StructureStart) var8.next();

		if (var9 != null && var9.isSizeableStructure() && var9.getBoundingBox().intersectsWith(var5, var6, var5 + 15, var6 + 15)) {
			var9.generateStructure(par1World, par2Random, new StructureBoundingBox(var5, var6, var5 + 15, var6 + 15));
			var7 = true;
		}
	}
	return var7;
}
 
开发者ID:4Space,项目名称:4Space-5,代码行数:17,代码来源:PitMapGenStructure.java


示例2: generateStructure

import net.minecraft.world.gen.structure.StructureStart; //导入依赖的package包/类
/**
 * @author jamierocks - 25th October 2016
 * @reason Prevent CME
 */
@Overwrite
public boolean generateStructure(World worldIn, Random randomIn, ChunkCoordIntPair chunkCoord) {
    this.initializeStructureData(worldIn);
    int i = (chunkCoord.chunkXPos << 4) + 8;
    int j = (chunkCoord.chunkZPos << 4) + 8;
    boolean flag = false;

    synchronized (this.structureMap) { // Neptune - prevent CME
        for (StructureStart structurestart : this.structureMap.values()) {
            if (structurestart.isSizeableStructure() && structurestart.func_175788_a(chunkCoord) && structurestart.getBoundingBox()
                    .intersectsWith(i, j, i + 15, j + 15)) {
                structurestart.generateStructure(worldIn, randomIn, new StructureBoundingBox(i, j, i + 15, j + 15));
                structurestart.func_175787_b(chunkCoord);
                flag = true;
                this.setStructureStart(structurestart.getChunkPosX(), structurestart.getChunkPosZ(), structurestart);
            }
        }
    }

    return flag;
}
 
开发者ID:NeptunePowered,项目名称:NeptuneMod,代码行数:26,代码来源:MixinMapGenStructure_Performance.java


示例3: func_75037_a

import net.minecraft.world.gen.structure.StructureStart; //导入依赖的package包/类
protected final void func_75037_a(World p_75037_1_, int p_75037_2_, int p_75037_3_, int p_75037_4_, int p_75037_5_, byte[] p_75037_6_) {
   this.func_143027_a(p_75037_1_);
   if(!this.field_75053_d.containsKey(Long.valueOf(ChunkCoordIntPair.func_77272_a(p_75037_2_, p_75037_3_)))) {
      this.field_75038_b.nextInt();

      try {
         if(this.func_75047_a(p_75037_2_, p_75037_3_)) {
            StructureStart var7 = this.func_75049_b(p_75037_2_, p_75037_3_);
            this.field_75053_d.put(Long.valueOf(ChunkCoordIntPair.func_77272_a(p_75037_2_, p_75037_3_)), var7);
            this.func_143026_a(p_75037_2_, p_75037_3_, var7);
         }

      } catch (Throwable var10) {
         CrashReport var8 = CrashReport.func_85055_a(var10, "Exception preparing structure feature");
         CrashReportCategory var9 = var8.func_85058_a("Feature being prepared");
         var9.func_71500_a("Is feature chunk", new CallableIsFeatureChunk(this, p_75037_2_, p_75037_3_));
         var9.func_71507_a("Chunk location", String.format("%d,%d", new Object[]{Integer.valueOf(p_75037_2_), Integer.valueOf(p_75037_3_)}));
         var9.func_71500_a("Chunk pos hash", new CallableChunkPosHash(this, p_75037_2_, p_75037_3_));
         var9.func_71500_a("Structure type", new CallableStructureType(this));
         throw new ReportedException(var8);
      }
   }
}
 
开发者ID:HATB0T,项目名称:RuneCraftery,代码行数:24,代码来源:MapGenStructure.java


示例4: func_75051_a

import net.minecraft.world.gen.structure.StructureStart; //导入依赖的package包/类
public boolean func_75051_a(World p_75051_1_, Random p_75051_2_, int p_75051_3_, int p_75051_4_) {
   this.func_143027_a(p_75051_1_);
   int var5 = (p_75051_3_ << 4) + 8;
   int var6 = (p_75051_4_ << 4) + 8;
   boolean var7 = false;
   Iterator var8 = this.field_75053_d.values().iterator();

   while(var8.hasNext()) {
      StructureStart var9 = (StructureStart)var8.next();
      if(var9.func_75069_d() && var9.func_75071_a().func_78885_a(var5, var6, var5 + 15, var6 + 15)) {
         var9.func_75068_a(p_75051_1_, p_75051_2_, new StructureBoundingBox(var5, var6, var5 + 15, var6 + 15));
         var7 = true;
         this.func_143026_a(var9.func_143019_e(), var9.func_143018_f(), var9);
      }
   }

   return var7;
}
 
开发者ID:HATB0T,项目名称:RuneCraftery,代码行数:19,代码来源:MapGenStructure.java


示例5: func_143028_c

import net.minecraft.world.gen.structure.StructureStart; //导入依赖的package包/类
protected StructureStart func_143028_c(int p_143028_1_, int p_143028_2_, int p_143028_3_) {
   Iterator var4 = this.field_75053_d.values().iterator();

   while(var4.hasNext()) {
      StructureStart var5 = (StructureStart)var4.next();
      if(var5.func_75069_d() && var5.func_75071_a().func_78885_a(p_143028_1_, p_143028_3_, p_143028_1_, p_143028_3_)) {
         Iterator var6 = var5.func_75073_b().iterator();

         while(var6.hasNext()) {
            StructureComponent var7 = (StructureComponent)var6.next();
            if(var7.func_74874_b().func_78890_b(p_143028_1_, p_143028_2_, p_143028_3_)) {
               return var5;
            }
         }
      }
   }

   return null;
}
 
开发者ID:HATB0T,项目名称:RuneCraftery,代码行数:20,代码来源:MapGenStructure.java


示例6: func_143027_a

import net.minecraft.world.gen.structure.StructureStart; //导入依赖的package包/类
private void func_143027_a(World p_143027_1_) {
   if(this.field_143029_e == null) {
      this.field_143029_e = (MapGenStructureData)p_143027_1_.func_72943_a(MapGenStructureData.class, this.func_143025_a());
      if(this.field_143029_e == null) {
         this.field_143029_e = new MapGenStructureData(this.func_143025_a());
         p_143027_1_.func_72823_a(this.func_143025_a(), this.field_143029_e);
      } else {
         NBTTagCompound var2 = this.field_143029_e.func_143041_a();
         Iterator var3 = var2.func_74758_c().iterator();

         while(var3.hasNext()) {
            NBTBase var4 = (NBTBase)var3.next();
            if(var4.func_74732_a() == 10) {
               NBTTagCompound var5 = (NBTTagCompound)var4;
               if(var5.func_74764_b("ChunkX") && var5.func_74764_b("ChunkZ")) {
                  int var6 = var5.func_74762_e("ChunkX");
                  int var7 = var5.func_74762_e("ChunkZ");
                  StructureStart var8 = MapGenStructureIO.func_143035_a(var5, p_143027_1_);
                  this.field_75053_d.put(Long.valueOf(ChunkCoordIntPair.func_77272_a(var6, var7)), var8);
               }
            }
         }
      }
   }

}
 
开发者ID:HATB0T,项目名称:RuneCraftery,代码行数:27,代码来源:MapGenStructure.java


示例7: getStructureStart

import net.minecraft.world.gen.structure.StructureStart; //导入依赖的package包/类
protected StructureStart getStructureStart(int chunkX, int chunkZ)
{
	int blockX = chunkX << 4;
	int blockZ = chunkZ << 4;
    int count = this.frequency.getMax(this.world, blockX, blockZ) >= 1.0F ? 
    		this.frequency.getIntValue(super.rand, this.world, blockX, blockZ) : 1;
    StructureGroup group = new StructureGroup(chunkX, chunkZ, count);
    group.newerGroup = null;
    group.olderGroup = this.newestGroup;

    if (this.newestGroup == null)
    {
    }
    else
    {
        this.newestGroup.newerGroup = group;
    }

    this.newestGroup = group;
    return group;
}
 
开发者ID:lawremi,项目名称:CustomOreGen,代码行数:22,代码来源:MapGenOreDistribution.java


示例8: recursiveGenerate

import net.minecraft.world.gen.structure.StructureStart; //导入依赖的package包/类
@Override
protected void recursiveGenerate(World world, int xChunkCoord, int zChunkCoord, int origXChunkCoord, int origZChunkCoord, Block[] blocks, byte[] metadata) {
	this.rand.nextInt();

	if (this.canSpawnStructureAtCoords(xChunkCoord, zChunkCoord)) {
		final StructureStart var7 = this.getStructureStart(xChunkCoord, zChunkCoord);
		this.structureMap.put(Long.valueOf(ChunkCoordIntPair.chunkXZ2Int(xChunkCoord, zChunkCoord)), var7);
	}
}
 
开发者ID:4Space,项目名称:4Space-5,代码行数:10,代码来源:PitMapGenStructure.java


示例9: getStructureStart

import net.minecraft.world.gen.structure.StructureStart; //导入依赖的package包/类
/**
 * Returns a list of other locations at which the structure generation has been run, or null if not relevant to this
 * structure generator.
 */
//	@Override
//	@SuppressWarnings({ "rawtypes", "unchecked" })
//	protected List getCoordList()
//	{
//		ArrayList var1 = new ArrayList();
//		ChunkPos[] var2 = structureCoords;
//		int var3 = var2.length;
//
//		for (int var4 = 0; var4 < var3; ++var4)
//		{
//			ChunkPos var5 = var2[var4];
//
//			if (var5 != null)
//				var1.add(var5.getCenterBlock(64));
//		}
//
//		return var1;
//	}

@Override
protected StructureStart getStructureStart(int par1, int par2)
{
	MapGenAbyStronghold.Start start;

	for (start = new MapGenAbyStronghold.Start(world, rand, par1, par2); start.getComponents().isEmpty() || ((StructureAbyStrongholdPieces.Stairs2)start.getComponents().get(0)).strongholdPortalRoom == null; start = new MapGenAbyStronghold.Start(world, rand, par1, par2))
		;

	return start;
}
 
开发者ID:Shinoow,项目名称:AbyssalCraft,代码行数:34,代码来源:MapGenAbyStronghold.java


示例10: func_75049_b

import net.minecraft.world.gen.structure.StructureStart; //导入依赖的package包/类
protected StructureStart func_75049_b(int p_75049_1_, int p_75049_2_) {
   StructureStrongholdStart var3;
   for(var3 = new StructureStrongholdStart(this.field_75039_c, this.field_75038_b, p_75049_1_, p_75049_2_); var3.func_75073_b().isEmpty() || ((ComponentStrongholdStairs2)var3.func_75073_b().get(0)).field_75025_b == null; var3 = new StructureStrongholdStart(this.field_75039_c, this.field_75038_b, p_75049_1_, p_75049_2_)) {
      ;
   }

   return var3;
}
 
开发者ID:HATB0T,项目名称:RuneCraftery,代码行数:9,代码来源:MapGenStronghold.java


示例11: func_143030_a

import net.minecraft.world.gen.structure.StructureStart; //导入依赖的package包/类
public boolean func_143030_a(int p_143030_1_, int p_143030_2_, int p_143030_3_) {
   StructureStart var4 = this.func_143028_c(p_143030_1_, p_143030_2_, p_143030_3_);
   if(var4 != null && var4 instanceof StructureScatteredFeatureStart && !var4.field_75075_a.isEmpty()) {
      StructureComponent var5 = (StructureComponent)var4.field_75075_a.getFirst();
      return var5 instanceof ComponentScatteredFeatureSwampHut;
   } else {
      return false;
   }
}
 
开发者ID:HATB0T,项目名称:RuneCraftery,代码行数:10,代码来源:MapGenScatteredFeature.java


示例12: func_143030_a

import net.minecraft.world.gen.structure.StructureStart; //导入依赖的package包/类
public boolean func_143030_a(int par1, int par2, int par3)
{
    StructureStart structurestart = this.func_143028_c(par1, par2, par3);

    if (structurestart != null && structurestart instanceof StructureScatteredFeatureStart && !structurestart.components.isEmpty())
    {
        StructureComponent structurecomponent = (StructureComponent)structurestart.components.getFirst();
        return structurecomponent instanceof ComponentScatteredFeatureSwampHut;
    }
    else
    {
        return false;
    }
}
 
开发者ID:HATB0T,项目名称:RuneCraftery,代码行数:15,代码来源:MapGenScatteredFeature.java


示例13: getStructureStart

import net.minecraft.world.gen.structure.StructureStart; //导入依赖的package包/类
@Override
protected StructureStart getStructureStart(int par1, int par2)
{
    FMLLog.info("Generating Moon Village at x" + par1 * 16 + " z" + par2 * 16);
    return new StructureVillageStartMoon(this.worldObj, this.rand, par1, par2, this.terrainType);
}
 
开发者ID:4Space,项目名称:4Space-5,代码行数:7,代码来源:MapGenVillageMoon.java


示例14: getStructureStart

import net.minecraft.world.gen.structure.StructureStart; //导入依赖的package包/类
@Override
protected StructureStart getStructureStart(int par1, int par2) {
	return new PitStructureStart(settings, this.worldObj, this.rand, par1, par2);
}
 
开发者ID:4Space,项目名称:4Space-5,代码行数:5,代码来源:PitMapGen.java


示例15: getStructureStart

import net.minecraft.world.gen.structure.StructureStart; //导入依赖的package包/类
@Override
protected StructureStart getStructureStart(int par1, int par2) {
	FMLLog.info("Generating " + settings.planetName + " Village at x" + par1 * 16 + " z" + par2 * 16);
	return new VillageStructureStart(this.worldObj, this.rand, par1, par2, this.terrainType);
}
 
开发者ID:4Space,项目名称:4Space-5,代码行数:6,代码来源:VillageMapGen.java


示例16: getStructureStart

import net.minecraft.world.gen.structure.StructureStart; //导入依赖的package包/类
@Override
protected StructureStart getStructureStart(int chunkX, int chunkZ) {
	return new Start(this.world, this.rand, chunkX, chunkZ);
}
 
开发者ID:Alec-WAM,项目名称:CrystalMod,代码行数:5,代码来源:MapGenCrystexiumSpike.java


示例17: getStructureStart

import net.minecraft.world.gen.structure.StructureStart; //导入依赖的package包/类
/** Get the start of the structure */
@Override
protected StructureStart getStructureStart(int x, int z) {
	return new MapGenUnderworldWaterTemple.Start(this.worldObj, this.rand, x, z);
}
 
开发者ID:sblectric,项目名称:LightningCraft,代码行数:6,代码来源:MapGenUnderworldWaterTemple.java


示例18: getStructureStart

import net.minecraft.world.gen.structure.StructureStart; //导入依赖的package包/类
/** Get the start of the structure */
@Override
protected StructureStart getStructureStart(int x, int z) {
	return new MapGenUnderworldRampart.Start(this.worldObj, this.rand, x, z);
}
 
开发者ID:sblectric,项目名称:LightningCraft,代码行数:6,代码来源:MapGenUnderworldRampart.java


示例19: getStructureStart

import net.minecraft.world.gen.structure.StructureStart; //导入依赖的package包/类
/** Get the start of the structure */
@Override
protected StructureStart getStructureStart(int x, int z) {
	return new MapGenUnderworldTower.Start(this.worldObj, this.rand, x, z);
}
 
开发者ID:sblectric,项目名称:LightningCraft,代码行数:6,代码来源:MapGenUnderworldTower.java


示例20: getStructureStart

import net.minecraft.world.gen.structure.StructureStart; //导入依赖的package包/类
@Override
protected StructureStart getStructureStart(int p_75049_1_, int p_75049_2_) {
	return new StructureTestStart(this.worldObj, this.rand, p_75049_1_,p_75049_2_);
}
 
开发者ID:Team-Antimatter-Mod,项目名称:AntiMatterMod,代码行数:5,代码来源:TestMapGen.java



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Java ShapelessArcaneRecipe类代码示例发布时间:2022-05-21
下一篇:
Java JDBCDataSource类代码示例发布时间:2022-05-21
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap