Java Code Examples for net.minecraft.client.renderer.entity.RenderItem#setRenderManager()

The following examples show how to use net.minecraft.client.renderer.entity.RenderItem#setRenderManager() . 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: RenderAutoChisel.java    From Chisel-2 with GNU General Public License v2.0 5 votes vote down vote up
public RenderAutoChisel() {
	Chisel.renderAutoChiselId = RenderingRegistry.getNextAvailableRenderId();

	renderItem = new RenderItem() {

		@Override
		public boolean shouldBob() {
			return false;
		}
	};
	renderItem.setRenderManager(RenderManager.instance);
}
 
Example 2
Source File: RenderEntityChopperSeeds.java    From PneumaticCraft with GNU General Public License v3.0 5 votes vote down vote up
public RenderEntityChopperSeeds(){
    itemRenderer = new RenderItem(){
        @Override
        public boolean shouldBob(){

            return false;
        };
    };
    itemRenderer.setRenderManager(RenderManager.instance);
}
 
Example 3
Source File: RenderDroneAI.java    From PneumaticCraft with GNU General Public License v3.0 5 votes vote down vote up
public RenderDroneAI(EntityDrone drone){
    this.drone = drone;
    renderItem = new RenderItem();
    renderItem.setRenderManager(RenderManager.instance);
    entityItem = new EntityItem(drone.worldObj);
    update();
}
 
Example 4
Source File: ModelAssemblyIOUnit.java    From PneumaticCraft with GNU General Public License v3.0 4 votes vote down vote up
public ModelAssemblyIOUnit(){
    // EE3 snippet, to initialize an EntityItem which doesn't bob.
    customRenderItem = new RenderItem(){
        @Override
        public boolean shouldBob(){

            return false;
        };
    };
    customRenderItem.setRenderManager(RenderManager.instance);

    textureWidth = 64;
    textureHeight = 64;

    Base = new ModelRenderer(this, 0, 0);
    Base.addBox(0F, 0F, 1F, 16, 1, 16);
    Base.setRotationPoint(-8F, 23F, -9F);
    Base.setTextureSize(64, 32);
    Base.mirror = true;
    setRotation(Base, 0F, 0F, 0F);
    BaseTurn = new ModelRenderer(this, 0, 17);
    BaseTurn.addBox(0F, 0F, 0F, 7, 1, 7);
    BaseTurn.setRotationPoint(-3.5F, 22F, -3.5F);
    BaseTurn.setTextureSize(64, 32);
    BaseTurn.mirror = true;
    setRotation(BaseTurn, 0F, 0F, 0F);
    BaseTurn2 = new ModelRenderer(this, 28, 17);
    BaseTurn2.addBox(0F, 0F, 0F, 4, 5, 4);
    BaseTurn2.setRotationPoint(-2F, 17F, -2F);
    BaseTurn2.setTextureSize(64, 32);
    BaseTurn2.mirror = true;
    setRotation(BaseTurn2, 0F, 0F, 0F);
    ArmBase1 = new ModelRenderer(this, 0, 25);
    ArmBase1.addBox(0F, 0F, 0F, 1, 2, 8);
    ArmBase1.setRotationPoint(2F, 17F, -1F);
    ArmBase1.setTextureSize(64, 32);
    ArmBase1.mirror = true;
    setRotation(ArmBase1, 0F, 0F, 0F);
    ArmBase2 = new ModelRenderer(this, 0, 25);
    ArmBase2.addBox(0F, 0F, 0F, 1, 2, 8);
    ArmBase2.setRotationPoint(-3F, 17F, -1F);
    ArmBase2.setTextureSize(64, 32);
    ArmBase2.mirror = true;
    setRotation(ArmBase2, 0F, 0F, 0F);
    SupportMiddle = new ModelRenderer(this, 0, 57);
    SupportMiddle.addBox(0F, 0F, 0F, 2, 1, 1);
    SupportMiddle.setRotationPoint(-1F, 17.5F, 5.5F);
    SupportMiddle.setTextureSize(64, 32);
    SupportMiddle.mirror = true;
    setRotation(SupportMiddle, 0F, 0F, 0F);
    ArmMiddle1 = new ModelRenderer(this, 0, 35);
    ArmMiddle1.addBox(0F, 0F, 0F, 1, 17, 2);
    ArmMiddle1.setRotationPoint(-2F, 2F, 5F);
    ArmMiddle1.setTextureSize(64, 32);
    ArmMiddle1.mirror = true;
    setRotation(ArmMiddle1, 0F, 0F, 0F);
    ArmMiddle2 = new ModelRenderer(this, 0, 35);
    ArmMiddle2.addBox(0F, 0F, 0F, 1, 17, 2);
    ArmMiddle2.setRotationPoint(1F, 2F, 5F);
    ArmMiddle2.setTextureSize(64, 32);
    ArmMiddle2.mirror = true;
    setRotation(ArmMiddle2, 0F, 0F, 0F);
    ClawBase = new ModelRenderer(this, 8, 38);
    ClawBase.addBox(0F, 0F, 0F, 2, 2, 3);
    ClawBase.setRotationPoint(-1F, 2F, 4.5F);
    ClawBase.setTextureSize(64, 32);
    ClawBase.mirror = true;
    setRotation(ClawBase, 0F, 0F, 0F);
    ClawAxil = new ModelRenderer(this, 8, 45);
    ClawAxil.addBox(0F, 0F, 0F, 1, 1, 1);
    ClawAxil.setRotationPoint(-0.5F, 2.5F, 4F);
    ClawAxil.setTextureSize(64, 32);
    ClawAxil.mirror = true;
    setRotation(ClawAxil, 0F, 0F, 0F);
    ClawTurn = new ModelRenderer(this, 8, 49);
    ClawTurn.addBox(0F, 0F, 0F, 4, 2, 1);
    ClawTurn.setRotationPoint(-2F, 2F, 3F);
    ClawTurn.setTextureSize(64, 32);
    ClawTurn.mirror = true;
    setRotation(ClawTurn, 0F, 0F, 0F);
    Claw1 = new ModelRenderer(this, 8, 54);
    Claw1.addBox(0F, 0F, 0F, 1, 2, 1);
    Claw1.setRotationPoint(0F, 2F, 2F);
    Claw1.setTextureSize(64, 32);
    Claw1.mirror = true;
    setRotation(Claw1, 0F, 0F, 0F);
    Claw2 = new ModelRenderer(this, 8, 59);
    Claw2.addBox(0F, 0F, 0F, 1, 2, 1);
    Claw2.setRotationPoint(-1F, 2F, 2F);
    Claw2.setTextureSize(64, 32);
    Claw2.mirror = true;
    setRotation(Claw2, 0F, 0F, 0F);
}
 
