本文整理汇总了Java中net.minecraft.client.renderer.entity.RenderManager.renderPosZ方法的典型用法代码示例。如果您正苦于以下问题:Java RenderManager.renderPosZ方法的具体用法?Java RenderManager.renderPosZ怎么用?Java RenderManager.renderPosZ使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类net.minecraft.client.renderer.entity.RenderManager
的用法示例。
在下文中一共展示了RenderManager.renderPosZ方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: onRender
import net.minecraft.client.renderer.entity.RenderManager; //导入方法依赖的package包/类
@Override
public void onRender() {
if(isEnabled()) {
for (EntityPlayer player : Wrapper.getWorld().playerEntities) {
if (player == null) continue;
if (player.deathTime > 0) continue;
if (player == Wrapper.getPlayer()) continue;
double x = ((player.lastTickPosX + (player.posX - player.lastTickPosX)
- RenderManager.renderPosX));
double y = ((player.lastTickPosY + (player.posY - player.lastTickPosY)
- RenderManager.renderPosY));
double z = ((player.lastTickPosZ + (player.posZ - player.lastTickPosZ)
- RenderManager.renderPosZ));
renderTag(player, x, y, z);
}
}
}
示例2: loadWaypoints
import net.minecraft.client.renderer.entity.RenderManager; //导入方法依赖的package包/类
public void loadWaypoints()
{
try
{
File file = new File(xdolfDir.getAbsolutePath(), "waypoints.txt");
FileInputStream fstream = new FileInputStream(file.getAbsolutePath());
DataInputStream in = new DataInputStream(fstream);
BufferedReader br = new BufferedReader(new InputStreamReader(in));
String line;
while((line = br.readLine()) != null)
{
String curLine = line.trim();
String name = curLine.split(":")[0];
int x = Integer.parseInt(curLine.split(":")[1]);
int y = Integer.parseInt(curLine.split(":")[2]);
int z = Integer.parseInt(curLine.split(":")[3]);
Waypoint point = new Waypoint(name, x, y, z, RenderManager.renderPosX, RenderManager.renderPosY, RenderManager.renderPosZ);
}
br.close();
}catch(Exception e)
{
e.printStackTrace();
System.out.println("ERROR WAYPOINTS!");
}
}
示例3: onUpdate
import net.minecraft.client.renderer.entity.RenderManager; //导入方法依赖的package包/类
@Override
public void onUpdate(EntityPlayerSP player) {
if(this.isEnabled()) {
count++;
if(count >= 50) {
count = 0;
if(positionsList.size() > 5) {
positionsList.remove(0);
}
}
for(Object o : Wrapper.getWorld().playerEntities){
if(o instanceof EntityPlayer) {
EntityPlayer player1 = (EntityPlayer)o;
boolean shouldBreadCrumb = (player1 == player) && ((player.movementInput.moveForward != 0) || (player.movementInput.moveStrafe != 0));
if(shouldBreadCrumb) {
double x = (RenderManager.renderPosX);
double y = (RenderManager.renderPosY);
double z = (RenderManager.renderPosZ);
positionsList.add(new double[] {x, y - player1.height, z});
}
}
}
}
}
示例4: onRender
import net.minecraft.client.renderer.entity.RenderManager; //导入方法依赖的package包/类
@Override
public void onRender() {
if(isEnabled()) {
try {
GL11.glPushMatrix();
GL11.glEnable(GL11.GL_LINE_SMOOTH);
GL11.glDisable(GL11.GL_DEPTH_TEST);
GL11.glDisable(GL11.GL_TEXTURE_2D);
GL11.glDepthMask(false);
GL11.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA);
GL11.glEnable(GL11.GL_BLEND);
GL11.glLineWidth(1.5F);
for (Entity entities : Client.mc.world.loadedEntityList) {
if (entities != Client.mc.player && entities != null) {
if (entities instanceof EntityPlayer) {
float distance = Client.mc.renderViewEntity.getDistanceToEntity(entities);
double posX = ((entities.lastTickPosX + (entities.posX - entities.lastTickPosX)
- RenderManager.renderPosX));
double posY = ((entities.lastTickPosY + (entities.posY - entities.lastTickPosY)
- RenderManager.renderPosY));
double posZ = ((entities.lastTickPosZ + (entities.posZ - entities.lastTickPosZ)
- RenderManager.renderPosZ));
if(Wrapper.getFriends().isFriend(entities.getName())) {
GL11.glColor3f(0.0F, 1.0F, 0.0F);
}else{
if (distance <= 6F) {
GL11.glColor3f(1.0F, 0.0F, 0.0F);
} else if (distance <= 96F) {
GL11.glColor3f(1.0F, (distance / 100F), 0.0F);
} else if (distance > 96F) {
GL11.glColor3f(0.1F, 0.6F, 255.0F);
}
}
Vec3d eyes = new Vec3d(0, 0, 1).rotatePitch(-(float) Math.toRadians(Wrapper.getPlayer().rotationPitch)).rotateYaw(-(float) Math.toRadians(Wrapper.getPlayer().rotationYaw));
GL11.glBegin(GL11.GL_LINE_LOOP);
GL11.glVertex3d(eyes.xCoord, Wrapper.getPlayer().getEyeHeight() + eyes.yCoord, eyes.zCoord);
GL11.glVertex3d(posX, posY, posZ);
GL11.glEnd();
}
}
}
GL11.glDisable(GL11.GL_BLEND);
GL11.glDepthMask(true);
GL11.glEnable(GL11.GL_TEXTURE_2D);
GL11.glEnable(GL11.GL_DEPTH_TEST);
GL11.glDisable(GL11.GL_LINE_SMOOTH);
GL11.glPopMatrix();
} catch (Exception e) {}
}
}
示例5: update
import net.minecraft.client.renderer.entity.RenderManager; //导入方法依赖的package包/类
public void update() {
dX = (int)posX - RenderManager.renderPosX;
dY = (int)posY - RenderManager.renderPosY;
dZ = (int)posZ - RenderManager.renderPosZ;
}
示例6: update
import net.minecraft.client.renderer.entity.RenderManager; //导入方法依赖的package包/类
public void update()
{
dX = posX - RenderManager.renderPosX;
dY = posY - RenderManager.renderPosY;
dZ = posZ - RenderManager.renderPosZ;
}