當前位置: 首頁>>代碼示例>>Java>>正文


Java RenderManager.renderPosZ方法代碼示例

本文整理匯總了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);
           }
	}
}
 
開發者ID:sudofox,項目名稱:Backmemed,代碼行數:18,代碼來源:Nametags.java

示例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!");
	}
}
 
開發者ID:sudofox,項目名稱:Backmemed,代碼行數:27,代碼來源:FileManager.java

示例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});
				}
			}
		}
	}
}
 
開發者ID:sudofox,項目名稱:Backmemed,代碼行數:28,代碼來源:Breadcrumb.java

示例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) {}
	}
}
 
開發者ID:sudofox,項目名稱:Backmemed,代碼行數:55,代碼來源:Tracers.java

示例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;
}
 
開發者ID:sudofox,項目名稱:Backmemed,代碼行數:6,代碼來源:Waypoint.java

示例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;
}
 
開發者ID:sudofox,項目名稱:Backmemed,代碼行數:7,代碼來源:LogoutSpot.java


注:本文中的net.minecraft.client.renderer.entity.RenderManager.renderPosZ方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。