Example 5
Source File: ModelAssemblyPlatform.java    From PneumaticCraft with GNU General Public License v3.0 4 votes vote down vote up
public ModelAssemblyPlatform(){
    // EE3 snippet, to initialize an EntityItem which doesn't bob.
    customRenderItem = new RenderItem(){
        @Override
        public boolean shouldBob(){

            return false;
        };
    };
    customRenderItem.setRenderManager(RenderManager.instance);

    textureWidth = 64;
    textureHeight = 32;

    Base = new ModelRenderer(this, 0, 15);
    Base.addBox(0F, 0F, 0F, 16, 1, 16);
    Base.setRotationPoint(-8F, 23F, -8F);
    Base.setTextureSize(64, 32);
    Base.mirror = true;
    setRotation(Base, 0F, 0F, 0F);
    Platform = new ModelRenderer(this, 0, 6);
    Platform.addBox(0F, 0F, 0F, 8, 1, 8);
    Platform.setRotationPoint(-4F, 18F, -4F);
    Platform.setTextureSize(64, 32);
    Platform.mirror = true;
    setRotation(Platform, 0F, 0F, 0F);
    Leg1 = new ModelRenderer(this, 34, 0);
    Leg1.addBox(0F, 0F, 0F, 1, 6, 1);
    Leg1.setRotationPoint(2.3F, 18F, -3F);
    Leg1.setTextureSize(64, 32);
    Leg1.mirror = true;
    setRotation(Leg1, -0.5585054F, -0.7853982F, 0F);
    Leg2 = new ModelRenderer(this, 34, 0);
    Leg2.addBox(0F, 0F, 0F, 1, 6, 1);
    Leg2.setRotationPoint(-3F, 18F, -2.3F);
    Leg2.setTextureSize(64, 32);
    Leg2.mirror = true;
    setRotation(Leg2, -0.5585054F, 0.7853982F, 0F);
    Leg3 = new ModelRenderer(this, 34, 0);
    Leg3.addBox(0F, 0F, 0F, 1, 6, 1);
    Leg3.setRotationPoint(3F, 18F, 2.3F);
    Leg3.setTextureSize(64, 32);
    Leg3.mirror = true;
    setRotation(Leg3, -0.5585054F, -2.356194F, 0F);
    Leg4 = new ModelRenderer(this, 34, 0);
    Leg4.addBox(0F, 0F, 0F, 1, 6, 1);
    Leg4.setRotationPoint(-2.3F, 18F, 3F);
    Leg4.setTextureSize(64, 32);
    Leg4.mirror = true;
    setRotation(Leg4, -0.5585054F, 2.356194F, 0F);
    Claw1 = new ModelRenderer(this, 0, 0);
    Claw1.addBox(0F, 0F, 0F, 2, 1, 1);
    Claw1.setRotationPoint(-1F, 17F, 0F);
    Claw1.setTextureSize(64, 32);
    Claw1.mirror = true;
    setRotation(Claw1, 0F, 0F, 0F);
    Claw2 = new ModelRenderer(this, 0, 0);
    Claw2.addBox(0F, 0F, 0F, 2, 1, 1);
    Claw2.setRotationPoint(-1F, 17F, -1F);
    Claw2.setTextureSize(64, 32);
    Claw2.mirror = true;
    setRotation(Claw2, 0F, 0F, 0F);
}
 
