本文整理匯總了Java中net.minecraft.block.BlockSand類的典型用法代碼示例。如果您正苦於以下問題:Java BlockSand類的具體用法?Java BlockSand怎麽用?Java BlockSand使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。
BlockSand類屬於net.minecraft.block包,在下文中一共展示了BlockSand類的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: BiomeGenMesa
import net.minecraft.block.BlockSand; //導入依賴的package包/類
public BiomeGenMesa(int p_i45380_1_, boolean p_i45380_2_, boolean p_i45380_3_)
{
super(p_i45380_1_);
this.field_150626_aH = p_i45380_2_;
this.field_150620_aI = p_i45380_3_;
this.setDisableRain();
this.setTemperatureRainfall(2.0F, 0.0F);
this.spawnableCreatureList.clear();
this.topBlock = Blocks.sand.getDefaultState().withProperty(BlockSand.VARIANT, BlockSand.EnumType.RED_SAND);
this.fillerBlock = Blocks.stained_hardened_clay.getDefaultState();
this.theBiomeDecorator.treesPerChunk = -999;
this.theBiomeDecorator.deadBushPerChunk = 20;
this.theBiomeDecorator.reedsPerChunk = 3;
this.theBiomeDecorator.cactiPerChunk = 5;
this.theBiomeDecorator.flowersPerChunk = 0;
this.spawnableCreatureList.clear();
if (p_i45380_3_)
{
this.theBiomeDecorator.treesPerChunk = 5;
}
}
示例2: inventoryRender
import net.minecraft.block.BlockSand; //導入依賴的package包/類
public static void inventoryRender()
{
Item item = GameRegistry.findItem(MReference.MODID, "cold_sand");
ModelBakery.addVariantName(item, "ministrapp:cold_sand");
ModelBakery.addVariantName(item, "ministrapp:cold_red_sand");
Item itemBlockVariants = GameRegistry.findItem(MReference.MODID, "cold_sand");
EnumType[] aenumtype = BlockSand.EnumType.values();
int i = aenumtype.length;
for (int j = 0; j < i; ++j)
{
BlockSand.EnumType enumtype = aenumtype[j];
ModelResourceLocation itemModelResourceLocation = new ModelResourceLocation(MReference.MODID + ":" + "cold_"
+ enumtype.getName(),
"inventory");
Minecraft.getMinecraft().getRenderItem().getItemModelMesher()
.register(itemBlockVariants, enumtype.getMetadata(), itemModelResourceLocation);
}
}
示例3: func_72236_l
import net.minecraft.block.BlockSand; //導入依賴的package包/類
private void func_72236_l(World p_72236_1_, int p_72236_2_, int p_72236_3_, int p_72236_4_) {
if(BlockSand.func_72191_e_(p_72236_1_, p_72236_2_, p_72236_3_ - 1, p_72236_4_) && p_72236_3_ >= 0) {
byte var5 = 32;
if(!BlockSand.field_72192_a && p_72236_1_.func_72904_c(p_72236_2_ - var5, p_72236_3_ - var5, p_72236_4_ - var5, p_72236_2_ + var5, p_72236_3_ + var5, p_72236_4_ + var5)) {
EntityFallingSand var6 = new EntityFallingSand(p_72236_1_, (double)((float)p_72236_2_ + 0.5F), (double)((float)p_72236_3_ + 0.5F), (double)((float)p_72236_4_ + 0.5F), this.field_71990_ca);
p_72236_1_.func_72838_d(var6);
} else {
p_72236_1_.func_94571_i(p_72236_2_, p_72236_3_, p_72236_4_);
while(BlockSand.func_72191_e_(p_72236_1_, p_72236_2_, p_72236_3_ - 1, p_72236_4_) && p_72236_3_ > 0) {
--p_72236_3_;
}
if(p_72236_3_ > 0) {
p_72236_1_.func_72832_d(p_72236_2_, p_72236_3_, p_72236_4_, this.field_71990_ca, 0, 2);
}
}
}
}
示例4: populate
import net.minecraft.block.BlockSand; //導入依賴的package包/類
/**
* Populates chunk with ores etc etc
*/
public void populate(IChunkProvider par1IChunkProvider, int par2, int par3)
{
BlockSand.fallInstantly = true;
MinecraftForge.EVENT_BUS.post(new PopulateChunkEvent.Pre(par1IChunkProvider, endWorld, endWorld.rand, par2, par3, false));
int k = par2 * 16;
int l = par3 * 16;
BiomeGenBase biomegenbase = this.endWorld.getBiomeGenForCoords(k + 16, l + 16);
biomegenbase.decorate(this.endWorld, this.endWorld.rand, k, l);
MinecraftForge.EVENT_BUS.post(new PopulateChunkEvent.Post(par1IChunkProvider, endWorld, endWorld.rand, par2, par3, false));
BlockSand.fallInstantly = false;
}
示例5: populate
import net.minecraft.block.BlockSand; //導入依賴的package包/類
@Override
public void populate(IChunkProvider par1IChunkProvider, int par2, int par3)
{
BlockSand.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.decoratePlanet(this.worldObj, this.rand, var4, var5);
BlockSand.fallInstantly = false;
}
示例6: populate
import net.minecraft.block.BlockSand; //導入依賴的package包/類
@Override
public void populate(IChunkProvider par1IChunkProvider, int par2, int par3)
{
BlockSand.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);
var4 += 8;
var5 += 8;
this.dungeonGenerator.handleTileEntities(this.rand);
if (!SCMercuryConfigManager.disableMercuryVillageGen)
{
;
}
}
示例7: populate
import net.minecraft.block.BlockSand; //導入依賴的package包/類
@Override
public void populate(IChunkProvider par1IChunkProvider, int par2, int par3)
{
BlockSand.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);
{
;
}
this.decoratePlanet(this.worldObj, this.rand, var4, var5);
BlockSand.fallInstantly = false;
}
示例8: populate
import net.minecraft.block.BlockSand; //導入依賴的package包/類
@Override
public void populate(IChunkProvider par1IChunkProvider, int par2, int par3)
{
BlockSand.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.decoratePlanet(this.worldObj, this.rand, var4, var5);
this.blazeNest.generateStructuresInChunk(this.worldObj, new Random(), par2, par3);
this.dungeonGenerator.handleTileEntities(this.rand);
if (!SCVenusConfigManager.disableVenusVillageGen)
{
this.villageGenerator.generateStructuresInChunk(this.worldObj, this.rand, par2, par3);
}
BlockSand.fallInstantly = false;
}
示例9: populate
import net.minecraft.block.BlockSand; //導入依賴的package包/類
@Override
public void populate(IChunkProvider par1IChunkProvider, int par2, int par3)
{
BlockSand.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);
{
}
this.decoratePlanet(this.worldObj, this.rand, var4, var5);
BlockSand.fallInstantly = false;
}
示例10: populate
import net.minecraft.block.BlockSand; //導入依賴的package包/類
@Override
public void populate(IChunkProvider par1IChunkProvider, int par2, int par3)
{
BlockSand.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);
var4 += 8;
var5 += 8;
BlockSand.fallInstantly = false;
}
示例11: populateDistributions
import net.minecraft.block.BlockSand; //導入依賴的package包/類
public static void populateDistributions(Collection<IOreDistribution> distributions, World world, int chunkX, int chunkZ)
{
SimpleProfiler.globalProfiler.startSection("Populate");
BlockSand.fallInstantly = true;
ReflectionHelper.setPrivateValue(World.class, world, true, "scheduledUpdatesAreImmediate","field_72999_e");
for (IOreDistribution dist : distributions) {
dist.generate(world, chunkX, chunkZ);
dist.populate(world, chunkX, chunkZ);
dist.cull();
}
ReflectionHelper.setPrivateValue(World.class, world, false, "scheduledUpdatesAreImmediate","field_72999_e");
BlockSand.fallInstantly = false;
if (Loader.isModLoaded("UndergroundBiomes")) {
// FIXME: API not yet available for 1.8.x
// UBAPIHook.ubAPIHook.ubOreTexturizer.redoOres(chunkX*16, chunkZ*16, world);
}
SimpleProfiler.globalProfiler.endSection();
}
示例12: addRecipes
import net.minecraft.block.BlockSand; //導入依賴的package包/類
/**
* Adds the crafting recipes to the CraftingManager.
*/
public void addRecipes(CraftingManager p_77589_1_)
{
p_77589_1_.addRecipe(new ItemStack(Blocks.chest), new Object[] {"###", "# #", "###", '#', Blocks.planks});
p_77589_1_.addRecipe(new ItemStack(Blocks.trapped_chest), new Object[] {"#-", '#', Blocks.chest, '-', Blocks.tripwire_hook});
p_77589_1_.addRecipe(new ItemStack(Blocks.ender_chest), new Object[] {"###", "#E#", "###", '#', Blocks.obsidian, 'E', Items.ender_eye});
p_77589_1_.addRecipe(new ItemStack(Blocks.furnace), new Object[] {"###", "# #", "###", '#', Blocks.cobblestone});
p_77589_1_.addRecipe(new ItemStack(Blocks.crafting_table), new Object[] {"##", "##", '#', Blocks.planks});
p_77589_1_.addRecipe(new ItemStack(Blocks.sandstone), new Object[] {"##", "##", '#', new ItemStack(Blocks.sand, 1, BlockSand.EnumType.SAND.getMetadata())});
p_77589_1_.addRecipe(new ItemStack(Blocks.red_sandstone), new Object[] {"##", "##", '#', new ItemStack(Blocks.sand, 1, BlockSand.EnumType.RED_SAND.getMetadata())});
p_77589_1_.addRecipe(new ItemStack(Blocks.sandstone, 4, BlockSandStone.EnumType.SMOOTH.getMetadata()), new Object[] {"##", "##", '#', new ItemStack(Blocks.sandstone, 1, BlockSandStone.EnumType.DEFAULT.getMetadata())});
p_77589_1_.addRecipe(new ItemStack(Blocks.red_sandstone, 4, BlockRedSandstone.EnumType.SMOOTH.getMetadata()), new Object[] {"##", "##", '#', new ItemStack(Blocks.red_sandstone, 1, BlockRedSandstone.EnumType.DEFAULT.getMetadata())});
p_77589_1_.addRecipe(new ItemStack(Blocks.sandstone, 1, BlockSandStone.EnumType.CHISELED.getMetadata()), new Object[] {"#", "#", '#', new ItemStack(Blocks.stone_slab, 1, BlockStoneSlab.EnumType.SAND.getMetadata())});
p_77589_1_.addRecipe(new ItemStack(Blocks.red_sandstone, 1, BlockRedSandstone.EnumType.CHISELED.getMetadata()), new Object[] {"#", "#", '#', new ItemStack(Blocks.stone_slab2, 1, BlockStoneSlabNew.EnumType.RED_SANDSTONE.getMetadata())});
p_77589_1_.addRecipe(new ItemStack(Blocks.quartz_block, 1, BlockQuartz.EnumType.CHISELED.getMetadata()), new Object[] {"#", "#", '#', new ItemStack(Blocks.stone_slab, 1, BlockStoneSlab.EnumType.QUARTZ.getMetadata())});
p_77589_1_.addRecipe(new ItemStack(Blocks.quartz_block, 2, BlockQuartz.EnumType.LINES_Y.getMetadata()), new Object[] {"#", "#", '#', new ItemStack(Blocks.quartz_block, 1, BlockQuartz.EnumType.DEFAULT.getMetadata())});
p_77589_1_.addRecipe(new ItemStack(Blocks.stonebrick, 4), new Object[] {"##", "##", '#', new ItemStack(Blocks.stone, 1, BlockStone.EnumType.STONE.getMetadata())});
p_77589_1_.addRecipe(new ItemStack(Blocks.stonebrick, 1, BlockStoneBrick.CHISELED_META), new Object[] {"#", "#", '#', new ItemStack(Blocks.stone_slab, 1, BlockStoneSlab.EnumType.SMOOTHBRICK.getMetadata())});
p_77589_1_.addShapelessRecipe(new ItemStack(Blocks.stonebrick, 1, BlockStoneBrick.MOSSY_META), new Object[] {Blocks.stonebrick, Blocks.vine});
p_77589_1_.addShapelessRecipe(new ItemStack(Blocks.mossy_cobblestone, 1), new Object[] {Blocks.cobblestone, Blocks.vine});
p_77589_1_.addRecipe(new ItemStack(Blocks.iron_bars, 16), new Object[] {"###", "###", '#', Items.iron_ingot});
p_77589_1_.addRecipe(new ItemStack(Blocks.glass_pane, 16), new Object[] {"###", "###", '#', Blocks.glass});
p_77589_1_.addRecipe(new ItemStack(Blocks.redstone_lamp, 1), new Object[] {" R ", "RGR", " R ", 'R', Items.redstone, 'G', Blocks.glowstone});
p_77589_1_.addRecipe(new ItemStack(Blocks.beacon, 1), new Object[] {"GGG", "GSG", "OOO", 'G', Blocks.glass, 'S', Items.nether_star, 'O', Blocks.obsidian});
p_77589_1_.addRecipe(new ItemStack(Blocks.nether_brick, 1), new Object[] {"NN", "NN", 'N', Items.netherbrick});
p_77589_1_.addRecipe(new ItemStack(Blocks.stone, 2, BlockStone.EnumType.DIORITE.getMetadata()), new Object[] {"CQ", "QC", 'C', Blocks.cobblestone, 'Q', Items.quartz});
p_77589_1_.addShapelessRecipe(new ItemStack(Blocks.stone, 1, BlockStone.EnumType.GRANITE.getMetadata()), new Object[] {new ItemStack(Blocks.stone, 1, BlockStone.EnumType.DIORITE.getMetadata()), Items.quartz});
p_77589_1_.addShapelessRecipe(new ItemStack(Blocks.stone, 2, BlockStone.EnumType.ANDESITE.getMetadata()), new Object[] {new ItemStack(Blocks.stone, 1, BlockStone.EnumType.DIORITE.getMetadata()), Blocks.cobblestone});
p_77589_1_.addRecipe(new ItemStack(Blocks.dirt, 4, BlockDirt.DirtType.COARSE_DIRT.getMetadata()), new Object[] {"DG", "GD", 'D', new ItemStack(Blocks.dirt, 1, BlockDirt.DirtType.DIRT.getMetadata()), 'G', Blocks.gravel});
p_77589_1_.addRecipe(new ItemStack(Blocks.stone, 4, BlockStone.EnumType.DIORITE_SMOOTH.getMetadata()), new Object[] {"SS", "SS", 'S', new ItemStack(Blocks.stone, 1, BlockStone.EnumType.DIORITE.getMetadata())});
p_77589_1_.addRecipe(new ItemStack(Blocks.stone, 4, BlockStone.EnumType.GRANITE_SMOOTH.getMetadata()), new Object[] {"SS", "SS", 'S', new ItemStack(Blocks.stone, 1, BlockStone.EnumType.GRANITE.getMetadata())});
p_77589_1_.addRecipe(new ItemStack(Blocks.stone, 4, BlockStone.EnumType.ANDESITE_SMOOTH.getMetadata()), new Object[] {"SS", "SS", 'S', new ItemStack(Blocks.stone, 1, BlockStone.EnumType.ANDESITE.getMetadata())});
p_77589_1_.addRecipe(new ItemStack(Blocks.prismarine, 1, BlockPrismarine.ROUGH_META), new Object[] {"SS", "SS", 'S', Items.prismarine_shard});
p_77589_1_.addRecipe(new ItemStack(Blocks.prismarine, 1, BlockPrismarine.BRICKS_META), new Object[] {"SSS", "SSS", "SSS", 'S', Items.prismarine_shard});
p_77589_1_.addRecipe(new ItemStack(Blocks.prismarine, 1, BlockPrismarine.DARK_META), new Object[] {"SSS", "SIS", "SSS", 'S', Items.prismarine_shard, 'I', new ItemStack(Items.dye, 1, EnumDyeColor.BLACK.getDyeDamage())});
p_77589_1_.addRecipe(new ItemStack(Blocks.sea_lantern, 1, 0), new Object[] {"SCS", "CCC", "SCS", 'S', Items.prismarine_shard, 'C', Items.prismarine_crystals});
}
示例13: grassGrowEvent
import net.minecraft.block.BlockSand; //導入依賴的package包/類
@SubscribeEvent
public void grassGrowEvent(RandomBlockTickEvent event)
{
World world = event.getWorld();
BlockPos pos = event.getPos().up();
IBlockState state = event.getState();
Random random = event.getRandom();
if (!world.isRemote && state.getBlock() == Blocks.GRASS)
{
if (world.getLightFromNeighbors(pos.up()) >= 9 && world.getBlockState(pos.up()).getLightOpacity(world, pos.up()) <= 2) {
for (int i = 0; i < 4; ++i) {
BlockPos growthpos = pos.add(random.nextInt(3) - 1, random.nextInt(5) - 3, random.nextInt(3) - 1);
if (growthpos.getY() >= 0 && growthpos.getY() < 256 && !world.isBlockLoaded(growthpos)) {
return;
}
IBlockState topstate = world.getBlockState(growthpos.up());
IBlockState growthstate = world.getBlockState(growthpos);
if(world.getLightFromNeighbors(growthpos.up()) >= 4 && topstate.getLightOpacity(world, pos.up()) <= 2) {
if (InteractionBWA.GRASS_TO_SAND && growthstate.getBlock() == Blocks.SAND) {
if(growthstate.getValue(BlockSand.VARIANT) == BlockSand.EnumType.SAND)
world.setBlockState(growthpos, ModBlocks.grass.getDefaultState().withProperty(BlockExtraGrass.VARIANT,BlockExtraGrass.ExtraGrassType.SAND));
else
world.setBlockState(growthpos, ModBlocks.grass.getDefaultState().withProperty(BlockExtraGrass.VARIANT,BlockExtraGrass.ExtraGrassType.REDSAND));
} else if(InteractionBWA.GRASS_TO_CLAY && growthstate.getBlock() == Blocks.CLAY)
world.setBlockState(growthpos, ModBlocks.grass.getDefaultState().withProperty(BlockExtraGrass.VARIANT,BlockExtraGrass.ExtraGrassType.CLAY));
}
}
}
}
}
示例14: checkBlockAbove
import net.minecraft.block.BlockSand; //導入依賴的package包/類
private static boolean checkBlockAbove(World w, int x, int y, int z)
{
Block b = w.getBlock(x, y, z);
if (b instanceof BlockSand)
{
return true;
}
if (b instanceof BlockGravel)
{
return true;
}
return false;
}
示例15: biomeifyBlocks
import net.minecraft.block.BlockSand; //導入依賴的package包/類
void biomeifyBlocks(Coord col, ChunkPrimer primer, BiomeGenBase biome, double stoneNoise, int min, int max) {
if (col == null) return;
biome.genTerrainBlocks(col.w, rand, primer, 0, 0, stoneNoise);
Coord at = col.copy();
boolean onSolid = false;
for (int y = min; y <= max; y++) {
IBlockState bs = primer.getBlockState(0, y, 0);
Block id = bs.getBlock();
if (id == Blocks.bedrock) continue;
if (id == Blocks.air) {
onSolid = false;
continue;
}
if (!onSolid && id instanceof BlockFalling) {
if (id == Blocks.sand) {
boolean isRed = bs.getValue(BlockSand.VARIANT) == BlockSand.EnumType.RED_SAND;
if (isRed) {
bs = Blocks.red_sandstone.getDefaultState();
} else {
bs = Blocks.sandstone.getDefaultState();
}
} else {
bs = Blocks.stone.getDefaultState();
}
}
at.y = y;
if (id == Blocks.grass) {
at.y++;
if (at.isSolid()) bs = Blocks.dirt.getDefaultState();
at.y--;
}
at.set(bs, true); // Notify only if triggered by command?
onSolid = true;
}
}