本文整理汇总了Java中net.minecraftforge.client.event.RenderLivingEvent.Post方法的典型用法代码示例。如果您正苦于以下问题:Java RenderLivingEvent.Post方法的具体用法?Java RenderLivingEvent.Post怎么用?Java RenderLivingEvent.Post使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类net.minecraftforge.client.event.RenderLivingEvent
的用法示例。
在下文中一共展示了RenderLivingEvent.Post方法的11个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: onRenderPlayerEventPost
import net.minecraftforge.client.event.RenderLivingEvent; //导入方法依赖的package包/类
@SuppressWarnings("unused")
@SubscribeEvent
public void onRenderPlayerEventPost(RenderLivingEvent.Post event) {
if (event.entity != Minecraft.getMinecraft().thePlayer) {
glPushMatrix();
glEnable(GL_BLEND);
glTranslated(event.x, event.y, event.z);
if (EntityPlayer.class.isAssignableFrom(event.entity.getClass())) {
/*IInventory baubles = BaublesApi.getBaubles((EntityPlayer) event.entity);
if (baubles.getStackInSlot(2) != null) {
TextureHelper.bindTexture(textureRingOfHealth);
model.renderAll();
} TODO: Baubles replacement*/
}
glDisable(GL_BLEND);
glPopMatrix();
}
}
示例2: renderLivingPostEntity
import net.minecraftforge.client.event.RenderLivingEvent; //导入方法依赖的package包/类
@SubscribeEvent
public void renderLivingPostEntity(RenderLivingEvent.Post<EntityLivingBase> event) {
if (!(event.getEntity() instanceof EntityPlayer || event.getEntity() instanceof EntityTF2Character))
return;
ClientProxy.renderCritGlow=0;
if (event.getEntity().getActivePotionEffect(TF2weapons.uber)!=null) {
GL11.glColor4f(1.0F, 1F, 1.0F, 1F);
}
// GlStateManager.enableLighting();
if (event.getEntity().getCapability(TF2weapons.WEAPONS_CAP, null).invisTicks > 0) {
GL11.glDisable(GL11.GL_BLEND);
GL11.glColor4f(1.0F, 1F, 1.0F, 1F);
}
}
示例3: entityColorRender
import net.minecraftforge.client.event.RenderLivingEvent; //导入方法依赖的package包/类
@SubscribeEvent
public void entityColorRender(final RenderLivingEvent.Post event) {
if (!this.avoidRecursion && this.resetRender) {
GL11.glColor4f(1.0f, 1.0f, 1.0f, 1.0f);
GL11.glDisable(3042);
}
}
示例4: renderEntity
import net.minecraftforge.client.event.RenderLivingEvent; //导入方法依赖的package包/类
static void renderEntity(RenderLivingEvent.Post e) {
if (!OptionCore.UI_ONLY.getValue()) {
if (e.entity != mc.thePlayer) {
StaticRenderer.render(e.renderer.getRenderManager(), e.entity, e.x, e.y, e.z);
}
}
}
示例5: onPlayerRenderPost
import net.minecraftforge.client.event.RenderLivingEvent; //导入方法依赖的package包/类
@SubscribeEvent
public void onPlayerRenderPost(RenderLivingEvent.Post event) {
if(nameIsGood(event.entity)){
GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
GL11.glDisable(GL11.GL_BLEND);
}
}
示例6: entityColorRender
import net.minecraftforge.client.event.RenderLivingEvent; //导入方法依赖的package包/类
@SubscribeEvent
public void entityColorRender(RenderLivingEvent.Post event) {
if (this.resetRender) {
GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
GL11.glDisable(3042);
}
}
示例7: onPostRenderLiving
import net.minecraftforge.client.event.RenderLivingEvent; //导入方法依赖的package包/类
@SubscribeEvent
public void onPostRenderLiving(RenderLivingEvent.Post event) {
GL11.glDisable(GL11.GL_POLYGON_OFFSET_FILL);
GlStateManager.doPolygonOffset(1.0F, 1000000);
GlStateManager.disablePolygonOffset();
}
示例8: onRenderLivingPost
import net.minecraftforge.client.event.RenderLivingEvent; //导入方法依赖的package包/类
@SubscribeEvent
public void onRenderLivingPost(RenderLivingEvent.Post event)
{
EntityGib[] gibs = amputationMap.get(event.getEntity());
if(gibs != null)
{
boolean gibbed = false;
for(int i = 0; i <= 2; i++)
{
if(!gibs[i].attached)
{
gibbed = true;
break;
}
}
if(gibbed)
{
if(event.getRenderer() instanceof RenderBiped || event.getRenderer() instanceof RenderPlayer)
{
ModelBase model = event.getRenderer().mainModel;
ModelBiped bipedPass1 = null;
ModelBiped bipedPass2 = null;
for(int i = 0; i < event.getRenderer().layerRenderers.size(); i++)
{
LayerRenderer layer = (LayerRenderer)event.getRenderer().layerRenderers.get(i);
if(layer instanceof LayerBipedArmor)
{
LayerBipedArmor armor = (LayerBipedArmor)layer;
bipedPass1 = armor.modelLeggings;
bipedPass2 = armor.modelArmor;
break;
}
}
if(model instanceof ModelBiped && bipedPass1 != null && bipedPass2 != null)
{
ModelBiped biped = (ModelBiped)model;
bipedPass1.bipedHead = ModelGib.bipedHead1;
bipedPass1.bipedHeadwear = ModelGib.bipedHeadwear1;
bipedPass1.bipedLeftArm = ModelGib.bipedLeftArm1;
bipedPass1.bipedRightArm = ModelGib.bipedRightArm1;
bipedPass2.bipedHead = ModelGib.bipedHead2;
bipedPass2.bipedHeadwear = ModelGib.bipedHeadwear2;
bipedPass2.bipedLeftArm = ModelGib.bipedLeftArm2;
bipedPass2.bipedRightArm = ModelGib.bipedRightArm2;
biped.bipedHead.showModel = true;
biped.bipedHeadwear.showModel = true;
biped.bipedLeftArm.showModel = true;
biped.bipedRightArm.showModel = true;
}
}
}
}
}
示例9: entityPostRender
import net.minecraftforge.client.event.RenderLivingEvent; //导入方法依赖的package包/类
@SideOnly(Side.CLIENT)
@SubscribeEvent
public void entityPostRender(RenderLivingEvent.Post event) {
if (GelsPlus.proxy.getRegistry().coloredList().containsKey(event.entity.getEntityId()))
RenderUtils.resetColor();
}
示例10: onLivingRender
import net.minecraftforge.client.event.RenderLivingEvent; //导入方法依赖的package包/类
@SubscribeEvent
public void onLivingRender(RenderLivingEvent.Post event){
setRenderHead(event.entity, true);
}
示例11: onEntityRender
import net.minecraftforge.client.event.RenderLivingEvent; //导入方法依赖的package包/类
@SubscribeEvent
public static void onEntityRender(RenderLivingEvent.Post<EntityLivingBase> event) {
EntityLivingBase e = event.getEntity();
if (e.getEntityData().getBoolean("eio_needs_pop")) {
GlStateManager.popMatrix();
e.getEntityData().removeTag("eio_needs_pop");
}
if (e.getEntityData().getBoolean(TileTelePad.TELEPORTING_KEY)) {
final float progress = e.getEntityData().getFloat(TileTelePad.PROGRESS_KEY);
final float speed = progress * 1.2f;
final float rot = (e.getEntityData().getFloat("eio_teleportrotation")) + speed;
e.getEntityData().setFloat("eio_teleportrotation", rot);
AxisAlignedBB bb = e.getRenderBoundingBox();
if (NullHelper.untrust(bb) == null || bb.getAverageEdgeLength() < .2) {
float radius = e.width / 2.0F;
bb = new AxisAlignedBB(-radius, 0, -radius, radius, e.height, radius).offset(e.posX, e.posY, e.posZ);
}
bb = bb.setMaxY(bb.maxY + 1.25 - progress / 2).expand(0.5 - progress / 5, 0, 0.5 - progress / 5);
GlStateManager.pushMatrix();
GlStateManager.disableTexture2D();
GlStateManager.shadeModel(GL11.GL_SMOOTH);
GlStateManager.enableBlend();
GlStateManager.tryBlendFuncSeparate(GL_SRC_ALPHA, GL_ONE, GL_ZERO, GL_ONE);
GlStateManager.disableAlpha();
GlStateManager.disableCull();
GlStateManager.disableLighting();
GlStateManager.depthMask(false);
GlStateManager.translate(event.getX(), event.getY(), event.getZ());
GlStateManager.rotate(rot + Minecraft.getMinecraft().getRenderPartialTicks() + e.ticksExisted, 0, 1, 0);
Tessellator tes = Tessellator.getInstance();
VertexBuffer vertexBuffer = tes.getBuffer();
vertexBuffer.setTranslation(-e.posX, -e.posY, -e.posZ);
vertexBuffer.begin(GL11.GL_QUAD_STRIP, DefaultVertexFormats.POSITION_COLOR);
vertexBuffer.pos(bb.maxX, bb.maxY, bb.maxZ).color(COL_TOP.x, COL_TOP.y, COL_TOP.z, COL_TOP.w).endVertex();
vertexBuffer.pos(bb.maxX, bb.minY, bb.maxZ).color(COL_BOT.x, COL_BOT.y, COL_BOT.z, COL_BOT.w).endVertex();
vertexBuffer.pos(bb.minX, bb.maxY, bb.maxZ).color(COL_TOP.x, COL_TOP.y, COL_TOP.z, COL_TOP.w).endVertex();
vertexBuffer.pos(bb.minX, bb.minY, bb.maxZ).color(COL_BOT.x, COL_BOT.y, COL_BOT.z, COL_BOT.w).endVertex();
vertexBuffer.pos(bb.minX, bb.maxY, bb.minZ).color(COL_TOP.x, COL_TOP.y, COL_TOP.z, COL_TOP.w).endVertex();
vertexBuffer.pos(bb.minX, bb.minY, bb.minZ).color(COL_BOT.x, COL_BOT.y, COL_BOT.z, COL_BOT.w).endVertex();
vertexBuffer.pos(bb.maxX, bb.maxY, bb.minZ).color(COL_TOP.x, COL_TOP.y, COL_TOP.z, COL_TOP.w).endVertex();
vertexBuffer.pos(bb.maxX, bb.minY, bb.minZ).color(COL_BOT.x, COL_BOT.y, COL_BOT.z, COL_BOT.w).endVertex();
vertexBuffer.pos(bb.maxX, bb.maxY, bb.maxZ).color(COL_TOP.x, COL_TOP.y, COL_TOP.z, COL_TOP.w).endVertex();
vertexBuffer.pos(bb.maxX, bb.minY, bb.maxZ).color(COL_BOT.x, COL_BOT.y, COL_BOT.z, COL_BOT.w).endVertex();
tes.draw();
GlStateManager.enableTexture2D();
GlStateManager.disableBlend();
GlStateManager.enableAlpha();
GlStateManager.enableCull();
GlStateManager.enableLighting();
GlStateManager.depthMask(true);
GlStateManager.popMatrix();
}
}