本文整理了Java中net.minecraft.client.Minecraft.setRenderViewEntity()
方法的一些代码示例,展示了Minecraft.setRenderViewEntity()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Minecraft.setRenderViewEntity()
方法的具体详情如下:
包路径:net.minecraft.client.Minecraft
类名称:Minecraft
方法名:setRenderViewEntity
暂无
代码示例来源:origin: CoFH/ThermalDynamics
@SubscribeEvent
@SideOnly (Side.CLIENT)
public void controlCamera(TickEvent.RenderTickEvent event) {
Minecraft mc = Minecraft.getMinecraft();
EntityPlayerSP thePlayer = mc.player;
if (thePlayer == null) {
return;
}
Entity ridingEntity = thePlayer.getRidingEntity();
if (ridingEntity == null) {
if (mc.getRenderViewEntity() != null && (mc.getRenderViewEntity() == camera)) {
mc.setRenderViewEntity(thePlayer);
camera.world = null;
}
} else if (ridingEntity.getClass() == EntityTransport.class) {
EntityTransport transport = (EntityTransport) ridingEntity;
if (camera == null) {
camera = new Camera();
}
camera.copyFromEntityTransport(transport, thePlayer);
mc.setRenderViewEntity(camera);
}
}
代码示例来源:origin: MrCrayfish/MrCrayfishFurnitureMod
mc.setRenderViewEntity(entity);
settings.fovSetting = ConfigurationHandler.mirrorFov;
settings.thirdPersonView = 0;
mc.setRenderViewEntity(entityBackup);
settings.fovSetting = fovBackup;
settings.thirdPersonView = thirdPersonBackup;
代码示例来源:origin: MatterOverdrive/MatterOverdrive-Legacy-Edition
public void renderWorld(float ticks, long time) {
if (fakePlayer == null) {
fakePlayer = new EntityFakePlayer(mc.world, mc.player.getGameProfile());
}
boolean lastHideGui = mc.gameSettings.hideGUI;
Entity lastRenderViewEntity = mc.getRenderViewEntity();
if (mc.currentScreen instanceof GuiDialog) {
mc.gameSettings.hideGUI = true;
mc.setRenderViewEntity(fakePlayer);
GuiDialog guiDialog = (GuiDialog) mc.currentScreen;
IDialogMessage message = guiDialog.getCurrentMessage();
if (message != null) {
random.setSeed(guiDialog.getSeed());
IDialogShot[] shots = message.getShots(guiDialog.getNpc(), mc.player);
if (shots != null && shots.length > 0) {
shots[random.nextInt(shots.length)].positionCamera(guiDialog.getNpc().getEntity(), mc.player, ticks, this);
} else {
DialogShot.wideNormal.positionCamera(guiDialog.getNpc().getEntity(), mc.player, ticks, this);
}
}
updateFakePlayerPositions();
}
super.renderWorld(ticks, time);
mc.setRenderViewEntity(lastRenderViewEntity);
mc.gameSettings.hideGUI = lastHideGui;
}
内容来源于网络,如有侵权,请联系作者删除!