net.minecraft.client.renderer.entity.layers.LayerRenderer Java Examples

The following examples show how to use net.minecraft.client.renderer.entity.layers.LayerRenderer. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: RenderGuard.java    From ToroQuest with GNU General Public License v3.0 6 votes vote down vote up
public RenderGuard(RenderManager renderManagerIn) {
	super(renderManagerIn, new ModelGuard(), 0.5F);

	LayerRenderer<?> layerrenderer = (LayerRenderer) this.layerRenderers.get(0);
	defaultModel = (ModelGuard) mainModel;

	addLayer(new LayerHeldItem(this));

	LayerBipedArmor layerbipedarmor = new LayerBipedArmor(this) {
		protected void initArmor() {
			modelLeggings = new ModelZombie(0.5F, true);
			modelArmor = new ModelZombie(1.0F, true);
		}
	};
	addLayer(layerbipedarmor);

	// addLayer(new LayerCape(this));

	this.defaultLayers = Lists.newArrayList(this.layerRenderers);

}
 
Example #2
Source File: HyperiumRendererLivingEntity.java    From Hyperium with GNU Lesser General Public License v3.0 5 votes vote down vote up
public void renderLayers(T entitylivingbaseIn, float limbSwing, float limbSwingAmount, float partialTicks, float ageInTicks,
                         float netHeadYaw, float headPitch, float scale, List<LayerRenderer<T>> layerRenderers) {
    for (LayerRenderer<T> layerrenderer : layerRenderers) {
        boolean f = layerrenderer.shouldCombineTextures();
        if (Settings.OLD_ARMOUR) f = true;
        boolean flag = ((IMixinRendererLivingEntity<T>) parent).callSetBrightness(entitylivingbaseIn, partialTicks, f);
        layerrenderer.doRenderLayer(entitylivingbaseIn, limbSwing, limbSwingAmount, partialTicks, ageInTicks, netHeadYaw, headPitch, scale);
        if (flag) ((IMixinRendererLivingEntity) parent).callUnsetBrightness();
    }
}
 
Example #3
Source File: RenderCyberZombie.java    From Cyberware with MIT License 5 votes vote down vote up
public RenderCyberZombie(RenderManager renderManagerIn)
{
	super(renderManagerIn);
       List<LayerRenderer<EntityZombie>> defaultLayers = ReflectionHelper.getPrivateValue(RenderZombie.class, this, 10);
       defaultLayers.add(new LayerZombieHighlight(this));
       ReflectionHelper.setPrivateValue(RenderZombie.class, this, defaultLayers, 10);
}
 
Example #4
Source File: MixinRenderPlayer.java    From Hyperium with GNU Lesser General Public License v3.0 2 votes vote down vote up
/**
 * Not using the normal armor layer, but a slightly modified one. This is done
 * to prevent weird rendering bugs because of armor being on different layers in
 * the textures. These bugs were caused because the armor needs to be slit up in
 * two for the knees and elbows
 *
 * @author 9Y0
 */
@SuppressWarnings("unchecked")
@ModifyArg(method = "<init>(Lnet/minecraft/client/renderer/entity/RenderManager;Z)V", at = @At(value = "INVOKE", ordinal = 0, target = "Lnet/minecraft/client/renderer/entity/RenderPlayer;addLayer(Lnet/minecraft/client/renderer/entity/layers/LayerRenderer;)Z"))
public <V extends EntityLivingBase, U extends LayerRenderer<V>> U injectTwoPartLayerBipedArmor(U original) {
    return (U) new TwoPartLayerBipedArmor(this);
}
 
Example #5
Source File: IMixinRendererLivingEntity.java    From Hyperium with GNU Lesser General Public License v3.0 votes vote down vote up
@Invoker <V extends EntityLivingBase, U extends LayerRenderer<V>> boolean callAddLayer(U layer);