本文整理了Java中net.minecraft.client.Minecraft.getRenderManager()
方法的一些代码示例,展示了Minecraft.getRenderManager()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Minecraft.getRenderManager()
方法的具体详情如下:
包路径:net.minecraft.client.Minecraft
类名称:Minecraft
方法名:getRenderManager
暂无
代码示例来源:origin: Vazkii/Botania
private static boolean renderComponentInWorld(World world, Multiblock mb, MultiblockComponent comp, BlockPos anchorPos) {
double renderPosX = Minecraft.getMinecraft().getRenderManager().renderPosX;
double renderPosY = Minecraft.getMinecraft().getRenderManager().renderPosY;
double renderPosZ = Minecraft.getMinecraft().getRenderManager().renderPosZ;
BlockPos pos = comp.getRelativePosition();
BlockPos pos_ = pos.add(anchorPos);
if(anchor != null && comp.matches(world, pos_))
return false;
GlStateManager.pushMatrix();
GlStateManager.translate(-renderPosX, -renderPosY, -renderPosZ);
GlStateManager.disableDepth();
doRenderComponent(mb, comp, pos_);
GlStateManager.popMatrix();
return true;
}
代码示例来源:origin: Vazkii/Botania
private static void renderBlockOutlineAt(BlockPos pos, int color, float thickness) {
double renderPosX = Minecraft.getMinecraft().getRenderManager().renderPosX;
double renderPosY = Minecraft.getMinecraft().getRenderManager().renderPosY;
double renderPosZ = Minecraft.getMinecraft().getRenderManager().renderPosZ;
代码示例来源:origin: Vazkii/Botania
private void initAuxiliaryRender() {
Map<String, RenderPlayer> skinMap = Minecraft.getMinecraft().getRenderManager().getSkinMap();
RenderPlayer render;
render = skinMap.get("default");
render.addLayer(new ContributorFancinessHandler());
render.addLayer(new BaubleRenderHandler());
render.addLayer(new LayerGaiaHead(render.getMainModel().bipedHead));
render = skinMap.get("slim");
render.addLayer(new ContributorFancinessHandler());
render.addLayer(new BaubleRenderHandler());
render.addLayer(new LayerGaiaHead(render.getMainModel().bipedHead));
}
代码示例来源:origin: Vazkii/Botania
private static void renderCircle(BlockPos center, double radius) {
double renderPosX = Minecraft.getMinecraft().getRenderManager().renderPosX;
double renderPosY = Minecraft.getMinecraft().getRenderManager().renderPosY;
double renderPosZ = Minecraft.getMinecraft().getRenderManager().renderPosZ;
代码示例来源:origin: Vazkii/Botania
private static void renderBlockAt(Block block, int meta, BlockPos pos) {
IBlockState state = block.getStateFromMeta(meta);
double renderPosX = Minecraft.getMinecraft().getRenderManager().renderPosX;
double renderPosY = Minecraft.getMinecraft().getRenderManager().renderPosY;
double renderPosZ = Minecraft.getMinecraft().getRenderManager().renderPosZ;
GlStateManager.pushMatrix();
GlStateManager.translate(-renderPosX, -renderPosY, -renderPosZ);
GlStateManager.disableDepth();
GlStateManager.pushMatrix();
GlStateManager.enableBlend();
GlStateManager.blendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA);
Minecraft.getMinecraft().renderEngine.bindTexture(TextureMap.LOCATION_BLOCKS_TEXTURE);
BlockRendererDispatcher brd = Minecraft.getMinecraft().getBlockRendererDispatcher();
GlStateManager.translate(pos.getX(), pos.getY(), pos.getZ() + 1);
GlStateManager.color(1, 1, 1, 1);
brd.renderBlockBrightness(state, 1.0F);
GlStateManager.color(1F, 1F, 1F, 1F);
GlStateManager.enableDepth();
GlStateManager.popMatrix();
GlStateManager.popMatrix();
}
代码示例来源:origin: Vazkii/Botania
private static void renderRectangle(AxisAlignedBB aabb, boolean inner, Color color, byte alpha) {
double renderPosX = Minecraft.getMinecraft().getRenderManager().renderPosX;
double renderPosY = Minecraft.getMinecraft().getRenderManager().renderPosY;
double renderPosZ = Minecraft.getMinecraft().getRenderManager().renderPosZ;
代码示例来源:origin: Vazkii/Botania
float r = 180.0F - mc.getRenderManager().playerViewY;
GlStateManager.rotate(r, 0F, 1F, 0F);
GlStateManager.rotate(-mc.getRenderManager().playerViewX, 1F, 0F, 0F);
代码示例来源:origin: Vazkii/Botania
@SideOnly(Side.CLIENT)
public void renderEntity(IGuiLexiconEntry gui, Entity entity, int x, int y, int scale, float rotation) {
dummyEntity.world = Minecraft.getMinecraft() != null ? Minecraft.getMinecraft().world : null;
GlStateManager.enableColorMaterial();
GlStateManager.pushMatrix();
GlStateManager.translate(x, y, 50.0F);
GlStateManager.scale(-scale, scale, scale);
GlStateManager.rotate(180.0F, 0.0F, 0.0F, 1.0F);
GlStateManager.rotate(rotation, 0.0F, 1.0F, 0.0F);
RenderHelper.enableStandardItemLighting();
Minecraft.getMinecraft().getRenderManager().playerViewY = 180.0F;
Minecraft.getMinecraft().getRenderManager().renderEntity(entity, 0.0D, 0.0D, 0.0D, 0.0F, 1.0F, false);
GlStateManager.popMatrix();
RenderHelper.disableStandardItemLighting();
GlStateManager.disableRescaleNormal();
OpenGlHelper.setActiveTexture(OpenGlHelper.lightmapTexUnit);
GlStateManager.disableTexture2D();
OpenGlHelper.setActiveTexture(OpenGlHelper.defaultTexUnit);
if(relativeMouseX >= x - dummyEntity.width * scale / 2 - 10 && relativeMouseY >= y - dummyEntity.height * scale - 20 && relativeMouseX <= x + dummyEntity.width * scale / 2 + 10 && relativeMouseY <= y + 20)
tooltipEntity = true;
}
代码示例来源:origin: Vazkii/Botania
private static void renderTile(TileRedString tile) {
double renderPosX = Minecraft.getMinecraft().getRenderManager().renderPosX;
double renderPosY = Minecraft.getMinecraft().getRenderManager().renderPosY;
double renderPosZ = Minecraft.getMinecraft().getRenderManager().renderPosZ;
代码示例来源:origin: Vazkii/Botania
((Render) Minecraft.getMinecraft().getRenderManager().entityRenderMap.get(EntityItem.class)).doRender(item, d0, d1, d2, 1F, f);
GlStateManager.translate(-0.5F, -1.25F, -0.5F);
代码示例来源:origin: Vazkii/Botania
Tessellator tess = Tessellator.getInstance();
double renderPosX = mc.getRenderManager().renderPosX;
double renderPosY = mc.getRenderManager().renderPosY;
double renderPosZ = mc.getRenderManager().renderPosZ;
代码示例来源:origin: MrCrayfish/MrCrayfishFurnitureMod
@SubscribeEvent
public void onPrePlayerRender(RenderPlayerEvent.Pre event)
{
if(!rendering) return;
if(event.getEntityPlayer() == renderEntity)
{
backupEntity = Minecraft.getMinecraft().getRenderManager().renderViewEntity;
Minecraft.getMinecraft().getRenderManager().renderViewEntity = renderEntity;
}
}
代码示例来源:origin: Vazkii/Quark
private static RenderPlayer getRenderPlayer(AbstractClientPlayer player) {
Minecraft mc = Minecraft.getMinecraft();
RenderManager manager = mc.getRenderManager();
return manager.getSkinMap().get(player.getSkinType());
}
代码示例来源:origin: Vazkii/Botania
GlStateManager.pushMatrix();
GlStateManager.translate(0F, -0.6F, 0F);
GlStateManager.rotate(-mc.getRenderManager().playerViewY, 0.0F, 1.0F, 0.0F);
GlStateManager.rotate(mc.getRenderManager().playerViewX, 1.0F, 0.0F, 0.0F);
float f = 1.6F;
float f1 = 0.016666668F * f;
代码示例来源:origin: MrCrayfish/MrCrayfishFurnitureMod
@SubscribeEvent
public void onPostPlayerRender(RenderPlayerEvent.Post event)
{
if(!rendering) return;
if(event.getEntityPlayer() == renderEntity)
{
Minecraft.getMinecraft().getRenderManager().renderViewEntity = backupEntity;
renderEntity = null;
}
}
}
代码示例来源:origin: sinkillerj/ProjectE
@Override
public void registerLayerRenderers()
{
Map<String, RenderPlayer> skinMap = Minecraft.getMinecraft().getRenderManager().getSkinMap();
RenderPlayer render = skinMap.get("default");
render.addLayer(new LayerYue(render));
render = skinMap.get("slim");
render.addLayer(new LayerYue(render));
}
代码示例来源:origin: Azanor/Baubles
@Override
public void init() {
Map<String, RenderPlayer> skinMap = Minecraft.getMinecraft().getRenderManager().getSkinMap();
RenderPlayer render;
render = skinMap.get("default");
render.addLayer(new BaublesRenderLayer());
render = skinMap.get("slim");
render.addLayer(new BaublesRenderLayer());
}
}
代码示例来源:origin: Vazkii/Botania
itemRenderer = new RenderEntityItem(Minecraft.getMinecraft().getRenderManager(), Minecraft.getMinecraft().getRenderItem()) {
@Override
public boolean shouldBob() {
代码示例来源:origin: SquidDev-CC/plethora
@SideOnly(Side.CLIENT)
private void inject(Class<? extends EntityLivingBase> klass, float dx, float dy, float dz) {
RenderManager manager = Minecraft.getMinecraft().getRenderManager();
inject(manager.getEntityClassRenderObject(klass), getNormal(), dx, dy, dz, 0, 0, 0);
}
代码示例来源:origin: SquidDev-CC/plethora
@SideOnly(Side.CLIENT)
private void injectMonocle(Class<? extends EntityLivingBase> klass, float dx, float dy, float dz, float rx, float ry, float rz) {
RenderManager manager = Minecraft.getMinecraft().getRenderManager();
inject(manager.getEntityClassRenderObject(klass), getMonocle(), dx, dy, dz, rx, ry, rz);
}
内容来源于网络,如有侵权,请联系作者删除!