本文整理汇总了Java中net.minecraft.entity.item.EntityEnderCrystal.getBeamTarget方法的典型用法代码示例。如果您正苦于以下问题:Java EntityEnderCrystal.getBeamTarget方法的具体用法?Java EntityEnderCrystal.getBeamTarget怎么用?Java EntityEnderCrystal.getBeamTarget使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类net.minecraft.entity.item.EntityEnderCrystal
的用法示例。
在下文中一共展示了EntityEnderCrystal.getBeamTarget方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: doRender
import net.minecraft.entity.item.EntityEnderCrystal; //导入方法依赖的package包/类
/**
* Renders the desired {@code T} type Entity.
*/
public void doRender(EntityEnderCrystal entity, double x, double y, double z, float entityYaw, float partialTicks)
{
float f = (float)entity.innerRotation + partialTicks;
GlStateManager.pushMatrix();
GlStateManager.translate((float)x, (float)y, (float)z);
this.bindTexture(ENDER_CRYSTAL_TEXTURES);
float f1 = MathHelper.sin(f * 0.2F) / 2.0F + 0.5F;
f1 = f1 * f1 + f1;
if (this.renderOutlines)
{
GlStateManager.enableColorMaterial();
GlStateManager.enableOutlineMode(this.getTeamColor(entity));
}
if (entity.shouldShowBottom())
{
this.modelEnderCrystal.render(entity, 0.0F, f * 3.0F, f1 * 0.2F, 0.0F, 0.0F, 0.0625F);
}
else
{
this.modelEnderCrystalNoBase.render(entity, 0.0F, f * 3.0F, f1 * 0.2F, 0.0F, 0.0F, 0.0625F);
}
if (this.renderOutlines)
{
GlStateManager.disableOutlineMode();
GlStateManager.disableColorMaterial();
}
GlStateManager.popMatrix();
BlockPos blockpos = entity.getBeamTarget();
if (blockpos != null)
{
this.bindTexture(RenderDragon.ENDERCRYSTAL_BEAM_TEXTURES);
float f2 = (float)blockpos.getX() + 0.5F;
float f3 = (float)blockpos.getY() + 0.5F;
float f4 = (float)blockpos.getZ() + 0.5F;
double d0 = (double)f2 - entity.posX;
double d1 = (double)f3 - entity.posY;
double d2 = (double)f4 - entity.posZ;
RenderDragon.renderCrystalBeams(x + d0, y - 0.3D + (double)(f1 * 0.4F) + d1, z + d2, partialTicks, (double)f2, (double)f3, (double)f4, entity.innerRotation, entity.posX, entity.posY, entity.posZ);
}
super.doRender(entity, x, y, z, entityYaw, partialTicks);
}
示例2: shouldRender
import net.minecraft.entity.item.EntityEnderCrystal; //导入方法依赖的package包/类
public boolean shouldRender(EntityEnderCrystal livingEntity, ICamera camera, double camX, double camY, double camZ)
{
return super.shouldRender(livingEntity, camera, camX, camY, camZ) || livingEntity.getBeamTarget() != null;
}