本文整理汇总了Java中net.minecraft.block.BlockDragonEgg类的典型用法代码示例。如果您正苦于以下问题:Java BlockDragonEgg类的具体用法?Java BlockDragonEgg怎么用?Java BlockDragonEgg使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
BlockDragonEgg类属于net.minecraft.block包,在下文中一共展示了BlockDragonEgg类的13个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: func_77003_a
import net.minecraft.block.BlockDragonEgg; //导入依赖的package包/类
public void func_77003_a(EntityFallingSand p_77003_1_, double p_77003_2_, double p_77003_4_, double p_77003_6_, float p_77003_8_, float p_77003_9_) {
World var10 = p_77003_1_.func_70283_d();
Block var11 = Block.field_71973_m[p_77003_1_.field_70287_a];
if(var10.func_72798_a(MathHelper.func_76128_c(p_77003_1_.field_70165_t), MathHelper.func_76128_c(p_77003_1_.field_70163_u), MathHelper.func_76128_c(p_77003_1_.field_70161_v)) != p_77003_1_.field_70287_a) {
GL11.glPushMatrix();
GL11.glTranslatef((float)p_77003_2_, (float)p_77003_4_, (float)p_77003_6_);
this.func_110777_b(p_77003_1_);
GL11.glDisable(2896);
Tessellator var12;
if(var11 instanceof BlockAnvil && var11.func_71857_b() == 35) {
this.field_77004_a.field_78669_a = var10;
var12 = Tessellator.field_78398_a;
var12.func_78382_b();
var12.func_78373_b((double)((float)(-MathHelper.func_76128_c(p_77003_1_.field_70165_t)) - 0.5F), (double)((float)(-MathHelper.func_76128_c(p_77003_1_.field_70163_u)) - 0.5F), (double)((float)(-MathHelper.func_76128_c(p_77003_1_.field_70161_v)) - 0.5F));
this.field_77004_a.func_85096_a((BlockAnvil)var11, MathHelper.func_76128_c(p_77003_1_.field_70165_t), MathHelper.func_76128_c(p_77003_1_.field_70163_u), MathHelper.func_76128_c(p_77003_1_.field_70161_v), p_77003_1_.field_70285_b);
var12.func_78373_b(0.0D, 0.0D, 0.0D);
var12.func_78381_a();
} else if(var11.func_71857_b() == 27) {
this.field_77004_a.field_78669_a = var10;
var12 = Tessellator.field_78398_a;
var12.func_78382_b();
var12.func_78373_b((double)((float)(-MathHelper.func_76128_c(p_77003_1_.field_70165_t)) - 0.5F), (double)((float)(-MathHelper.func_76128_c(p_77003_1_.field_70163_u)) - 0.5F), (double)((float)(-MathHelper.func_76128_c(p_77003_1_.field_70161_v)) - 0.5F));
this.field_77004_a.func_78618_a((BlockDragonEgg)var11, MathHelper.func_76128_c(p_77003_1_.field_70165_t), MathHelper.func_76128_c(p_77003_1_.field_70163_u), MathHelper.func_76128_c(p_77003_1_.field_70161_v));
var12.func_78373_b(0.0D, 0.0D, 0.0D);
var12.func_78381_a();
} else if(var11 != null) {
this.field_77004_a.func_83018_a(var11);
this.field_77004_a.func_78588_a(var11, var10, MathHelper.func_76128_c(p_77003_1_.field_70165_t), MathHelper.func_76128_c(p_77003_1_.field_70163_u), MathHelper.func_76128_c(p_77003_1_.field_70161_v), p_77003_1_.field_70285_b);
}
GL11.glEnable(2896);
GL11.glPopMatrix();
}
}
示例2: func_78612_b
import net.minecraft.block.BlockDragonEgg; //导入依赖的package包/类
public boolean func_78612_b(Block p_78612_1_, int p_78612_2_, int p_78612_3_, int p_78612_4_) {
int var5 = p_78612_1_.func_71857_b();
if(var5 == -1) {
return false;
} else {
p_78612_1_.func_71902_a(this.field_78669_a, p_78612_2_, p_78612_3_, p_78612_4_);
this.func_83018_a(p_78612_1_);
return var5 == 0?this.func_78570_q(p_78612_1_, p_78612_2_, p_78612_3_, p_78612_4_):(var5 == 4?this.func_78621_p(p_78612_1_, p_78612_2_, p_78612_3_, p_78612_4_):(var5 == 31?this.func_78581_r(p_78612_1_, p_78612_2_, p_78612_3_, p_78612_4_):(var5 == 1?this.func_78620_l(p_78612_1_, p_78612_2_, p_78612_3_, p_78612_4_):(var5 == 2?this.func_78572_c(p_78612_1_, p_78612_2_, p_78612_3_, p_78612_4_):(var5 == 20?this.func_78598_k(p_78612_1_, p_78612_2_, p_78612_3_, p_78612_4_):(var5 == 11?this.func_78582_a((BlockFence)p_78612_1_, p_78612_2_, p_78612_3_, p_78612_4_):(var5 == 39?this.func_96445_r(p_78612_1_, p_78612_2_, p_78612_3_, p_78612_4_):(var5 == 5?this.func_78589_i(p_78612_1_, p_78612_2_, p_78612_3_, p_78612_4_):(var5 == 13?this.func_78584_s(p_78612_1_, p_78612_2_, p_78612_3_, p_78612_4_):(var5 == 9?this.func_78586_a((BlockRailBase)p_78612_1_, p_78612_2_, p_78612_3_, p_78612_4_):(var5 == 19?this.func_78603_m(p_78612_1_, p_78612_2_, p_78612_3_, p_78612_4_):(var5 == 23?this.func_78566_o(p_78612_1_, p_78612_2_, p_78612_3_, p_78612_4_):(var5 == 6?this.func_78614_n(p_78612_1_, p_78612_2_, p_78612_3_, p_78612_4_):(var5 == 3?this.func_78590_h((BlockFire)p_78612_1_, p_78612_2_, p_78612_3_, p_78612_4_):(var5 == 8?this.func_78576_j(p_78612_1_, p_78612_2_, p_78612_3_, p_78612_4_):(var5 == 7?this.func_78601_u(p_78612_1_, p_78612_2_, p_78612_3_, p_78612_4_):(var5 == 10?this.func_78565_t((BlockStairs)p_78612_1_, p_78612_2_, p_78612_3_, p_78612_4_):(var5 == 27?this.func_78618_a((BlockDragonEgg)p_78612_1_, p_78612_2_, p_78612_3_, p_78612_4_):(var5 == 32?this.func_82779_a((BlockWall)p_78612_1_, p_78612_2_, p_78612_3_, p_78612_4_):(var5 == 12?this.func_78594_e(p_78612_1_, p_78612_2_, p_78612_3_, p_78612_4_):(var5 == 29?this.func_78577_f(p_78612_1_, p_78612_2_, p_78612_3_, p_78612_4_):(var5 == 30?this.func_78619_g(p_78612_1_, p_78612_2_, p_78612_3_, p_78612_4_):(var5 == 14?this.func_78574_w(p_78612_1_, p_78612_2_, p_78612_3_, p_78612_4_):(var5 == 15?this.func_78610_x((BlockRedstoneRepeater)p_78612_1_, p_78612_2_, p_78612_3_, p_78612_4_):(var5 == 36?this.func_94176_a((BlockRedstoneLogic)p_78612_1_, p_78612_2_, p_78612_3_, p_78612_4_):(var5 == 37?this.func_94171_a((BlockComparator)p_78612_1_, p_78612_2_, p_78612_3_, p_78612_4_):(var5 == 16?this.func_78593_b(p_78612_1_, p_78612_2_, p_78612_3_, p_78612_4_, false):(var5 == 17?this.func_78608_c(p_78612_1_, p_78612_2_, p_78612_3_, p_78612_4_, true):(var5 == 18?this.func_78592_a((BlockPane)p_78612_1_, p_78612_2_, p_78612_3_, p_78612_4_):(var5 == 21?this.func_78580_a((BlockFenceGate)p_78612_1_, p_78612_2_, p_78612_3_, p_78612_4_):(var5 == 24?this.func_78615_a((BlockCauldron)p_78612_1_, p_78612_2_, p_78612_3_, p_78612_4_):(var5 == 33?this.func_82780_a((BlockFlowerPot)p_78612_1_, p_78612_2_, p_78612_3_, p_78612_4_):(var5 == 35?this.func_82775_a((BlockAnvil)p_78612_1_, p_78612_2_, p_78612_3_, p_78612_4_):(var5 == 25?this.func_78585_a((BlockBrewingStand)p_78612_1_, p_78612_2_, p_78612_3_, p_78612_4_):(var5 == 26?this.func_78567_v((BlockEndPortalFrame)p_78612_1_, p_78612_2_, p_78612_3_, p_78612_4_):(var5 == 28?this.func_78616_a((BlockCocoa)p_78612_1_, p_78612_2_, p_78612_3_, p_78612_4_):(var5 == 34?this.func_82778_a((BlockBeacon)p_78612_1_, p_78612_2_, p_78612_3_, p_78612_4_):(var5 == 38?this.func_94172_a((BlockHopper)p_78612_1_, p_78612_2_, p_78612_3_, p_78612_4_):false))))))))))))))))))))))))))))))))))))));
}
}
示例3: doRender
import net.minecraft.block.BlockDragonEgg; //导入依赖的package包/类
/**
* Actually renders the given argument. This is a synthetic bridge method, always casting down its argument and then
* handing it off to a worker function which does the actual work. In all probabilty, the class Render is generic
* (Render<T extends Entity) and this method has signature public void doRender(T entity, double d, double d1,
* double d2, float f, float f1). But JAD is pre 1.5 so doesn't do that.
*/
public void doRender(EntityFallingBlock p_147918_1_, double p_147918_2_, double p_147918_4_, double p_147918_6_, float p_147918_8_, float p_147918_9_)
{
World var10 = p_147918_1_.func_145807_e();
Block var11 = p_147918_1_.func_145805_f();
int var12 = MathHelper.floor_double(p_147918_1_.posX);
int var13 = MathHelper.floor_double(p_147918_1_.posY);
int var14 = MathHelper.floor_double(p_147918_1_.posZ);
if (var11 != null && var11 != var10.getBlock(var12, var13, var14))
{
GL11.glPushMatrix();
GL11.glTranslatef((float)p_147918_2_, (float)p_147918_4_, (float)p_147918_6_);
this.bindEntityTexture(p_147918_1_);
GL11.glDisable(GL11.GL_LIGHTING);
Tessellator var15;
if (var11 instanceof BlockAnvil)
{
this.field_147920_a.blockAccess = var10;
var15 = Tessellator.instance;
var15.startDrawingQuads();
var15.setTranslation((double)((float)(-var12) - 0.5F), (double)((float)(-var13) - 0.5F), (double)((float)(-var14) - 0.5F));
this.field_147920_a.renderBlockAnvilMetadata((BlockAnvil)var11, var12, var13, var14, p_147918_1_.field_145814_a);
var15.setTranslation(0.0D, 0.0D, 0.0D);
var15.draw();
}
else if (var11 instanceof BlockDragonEgg)
{
this.field_147920_a.blockAccess = var10;
var15 = Tessellator.instance;
var15.startDrawingQuads();
var15.setTranslation((double)((float)(-var12) - 0.5F), (double)((float)(-var13) - 0.5F), (double)((float)(-var14) - 0.5F));
this.field_147920_a.renderBlockDragonEgg((BlockDragonEgg)var11, var12, var13, var14);
var15.setTranslation(0.0D, 0.0D, 0.0D);
var15.draw();
}
else
{
this.field_147920_a.setRenderBoundsFromBlock(var11);
this.field_147920_a.renderBlockSandFalling(var11, var10, var12, var13, var14, p_147918_1_.field_145814_a);
}
GL11.glEnable(GL11.GL_LIGHTING);
GL11.glPopMatrix();
}
}
示例4: renderBlockDragonEgg
import net.minecraft.block.BlockDragonEgg; //导入依赖的package包/类
public boolean renderBlockDragonEgg(BlockDragonEgg p_147802_1_, int p_147802_2_, int p_147802_3_, int p_147802_4_)
{
boolean var5 = false;
int var6 = 0;
for (int var7 = 0; var7 < 8; ++var7)
{
byte var8 = 0;
byte var9 = 1;
if (var7 == 0)
{
var8 = 2;
}
if (var7 == 1)
{
var8 = 3;
}
if (var7 == 2)
{
var8 = 4;
}
if (var7 == 3)
{
var8 = 5;
var9 = 2;
}
if (var7 == 4)
{
var8 = 6;
var9 = 3;
}
if (var7 == 5)
{
var8 = 7;
var9 = 5;
}
if (var7 == 6)
{
var8 = 6;
var9 = 2;
}
if (var7 == 7)
{
var8 = 3;
}
float var10 = (float)var8 / 16.0F;
float var11 = 1.0F - (float)var6 / 16.0F;
float var12 = 1.0F - (float)(var6 + var9) / 16.0F;
var6 += var9;
this.setRenderBounds((double)(0.5F - var10), (double)var12, (double)(0.5F - var10), (double)(0.5F + var10), (double)var11, (double)(0.5F + var10));
this.renderStandardBlock(p_147802_1_, p_147802_2_, p_147802_3_, p_147802_4_);
}
var5 = true;
this.setRenderBounds(0.0D, 0.0D, 0.0D, 1.0D, 1.0D, 1.0D);
return var5;
}
示例5: doRender
import net.minecraft.block.BlockDragonEgg; //导入依赖的package包/类
public void doRender(EntityBlock entBlock, double posX, double posY, double posZ, float par8, float renderTick)
{
int i = MathHelper.floor_double(entBlock.posX);
int j = MathHelper.floor_double(entBlock.posY);
int k = MathHelper.floor_double(entBlock.posZ);
GL11.glEnable(GL11.GL_BLEND);
GL11.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA);
GL11.glPushMatrix();
GL11.glTranslatef((float)posX, (float)posY, (float)posZ);
this.bindEntityTexture(entBlock);
GL11.glRotatef(-90F, 0F, 1F, 0F);
GL11.glRotatef(interpolateRotation(entBlock.prevRotYaw, entBlock.rotYaw, renderTick), 0F, 1F, 0F);
GL11.glRotatef(interpolateRotation(entBlock.prevRotPitch, entBlock.rotPitch, renderTick), 0F, 0F, 1F);
// GL11.glDisable(GL11.GL_LIGHTING);
int ii = entBlock.getBrightnessForRender(renderTick);
int jj = ii % 0x10000;
int kk = ii / 0x10000;
OpenGlHelper.setLightmapTextureCoords(OpenGlHelper.lightmapTexUnit, (float)jj / 1.0F, (float)kk / 1.0F);
Tessellator tessellator = Tessellator.instance;
renderBlock.blockAccess = entBlock.worldObj;
renderBlock.useInventoryTint = true;
if (entBlock.getBlock() instanceof BlockAnvil)
{
tessellator.startDrawingQuads();
tessellator.setTranslation((double)((float)(-i) - 0.5F), (double)((float)(-j) - 0.5F), (double)((float)(-k) - 0.5F));
renderBlock.renderBlockAnvilMetadata((BlockAnvil)entBlock.getBlock(), i, j, k, entBlock.getMeta());
tessellator.setTranslation(0.0D, 0.0D, 0.0D);
tessellator.draw();
}
else if (entBlock.getBlock() instanceof BlockDragonEgg)
{
tessellator.startDrawingQuads();
tessellator.setTranslation((double)((float)(-i) - 0.5F), (double)((float)(-j) - 0.5F), (double)((float)(-k) - 0.5F));
renderBlock.renderBlockDragonEgg((BlockDragonEgg)entBlock.getBlock(), i, j, k);
tessellator.setTranslation(0.0D, 0.0D, 0.0D);
tessellator.draw();
}
else
{
renderBlock.setRenderBoundsFromBlock(entBlock.getBlock());
renderBlock.renderBlockAsItem(entBlock.getBlock(), entBlock.getMeta(), 1.0F);
}
// GL11.glEnable(GL11.GL_LIGHTING);
GL11.glPopMatrix();
GL11.glDisable(GL11.GL_BLEND);
}
示例6: doRender
import net.minecraft.block.BlockDragonEgg; //导入依赖的package包/类
public void doRender(EntityFallingBlock p_76986_1_, double p_76986_2_, double p_76986_4_, double p_76986_6_, float p_76986_8_, float p_76986_9_)
{
World world = p_76986_1_.func_145807_e();
Block block = p_76986_1_.func_145805_f();
int i = MathHelper.floor_double(p_76986_1_.posX);
int j = MathHelper.floor_double(p_76986_1_.posY);
int k = MathHelper.floor_double(p_76986_1_.posZ);
if (block != null && block != world.getBlock(i, j, k))
{
GL11.glPushMatrix();
GL11.glTranslatef((float)p_76986_2_, (float)p_76986_4_, (float)p_76986_6_);
this.bindEntityTexture(p_76986_1_);
GL11.glDisable(GL11.GL_LIGHTING);
Tessellator tessellator;
if (block instanceof BlockAnvil)
{
this.field_147920_a.blockAccess = world;
tessellator = Tessellator.instance;
tessellator.startDrawingQuads();
tessellator.setTranslation((double)((float)(-i) - 0.5F), (double)((float)(-j) - 0.5F), (double)((float)(-k) - 0.5F));
this.field_147920_a.renderBlockAnvilMetadata((BlockAnvil)block, i, j, k, p_76986_1_.field_145814_a);
tessellator.setTranslation(0.0D, 0.0D, 0.0D);
tessellator.draw();
}
else if (block instanceof BlockDragonEgg)
{
this.field_147920_a.blockAccess = world;
tessellator = Tessellator.instance;
tessellator.startDrawingQuads();
tessellator.setTranslation((double)((float)(-i) - 0.5F), (double)((float)(-j) - 0.5F), (double)((float)(-k) - 0.5F));
this.field_147920_a.renderBlockDragonEgg((BlockDragonEgg)block, i, j, k);
tessellator.setTranslation(0.0D, 0.0D, 0.0D);
tessellator.draw();
}
else
{
this.field_147920_a.setRenderBoundsFromBlock(block);
this.field_147920_a.renderBlockSandFalling(block, world, i, j, k, p_76986_1_.field_145814_a);
}
GL11.glEnable(GL11.GL_LIGHTING);
GL11.glPopMatrix();
}
}
示例7: renderBlockByRenderType
import net.minecraft.block.BlockDragonEgg; //导入依赖的package包/类
public boolean renderBlockByRenderType(Block p_147805_1_, int p_147805_2_, int p_147805_3_, int p_147805_4_)
{
int l = p_147805_1_.getRenderType();
if (l == -1)
{
return false;
}
else
{
p_147805_1_.setBlockBoundsBasedOnState(this.blockAccess, p_147805_2_, p_147805_3_, p_147805_4_);
this.setRenderBoundsFromBlock(p_147805_1_);
switch (l)
{
//regex: ' : \(l == ([\d]+) \?' replace: ';\ncase \1: return' ::: IMPORTANT: REMEMBER THIS ON FIRST line!
case 0 : return this.renderStandardBlock(p_147805_1_, p_147805_2_, p_147805_3_, p_147805_4_) ;
case 4: return this.renderBlockLiquid(p_147805_1_, p_147805_2_, p_147805_3_, p_147805_4_) ;
case 31: return this.renderBlockLog(p_147805_1_, p_147805_2_, p_147805_3_, p_147805_4_) ;
case 1: return this.renderCrossedSquares(p_147805_1_, p_147805_2_, p_147805_3_, p_147805_4_) ;
case 40: return this.renderBlockDoublePlant((BlockDoublePlant)p_147805_1_, p_147805_2_, p_147805_3_, p_147805_4_) ;
case 2: return this.renderBlockTorch(p_147805_1_, p_147805_2_, p_147805_3_, p_147805_4_) ;
case 20: return this.renderBlockVine(p_147805_1_, p_147805_2_, p_147805_3_, p_147805_4_) ;
case 11: return this.renderBlockFence((BlockFence)p_147805_1_, p_147805_2_, p_147805_3_, p_147805_4_) ;
case 39: return this.renderBlockQuartz(p_147805_1_, p_147805_2_, p_147805_3_, p_147805_4_) ;
case 5: return this.renderBlockRedstoneWire(p_147805_1_, p_147805_2_, p_147805_3_, p_147805_4_) ;
case 13: return this.renderBlockCactus(p_147805_1_, p_147805_2_, p_147805_3_, p_147805_4_) ;
case 9: return this.renderBlockMinecartTrack((BlockRailBase)p_147805_1_, p_147805_2_, p_147805_3_, p_147805_4_) ;
case 19: return this.renderBlockStem(p_147805_1_, p_147805_2_, p_147805_3_, p_147805_4_) ;
case 23: return this.renderBlockLilyPad(p_147805_1_, p_147805_2_, p_147805_3_, p_147805_4_) ;
case 6: return this.renderBlockCrops(p_147805_1_, p_147805_2_, p_147805_3_, p_147805_4_) ;
case 3: return this.renderBlockFire((BlockFire)p_147805_1_, p_147805_2_, p_147805_3_, p_147805_4_) ;
case 8: return this.renderBlockLadder(p_147805_1_, p_147805_2_, p_147805_3_, p_147805_4_) ;
case 7: return this.renderBlockDoor(p_147805_1_, p_147805_2_, p_147805_3_, p_147805_4_) ;
case 10: return this.renderBlockStairs((BlockStairs)p_147805_1_, p_147805_2_, p_147805_3_, p_147805_4_) ;
case 27: return this.renderBlockDragonEgg((BlockDragonEgg)p_147805_1_, p_147805_2_, p_147805_3_, p_147805_4_) ;
case 32: return this.renderBlockWall((BlockWall)p_147805_1_, p_147805_2_, p_147805_3_, p_147805_4_) ;
case 12: return this.renderBlockLever(p_147805_1_, p_147805_2_, p_147805_3_, p_147805_4_) ;
case 29: return this.renderBlockTripWireSource(p_147805_1_, p_147805_2_, p_147805_3_, p_147805_4_) ;
case 30: return this.renderBlockTripWire(p_147805_1_, p_147805_2_, p_147805_3_, p_147805_4_) ;
case 14: return this.renderBlockBed(p_147805_1_, p_147805_2_, p_147805_3_, p_147805_4_) ;
case 15: return this.renderBlockRepeater((BlockRedstoneRepeater)p_147805_1_, p_147805_2_, p_147805_3_, p_147805_4_) ;
case 36: return this.renderBlockRedstoneDiode((BlockRedstoneDiode)p_147805_1_, p_147805_2_, p_147805_3_, p_147805_4_) ;
case 37: return this.renderBlockRedstoneComparator((BlockRedstoneComparator)p_147805_1_, p_147805_2_, p_147805_3_, p_147805_4_) ;
case 16: return this.renderPistonBase(p_147805_1_, p_147805_2_, p_147805_3_, p_147805_4_, false) ;
case 17: return this.renderPistonExtension(p_147805_1_, p_147805_2_, p_147805_3_, p_147805_4_, true) ;
case 18: return this.renderBlockPane((BlockPane)p_147805_1_, p_147805_2_, p_147805_3_, p_147805_4_) ;
case 41: return this.renderBlockStainedGlassPane(p_147805_1_, p_147805_2_, p_147805_3_, p_147805_4_) ;
case 21: return this.renderBlockFenceGate((BlockFenceGate)p_147805_1_, p_147805_2_, p_147805_3_, p_147805_4_) ;
case 24: return this.renderBlockCauldron((BlockCauldron)p_147805_1_, p_147805_2_, p_147805_3_, p_147805_4_) ;
case 33: return this.renderBlockFlowerpot((BlockFlowerPot)p_147805_1_, p_147805_2_, p_147805_3_, p_147805_4_) ;
case 35: return this.renderBlockAnvil((BlockAnvil)p_147805_1_, p_147805_2_, p_147805_3_, p_147805_4_) ;
case 25: return this.renderBlockBrewingStand((BlockBrewingStand)p_147805_1_, p_147805_2_, p_147805_3_, p_147805_4_) ;
case 26: return this.renderBlockEndPortalFrame((BlockEndPortalFrame)p_147805_1_, p_147805_2_, p_147805_3_, p_147805_4_) ;
case 28: return this.renderBlockCocoa((BlockCocoa)p_147805_1_, p_147805_2_, p_147805_3_, p_147805_4_) ;
case 34: return this.renderBlockBeacon((BlockBeacon)p_147805_1_, p_147805_2_, p_147805_3_, p_147805_4_) ;
case 38: return this.renderBlockHopper((BlockHopper)p_147805_1_, p_147805_2_, p_147805_3_, p_147805_4_);
default: return FMLRenderAccessLibrary.renderWorldBlock(this, blockAccess, p_147805_2_, p_147805_3_, p_147805_4_, p_147805_1_, l);
}
}
}
示例8: renderBlockDragonEgg
import net.minecraft.block.BlockDragonEgg; //导入依赖的package包/类
public boolean renderBlockDragonEgg(BlockDragonEgg p_147802_1_, int p_147802_2_, int p_147802_3_, int p_147802_4_)
{
boolean flag = false;
int l = 0;
for (int i1 = 0; i1 < 8; ++i1)
{
byte b0 = 0;
byte b1 = 1;
if (i1 == 0)
{
b0 = 2;
}
if (i1 == 1)
{
b0 = 3;
}
if (i1 == 2)
{
b0 = 4;
}
if (i1 == 3)
{
b0 = 5;
b1 = 2;
}
if (i1 == 4)
{
b0 = 6;
b1 = 3;
}
if (i1 == 5)
{
b0 = 7;
b1 = 5;
}
if (i1 == 6)
{
b0 = 6;
b1 = 2;
}
if (i1 == 7)
{
b0 = 3;
}
float f = (float)b0 / 16.0F;
float f1 = 1.0F - (float)l / 16.0F;
float f2 = 1.0F - (float)(l + b1) / 16.0F;
l += b1;
this.setRenderBounds((double)(0.5F - f), (double)f2, (double)(0.5F - f), (double)(0.5F + f), (double)f1, (double)(0.5F + f));
this.renderStandardBlock(p_147802_1_, p_147802_2_, p_147802_3_, p_147802_4_);
}
flag = true;
this.setRenderBounds(0.0D, 0.0D, 0.0D, 1.0D, 1.0D, 1.0D);
return flag;
}
示例9: func_78618_a
import net.minecraft.block.BlockDragonEgg; //导入依赖的package包/类
public boolean func_78618_a(BlockDragonEgg p_78618_1_, int p_78618_2_, int p_78618_3_, int p_78618_4_) {
boolean var5 = false;
int var6 = 0;
for(int var7 = 0; var7 < 8; ++var7) {
byte var8 = 0;
byte var9 = 1;
if(var7 == 0) {
var8 = 2;
}
if(var7 == 1) {
var8 = 3;
}
if(var7 == 2) {
var8 = 4;
}
if(var7 == 3) {
var8 = 5;
var9 = 2;
}
if(var7 == 4) {
var8 = 6;
var9 = 3;
}
if(var7 == 5) {
var8 = 7;
var9 = 5;
}
if(var7 == 6) {
var8 = 6;
var9 = 2;
}
if(var7 == 7) {
var8 = 3;
}
float var10 = (float)var8 / 16.0F;
float var11 = 1.0F - (float)var6 / 16.0F;
float var12 = 1.0F - (float)(var6 + var9) / 16.0F;
var6 += var9;
this.func_83020_a((double)(0.5F - var10), (double)var12, (double)(0.5F - var10), (double)(0.5F + var10), (double)var11, (double)(0.5F + var10));
this.func_78570_q(p_78618_1_, p_78618_2_, p_78618_3_, p_78618_4_);
}
var5 = true;
this.func_83020_a(0.0D, 0.0D, 0.0D, 1.0D, 1.0D, 1.0D);
return var5;
}
示例10: doRenderFallingSand
import net.minecraft.block.BlockDragonEgg; //导入依赖的package包/类
/**
* The actual render method that is used in doRender
*/
public void doRenderFallingSand(EntityFallingSand par1EntityFallingSand, double par2, double par4, double par6, float par8, float par9)
{
World world = par1EntityFallingSand.getWorld();
Block block = Block.blocksList[par1EntityFallingSand.blockID];
if (world.getBlockId(MathHelper.floor_double(par1EntityFallingSand.posX), MathHelper.floor_double(par1EntityFallingSand.posY), MathHelper.floor_double(par1EntityFallingSand.posZ)) != par1EntityFallingSand.blockID)
{
GL11.glPushMatrix();
GL11.glTranslatef((float)par2, (float)par4, (float)par6);
this.bindEntityTexture(par1EntityFallingSand);
GL11.glDisable(GL11.GL_LIGHTING);
Tessellator tessellator;
if (block instanceof BlockAnvil && block.getRenderType() == 35)
{
this.sandRenderBlocks.blockAccess = world;
tessellator = Tessellator.instance;
tessellator.startDrawingQuads();
tessellator.setTranslation((double)((float)(-MathHelper.floor_double(par1EntityFallingSand.posX)) - 0.5F), (double)((float)(-MathHelper.floor_double(par1EntityFallingSand.posY)) - 0.5F), (double)((float)(-MathHelper.floor_double(par1EntityFallingSand.posZ)) - 0.5F));
this.sandRenderBlocks.renderBlockAnvilMetadata((BlockAnvil)block, MathHelper.floor_double(par1EntityFallingSand.posX), MathHelper.floor_double(par1EntityFallingSand.posY), MathHelper.floor_double(par1EntityFallingSand.posZ), par1EntityFallingSand.metadata);
tessellator.setTranslation(0.0D, 0.0D, 0.0D);
tessellator.draw();
}
else if (block.getRenderType() == 27)
{
this.sandRenderBlocks.blockAccess = world;
tessellator = Tessellator.instance;
tessellator.startDrawingQuads();
tessellator.setTranslation((double)((float)(-MathHelper.floor_double(par1EntityFallingSand.posX)) - 0.5F), (double)((float)(-MathHelper.floor_double(par1EntityFallingSand.posY)) - 0.5F), (double)((float)(-MathHelper.floor_double(par1EntityFallingSand.posZ)) - 0.5F));
this.sandRenderBlocks.renderBlockDragonEgg((BlockDragonEgg)block, MathHelper.floor_double(par1EntityFallingSand.posX), MathHelper.floor_double(par1EntityFallingSand.posY), MathHelper.floor_double(par1EntityFallingSand.posZ));
tessellator.setTranslation(0.0D, 0.0D, 0.0D);
tessellator.draw();
}
else if (block != null)
{
this.sandRenderBlocks.setRenderBoundsFromBlock(block);
this.sandRenderBlocks.renderBlockSandFalling(block, world, MathHelper.floor_double(par1EntityFallingSand.posX), MathHelper.floor_double(par1EntityFallingSand.posY), MathHelper.floor_double(par1EntityFallingSand.posZ), par1EntityFallingSand.metadata);
}
GL11.glEnable(GL11.GL_LIGHTING);
GL11.glPopMatrix();
}
}
示例11: renderBlockByRenderType
import net.minecraft.block.BlockDragonEgg; //导入依赖的package包/类
/**
* Renders the block at the given coordinates using the block's rendering type
*/
public boolean renderBlockByRenderType(Block par1Block, int par2, int par3, int par4)
{
int l = par1Block.getRenderType();
if (l == -1)
{
return false;
}
else
{
par1Block.setBlockBoundsBasedOnState(this.blockAccess, par2, par3, par4);
this.setRenderBoundsFromBlock(par1Block);
switch (l)
{
//regex: ' : \(l == ([\d]+) \?' replace: ';\ncase \1: return' ::: IMPORTANT: REMEMBER THIS ON FIRST line!
case 0: return this.renderStandardBlock(par1Block, par2, par3, par4);
case 4: return this.renderBlockFluids(par1Block, par2, par3, par4);
case 31: return this.renderBlockLog(par1Block, par2, par3, par4);
case 1: return this.renderCrossedSquares(par1Block, par2, par3, par4);
case 2: return this.renderBlockTorch(par1Block, par2, par3, par4);
case 20: return this.renderBlockVine(par1Block, par2, par3, par4);
case 11: return this.renderBlockFence((BlockFence)par1Block, par2, par3, par4);
case 39: return this.renderBlockQuartz(par1Block, par2, par3, par4);
case 5: return this.renderBlockRedstoneWire(par1Block, par2, par3, par4);
case 13: return this.renderBlockCactus(par1Block, par2, par3, par4);
case 9: return this.renderBlockMinecartTrack((BlockRailBase)par1Block, par2, par3, par4);
case 19: return this.renderBlockStem(par1Block, par2, par3, par4);
case 23: return this.renderBlockLilyPad(par1Block, par2, par3, par4);
case 6: return this.renderBlockCrops(par1Block, par2, par3, par4);
case 3: return this.renderBlockFire((BlockFire)par1Block, par2, par3, par4);
case 8: return this.renderBlockLadder(par1Block, par2, par3, par4);
case 7: return this.renderBlockDoor(par1Block, par2, par3, par4);
case 10: return this.renderBlockStairs((BlockStairs)par1Block, par2, par3, par4);
case 27: return this.renderBlockDragonEgg((BlockDragonEgg)par1Block, par2, par3, par4);
case 32: return this.renderBlockWall((BlockWall)par1Block, par2, par3, par4);
case 12: return this.renderBlockLever(par1Block, par2, par3, par4);
case 29: return this.renderBlockTripWireSource(par1Block, par2, par3, par4);
case 30: return this.renderBlockTripWire(par1Block, par2, par3, par4);
case 14: return this.renderBlockBed(par1Block, par2, par3, par4);
case 15: return this.renderBlockRepeater((BlockRedstoneRepeater)par1Block, par2, par3, par4);
case 36: return this.renderBlockRedstoneLogic((BlockRedstoneLogic)par1Block, par2, par3, par4);
case 37: return this.renderBlockComparator((BlockComparator)par1Block, par2, par3, par4);
case 16: return this.renderPistonBase(par1Block, par2, par3, par4, false);
case 17: return this.renderPistonExtension(par1Block, par2, par3, par4, true);
case 18: return this.renderBlockPane((BlockPane)par1Block, par2, par3, par4);
case 21: return this.renderBlockFenceGate((BlockFenceGate)par1Block, par2, par3, par4);
case 24: return this.renderBlockCauldron((BlockCauldron)par1Block, par2, par3, par4);
case 33: return this.renderBlockFlowerpot((BlockFlowerPot)par1Block, par2, par3, par4);
case 35: return this.renderBlockAnvil((BlockAnvil)par1Block, par2, par3, par4);
case 25: return this.renderBlockBrewingStand((BlockBrewingStand)par1Block, par2, par3, par4);
case 26: return this.renderBlockEndPortalFrame((BlockEndPortalFrame)par1Block, par2, par3, par4);
case 28: return this.renderBlockCocoa((BlockCocoa)par1Block, par2, par3, par4);
case 34: return this.renderBlockBeacon((BlockBeacon)par1Block, par2, par3, par4);
case 38: return this.renderBlockHopper((BlockHopper)par1Block, par2, par3, par4);
default: return FMLRenderAccessLibrary.renderWorldBlock(this, blockAccess, par2, par3, par4, par1Block, l);
}
}
}
示例12: renderBlockDragonEgg
import net.minecraft.block.BlockDragonEgg; //导入依赖的package包/类
public boolean renderBlockDragonEgg(BlockDragonEgg par1BlockDragonEgg, int par2, int par3, int par4)
{
boolean flag = false;
int l = 0;
for (int i1 = 0; i1 < 8; ++i1)
{
byte b0 = 0;
byte b1 = 1;
if (i1 == 0)
{
b0 = 2;
}
if (i1 == 1)
{
b0 = 3;
}
if (i1 == 2)
{
b0 = 4;
}
if (i1 == 3)
{
b0 = 5;
b1 = 2;
}
if (i1 == 4)
{
b0 = 6;
b1 = 3;
}
if (i1 == 5)
{
b0 = 7;
b1 = 5;
}
if (i1 == 6)
{
b0 = 6;
b1 = 2;
}
if (i1 == 7)
{
b0 = 3;
}
float f = (float)b0 / 16.0F;
float f1 = 1.0F - (float)l / 16.0F;
float f2 = 1.0F - (float)(l + b1) / 16.0F;
l += b1;
this.setRenderBounds((double)(0.5F - f), (double)f2, (double)(0.5F - f), (double)(0.5F + f), (double)f1, (double)(0.5F + f));
this.renderStandardBlock(par1BlockDragonEgg, par2, par3, par4);
}
flag = true;
this.setRenderBounds(0.0D, 0.0D, 0.0D, 1.0D, 1.0D, 1.0D);
return flag;
}
示例13: renderEntityFallingBlock
import net.minecraft.block.BlockDragonEgg; //导入依赖的package包/类
public void renderEntityFallingBlock(EntityFallingBlock entity, double x, double y, double z, float f1, float f2) {
World world = entity.worldObj;
Block block = entity.getBlockClient();
int meta = entity.getMetaClient();
NBTTagCompound nbt = entity.getNBTClient();
if(nbt == null) {
nbt = new NBTTagCompound();
}
int i = MathHelper.floor_double(entity.posX);
int j = MathHelper.floor_double(entity.posY);
int k = MathHelper.floor_double(entity.posZ);
if(block != null && block != world.getBlock(i, j, k)) {
GL11.glPushMatrix();
GL11.glTranslatef((float) x, (float) y, (float) z);
bindEntityTexture(entity);
GL11.glDisable(GL11.GL_LIGHTING);
Tessellator tessellator;
if(block instanceof BlockAnvil) {
renderBlocks.blockAccess = world;
tessellator = Tessellator.instance;
tessellator.startDrawingQuads();
tessellator.setTranslation((double) ((float) (-i) - 0.5F), (double) ((float) (-j) - 0.5F), (double) ((float) (-k) - 0.5F));
BlockAnvil.renderMeta = nbt.getByte("Damage") + (nbt.getByte("Type") * 4);
ACBlockRenderingHandler.instance.renderBlockAnvil(world, i, j, k, (BlockAnvil) block, nbt.getByte("Damage") + (nbt.getByte("Type") * 4), nbt.getByte("Direction"), renderBlocks);
BlockAnvil.renderMeta = -1;
tessellator.setTranslation(0.0D, 0.0D, 0.0D);
tessellator.draw();
} else if(block instanceof net.minecraft.block.BlockAnvil) {
renderBlocks.blockAccess = world;
tessellator = Tessellator.instance;
tessellator.startDrawingQuads();
tessellator.setTranslation((double) ((float) (-i) - 0.5F), (double) ((float) (-j) - 0.5F), (double) ((float) (-k) - 0.5F));
renderBlocks.renderBlockAnvilMetadata((net.minecraft.block.BlockAnvil) block, i, j, k, meta);
tessellator.setTranslation(0.0D, 0.0D, 0.0D);
tessellator.draw();
} else if(block instanceof BlockDragonEgg) {
renderBlocks.blockAccess = world;
tessellator = Tessellator.instance;
tessellator.startDrawingQuads();
tessellator.setTranslation((double) ((float) (-i) - 0.5F), (double) ((float) (-j) - 0.5F), (double) ((float) (-k) - 0.5F));
renderBlocks.renderBlockDragonEgg((BlockDragonEgg) block, i, j, k);
tessellator.setTranslation(0.0D, 0.0D, 0.0D);
tessellator.draw();
} else {
renderBlocks.setRenderBoundsFromBlock(block);
renderBlocks.renderBlockSandFalling(block, world, i, j, k, meta);
}
GL11.glEnable(GL11.GL_LIGHTING);
GL11.glPopMatrix();
}
}