Example 6
Source File: ModelPressureChamberInterface.java    From PneumaticCraft with GNU General Public License v3.0 4 votes vote down vote up
public ModelPressureChamberInterface(){
    textureWidth = 128;
    textureHeight = 128;

    Shape1 = new ModelRenderer(this, 0, 0);
    Shape1.addBox(0F, 0F, 0F, 13, 3, 16);
    Shape1.setRotationPoint(-5F, 21F, -8F);
    Shape1.setTextureSize(128, 128);
    Shape1.mirror = true;
    setRotation(Shape1, 0F, 0F, 0F);
    Shape2 = new ModelRenderer(this, 0, 19);
    Shape2.addBox(0F, 0F, 0F, 3, 13, 16);
    Shape2.setRotationPoint(5F, 8F, -8F);
    Shape2.setTextureSize(128, 128);
    Shape2.mirror = true;
    setRotation(Shape2, 0F, 0F, 0F);
    Shape3 = new ModelRenderer(this, 58, 0);
    Shape3.addBox(0F, 0F, 0F, 13, 3, 16);
    Shape3.setRotationPoint(-8F, 8F, -8F);
    Shape3.setTextureSize(128, 128);
    Shape3.mirror = true;
    setRotation(Shape3, 0F, 0F, 0F);
    Shape4 = new ModelRenderer(this, 38, 19);
    Shape4.addBox(0F, 0F, 0F, 3, 13, 16);
    Shape4.setRotationPoint(-8F, 11F, -8F);
    Shape4.setTextureSize(128, 128);
    Shape4.mirror = true;
    setRotation(Shape4, 0F, 0F, 0F);
    Shape5 = new ModelRenderer(this, 0, 48);
    Shape5.addBox(0F, 0F, 0F, 2, 2, 16);
    Shape5.setRotationPoint(-5F, 11F, -8F);
    Shape5.setTextureSize(128, 128);
    Shape5.mirror = true;
    setRotation(Shape5, 0F, 0F, 0F);
    Shape6 = new ModelRenderer(this, 36, 48);
    Shape6.addBox(0F, 0F, 0F, 2, 2, 16);
    Shape6.setRotationPoint(3F, 11F, -8F);
    Shape6.setTextureSize(128, 128);
    Shape6.mirror = true;
    setRotation(Shape6, 0F, 0F, 0F);
    Shape7 = new ModelRenderer(this, 0, 66);
    Shape7.addBox(0F, 0F, 0F, 2, 2, 16);
    Shape7.setRotationPoint(-5F, 19F, -8F);
    Shape7.setTextureSize(128, 128);
    Shape7.mirror = true;
    setRotation(Shape7, 0F, 0F, 0F);
    Shape8 = new ModelRenderer(this, 36, 66);
    Shape8.addBox(0F, 0F, 0F, 2, 2, 16);
    Shape8.setRotationPoint(3F, 19F, -8F);
    Shape8.setTextureSize(128, 128);
    Shape8.mirror = true;
    setRotation(Shape8, 0F, 0F, 0F);
    Input = new ModelRenderer(this, 0, 84);
    Input.addBox(0F, 0F, 0F, 10, 10, 2);
    Input.setRotationPoint(-5F, 11F, -7.2F);
    Input.setTextureSize(128, 128);
    Input.mirror = true;
    setRotation(Input, 0F, 0F, 0F);
    Output = new ModelRenderer(this, 24, 84);
    Output.addBox(0F, 0F, 0F, 10, 10, 2);
    Output.setRotationPoint(-5F, 11F, 5.2F);
    Output.setTextureSize(128, 128);
    Output.mirror = true;
    setRotation(Output, 0F, 0F, 0F);
    setRotation(Output, 0F, 0F, 0F);

    // EE3 snippet, to initialize an EntityItem which doesn't bob.
    customRenderItem = new RenderItem(){
        @Override
        public boolean shouldBob(){

            return false;
        };
    };
    customRenderItem.setRenderManager(RenderManager.instance);
}