本文整理汇总了Java中net.minecraft.block.BlockFalling.fallInstantly方法的典型用法代码示例。如果您正苦于以下问题:Java BlockFalling.fallInstantly方法的具体用法?Java BlockFalling.fallInstantly怎么用?Java BlockFalling.fallInstantly使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类net.minecraft.block.BlockFalling
的用法示例。
在下文中一共展示了BlockFalling.fallInstantly方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: populate
import net.minecraft.block.BlockFalling; //导入方法依赖的package包/类
@Override
public void populate(IChunkProvider par1IChunkProvider, int par2, int par3)
{
BlockFalling.fallInstantly = true;
int var4 = par2 * 16;
int var5 = par3 * 16;
this.worldObj.getBiomeGenForCoords(var4 + 16, var5 + 16);
this.rand.setSeed(this.worldObj.getSeed());
final long var7 = this.rand.nextLong() / 2L * 2L + 1L;
final long var9 = this.rand.nextLong() / 2L * 2L + 1L;
this.rand.setSeed(par2 * var7 + par3 * var9 ^ this.worldObj.getSeed());
this.decoratePlanet(this.worldObj, this.rand, var4, var5);
this.onPopulate(par1IChunkProvider, par2, par3);
BlockFalling.fallInstantly = false;
}
示例2: populate
import net.minecraft.block.BlockFalling; //导入方法依赖的package包/类
@Override
public void populate(IChunkProvider chunk, int x, int z)
{
BlockFalling.fallInstantly = true;
int var4 = x * 16;
int var5 = z * 16;
BiomeGenBase biomeGen = this.worldObj.getBiomeGenForCoords(var4 + 16, var5 + 16);
this.worldObj.getBiomeGenForCoords(var4 + 16, var5 + 16);
this.rand.setSeed(this.worldObj.getSeed());
long var7 = this.rand.nextLong() / 2L * 2L + 1L;
long var9 = this.rand.nextLong() / 2L * 2L + 1L;
this.rand.setSeed(x * var7 + z * var9 ^ this.worldObj.getSeed());
biomeGen.decorate(this.worldObj, this.rand, var4, var5);
this.decoratePlanet(this.worldObj, this.rand, var4, var5);
SpawnerAnimals.performWorldGenSpawning(this.worldObj, biomeGen, var4 + 8, var5 + 8, 16, 16, this.rand);
this.onPopulate(chunk, x, z);
BlockFalling.fallInstantly = false;
}
示例3: populate
import net.minecraft.block.BlockFalling; //导入方法依赖的package包/类
@Override
public void populate(IChunkProvider par1IChunkProvider, int par2, int par3)
{
BlockFalling.fallInstantly = true;
final int var4 = par2 * 16;
final int var5 = par3 * 16;
this.worldObj.getBiomeGenForCoords(var4 + 16, var5 + 16);
this.rand.setSeed(this.worldObj.getSeed());
final long var7 = this.rand.nextLong() / 2L * 2L + 1L;
final long var9 = this.rand.nextLong() / 2L * 2L + 1L;
this.rand.setSeed(par2 * var7 + par3 * var9 ^ this.worldObj.getSeed());
this.dungeonGenerator.handleTileEntities(this.rand);
if (!ConfigManagerCore.disableMoonVillageGen)
{
this.villageGenerator.generateStructuresInChunk(this.worldObj, this.rand, par2, par3);
}
this.decoratePlanet(this.worldObj, this.rand, var4, var5);
BlockFalling.fallInstantly = false;
}
示例4: populate
import net.minecraft.block.BlockFalling; //导入方法依赖的package包/类
@Override
public void populate(IChunkProvider par1IChunkProvider, int par2, int par3)
{
BlockFalling.fallInstantly = true;
final int k = par2 * 16;
final int l = par3 * 16;
this.rand.setSeed(this.worldObj.getSeed());
final long i1 = this.rand.nextLong() / 2L * 2L + 1L;
final long j1 = this.rand.nextLong() / 2L * 2L + 1L;
this.rand.setSeed(par2 * i1 + par3 * j1 ^ this.worldObj.getSeed());
if (k == 0 && l == 0)
{
this.worldObj.setBlock(k, 64, l, GCBlocks.spaceStationBase, 0, 3);
final TileEntity var8 = this.worldObj.getTileEntity(k, 64, l);
if (var8 instanceof IMultiBlock)
{
((IMultiBlock) var8).onCreate(new BlockVec3(k, 64, l));
}
new WorldGenSpaceStation().generate(this.worldObj, this.rand, k - 10, 62, l - 3);
}
BlockFalling.fallInstantly = false;
}
示例5: populate
import net.minecraft.block.BlockFalling; //导入方法依赖的package包/类
@Override
public void populate(IChunkProvider par1IChunkProvider, int par2, int par3) {
BlockFalling.fallInstantly = true;
int var4 = par2 * 16;
int var5 = par3 * 16;
worldObject.getBiomeGenForCoords(var4 + 16, var5 + 16);
random.setSeed(worldObject.getSeed());
long var7 = random.nextLong() / 2l * 2l + 1l;
long var9 = random.nextLong() / 2l * 2l + 1l;
random.setSeed(par2 * var7 + par3 * var9 ^ worldObject.getSeed());
decoratePlanet(this.worldObject, random, var4, var5);
if (pitNest != null) {
pitNest.generateStructuresInChunk(worldObject, new Random(), par2, par3);
}
BlockFalling.fallInstantly = false;
if (villageGenerator != null) {
villageGenerator.generateStructuresInChunk(worldObject, random, par2, par3);
}
}
示例6: updateBlocks
import net.minecraft.block.BlockFalling; //导入方法依赖的package包/类
private void updateBlocks() {
try {
BlockFalling.fallInstantly = true;
for (BlockPos pos : blocksToUpdate) {
IBlockState state = serverWorld.getBlockState(pos);
if (state.getBlock() instanceof BlockFalling) {
state.getBlock().updateTick(serverWorld, pos, state, serverWorld.rand);
}
state.neighborChanged(serverWorld, pos, Blocks.AIR, pos);
serverWorld.notifyNeighborsOfStateChange(pos, state.getBlock(), true);
}
}
catch (Throwable e) {
e.printStackTrace();
}
BlockFalling.fallInstantly = false;
}
示例7: populate
import net.minecraft.block.BlockFalling; //导入方法依赖的package包/类
@Override
public void populate(int x, int z) {
BlockFalling.fallInstantly = true;
net.minecraftforge.event.ForgeEventFactory.onChunkPopulate(true, this, this.worldObj, this.rand, x, z, false);
BlockPos blockpos = new BlockPos(x * 16, 0, z * 16);
this.worldObj.getBiomeForCoordsBody(blockpos.add(16, 0, 16)).decorate(this.worldObj, this.worldObj.rand, blockpos);
long i = (long)x * (long)x + (long)z * (long)z;
if (i > 4096L)
{
}
net.minecraftforge.event.ForgeEventFactory.onChunkPopulate(false, this, this.worldObj, this.rand, x, z, false);
BlockFalling.fallInstantly = false;
}
示例8: fall
import net.minecraft.block.BlockFalling; //导入方法依赖的package包/类
protected void fall(World worldIn, BlockPos pos, IBlockState state)
{
int i = 32;
if ((!BlockFalling.fallInstantly) && (worldIn.isAreaLoaded(pos.add(-i, -i, -i), pos.add(i, i, i))))
{
if (!worldIn.isRemote)
{
EntityFallingBlockTFC entityfallingblock = new EntityFallingBlockTFC(worldIn, pos.getX() + 0.5D, pos.getY(), pos.getZ() + 0.5D, state);
onStartFalling(entityfallingblock);
worldIn.spawnEntity(entityfallingblock);
}
}
else
{
((World)worldIn).setBlockToAir(pos);
BlockPos blockpos;
for (blockpos = pos.down(); (canFallInto(worldIn, blockpos)) && (blockpos.getY() > 0); blockpos = blockpos.down()) {}
if (blockpos.getY() > 0)
{
worldIn.setBlockState(blockpos.up(), getDefaultState());
}
}
}
示例9: populate
import net.minecraft.block.BlockFalling; //导入方法依赖的package包/类
@Override
public void populate(IChunkProvider par1IChunkProvider, int chunkX, int chunkZ)
{
BlockFalling.fallInstantly = true;
final int blockX = chunkX * 16;
final int blockZ = chunkZ * 16;
this.rand.setSeed(this.worldObjNonPrivate.getSeed());
final long seed1 = this.rand.nextLong() / 2L * 2L + 1L;
final long seed2 = this.rand.nextLong() / 2L * 2L + 1L;
this.rand.setSeed(chunkX * seed1 + chunkZ * seed2 ^ this.worldObjNonPrivate.getSeed());
if (blockX == 0 && blockZ == 0)
{
// this generates the basis structure
new MothershipWorldGen().generate(this.worldObjNonPrivate, this.rand, 0, 64, 0);
}
BlockFalling.fallInstantly = false;
}
示例10: populate
import net.minecraft.block.BlockFalling; //导入方法依赖的package包/类
/**
* Populates chunk with ores etc etc
*/
public void populate(IChunkProvider p_73153_1_, int p_73153_2_, int p_73153_3_)
{
BlockFalling.fallInstantly = true;
MinecraftForge.EVENT_BUS.post(new PopulateChunkEvent.Pre(p_73153_1_, worldObj, worldObj.rand, p_73153_2_, p_73153_3_, false));
int k = p_73153_2_ * 16;
int l = p_73153_3_ * 16;
BiomeGenBase biomegenbase = this.worldObj.getBiomeGenForCoords(k + 16, l + 16);
biomegenbase.decorate(this.worldObj, this.worldObj.rand, k, l);
MinecraftForge.EVENT_BUS.post(new PopulateChunkEvent.Post(p_73153_1_, worldObj, worldObj.rand, p_73153_2_, p_73153_3_, false));
BlockFalling.fallInstantly = false;
}
示例11: populate
import net.minecraft.block.BlockFalling; //导入方法依赖的package包/类
@Override
public void populate(IChunkProvider par1IChunkProvider, int par2, int par3) {
BlockFalling.fallInstantly = true;
int var4 = par2 * 16;
int var5 = par3 * 16;
this.worldObj.getBiomeGenForCoords(var4 + 16, var5 + 16);
this.rand.setSeed(this.worldObj.getSeed());
long var7 = this.rand.nextLong() / 2L * 2L + 1L;
long var9 = this.rand.nextLong() / 2L * 2L + 1L;
this.rand.setSeed(par2 * var7 + par3 * var9 ^ this.worldObj.getSeed());
this.decoratePlanet(this.worldObj, this.rand, var4, var5);
if (!ConfigManagerCore.idRealisticEnabled) {
this.blazeNest.generateStructuresInChunk(this.worldObj, new Random(), par2, par3);
}
BlockFalling.fallInstantly = false;
if (!ConfigManagerCore.idRealisticEnabled) {
this.villageGenerator.generateStructuresInChunk(this.worldObj, this.rand, par2, par3);
}
}
示例12: populate
import net.minecraft.block.BlockFalling; //导入方法依赖的package包/类
/**
* Populates chunk with ores etc etc
*/
public void populate(IChunkProvider p_73153_1_, int p_73153_2_, int p_73153_3_)
{
BlockFalling.fallInstantly = true;
int k = p_73153_2_ * 16;
int l = p_73153_3_ * 16;
BiomeGenBase biomegenbase = this.worldObj.getBiomeGenForCoords(k + 16, l + 16);
this.rand.setSeed(this.worldObj.getSeed());
long i1 = this.rand.nextLong() / 2L * 2L + 1L;
long j1 = this.rand.nextLong() / 2L * 2L + 1L;
this.rand.setSeed((long)p_73153_2_ * i1 + (long)p_73153_3_ * j1 ^ this.worldObj.getSeed());
boolean flag = false;
MinecraftForge.EVENT_BUS.post(new PopulateChunkEvent.Pre(p_73153_1_, worldObj, rand, p_73153_2_, p_73153_3_, flag));
MinecraftForge.EVENT_BUS.post(new PopulateChunkEvent.Post(p_73153_1_, worldObj, rand, p_73153_2_, p_73153_3_, flag));
BlockFalling.fallInstantly = false;
}
示例13: populate
import net.minecraft.block.BlockFalling; //导入方法依赖的package包/类
/**
* Populates chunk with ores etc etc
*/
public void populate(IChunkProvider p_73153_1_, int p_73153_2_, int p_73153_3_)
{
BlockFalling.fallInstantly = true;
MinecraftForge.EVENT_BUS.post(new PopulateChunkEvent.Pre(p_73153_1_, world, world.rand, p_73153_2_, p_73153_3_, false));
int k = p_73153_2_ * 16;
int l = p_73153_3_ * 16;
BiomeGenBase biomegenbase = this.world.getBiomeGenForCoords(k + 16, l + 16);
biomegenbase.decorate(this.world, this.world.rand, k, l);
MinecraftForge.EVENT_BUS.post(new PopulateChunkEvent.Post(p_73153_1_, world, world.rand, p_73153_2_, p_73153_3_, false));
BlockFalling.fallInstantly = false;
}
示例14: fall
import net.minecraft.block.BlockFalling; //导入方法依赖的package包/类
@Override
public void fall(World world, int x, int y, int z) {
if(canFall(world, x, y - 1, z) && y >= 0) {
byte radius = 32;
if(!BlockFalling.fallInstantly && world.checkChunksExist(x - radius, y - radius, z - radius, x + radius, y + radius, z + radius)) {
if(!world.isRemote) {
EntityFallingBlock entity = new EntityFallingBlock(world, (double) ((float) x + 0.5F), (double) ((float) y + 0.5F), (double) ((float) z + 0.5F), this, world.getBlockMetadata(x, y, z));
addFallData(world, x, y, z, entity);
world.spawnEntityInWorld(entity);
}
} else {
world.setBlockToAir(x, y, z);
while(canFall(world, x, y - 1, z) && y > 0) {
y--;
}
if(y > 0) {
world.setBlock(x, y, z, this);
}
}
}
}
示例15: populate
import net.minecraft.block.BlockFalling; //导入方法依赖的package包/类
/**
* Populates chunk with ores etc etc
*/
public void populate(IChunkProvider p_73153_1_, int p_73153_2_, int p_73153_3_)
{
BlockFalling.fallInstantly = true;
BlockPos blockpos = new BlockPos(p_73153_2_ * 16, 0, p_73153_3_ * 16);
this.endWorld.getBiomeGenForCoords(blockpos.add(16, 0, 16)).decorate(this.endWorld, this.endWorld.rand, blockpos);
BlockFalling.fallInstantly = false;
}