本文整理汇总了Java中net.minecraft.block.BlockFluid类的典型用法代码示例。如果您正苦于以下问题:Java BlockFluid类的具体用法?Java BlockFluid怎么用?Java BlockFluid使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
BlockFluid类属于net.minecraft.block包,在下文中一共展示了BlockFluid类的19个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: getBlockIdAtEntityViewpoint
import net.minecraft.block.BlockFluid; //导入依赖的package包/类
/**
* Returns the block ID at the current camera location (either air or fluid), taking into account the height of
* fluid blocks
*/
public static int getBlockIdAtEntityViewpoint(World par0World, EntityLivingBase par1EntityLivingBase, float par2)
{
Vec3 vec3 = projectViewFromEntity(par1EntityLivingBase, (double)par2);
ChunkPosition chunkposition = new ChunkPosition(vec3);
int i = par0World.getBlockId(chunkposition.x, chunkposition.y, chunkposition.z);
if (i != 0 && Block.blocksList[i].blockMaterial.isLiquid())
{
float f1 = BlockFluid.getFluidHeightPercent(par0World.getBlockMetadata(chunkposition.x, chunkposition.y, chunkposition.z)) - 0.11111111F;
float f2 = (float)(chunkposition.y + 1) - f1;
if (vec3.yCoord >= (double)f2)
{
i = par0World.getBlockId(chunkposition.x, chunkposition.y + 1, chunkposition.z);
}
}
return i;
}
开发者ID:HATB0T,项目名称:RuneCraftery,代码行数:24,代码来源:ActiveRenderInfo.java
示例2: func_72918_a
import net.minecraft.block.BlockFluid; //导入依赖的package包/类
public boolean func_72918_a(AxisAlignedBB p_72918_1_, Material p_72918_2_, Entity p_72918_3_) {
int var4 = MathHelper.func_76128_c(p_72918_1_.field_72340_a);
int var5 = MathHelper.func_76128_c(p_72918_1_.field_72336_d + 1.0D);
int var6 = MathHelper.func_76128_c(p_72918_1_.field_72338_b);
int var7 = MathHelper.func_76128_c(p_72918_1_.field_72337_e + 1.0D);
int var8 = MathHelper.func_76128_c(p_72918_1_.field_72339_c);
int var9 = MathHelper.func_76128_c(p_72918_1_.field_72334_f + 1.0D);
if(!this.func_72904_c(var4, var6, var8, var5, var7, var9)) {
return false;
} else {
boolean var10 = false;
Vec3 var11 = this.func_82732_R().func_72345_a(0.0D, 0.0D, 0.0D);
for(int var12 = var4; var12 < var5; ++var12) {
for(int var13 = var6; var13 < var7; ++var13) {
for(int var14 = var8; var14 < var9; ++var14) {
Block var15 = Block.field_71973_m[this.func_72798_a(var12, var13, var14)];
if(var15 != null && var15.field_72018_cp == p_72918_2_) {
double var16 = (double)((float)(var13 + 1) - BlockFluid.func_72199_d(this.func_72805_g(var12, var13, var14)));
if((double)var7 >= var16) {
var10 = true;
var15.func_71901_a(this, var12, var13, var14, p_72918_3_, var11);
}
}
}
}
}
if(var11.func_72433_c() > 0.0D && p_72918_3_.func_96092_aw()) {
var11 = var11.func_72432_b();
double var18 = 0.014D;
p_72918_3_.field_70159_w += var11.field_72450_a * var18;
p_72918_3_.field_70181_x += var11.field_72448_b * var18;
p_72918_3_.field_70179_y += var11.field_72449_c * var18;
}
return var10;
}
}
开发者ID:HATB0T,项目名称:RuneCraftery,代码行数:40,代码来源:World.java
示例3: func_70055_a
import net.minecraft.block.BlockFluid; //导入依赖的package包/类
public boolean func_70055_a(Material p_70055_1_) {
double var2 = this.field_70163_u + (double)this.func_70047_e();
int var4 = MathHelper.func_76128_c(this.field_70165_t);
int var5 = MathHelper.func_76141_d((float)MathHelper.func_76128_c(var2));
int var6 = MathHelper.func_76128_c(this.field_70161_v);
int var7 = this.field_70170_p.func_72798_a(var4, var5, var6);
if(var7 != 0 && Block.field_71973_m[var7].field_72018_cp == p_70055_1_) {
float var8 = BlockFluid.func_72199_d(this.field_70170_p.func_72805_g(var4, var5, var6)) - 0.11111111F;
float var9 = (float)(var5 + 1) - var8;
return var2 < (double)var9;
} else {
return false;
}
}
开发者ID:HATB0T,项目名称:RuneCraftery,代码行数:15,代码来源:Entity.java
示例4: func_70071_h_
import net.minecraft.block.BlockFluid; //导入依赖的package包/类
public void func_70071_h_() {
this.field_70169_q = this.field_70165_t;
this.field_70167_r = this.field_70163_u;
this.field_70166_s = this.field_70161_v;
this.field_70181_x -= (double)this.field_70545_g;
this.func_70091_d(this.field_70159_w, this.field_70181_x, this.field_70179_y);
this.field_70159_w *= 0.9800000190734863D;
this.field_70181_x *= 0.9800000190734863D;
this.field_70179_y *= 0.9800000190734863D;
if(this.field_70547_e-- <= 0) {
this.func_70106_y();
}
if(this.field_70122_E) {
if(Math.random() < 0.5D) {
this.func_70106_y();
}
this.field_70159_w *= 0.699999988079071D;
this.field_70179_y *= 0.699999988079071D;
}
Material var1 = this.field_70170_p.func_72803_f(MathHelper.func_76128_c(this.field_70165_t), MathHelper.func_76128_c(this.field_70163_u), MathHelper.func_76128_c(this.field_70161_v));
if(var1.func_76224_d() || var1.func_76220_a()) {
double var2 = (double)((float)(MathHelper.func_76128_c(this.field_70163_u) + 1) - BlockFluid.func_72199_d(this.field_70170_p.func_72805_g(MathHelper.func_76128_c(this.field_70165_t), MathHelper.func_76128_c(this.field_70163_u), MathHelper.func_76128_c(this.field_70161_v))));
if(this.field_70163_u < var2) {
this.func_70106_y();
}
}
}
开发者ID:HATB0T,项目名称:RuneCraftery,代码行数:32,代码来源:EntityRainFX.java
示例5: func_74584_a
import net.minecraft.block.BlockFluid; //导入依赖的package包/类
public static int func_74584_a(World p_74584_0_, EntityLivingBase p_74584_1_, float p_74584_2_) {
Vec3 var3 = func_74585_b(p_74584_1_, (double)p_74584_2_);
ChunkPosition var4 = new ChunkPosition(var3);
int var5 = p_74584_0_.func_72798_a(var4.field_76930_a, var4.field_76928_b, var4.field_76929_c);
if(var5 != 0 && Block.field_71973_m[var5].field_72018_cp.func_76224_d()) {
float var6 = BlockFluid.func_72199_d(p_74584_0_.func_72805_g(var4.field_76930_a, var4.field_76928_b, var4.field_76929_c)) - 0.11111111F;
float var7 = (float)(var4.field_76928_b + 1) - var6;
if(var3.field_72448_b >= (double)var7) {
var5 = p_74584_0_.func_72798_a(var4.field_76930_a, var4.field_76928_b + 1, var4.field_76929_c);
}
}
return var5;
}
开发者ID:HATB0T,项目名称:RuneCraftery,代码行数:15,代码来源:ActiveRenderInfo.java
示例6: func_78596_a
import net.minecraft.block.BlockFluid; //导入依赖的package包/类
public float func_78596_a(int p_78596_1_, int p_78596_2_, int p_78596_3_, Material p_78596_4_) {
int var5 = 0;
float var6 = 0.0F;
for(int var7 = 0; var7 < 4; ++var7) {
int var8 = p_78596_1_ - (var7 & 1);
int var10 = p_78596_3_ - (var7 >> 1 & 1);
if(this.field_78669_a.func_72803_f(var8, p_78596_2_ + 1, var10) == p_78596_4_) {
return 1.0F;
}
Material var11 = this.field_78669_a.func_72803_f(var8, p_78596_2_, var10);
if(var11 == p_78596_4_) {
int var12 = this.field_78669_a.func_72805_g(var8, p_78596_2_, var10);
if(var12 >= 8 || var12 == 0) {
var6 += BlockFluid.func_72199_d(var12) * 10.0F;
var5 += 10;
}
var6 += BlockFluid.func_72199_d(var12);
++var5;
} else if(!var11.func_76220_a()) {
++var6;
++var5;
}
}
return 1.0F - var6 / (float)var5;
}
开发者ID:HATB0T,项目名称:RuneCraftery,代码行数:30,代码来源:RenderBlocks.java
示例7: onTextureStitchedPost
import net.minecraft.block.BlockFluid; //导入依赖的package包/类
public static void onTextureStitchedPost(TextureMap map)
{
MinecraftForge.EVENT_BUS.post(new TextureStitchEvent.Post(map));
FluidRegistry.WATER.setIcons(BlockFluid.getFluidIcon("water_still"), BlockFluid.getFluidIcon("water_flow"));
FluidRegistry.LAVA.setIcons(BlockFluid.getFluidIcon("lava_still"), BlockFluid.getFluidIcon("lava_flow"));
}
开发者ID:HATB0T,项目名称:RuneCraftery,代码行数:8,代码来源:ForgeHooksClient.java
示例8: getRenderingIcon
import net.minecraft.block.BlockFluid; //导入依赖的package包/类
/**
* Get the rendering icon for this liquid stack, for presentation in the world or in GUIs.
* Defaults to handling water and lava, and returns the set rendering icon otherwise.
*
* See {@link #getTextureSheet()} to get the texture sheet this icon is associated with
*
* @return The icon for rendering this liquid
*/
@SideOnly(CLIENT)
public Icon getRenderingIcon()
{
if (itemID == Block.waterStill.blockID)
{
return BlockFluid.getFluidIcon("water");
}
else if (itemID == Block.lavaStill.blockID)
{
return BlockFluid.getFluidIcon("lava");
}
return renderingIcon;
}
开发者ID:HATB0T,项目名称:RuneCraftery,代码行数:22,代码来源:LiquidStack.java
示例9: onUpdate
import net.minecraft.block.BlockFluid; //导入依赖的package包/类
/**
* Called to update the entity's position/logic.
*/
public void onUpdate()
{
this.prevPosX = this.posX;
this.prevPosY = this.posY;
this.prevPosZ = this.posZ;
this.motionY -= (double)this.particleGravity;
this.moveEntity(this.motionX, this.motionY, this.motionZ);
this.motionX *= 0.9800000190734863D;
this.motionY *= 0.9800000190734863D;
this.motionZ *= 0.9800000190734863D;
if (this.particleMaxAge-- <= 0)
{
this.setDead();
}
if (this.onGround)
{
if (Math.random() < 0.5D)
{
this.setDead();
}
this.motionX *= 0.699999988079071D;
this.motionZ *= 0.699999988079071D;
}
Material material = this.worldObj.getBlockMaterial(MathHelper.floor_double(this.posX), MathHelper.floor_double(this.posY), MathHelper.floor_double(this.posZ));
if (material.isLiquid() || material.isSolid())
{
double d0 = (double)((float)(MathHelper.floor_double(this.posY) + 1) - BlockFluid.getFluidHeightPercent(this.worldObj.getBlockMetadata(MathHelper.floor_double(this.posX), MathHelper.floor_double(this.posY), MathHelper.floor_double(this.posZ))));
if (this.posY < d0)
{
this.setDead();
}
}
}
开发者ID:HATB0T,项目名称:RuneCraftery,代码行数:43,代码来源:EntityRainFX.java
示例10: getFluidHeight
import net.minecraft.block.BlockFluid; //导入依赖的package包/类
/**
* Get fluid height
*/
public float getFluidHeight(int par1, int par2, int par3, Material par4Material)
{
int l = 0;
float f = 0.0F;
for (int i1 = 0; i1 < 4; ++i1)
{
int j1 = par1 - (i1 & 1);
int k1 = par3 - (i1 >> 1 & 1);
if (this.blockAccess.getBlockMaterial(j1, par2 + 1, k1) == par4Material)
{
return 1.0F;
}
Material material1 = this.blockAccess.getBlockMaterial(j1, par2, k1);
if (material1 == par4Material)
{
int l1 = this.blockAccess.getBlockMetadata(j1, par2, k1);
if (l1 >= 8 || l1 == 0)
{
f += BlockFluid.getFluidHeightPercent(l1) * 10.0F;
l += 10;
}
f += BlockFluid.getFluidHeightPercent(l1);
++l;
}
else if (!material1.isSolid())
{
++f;
++l;
}
}
return 1.0F - f / (float)l;
}
开发者ID:HATB0T,项目名称:RuneCraftery,代码行数:43,代码来源:RenderBlocks.java
示例11: isBuild
import net.minecraft.block.BlockFluid; //导入依赖的package包/类
public boolean isBuild(World world, int x, int y, int z)
{
if (isFluid())
{
return Block.blocksList[world.getBlockId(x + i, y + j, z + k)] instanceof BlockFluid;
}
return world.getBlockId(x + i, y + j, z + k) == blockID && world.getBlockMetadata(x + i, y + j, z + k) == blockMeta;
}
开发者ID:Open-Code-Developers,项目名称:KeplerCore,代码行数:9,代码来源:SchematicBlock.java
示例12: isPassthroughBlock
import net.minecraft.block.BlockFluid; //导入依赖的package包/类
public static boolean isPassthroughBlock(World world, int x, int y, int z) {
if (y < 0 || y > 254) return false;
int id = world.getBlockId(x, y, z);
return Block.blocksList[id] == null || Block.blocksList[id].isAirBlock(world, x, y, z) || Block.blocksList[id] instanceof BlockFluid || Block.blocksList[id] instanceof BlockSnow || Block.blocksList[id] instanceof BlockTallGrass;
}
开发者ID:austinv11,项目名称:PeripheralsPlusPlus,代码行数:7,代码来源:Util.java
示例13: func_70071_h_
import net.minecraft.block.BlockFluid; //导入依赖的package包/类
public void func_70071_h_() {
this.field_70169_q = this.field_70165_t;
this.field_70167_r = this.field_70163_u;
this.field_70166_s = this.field_70161_v;
if(this.field_70563_a == Material.field_76244_g) {
this.field_70552_h = 0.2F;
this.field_70553_i = 0.3F;
this.field_70551_j = 1.0F;
} else {
this.field_70552_h = 1.0F;
this.field_70553_i = 16.0F / (float)(40 - this.field_70564_aq + 16);
this.field_70551_j = 4.0F / (float)(40 - this.field_70564_aq + 8);
}
this.field_70181_x -= (double)this.field_70545_g;
if(this.field_70564_aq-- > 0) {
this.field_70159_w *= 0.02D;
this.field_70181_x *= 0.02D;
this.field_70179_y *= 0.02D;
this.func_70536_a(113);
} else {
this.func_70536_a(112);
}
this.func_70091_d(this.field_70159_w, this.field_70181_x, this.field_70179_y);
this.field_70159_w *= 0.9800000190734863D;
this.field_70181_x *= 0.9800000190734863D;
this.field_70179_y *= 0.9800000190734863D;
if(this.field_70547_e-- <= 0) {
this.func_70106_y();
}
if(this.field_70122_E) {
if(this.field_70563_a == Material.field_76244_g) {
this.func_70106_y();
this.field_70170_p.func_72869_a("splash", this.field_70165_t, this.field_70163_u, this.field_70161_v, 0.0D, 0.0D, 0.0D);
} else {
this.func_70536_a(114);
}
this.field_70159_w *= 0.699999988079071D;
this.field_70179_y *= 0.699999988079071D;
}
Material var1 = this.field_70170_p.func_72803_f(MathHelper.func_76128_c(this.field_70165_t), MathHelper.func_76128_c(this.field_70163_u), MathHelper.func_76128_c(this.field_70161_v));
if(var1.func_76224_d() || var1.func_76220_a()) {
double var2 = (double)((float)(MathHelper.func_76128_c(this.field_70163_u) + 1) - BlockFluid.func_72199_d(this.field_70170_p.func_72805_g(MathHelper.func_76128_c(this.field_70165_t), MathHelper.func_76128_c(this.field_70163_u), MathHelper.func_76128_c(this.field_70161_v))));
if(this.field_70163_u < var2) {
this.func_70106_y();
}
}
}
开发者ID:HATB0T,项目名称:RuneCraftery,代码行数:54,代码来源:EntityDropParticleFX.java
示例14: func_78615_a
import net.minecraft.block.BlockFluid; //导入依赖的package包/类
public boolean func_78615_a(BlockCauldron p_78615_1_, int p_78615_2_, int p_78615_3_, int p_78615_4_) {
this.func_78570_q(p_78615_1_, p_78615_2_, p_78615_3_, p_78615_4_);
Tessellator var5 = Tessellator.field_78398_a;
var5.func_78380_c(p_78615_1_.func_71874_e(this.field_78669_a, p_78615_2_, p_78615_3_, p_78615_4_));
float var6 = 1.0F;
int var7 = p_78615_1_.func_71920_b(this.field_78669_a, p_78615_2_, p_78615_3_, p_78615_4_);
float var8 = (float)(var7 >> 16 & 255) / 255.0F;
float var9 = (float)(var7 >> 8 & 255) / 255.0F;
float var10 = (float)(var7 & 255) / 255.0F;
float var12;
if(EntityRenderer.field_78517_a) {
float var11 = (var8 * 30.0F + var9 * 59.0F + var10 * 11.0F) / 100.0F;
var12 = (var8 * 30.0F + var9 * 70.0F) / 100.0F;
float var13 = (var8 * 30.0F + var10 * 70.0F) / 100.0F;
var8 = var11;
var9 = var12;
var10 = var13;
}
var5.func_78386_a(var6 * var8, var6 * var9, var6 * var10);
Icon var16 = p_78615_1_.func_71851_a(2);
var12 = 0.125F;
this.func_78605_f(p_78615_1_, (double)((float)p_78615_2_ - 1.0F + var12), (double)p_78615_3_, (double)p_78615_4_, var16);
this.func_78573_e(p_78615_1_, (double)((float)p_78615_2_ + 1.0F - var12), (double)p_78615_3_, (double)p_78615_4_, var16);
this.func_78622_d(p_78615_1_, (double)p_78615_2_, (double)p_78615_3_, (double)((float)p_78615_4_ - 1.0F + var12), var16);
this.func_78611_c(p_78615_1_, (double)p_78615_2_, (double)p_78615_3_, (double)((float)p_78615_4_ + 1.0F - var12), var16);
Icon var17 = BlockCauldron.func_94375_b("inner");
this.func_78617_b(p_78615_1_, (double)p_78615_2_, (double)((float)p_78615_3_ - 1.0F + 0.25F), (double)p_78615_4_, var17);
this.func_78613_a(p_78615_1_, (double)p_78615_2_, (double)((float)p_78615_3_ + 1.0F - 0.75F), (double)p_78615_4_, var17);
int var14 = this.field_78669_a.func_72805_g(p_78615_2_, p_78615_3_, p_78615_4_);
if(var14 > 0) {
Icon var15 = BlockFluid.func_94424_b("water_still");
if(var14 > 3) {
var14 = 3;
}
this.func_78617_b(p_78615_1_, (double)p_78615_2_, (double)((float)p_78615_3_ - 1.0F + (6.0F + (float)var14 * 3.0F) / 16.0F), (double)p_78615_4_, var15);
}
return true;
}
开发者ID:HATB0T,项目名称:RuneCraftery,代码行数:42,代码来源:RenderBlocks.java
示例15: handleMaterialAcceleration
import net.minecraft.block.BlockFluid; //导入依赖的package包/类
/**
* handles the acceleration of an object whilst in water. Not sure if it is used elsewhere.
*/
public boolean handleMaterialAcceleration(AxisAlignedBB par1AxisAlignedBB, Material par2Material, Entity par3Entity)
{
int i = MathHelper.floor_double(par1AxisAlignedBB.minX);
int j = MathHelper.floor_double(par1AxisAlignedBB.maxX + 1.0D);
int k = MathHelper.floor_double(par1AxisAlignedBB.minY);
int l = MathHelper.floor_double(par1AxisAlignedBB.maxY + 1.0D);
int i1 = MathHelper.floor_double(par1AxisAlignedBB.minZ);
int j1 = MathHelper.floor_double(par1AxisAlignedBB.maxZ + 1.0D);
if (!this.checkChunksExist(i, k, i1, j, l, j1))
{
return false;
}
else
{
boolean flag = false;
Vec3 vec3 = this.getWorldVec3Pool().getVecFromPool(0.0D, 0.0D, 0.0D);
for (int k1 = i; k1 < j; ++k1)
{
for (int l1 = k; l1 < l; ++l1)
{
for (int i2 = i1; i2 < j1; ++i2)
{
Block block = Block.blocksList[this.getBlockId(k1, l1, i2)];
if (block != null && block.blockMaterial == par2Material)
{
double d0 = (double)((float)(l1 + 1) - BlockFluid.getFluidHeightPercent(this.getBlockMetadata(k1, l1, i2)));
if ((double)l >= d0)
{
flag = true;
block.velocityToAddToEntity(this, k1, l1, i2, par3Entity, vec3);
}
}
}
}
}
if (vec3.lengthVector() > 0.0D && par3Entity.isPushedByWater())
{
vec3 = vec3.normalize();
double d1 = 0.014D;
par3Entity.motionX += vec3.xCoord * d1;
par3Entity.motionY += vec3.yCoord * d1;
par3Entity.motionZ += vec3.zCoord * d1;
}
return flag;
}
}
开发者ID:HATB0T,项目名称:RuneCraftery,代码行数:56,代码来源:World.java
示例16: onUpdate
import net.minecraft.block.BlockFluid; //导入依赖的package包/类
/**
* Called to update the entity's position/logic.
*/
public void onUpdate()
{
this.prevPosX = this.posX;
this.prevPosY = this.posY;
this.prevPosZ = this.posZ;
if (this.materialType == Material.water)
{
this.particleRed = 0.2F;
this.particleGreen = 0.3F;
this.particleBlue = 1.0F;
}
else
{
this.particleRed = 1.0F;
this.particleGreen = 16.0F / (float)(40 - this.bobTimer + 16);
this.particleBlue = 4.0F / (float)(40 - this.bobTimer + 8);
}
this.motionY -= (double)this.particleGravity;
if (this.bobTimer-- > 0)
{
this.motionX *= 0.02D;
this.motionY *= 0.02D;
this.motionZ *= 0.02D;
this.setParticleTextureIndex(113);
}
else
{
this.setParticleTextureIndex(112);
}
this.moveEntity(this.motionX, this.motionY, this.motionZ);
this.motionX *= 0.9800000190734863D;
this.motionY *= 0.9800000190734863D;
this.motionZ *= 0.9800000190734863D;
if (this.particleMaxAge-- <= 0)
{
this.setDead();
}
if (this.onGround)
{
if (this.materialType == Material.water)
{
this.setDead();
this.worldObj.spawnParticle("splash", this.posX, this.posY, this.posZ, 0.0D, 0.0D, 0.0D);
}
else
{
this.setParticleTextureIndex(114);
}
this.motionX *= 0.699999988079071D;
this.motionZ *= 0.699999988079071D;
}
Material material = this.worldObj.getBlockMaterial(MathHelper.floor_double(this.posX), MathHelper.floor_double(this.posY), MathHelper.floor_double(this.posZ));
if (material.isLiquid() || material.isSolid())
{
double d0 = (double)((float)(MathHelper.floor_double(this.posY) + 1) - BlockFluid.getFluidHeightPercent(this.worldObj.getBlockMetadata(MathHelper.floor_double(this.posX), MathHelper.floor_double(this.posY), MathHelper.floor_double(this.posZ))));
if (this.posY < d0)
{
this.setDead();
}
}
}
开发者ID:HATB0T,项目名称:RuneCraftery,代码行数:75,代码来源:EntityDropParticleFX.java
示例17: renderBlockCauldron
import net.minecraft.block.BlockFluid; //导入依赖的package包/类
/**
* Render block cauldron
*/
public boolean renderBlockCauldron(BlockCauldron par1BlockCauldron, int par2, int par3, int par4)
{
this.renderStandardBlock(par1BlockCauldron, par2, par3, par4);
Tessellator tessellator = Tessellator.instance;
tessellator.setBrightness(par1BlockCauldron.getMixedBrightnessForBlock(this.blockAccess, par2, par3, par4));
float f = 1.0F;
int l = par1BlockCauldron.colorMultiplier(this.blockAccess, par2, par3, par4);
float f1 = (float)(l >> 16 & 255) / 255.0F;
float f2 = (float)(l >> 8 & 255) / 255.0F;
float f3 = (float)(l & 255) / 255.0F;
float f4;
if (EntityRenderer.anaglyphEnable)
{
float f5 = (f1 * 30.0F + f2 * 59.0F + f3 * 11.0F) / 100.0F;
f4 = (f1 * 30.0F + f2 * 70.0F) / 100.0F;
float f6 = (f1 * 30.0F + f3 * 70.0F) / 100.0F;
f1 = f5;
f2 = f4;
f3 = f6;
}
tessellator.setColorOpaque_F(f * f1, f * f2, f * f3);
Icon icon = par1BlockCauldron.getBlockTextureFromSide(2);
f4 = 0.125F;
this.renderFaceXPos(par1BlockCauldron, (double)((float)par2 - 1.0F + f4), (double)par3, (double)par4, icon);
this.renderFaceXNeg(par1BlockCauldron, (double)((float)par2 + 1.0F - f4), (double)par3, (double)par4, icon);
this.renderFaceZPos(par1BlockCauldron, (double)par2, (double)par3, (double)((float)par4 - 1.0F + f4), icon);
this.renderFaceZNeg(par1BlockCauldron, (double)par2, (double)par3, (double)((float)par4 + 1.0F - f4), icon);
Icon icon1 = BlockCauldron.getCauldronIcon("inner");
this.renderFaceYPos(par1BlockCauldron, (double)par2, (double)((float)par3 - 1.0F + 0.25F), (double)par4, icon1);
this.renderFaceYNeg(par1BlockCauldron, (double)par2, (double)((float)par3 + 1.0F - 0.75F), (double)par4, icon1);
int i1 = this.blockAccess.getBlockMetadata(par2, par3, par4);
if (i1 > 0)
{
Icon icon2 = BlockFluid.getFluidIcon("water_still");
if (i1 > 3)
{
i1 = 3;
}
this.renderFaceYPos(par1BlockCauldron, (double)par2, (double)((float)par3 - 1.0F + (6.0F + (float)i1 * 3.0F) / 16.0F), (double)par4, icon2);
}
return true;
}
开发者ID:HATB0T,项目名称:RuneCraftery,代码行数:52,代码来源:RenderBlocks.java
示例18: initBlocks
import net.minecraft.block.BlockFluid; //导入依赖的package包/类
public static void initBlocks()
{
aquatanWater = (BlockFluid)(new BlockAquatanWater(AquatanBlockConfig.aquatanWaterID, Material.water)).setHardness(100.0F).setLightOpacity(1).setUnlocalizedName("aquatanWater");
aquatanFlowingWater = (BlockFluid)(new BlockAquatanFlowingWater(AquatanBlockConfig.aquatanWaterID - 1, Material.water)).setHardness(100.0F).setLightOpacity(1).setUnlocalizedName("aquatanWater");
}
开发者ID:Hologuardian,项目名称:Sojourn,代码行数:7,代码来源:AquatanBlocks.java
示例19: isFluid
import net.minecraft.block.BlockFluid; //导入依赖的package包/类
public boolean isFluid()
{
return Block.blocksList[blockID] instanceof BlockFluid
|| Block.blocksList[blockID] instanceof IFluidBlock;
}
开发者ID:Open-Code-Developers,项目名称:KeplerCore,代码行数:6,代码来源:SchematicBlock.java
注:本文中的net.minecraft.block.BlockFluid类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论