本文整理匯總了Java中net.minecraft.client.renderer.EntityRenderer.enableLightmap方法的典型用法代碼示例。如果您正苦於以下問題:Java EntityRenderer.enableLightmap方法的具體用法?Java EntityRenderer.enableLightmap怎麽用?Java EntityRenderer.enableLightmap使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類net.minecraft.client.renderer.EntityRenderer
的用法示例。
在下文中一共展示了EntityRenderer.enableLightmap方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: drawChains
import net.minecraft.client.renderer.EntityRenderer; //導入方法依賴的package包/類
@SubscribeEvent
public void drawChains(RenderWorldLastEvent event) {
if (chains.isEmpty()) return;
final float partial = event.partialTicks;
final ICamera camera = getFrustum(partial);
final Minecraft mc = Minecraft.getMinecraft();
final EntityRenderer er = mc.entityRenderer;
final TextureManager textureManager = mc.getTextureManager();
setup = false;
world = mc.theWorld;
for (WeakReference<ChainLink> ref : chains) {
ChainLink chain = ref.get();
if (chain == null) {
needsRebag = true;
continue;
}
chain.visitChain(camera, partial, this);
}
if (!setup) {
cleanup();
return;
}
GL11.glPushAttrib(GL11.GL_ENABLE_BIT | GL11.GL_COLOR_BUFFER_BIT );
textureManager.bindTexture(new ResourceLocation("factorization", "textures/chain.png"));
er.enableLightmap();
GL11.glEnable(GL11.GL_BLEND);
GL11.glBlendFunc(GL11.GL_ONE, GL11.GL_ZERO);
GL11.glDisable(GL11.GL_LIGHTING);
GL11.glDisable(GL11.GL_CULL_FACE);
tessI.draw();
er.disableLightmap();
GL11.glPopAttrib();
textureManager.bindTexture(Core.blockAtlas);
cleanup();
}