本文整理汇总了Java中net.minecraft.client.renderer.ActiveRenderInfo.getRotationXZ方法的典型用法代码示例。如果您正苦于以下问题:Java ActiveRenderInfo.getRotationXZ方法的具体用法?Java ActiveRenderInfo.getRotationXZ怎么用?Java ActiveRenderInfo.getRotationXZ使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类net.minecraft.client.renderer.ActiveRenderInfo
的用法示例。
在下文中一共展示了ActiveRenderInfo.getRotationXZ方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: render
import net.minecraft.client.renderer.ActiveRenderInfo; //导入方法依赖的package包/类
public static void render(double x, double y, double z, Colour colour, double s, double u1, double v1, double u2, double v2) {
x -= Particle.interpPosX;
y -= Particle.interpPosY;
z -= Particle.interpPosZ;
float par3 = ActiveRenderInfo.getRotationX();
float par4 = ActiveRenderInfo.getRotationXZ();
float par5 = ActiveRenderInfo.getRotationZ();
float par6 = ActiveRenderInfo.getRotationYZ();
float par7 = ActiveRenderInfo.getRotationXY();
VertexBuffer b = Tessellator.getInstance().getBuffer();
b.pos((x - par3 * s - par6 * s), (y - par4 * s), (z - par5 * s - par7 * s)).tex(u2, v2).color(colour.r & 0xFF, colour.g & 0xFF, colour.b & 0xFF, colour.a & 0xFF).endVertex();
b.pos((x - par3 * s + par6 * s), (y + par4 * s), (z - par5 * s + par7 * s)).tex(u2, v1).color(colour.r & 0xFF, colour.g & 0xFF, colour.b & 0xFF, colour.a & 0xFF).endVertex();
b.pos((x + par3 * s + par6 * s), (y + par4 * s), (z + par5 * s + par7 * s)).tex(u1, v1).color(colour.r & 0xFF, colour.g & 0xFF, colour.b & 0xFF, colour.a & 0xFF).endVertex();
b.pos((x + par3 * s - par6 * s), (y - par4 * s), (z + par5 * s - par7 * s)).tex(u1, v2).color(colour.r & 0xFF, colour.g & 0xFF, colour.b & 0xFF, colour.a & 0xFF).endVertex();
}
示例2: renderParticles
import net.minecraft.client.renderer.ActiveRenderInfo; //导入方法依赖的package包/类
public void renderParticles(EntityPlayer dumbplayer, float partialTicks) {
float f = ActiveRenderInfo.getRotationX();
float f1 = ActiveRenderInfo.getRotationZ();
float f2 = ActiveRenderInfo.getRotationYZ();
float f3 = ActiveRenderInfo.getRotationXY();
float f4 = ActiveRenderInfo.getRotationXZ();
EntityPlayer player = EasyMappings.player();
if (player != null) {
Particle.interpPosX = player.lastTickPosX + (player.posX - player.lastTickPosX) * partialTicks;
Particle.interpPosY = player.lastTickPosY + (player.posY - player.lastTickPosY) * partialTicks;
Particle.interpPosZ = player.lastTickPosZ + (player.posZ - player.lastTickPosZ) * partialTicks;
Particle.cameraViewDir = player.getLook(partialTicks);
//GlStateManager.glTexParameterf(3553, 10242, 10497.0F);
//GlStateManager.glTexParameterf(3553, 10243, 10497.0F);
GlStateManager.enableAlpha();
GlStateManager.enableBlend();
GlStateManager.blendFunc(GlStateManager.SourceFactor.SRC_ALPHA, GlStateManager.DestFactor.ONE);
//GlStateManager.alphaFunc(GL11.GL_GREATER, 0F);
GlStateManager.disableCull();
GlStateManager.depthMask(false);
Minecraft.getMinecraft().renderEngine.bindTexture(TextureMap.LOCATION_BLOCKS_TEXTURE);
Tessellator tess = Tessellator.getInstance();
BufferBuilder buffer = tess.getBuffer();
buffer.begin(GL11.GL_QUADS, DefaultVertexFormats.PARTICLE_POSITION_TEX_COLOR_LMAP);
for (int i = 0; i < particles.size(); i++) {
particles.get(i).renderParticle(buffer, player, partialTicks, f, f4, f1, f2, f3);
}
tess.draw();
GlStateManager.enableCull();
GlStateManager.depthMask(true);
GlStateManager.blendFunc(GlStateManager.SourceFactor.SRC_ALPHA, GlStateManager.DestFactor.ONE_MINUS_SRC_ALPHA);
GlStateManager.disableBlend();
//GlStateManager.alphaFunc(516, 0.1F);
}
}
示例3: renderParticles
import net.minecraft.client.renderer.ActiveRenderInfo; //导入方法依赖的package包/类
public void renderParticles(EntityPlayer dumbplayer, float partialTicks) {
float f = ActiveRenderInfo.getRotationX();
float f1 = ActiveRenderInfo.getRotationZ();
float f2 = ActiveRenderInfo.getRotationYZ();
float f3 = ActiveRenderInfo.getRotationXY();
float f4 = ActiveRenderInfo.getRotationXZ();
EntityPlayer player = Minecraft.getMinecraft().player;
if (player != null){
Particle.interpPosX = player.lastTickPosX + (player.posX - player.lastTickPosX) * partialTicks;
Particle.interpPosY = player.lastTickPosY + (player.posY - player.lastTickPosY) * partialTicks;
Particle.interpPosZ = player.lastTickPosZ + (player.posZ - player.lastTickPosZ) * partialTicks;
Particle.cameraViewDir = player.getLook(partialTicks);
GlStateManager.enableAlpha();
GlStateManager.enableBlend();
GlStateManager.alphaFunc(516, 0.003921569F);
GlStateManager.disableCull();
GlStateManager.depthMask(false);
Minecraft.getMinecraft().renderEngine.bindTexture(TextureMap.LOCATION_BLOCKS_TEXTURE);
Tessellator tess = Tessellator.getInstance();
VertexBuffer buffer = tess.getBuffer();
GlStateManager.blendFunc(GlStateManager.SourceFactor.SRC_ALPHA, GlStateManager.DestFactor.ONE_MINUS_SRC_ALPHA);
buffer.begin(GL11.GL_QUADS, DefaultVertexFormats.PARTICLE_POSITION_TEX_COLOR_LMAP);
for (int i = 0; i < particles.size(); i ++){
if (particles.get(i) instanceof IParticle){
if (!((IParticle)particles.get(i)).isAdditive()){
particles.get(i).renderParticle(buffer, player, partialTicks, f, f4, f1, f2, f3);
}
}
}
tess.draw();
GlStateManager.blendFunc(GlStateManager.SourceFactor.SRC_ALPHA, GlStateManager.DestFactor.ONE);
buffer.begin(GL11.GL_QUADS, DefaultVertexFormats.PARTICLE_POSITION_TEX_COLOR_LMAP);
for (int i = 0; i < particles.size(); i ++){
if (particles.get(i) != null){
if (((IParticle)particles.get(i)).isAdditive()){
particles.get(i).renderParticle(buffer, player, partialTicks, f, f4, f1, f2, f3);
}
}
}
tess.draw();
GlStateManager.disableDepth();
GlStateManager.blendFunc(GlStateManager.SourceFactor.SRC_ALPHA, GlStateManager.DestFactor.ONE_MINUS_SRC_ALPHA);
buffer.begin(GL11.GL_QUADS, DefaultVertexFormats.PARTICLE_POSITION_TEX_COLOR_LMAP);
for (int i = 0; i < particles.size(); i ++){
if (particles.get(i) instanceof IParticle){
if (!((IParticle)particles.get(i)).isAdditive() && ((IParticle)particles.get(i)).renderThroughBlocks()){
particles.get(i).renderParticle(buffer, player, partialTicks, f, f4, f1, f2, f3);
}
}
}
tess.draw();
GlStateManager.blendFunc(GlStateManager.SourceFactor.SRC_ALPHA, GlStateManager.DestFactor.ONE);
buffer.begin(GL11.GL_QUADS, DefaultVertexFormats.PARTICLE_POSITION_TEX_COLOR_LMAP);
for (int i = 0; i < particles.size(); i ++){
if (particles.get(i) != null){
if (((IParticle)particles.get(i)).isAdditive() && ((IParticle)particles.get(i)).renderThroughBlocks()){
particles.get(i).renderParticle(buffer, player, partialTicks, f, f4, f1, f2, f3);
}
}
}
tess.draw();
GlStateManager.enableDepth();
GlStateManager.enableCull();
GlStateManager.depthMask(true);
GlStateManager.blendFunc(GlStateManager.SourceFactor.SRC_ALPHA, GlStateManager.DestFactor.ONE_MINUS_SRC_ALPHA);
GlStateManager.disableBlend();
GlStateManager.alphaFunc(516, 0.1F);
}
}
示例4: renderParticles
import net.minecraft.client.renderer.ActiveRenderInfo; //导入方法依赖的package包/类
public void renderParticles(EntityPlayer aPlayer, float pTicks) {
float f = ActiveRenderInfo.getRotationX();
float f1 = ActiveRenderInfo.getRotationZ();
float f2 = ActiveRenderInfo.getRotationYZ();
float f3 = ActiveRenderInfo.getRotationXY();
float f4 = ActiveRenderInfo.getRotationXZ();
EntityPlayer player = Minecraft.getMinecraft().player;
if(player!=null) {
Particle.interpPosX = player.lastTickPosX + (player.posX - player.lastTickPosX) * pTicks;
Particle.interpPosY = player.lastTickPosY + (player.posY - player.lastTickPosY) * pTicks;
Particle.interpPosZ = player.lastTickPosZ + (player.posZ - player.lastTickPosZ) * pTicks;
Particle.cameraViewDir = player.getLook(pTicks);
GlStateManager.enableAlpha();
GlStateManager.enableBlend();
GlStateManager.alphaFunc(516, 0.003921569F);
GlStateManager.disableCull();
GlStateManager.depthMask(false);
Minecraft.getMinecraft().renderEngine.bindTexture(TextureMap.LOCATION_BLOCKS_TEXTURE);
Tessellator tess = Tessellator.getInstance();
VertexBuffer buffer = tess.getBuffer();
GlStateManager.blendFunc(GlStateManager.SourceFactor.SRC_ALPHA, GlStateManager.DestFactor.ONE_MINUS_SRC_ALPHA);
buffer.begin(GL11.GL_QUADS, DefaultVertexFormats.PARTICLE_POSITION_TEX_COLOR_LMAP);
for(int i = 0; i < particles.size(); i ++) {
if(!((ILP2Particle) particles.get(i)).isAdditive()) {
particles.get(i).renderParticle(buffer, player, pTicks, f, f4, f1, f2, f3);
}
}
tess.draw();
GlStateManager.blendFunc(GlStateManager.SourceFactor.SRC_ALPHA, GlStateManager.DestFactor.ONE);
buffer.begin(GL11.GL_QUADS, DefaultVertexFormats.PARTICLE_POSITION_TEX_COLOR_LMAP);
for(int i = 0; i < particles.size(); i ++) {
if(((ILP2Particle) particles.get(i)).isAdditive()) {
particles.get(i).renderParticle(buffer, player, pTicks, f, f4, f1, f2, f3);
}
}
tess.draw();
GlStateManager.enableCull();
GlStateManager.depthMask(true);
GlStateManager.blendFunc(GlStateManager.SourceFactor.SRC_ALPHA, GlStateManager.DestFactor.ONE_MINUS_SRC_ALPHA);
GlStateManager.disableBlend();
GlStateManager.alphaFunc(516, 0.1F);
}
}
示例5: onPostRender
import net.minecraft.client.renderer.ActiveRenderInfo; //导入方法依赖的package包/类
@SubscribeEvent
public static void onPostRender(RenderWorldLastEvent event) {
Minecraft mc = Minecraft.getMinecraft();
TextureManager renderer = mc.renderEngine;
int dim = mc.world.provider.getDimension();
EntityPlayerSP player = mc.player;
float frame = event.getPartialTicks();
renderer.bindTexture(SPRITE_SHEET_ALT);
GL11.glPushMatrix();
GL11.glColor4f(1F, 1F, 1F, 1F);
GlStateManager.enableBlend();
GL11.glEnable(GL11.GL_BLEND); // 3042 = 0xBE2 = GL_BLEND (redundant?)
GL11.glAlphaFunc(GL11.GL_GREATER, 0.004F);
GlStateManager.depthMask(false); // isTransparent (therefore calls unnecessary in particle classes)
boolean rebound = false;
for (int layer = 3; layer >= 0; --layer) {
if (particles[layer].containsKey(dim)) {
ArrayList<Particle> fx = (ArrayList) particles[layer].get(dim);
if (!fx.isEmpty()) {
if (!rebound && layer < 2) {
renderer.bindTexture(SPRITE_SHEET);
rebound = true;
}
GL11.glPushMatrix();
switch (layer) {
case 0: case 2:
GlStateManager.blendFunc(GL11.GL_SRC_ALPHA, GL11.GL_CURRENT_BIT);
break;
case 1: case 3:
GlStateManager.blendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA);
break;
}
float f1 = ActiveRenderInfo.getRotationX();
float f2 = ActiveRenderInfo.getRotationZ();
float f3 = ActiveRenderInfo.getRotationYZ();
float f4 = ActiveRenderInfo.getRotationXY();
float f5 = ActiveRenderInfo.getRotationXZ();
Particle.interpPosX = player.lastTickPosX + (player.posX - player.lastTickPosX) * frame;
Particle.interpPosY = player.lastTickPosY + (player.posY - player.lastTickPosY) * frame;
Particle.interpPosZ = player.lastTickPosZ + (player.posZ - player.lastTickPosZ) * frame;
Tessellator tessellator = Tessellator.getInstance();
BufferBuilder worldRenderer = tessellator.getBuffer();
worldRenderer.begin(GL11.GL_QUADS, DefaultVertexFormats.PARTICLE_POSITION_TEX_COLOR_LMAP);
for (final Particle effect : fx) {
if (effect != null) {
try {
effect.renderParticle(worldRenderer, player, frame, f1, f5, f2, f3, f4);
} catch (Exception err) {
crashParticle(err, effect);
}
}
}
tessellator.draw();
GL11.glPopMatrix();
}
}
}
GlStateManager.depthMask(true);
GlStateManager.blendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA);
GlStateManager.disableBlend();
GlStateManager.alphaFunc(GL11.GL_GREATER, 0.1F);
GL11.glPopMatrix();
}