本文整理汇总了Java中net.minecraft.world.gen.structure.StructureStart类的典型用法代码示例。如果您正苦于以下问题:Java StructureStart类的具体用法?Java StructureStart怎么用?Java StructureStart使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
StructureStart类属于net.minecraft.world.gen.structure包,在下文中一共展示了StructureStart类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的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;
}
示例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;
}
示例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);
}
}
}
示例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;
}
示例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;
}
示例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);
}
}
}
}
}
}
示例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;
}
示例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);
}
}
示例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;
}
示例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;
}
示例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;
}
}
示例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;
}
}
示例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);
}
示例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);
}
示例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);
}