Jump to content

Darth

Members
  • Posts

    12
  • Joined

  • Last visited

Posts posted by Darth

  1. I'm trying to create custom fluid, using forge fluid api, but blockfluid can't find model. Can someone help me find an error?

     

    Fluid Class:

    https://pastebin.com/XYuRcw86

     

    BlockFluid: 

    https://pastebin.com/dNXSvhUL

     

    Register Fluids: 

    https://pastebin.com/iKPa5tjy

     

    StateMapper:

    https://pastebin.com/GqK9LNC9

     

    BlockStates File:

    https://pastebin.com/ah4yKnmK

     

    Fluid registered in preInit event.

  2. On 9/26/2018 at 11:07 PM, lehjr said:

    This is a blockstate file I was using for a testblock. Note the scale and transform can all be set using a the blockstate file as well as different models for different states if that's what you want. That should be enough for most things. This probably isn't the best example, but it should be enough to get you pointed in the right direction. 

    https://github.com/MachineMuse/MachineMusePowersuits/blob/1.12.2-experimental/src/main/resources/assets/powersuits/blockstates/tile.testBlock.json

    Hmm, strange, but thats doesn't work. 

    Spoiler
    
    {
        "forge_marker": 1,
        "defaults": 
        {
            "transform": "forge:default-block"
        },
        "variants": {
            "normal": 
            [
                {
                    "model": "tg:teleportator.obj",
                    "transform": 
                    {       
                        "gui": { "translation": [0, 2, 0], "scale": 0.125 , "rotation": [{ "x": 300 },{ "z": 45 }] },
                        "firstperson_righthand": { "translation": [0, 2, 0], "scale": 0.125 , "rotation": [{ "x": 300 },{ "z": 45 }] }
                    }
                }
            ],
            "inventory": 
            [
                {
                "model": "tg:teleportator.obj",
                "transform": 
                    {       
                        "gui": { "translation": [0, 2, 0], "scale": 0.125 , "rotation": [{ "x": 300 },{ "z": 45 }] },
                        "firstperson_righthand": { "translation": [0, 2, 0], "scale": 0.125 , "rotation": [{ "x": 300 },{ "z": 45 }] }
                    }
                }
            ]
        }
    }

     

     

    Any ideas?

  3. Hi!. I'm use .obj model for block and this works pretty good, but i have so problems with #inventory variant for items. 

     

    Spoiler

    image.thumb.png.b34972ea392ce912a6dc9dddc4cfce7f.png

    How i can fix that? That completly ignore all .json files. So please help set that model like standard minecraft block.

     

    My .json files:

    BlockStates:

    Spoiler
    
    {
        "forge_marker": 1,
        "defaults": {
            "model": "tg:teleportator.obj",
            "transform": "forge:default-block"
         },
        "variants": {
            "normal": 
            [
                {
                }
            ],
            "inventory": 
            [
                {
                "transform": 
                    {       
                        "gui": { "translation": [0, 2, 0], "scale": 0.125 , "rotation": [{ "x": 300 },{ "z": 45 }] },
                        "firstperson_righthand": { "translation": [0, 2, 0], "scale": 0.125 , "rotation": [{ "x": 300 },{ "z": 45 }] }
                    }
                }
            ]
        }
    }
    

     

    and models/item:

    Spoiler
    
    {
        "parent": "tg:block/teleportator.obj",
         "display":       
         {
             "gui": { "translation": [0, 2, 0], "scale": 0.125 , "rotation": [{ "x": 300 },{ "z": 45 }] },
             "firstperson_righthand": { "translation": [0, 2, 0], "scale": 0.125 , "rotation": [{ "x": 300 },{ "z": 45 }] }
         }
    }
    

     

     

  4. Yea, thats again me with rendering -_-

     

    So, what i'm trying to do.

    TESR:

     

    Spoiler
    
    package com.ancient.thaumicgadgets.objects.machines.stab_2;
    
    import com.ancient.thaumicgadgets.util.IFunctionLibrary;
    import com.ancient.thaumicgadgets.util.Reference;
    
    import net.minecraft.block.state.IBlockState;
    import net.minecraft.client.Minecraft;
    import net.minecraft.client.renderer.BlockRendererDispatcher;
    import net.minecraft.client.renderer.GlStateManager;
    import net.minecraft.client.renderer.block.model.IBakedModel;
    import net.minecraft.client.renderer.block.model.ModelManager;
    import net.minecraft.client.renderer.block.model.ModelResourceLocation;
    import net.minecraft.client.renderer.texture.TextureMap;
    import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer;
    import net.minecraft.util.ResourceLocation;
    
    public class RenderStab2 extends TileEntitySpecialRenderer<TileEntityStab2>
    {
        private float timer = 0f;
        private int runesCount = 0;
        private float distance = 0.9f;
        private static final ResourceLocation[] textureLoc = {new ResourceLocation(Reference.MOD_ID, "textures/models/runes/1.png"),
                                                              new ResourceLocation(Reference.MOD_ID, "textures/models/runes/2.png"),
                                                              new ResourceLocation(Reference.MOD_ID, "textures/models/runes/3.png"),
                                                              new ResourceLocation(Reference.MOD_ID, "textures/models/runes/4.png"),
                                                              new ResourceLocation(Reference.MOD_ID, "textures/models/runes/5.png"),
                                                              new ResourceLocation(Reference.MOD_ID, "textures/models/runes/6.png")};
        private static final ResourceLocation modelLoc = new ResourceLocation(Reference.MOD_ID, "textures/models/runes/rune");
        private static IBakedModel model;   
        @Override
        public void render(TileEntityStab2 te, double x, double y, double z, float partialTicks, int destroyStage, float alpha) 
        {
            super.render(te, x, y, z, partialTicks, destroyStage, alpha);
    
            Minecraft mc = Minecraft.getMinecraft();
            BlockRendererDispatcher brd = mc.getBlockRendererDispatcher();
            ModelManager mm = brd.getBlockModelShapes().getModelManager();
            model = mm.getModel(new ModelResourceLocation(Reference.MOD_ID, "textures/models/runes/rune"));
            IBlockState state = te.getWorld().getBlockState(te.getPos());
            this.timer = te.timer *0.05f;
            this.runesCount = te.runesCount;
            
            for (int q = 0; q < this.runesCount; q++)
            {
                GlStateManager.pushMatrix();
                {
                    GlStateManager.translate(x + 0.5d, y + 0.9d, z + 0.5d);
                    GlStateManager.translate(distance * Math.cos(te.runeAngles.get(q) + timer), y + 0.9d, distance * Math.sin(te.runeAngles.get(q) + timer));
                    GlStateManager.scale(1f, 1f, 1f);
                    this.bindTexture(TextureMap.LOCATION_BLOCKS_TEXTURE);
                    brd.getBlockModelRenderer().renderModelBrightness(model, state, 1.0f, true);
                }
                GlStateManager.popMatrix();
            }
        }
    }

     

     

     And register model baking in client proxy, at init:

    ModelBakery.registerItemVariants(ModItems.TG, new ResourceLocation(Reference.MOD_ID, "textures/models/runes/rune"));


    But minecraft can't find this model. It's return missing block model. Why? What i'm doing wrong?

  5. On 9/2/2018 at 4:54 PM, Cadiboo said:

    you should probably also te#getWorld#getTotalWorldTime() instead of your timer variable. If you need even more accuracy you can also add the partialTicks to the world time.

     

    You might want to take a look at https://github.com/Cadiboo/WIPTechAlpha/blob/fc508e4dd439603888ca2caf08c0b871372764d4/src/main/java/cadiboo/wiptech/client/ClientUtil.java#L776-L801 for the trigonometry and at https://github.com/Cadiboo/WIPTechAlpha/blob/fc508e4dd439603888ca2caf08c0b871372764d4/src/main/java/cadiboo/wiptech/client/ClientUtil.java#L247-L292 for my use of it

    Problem was with rendering, not with trigonometry, but thanks anyway.

  6. Hi gyus. I have really strange problem with model rendering.

     

    If you look at the model at the first angle - everything is fine, but if you look under the second... I use TESR for render model. All code u can find above:

    1:

    Spoiler

    1.thumb.png.36f1872a1ab05e4a25031d7d9ebf3814.png

    2:

    Spoiler

    2.thumb.png.6e7123a4af2c1947784f7598addcdc30.png

    3:

    Spoiler

    3.thumb.png.4f8ea59e7e24908b9c69abc1b49fdb4a.png

    model:

    Spoiler

    Code:

    Block:

    Spoiler
    
    package com.ancient.thaumicgadgets.blocks;
    
    import java.util.Random;
    
    import com.ancient.thaumicgadgets.init.ModBlocks;
    import com.ancient.thaumicgadgets.objects.machines.eye.TileEntityEye;
    import com.ancient.thaumicgadgets.util.Reference;
    
    import net.minecraft.block.BlockHorizontal;
    import net.minecraft.block.ITileEntityProvider;
    import net.minecraft.block.SoundType;
    import net.minecraft.block.material.Material;
    import net.minecraft.block.properties.IProperty;
    import net.minecraft.block.properties.PropertyDirection;
    import net.minecraft.block.state.BlockStateContainer;
    import net.minecraft.block.state.IBlockState;
    import net.minecraft.client.renderer.block.model.ModelResourceLocation;
    import net.minecraft.entity.EntityLivingBase;
    import net.minecraft.item.Item;
    import net.minecraft.item.ItemStack;
    import net.minecraft.tileentity.TileEntity;
    import net.minecraft.util.BlockRenderLayer;
    import net.minecraft.util.EnumBlockRenderType;
    import net.minecraft.util.EnumFacing;
    import net.minecraft.util.EnumHand;
    import net.minecraft.util.Mirror;
    import net.minecraft.util.Rotation;
    import net.minecraft.util.math.BlockPos;
    import net.minecraft.world.World;
    import net.minecraftforge.client.model.ModelLoader;
    import net.minecraftforge.fml.relauncher.Side;
    import net.minecraftforge.fml.relauncher.SideOnly;
    
    public class BlockEye extends BlockBase implements ITileEntityProvider
    {
    
    	private final String name;
    	
    	public BlockEye(String name) 
    	{
    		super(name, Material.GLASS);
    		
    		this.name = name;
    		setSoundType(SoundType.GLASS);
    		setHardness(4f);
    		setResistance(30f);
    		setLightOpacity(0);
    		setHarvestLevel("pickaxe", 0);
    
    	}
    
    	@Override
    	public TileEntity createNewTileEntity(World worldIn, int meta) 
    	{
    		return new TileEntityEye();
    	}
    
    	@Override
    	public Item getItemDropped(IBlockState state, Random rand, int fortune) 
    	{
    		return Item.getItemFromBlock(ModBlocks.EYE);
    	}
    	
    	@Override
    	public ItemStack getItem(World worldIn, BlockPos pos, IBlockState state) 
    	{
    		return new ItemStack(ModBlocks.EYE);
    	}
    
    	@Override
    	public EnumBlockRenderType getRenderType(IBlockState state) 
    	{
    		return EnumBlockRenderType.INVISIBLE;
    	}
    	
        @SideOnly(Side.CLIENT)
        public BlockRenderLayer getBlockLayer()
        {
            return BlockRenderLayer.CUTOUT;
        }
    
    	@Override
    	public boolean isOpaqueCube(IBlockState state) 
    	{
    		return false;
    	}
    	
    	@Override
    	public boolean isFullCube(IBlockState state) 
    	{
    		return false;
    	}
    
    	@Override
    	public void registerModels() 
    	{
    		ModelResourceLocation itemModel = new ModelResourceLocation(Reference.MOD_ID + ":" + this.name + ".obj");
    		
    		ModelLoader.setCustomModelResourceLocation(Item.getItemFromBlock(this), 0, itemModel);
    	}
    }

     

    TileEntity:

    Spoiler
    
    package com.ancient.thaumicgadgets.objects.machines.eye;
    
    import net.minecraft.client.Minecraft;
    import net.minecraft.entity.player.EntityPlayer;
    import net.minecraft.tileentity.TileEntity;
    import net.minecraft.util.ITickable;
    import net.minecraft.util.math.Vec3d;
    
    public class TileEntityEye extends TileEntity implements ITickable
    {
    
    	public Vec3d vec = Vec3d.ZERO;
    	
    	public TileEntityEye()
    	{
    		
    	}
    	
    	@Override
    	public void update() 
    	{
    		if (world.isRemote)
    		{
    			EntityPlayer pl = Minecraft.getMinecraft().world.getClosestPlayer(this.pos.getX(), this.pos.getY(), this.pos.getZ(), 10, false);
    			if (pl != null)
    			{
    				vec = new Vec3d(this.pos.getX() - pl.posX, this.pos.getY() - (pl.posY +  (pl.height / 2)), this.pos.getZ() - pl.posZ).normalize();
    			}
    			else
    			{
    				vec = Vec3d.ZERO;
    			}
    		}
    	}
    
    }

     

    TESR:

    Spoiler
    
    package com.ancient.thaumicgadgets.objects.machines.eye;
    
    import com.ancient.thaumicgadgets.util.IFunctionLibrary;
    import com.ancient.thaumicgadgets.util.Reference;
    
    import net.minecraft.block.state.IBlockState;
    import net.minecraft.client.Minecraft;
    import net.minecraft.client.renderer.BlockRendererDispatcher;
    import net.minecraft.client.renderer.GlStateManager;
    import net.minecraft.client.renderer.RenderHelper;
    import net.minecraft.client.renderer.block.model.IBakedModel;
    import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer;
    import net.minecraft.util.ResourceLocation;
    
    public class RenderEye extends TileEntitySpecialRenderer<TileEntityEye>
    {
    	private float timer = 0f;
    	private static final ResourceLocation modelLoc = new ResourceLocation(Reference.MOD_ID, "models/block/eye.obj");
    	private static final IBakedModel model = IFunctionLibrary.loadModel(modelLoc);
    	@Override
    	public void render(TileEntityEye te, double x, double y, double z, float partialTicks, int destroyStage, float alpha) 
    	{
    
    		double teX = te.getPos().getX();
    		double teY = te.getPos().getY();
    		double teZ = te.getPos().getZ();
    
    		BlockRendererDispatcher brd = Minecraft.getMinecraft().getBlockRendererDispatcher();
    		
    		GlStateManager.pushMatrix();
    		
    		GlStateManager.color(1f, 1f, 1f, 1f);
    		
    		if (++timer > 7200)
    		{
    			timer = 0f;
    		}
    		
    		GlStateManager.translate(x + 0.5d, y + (Math.sin(timer*0.05d)*0.1d) + 0.5d, z + 0.5d);
    		GlStateManager.rotate((float) (te.vec.y * 180/Math.PI), 0, 1f, 0);
    		GlStateManager.enableBlend();
    		
    		IBlockState state = te.getWorld().getBlockState(te.getPos());
    		
    		brd.getBlockModelRenderer().renderModelBrightness(model, state, 1.0f, false);
    		
    		GlStateManager.disableBlend();
    		GlStateManager.popMatrix();
    	}
    }

     

     

  7. Hi. I need some help with armor model. 

    How it's rendering now: 

    Spoiler

    unknown.png.88e727168dbcd337a072ffe2d35f6d5c.png

    and how it's must render:

    Spoiler

    1940625606_unknown(1).png.ab76b18babb95ea3e5ea2bd14c62f386.png

    Any ideas why that happening?

     

    Model code:

    Spoiler
    
    package com.ancient.thaumicgadgets.armour.shade;
    
    import net.minecraft.client.model.ModelBiped;
    import net.minecraft.client.model.ModelRenderer;
    import net.minecraft.entity.Entity;
    
    public class ArmorShadeModel extends ModelBiped
    {
      //fields
        ModelRenderer RShouderBase;
        ModelRenderer LShoulderSpikeB1;
        ModelRenderer LShoulderSpikeTopB;
        ModelRenderer RShoulderSpikeTopB;
        ModelRenderer LShoulderSpikeB2;
        ModelRenderer RShoulderSpikeB1;
        ModelRenderer RShoulderSpikeB2;
        ModelRenderer RShoulderWing;
        ModelRenderer LShoulderSpikeBaseB;
        ModelRenderer RShoulderSpikeBaseB;
        ModelRenderer RShoulderBottom;
        ModelRenderer RShoulder;
        ModelRenderer RShoulderT1;
        ModelRenderer RShoulderT2;
        ModelRenderer LShoulderBottom;
        ModelRenderer LShoulderT1;
        ModelRenderer LShoulderT2;
        ModelRenderer LShouderBase;
        ModelRenderer LShoulderWing;
        ModelRenderer LShoulder;
        ModelRenderer LShoulderSpikeF1;
        ModelRenderer LShoulderSpikeF2;
        ModelRenderer LShoulderSpikeTopF;
        ModelRenderer LShoulderSpikeBaseF;
        ModelRenderer RShoulderSpikeBaseF;
        ModelRenderer RShoulderSpikeF1;
        ModelRenderer RShoulderSpikeF2;
        ModelRenderer RShoulderSpikeTopF;
        ModelRenderer ArmorPlate5;
        ModelRenderer ArmorPlate6;
        ModelRenderer ArmorPlateMiddle;
        ModelRenderer ArmorPlate1;
        ModelRenderer ArmorPlate2;
        ModelRenderer ArmorPlate4;
        ModelRenderer ArmorPlate3;
        ModelRenderer ArmorBase;
        ModelRenderer ArmorB2;
        ModelRenderer ArmorB1;
        ModelRenderer ArmorBackB;
        ModelRenderer Burr;
        ModelRenderer Belt;
        ModelRenderer Armor;
        ModelRenderer BootsL;
        ModelRenderer LegArmorR1;
        ModelRenderer LegArmorL2;
        ModelRenderer LegArmorL1;
        ModelRenderer LegArmorR2;
        ModelRenderer BootsR;
        ModelRenderer BootsL2;
        ModelRenderer BootsR2;
        ModelRenderer GlovesL1;
        ModelRenderer GlovesR1;
        ModelRenderer BoorsL1;
        ModelRenderer BoorsR1;
        ModelRenderer GlovesL2;
        ModelRenderer GlovesR2;
      
      public ArmorShadeModel(float f)
      {
    	  super(f, 0, 64, 64);
    	  textureWidth = 64;
    	  textureHeight = 64;
        
          RShouderBase = new ModelRenderer(this, 46, 0);
          RShouderBase.addBox(-3.2F, -2.4F, -2.5F, 4, 3, 5);
          RShouderBase.setRotationPoint(0F, 0F, 0F);
          RShouderBase.setTextureSize(64, 64);
          RShouderBase.mirror = true;
          setRotation(RShouderBase, 0F, 0F, -0.122173F);
          LShoulderSpikeB1 = new ModelRenderer(this, 42, 0);
          LShoulderSpikeB1.addBox(0F, -6.6F, 2F, 1, 6, 1);
          LShoulderSpikeB1.setRotationPoint(0F, 0F, 0F);
          LShoulderSpikeB1.setTextureSize(64, 64);
          LShoulderSpikeB1.mirror = true;
          setRotation(LShoulderSpikeB1, 0F, 0F, 0.5235988F);
          LShoulderSpikeTopB = new ModelRenderer(this, 34, 0);
          LShoulderSpikeTopB.addBox(3F, -7F, 2F, 1, 2, 1);
          LShoulderSpikeTopB.setRotationPoint(0F, 0F, 0F);
          LShoulderSpikeTopB.setTextureSize(64, 64);
          LShoulderSpikeTopB.mirror = true;
          setRotation(LShoulderSpikeTopB, 0F, 0F, 0F);
          RShoulderSpikeTopB = new ModelRenderer(this, 34, 0);
          RShoulderSpikeTopB.addBox(-4F, -7F, 2F, 1, 2, 1);
          RShoulderSpikeTopB.setRotationPoint(0F, 0F, 0F);
          RShoulderSpikeTopB.setTextureSize(64, 64);
          RShoulderSpikeTopB.mirror = true;
          setRotation(RShoulderSpikeTopB, 0F, 0F, 0F);
          LShoulderSpikeB2 = new ModelRenderer(this, 38, 0);
          LShoulderSpikeB2.addBox(1F, -4.6F, 2F, 1, 4, 1);
          LShoulderSpikeB2.setRotationPoint(0F, 0F, 0F);
          LShoulderSpikeB2.setTextureSize(64, 64);
          LShoulderSpikeB2.mirror = true;
          setRotation(LShoulderSpikeB2, 0F, 0F, 0.5235988F);
          RShoulderSpikeB1 = new ModelRenderer(this, 42, 0);
          RShoulderSpikeB1.addBox(-1F, -6.6F, 2F, 1, 6, 1);
          RShoulderSpikeB1.setRotationPoint(0F, 0F, 0F);
          RShoulderSpikeB1.setTextureSize(64, 64);
          RShoulderSpikeB1.mirror = true;
          setRotation(RShoulderSpikeB1, 0F, 0F, -0.5235988F);
          RShoulderSpikeB2 = new ModelRenderer(this, 38, 0);
          RShoulderSpikeB2.addBox(-2F, -4.6F, 2F, 1, 4, 1);
          RShoulderSpikeB2.setRotationPoint(0F, 0F, 0F);
          RShoulderSpikeB2.setTextureSize(64, 64);
          RShoulderSpikeB2.mirror = true;
          setRotation(RShoulderSpikeB2, 0F, 0F, -0.5235988F);
          RShoulderWing = new ModelRenderer(this, 52, 59);
          RShoulderWing.addBox(-4F, -2.4F, -2F, 2, 1, 4);
          RShoulderWing.setRotationPoint(0F, 0F, 0F);
          RShoulderWing.setTextureSize(64, 64);
          RShoulderWing.mirror = true;
          setRotation(RShoulderWing, 0F, 0F, -0.1396263F);
          LShoulderSpikeBaseB = new ModelRenderer(this, 32, 4);
          LShoulderSpikeBaseB.addBox(-0.8F, -2F, 2F, 2, 2, 1);
          LShoulderSpikeBaseB.setRotationPoint(0F, 0F, 0F);
          LShoulderSpikeBaseB.setTextureSize(64, 64);
          LShoulderSpikeBaseB.mirror = true;
          setRotation(LShoulderSpikeBaseB, 0F, 0F, 0.5235988F);
          RShoulderSpikeBaseB = new ModelRenderer(this, 32, 4);
          RShoulderSpikeBaseB.addBox(-1.2F, -2F, 2F, 2, 2, 1);
          RShoulderSpikeBaseB.setRotationPoint(0F, 0F, 0F);
          RShoulderSpikeBaseB.setTextureSize(64, 64);
          RShoulderSpikeBaseB.mirror = true;
          setRotation(RShoulderSpikeBaseB, 0F, 0F, -0.5235988F);
          RShoulderBottom = new ModelRenderer(this, 32, 9);
          RShoulderBottom.addBox(-4F, -1F, -1.5F, 1, 4, 3);
          RShoulderBottom.setRotationPoint(0F, 0F, 0F);
          RShoulderBottom.setTextureSize(64, 64);
          RShoulderBottom.mirror = true;
          setRotation(RShoulderBottom, 0F, 0F, 0F);
          RShoulder = new ModelRenderer(this, 40, 14);
          RShoulder.addBox(-2F, -3F, -0.5F, 2, 1, 1);
          RShoulder.setRotationPoint(0F, 0F, 0F);
          RShoulder.setTextureSize(64, 64);
          RShoulder.mirror = true;
          setRotation(RShoulder, 0F, 0F, -0.1396263F);
          RShoulderT1 = new ModelRenderer(this, 46, 11);
          RShoulderT1.addBox(-0.5F, -4F, -1.5F, 1, 2, 3);
          RShoulderT1.setRotationPoint(0F, 0F, 0F);
          RShoulderT1.setTextureSize(64, 64);
          RShoulderT1.mirror = true;
          setRotation(RShoulderT1, 0F, 0F, 0F);
          RShoulderT2 = new ModelRenderer(this, 41, 12);
          RShoulderT2.addBox(-0.5F, -5F, -0.5F, 1, 1, 1);
          RShoulderT2.setRotationPoint(0F, 0F, 0F);
          RShoulderT2.setTextureSize(64, 64);
          RShoulderT2.mirror = true;
          setRotation(RShoulderT2, 0F, 0F, 0F);
          LShoulderBottom = new ModelRenderer(this, 32, 9);
          LShoulderBottom.addBox(3F, -1F, -1.5F, 1, 4, 3);
          LShoulderBottom.setRotationPoint(0F, 0F, 0F);
          LShoulderBottom.setTextureSize(64, 64);
          LShoulderBottom.mirror = true;
          setRotation(LShoulderBottom, 0F, 0F, 0F);
          LShoulderT1 = new ModelRenderer(this, 46, 11);
          LShoulderT1.addBox(-0.5F, -4F, -1.5F, 1, 2, 3);
          LShoulderT1.setRotationPoint(0F, 0F, 0F);
          LShoulderT1.setTextureSize(64, 64);
          LShoulderT1.mirror = true;
          setRotation(LShoulderT1, 0F, 0F, 0F);
          LShoulderT2 = new ModelRenderer(this, 41, 12);
          LShoulderT2.addBox(-0.5F, -5F, -0.5F, 1, 1, 1);
          LShoulderT2.setRotationPoint(0F, 0F, 0F);
          LShoulderT2.setTextureSize(64, 64);
          LShoulderT2.mirror = true;
          setRotation(LShoulderT2, 0F, 0F, 0F);
          LShouderBase = new ModelRenderer(this, 46, 0);
          LShouderBase.addBox(-0.8F, -2.4F, -2.5F, 4, 3, 5);
          LShouderBase.setRotationPoint(0F, 0F, 0F);
          LShouderBase.setTextureSize(64, 64);
          LShouderBase.mirror = true;
          setRotation(LShouderBase, 0F, 0F, 0.1396263F);
          LShoulderWing = new ModelRenderer(this, 52, 59);
          LShoulderWing.addBox(2F, -2.4F, -2F, 2, 1, 4);
          LShoulderWing.setRotationPoint(0F, 0F, 0F);
          LShoulderWing.setTextureSize(64, 64);
          LShoulderWing.mirror = true;
          setRotation(LShoulderWing, 0F, 0F, 0.1396263F);
          LShoulder = new ModelRenderer(this, 40, 14);
          LShoulder.addBox(0F, -3F, -0.5F, 2, 1, 1);
          LShoulder.setRotationPoint(0F, 0F, 0F);
          LShoulder.setTextureSize(64, 64);
          LShoulder.mirror = true;
          setRotation(LShoulder, 0F, 0F, 0.1396263F);
          LShoulderSpikeF1 = new ModelRenderer(this, 42, 0);
          LShoulderSpikeF1.addBox(0F, -6.6F, -3F, 1, 6, 1);
          LShoulderSpikeF1.setRotationPoint(0F, 0F, 0F);
          LShoulderSpikeF1.setTextureSize(64, 64);
          LShoulderSpikeF1.mirror = true;
          setRotation(LShoulderSpikeF1, 0F, 0F, 0.5235988F);
          LShoulderSpikeF2 = new ModelRenderer(this, 38, 0);
          LShoulderSpikeF2.addBox(1F, -4.6F, -3F, 1, 4, 1);
          LShoulderSpikeF2.setRotationPoint(0F, 0F, 0F);
          LShoulderSpikeF2.setTextureSize(64, 64);
          LShoulderSpikeF2.mirror = true;
          setRotation(LShoulderSpikeF2, 0F, 0F, 0.5235988F);
          LShoulderSpikeTopF = new ModelRenderer(this, 34, 0);
          LShoulderSpikeTopF.addBox(3F, -7F, -3F, 1, 2, 1);
          LShoulderSpikeTopF.setRotationPoint(0F, 0F, 0F);
          LShoulderSpikeTopF.setTextureSize(64, 64);
          LShoulderSpikeTopF.mirror = true;
          setRotation(LShoulderSpikeTopF, 0F, 0F, 0F);
          LShoulderSpikeBaseF = new ModelRenderer(this, 32, 4);
          LShoulderSpikeBaseF.addBox(-0.8F, -2F, -3F, 2, 2, 1);
          LShoulderSpikeBaseF.setRotationPoint(0F, 0F, 0F);
          LShoulderSpikeBaseF.setTextureSize(64, 64);
          LShoulderSpikeBaseF.mirror = true;
          setRotation(LShoulderSpikeBaseF, 0F, 0F, 0.5235988F);
          RShoulderSpikeBaseF = new ModelRenderer(this, 32, 4);
          RShoulderSpikeBaseF.addBox(-1.2F, -2F, -3F, 2, 2, 1);
          RShoulderSpikeBaseF.setRotationPoint(0F, 0F, 0F);
          RShoulderSpikeBaseF.setTextureSize(64, 64);
          RShoulderSpikeBaseF.mirror = true;
          setRotation(RShoulderSpikeBaseF, 0F, 0F, -0.5235988F);
          RShoulderSpikeF1 = new ModelRenderer(this, 42, 0);
          RShoulderSpikeF1.addBox(-1F, -6.6F, -3F, 1, 6, 1);
          RShoulderSpikeF1.setRotationPoint(0F, 0F, 0F);
          RShoulderSpikeF1.setTextureSize(64, 64);
          RShoulderSpikeF1.mirror = true;
          setRotation(RShoulderSpikeF1, 0F, 0F, -0.5235988F);
          RShoulderSpikeF2 = new ModelRenderer(this, 38, 0);
          RShoulderSpikeF2.addBox(-2F, -4.6F, -3F, 1, 4, 1);
          RShoulderSpikeF2.setRotationPoint(0F, 0F, 0F);
          RShoulderSpikeF2.setTextureSize(64, 64);
          RShoulderSpikeF2.mirror = true;
          setRotation(RShoulderSpikeF2, 0F, 0F, -0.5235988F);
          RShoulderSpikeTopF = new ModelRenderer(this, 34, 0);
          RShoulderSpikeTopF.addBox(-4F, -7F, -3F, 1, 2, 1);
          RShoulderSpikeTopF.setRotationPoint(0F, 0F, 0F);
          RShoulderSpikeTopF.setTextureSize(64, 64);
          RShoulderSpikeTopF.mirror = true;
          setRotation(RShoulderSpikeTopF, 0F, 0F, 0F);
          ArmorPlate5 = new ModelRenderer(this, 0, 60);
          ArmorPlate5.addBox(-3F, 6.8F, -3.7F, 3, 3, 1);
          ArmorPlate5.setRotationPoint(0F, 0F, 0F);
          ArmorPlate5.setTextureSize(64, 64);
          ArmorPlate5.mirror = true;
          setRotation(ArmorPlate5, 0F, 0.2443461F, 0.0174533F);
          ArmorPlate6 = new ModelRenderer(this, 0, 60);
          ArmorPlate6.addBox(0F, 6.8F, -3.7F, 3, 3, 1);
          ArmorPlate6.setRotationPoint(0F, 0F, 0F);
          ArmorPlate6.setTextureSize(64, 64);
          ArmorPlate6.mirror = true;
          setRotation(ArmorPlate6, 0F, -0.2443461F, -0.0174533F);
          ArmorPlateMiddle = new ModelRenderer(this, 0, 32);
          ArmorPlateMiddle.addBox(-1F, 0.8F, -4.1F, 2, 9, 1);
          ArmorPlateMiddle.setRotationPoint(0F, 0F, 0F);
          ArmorPlateMiddle.setTextureSize(64, 64);
          ArmorPlateMiddle.mirror = true;
          setRotation(ArmorPlateMiddle, 0.0349066F, 0F, 0F);
          ArmorPlate1 = new ModelRenderer(this, 9, 60);
          ArmorPlate1.addBox(-3F, 0.8F, -4F, 4, 3, 1);
          ArmorPlate1.setRotationPoint(0F, 0F, 0F);
          ArmorPlate1.setTextureSize(64, 64);
          ArmorPlate1.mirror = true;
          setRotation(ArmorPlate1, 0F, 0.2443461F, 0.2268928F);
          ArmorPlate2 = new ModelRenderer(this, 9, 60);
          ArmorPlate2.addBox(-1F, 0.8F, -4F, 4, 3, 1);
          ArmorPlate2.setRotationPoint(0F, 0F, 0F);
          ArmorPlate2.setTextureSize(64, 64);
          ArmorPlate2.mirror = true;
          setRotation(ArmorPlate2, 0F, -0.2443461F, -0.2268928F);
          ArmorPlate4 = new ModelRenderer(this, 0, 60);
          ArmorPlate4.addBox(-1.3F, 3.8F, -3.7F, 3, 3, 1);
          ArmorPlate4.setRotationPoint(0F, 0F, 0F);
          ArmorPlate4.setTextureSize(64, 64);
          ArmorPlate4.mirror = true;
          setRotation(ArmorPlate4, 0F, -0.2443461F, -0.2268928F);
          ArmorPlate3 = new ModelRenderer(this, 0, 60);
          ArmorPlate3.addBox(-1.7F, 3.8F, -3.7F, 3, 3, 1);
          ArmorPlate3.setRotationPoint(0F, 0F, 0F);
          ArmorPlate3.setTextureSize(64, 64);
          ArmorPlate3.mirror = true;
          setRotation(ArmorPlate3, 0F, 0.2443461F, 0.2268928F);
          ArmorBase = new ModelRenderer(this, 20, 19);
          ArmorBase.addBox(-4F, 0F, -2.5F, 8, 12, 1);
          ArmorBase.setRotationPoint(0F, 0F, 0F);
          ArmorBase.setTextureSize(64, 64);
          ArmorBase.mirror = true;
          setRotation(ArmorBase, 0F, 0F, 0F);
          ArmorB2 = new ModelRenderer(this, 0, 53);
          ArmorB2.addBox(-4F, 3.6F, 1.8F, 8, 4, 2);
          ArmorB2.setRotationPoint(0F, 0F, 0F);
          ArmorB2.setTextureSize(64, 64);
          ArmorB2.mirror = true;
          setRotation(ArmorB2, -0.1396263F, 0F, 0F);
          ArmorB1 = new ModelRenderer(this, 0, 46);
          ArmorB1.addBox(-4F, -0.4F, 2F, 8, 4, 2);
          ArmorB1.setRotationPoint(0F, 0F, 0F);
          ArmorB1.setTextureSize(64, 64);
          ArmorB1.mirror = true;
          setRotation(ArmorB1, -0.1396263F, 0F, 0F);
          ArmorBackB = new ModelRenderer(this, 13, 40);
          ArmorBackB.addBox(-4F, 7F, 1.6F, 8, 5, 1);
          ArmorBackB.setRotationPoint(0F, 0F, 0F);
          ArmorBackB.setTextureSize(64, 64);
          ArmorBackB.mirror = true;
          setRotation(ArmorBackB, 0F, 0F, 0F);
          Burr = new ModelRenderer(this, 0, 42);
          Burr.addBox(-1F, 10F, -3F, 2, 2, 1);
          Burr.setRotationPoint(0F, 0F, 0F);
          Burr.setTextureSize(64, 64);
          Burr.mirror = true;
          setRotation(Burr, 0F, 0F, 0F);
          Belt = new ModelRenderer(this, 7, 32);
          Belt.addBox(-4F, 10F, -2.6F, 8, 2, 5);
          Belt.setRotationPoint(0F, 0F, 0F);
          Belt.setTextureSize(64, 64);
          Belt.mirror = true;
          setRotation(Belt, 0F, 0F, 0F);
          Armor = new ModelRenderer(this, 7, 40);
          Armor.addBox(0.5F, 0.5F, -4.5F, 2, 2, 1);
          Armor.setRotationPoint(0F, 0F, 0F);
          Armor.setTextureSize(64, 64);
          Armor.mirror = true;
          setRotation(Armor, 0F, 0F, 0.7853982F);
          BootsL = new ModelRenderer(this, 44, 32);
          BootsL.addBox(-2F, 6F, -2.5F, 5, 6, 5);
          BootsL.setRotationPoint(0F, 0F, 0F);
          BootsL.setTextureSize(64, 64);
          BootsL.mirror = true;
          setRotation(BootsL, 0F, 0F, 0F);
          LegArmorR1 = new ModelRenderer(this, 20, 53);
          LegArmorR1.addBox(-3F, -0.6F, -3F, 1, 5, 6);
          LegArmorR1.setRotationPoint(0F, 0F, 0F);
          LegArmorR1.setTextureSize(64, 64);
          LegArmorR1.mirror = true;
          setRotation(LegArmorR1, 0F, 0F, 0.122173F);
          LegArmorL2 = new ModelRenderer(this, 34, 56);
          LegArmorL2.addBox(2F, -2F, -3F, 1, 2, 6);
          LegArmorL2.setRotationPoint(0F, 0F, 0F);
          LegArmorL2.setTextureSize(64, 64);
          LegArmorL2.mirror = true;
          setRotation(LegArmorL2, 0F, 0F, 0F);
          LegArmorL1 = new ModelRenderer(this, 20, 53);
          LegArmorL1.addBox(2F, -0.6F, -3F, 1, 5, 6);
          LegArmorL1.setRotationPoint(0F, 0F, 0F);
          LegArmorL1.setTextureSize(64, 64);
          LegArmorL1.mirror = true;
          setRotation(LegArmorL1, 0F, 0F, -0.122173F);
          LegArmorR2 = new ModelRenderer(this, 34, 56);
          LegArmorR2.addBox(-3F, -2F, -3F, 1, 2, 6);
          LegArmorR2.setRotationPoint(0F, 0F, 0F);
          LegArmorR2.setTextureSize(64, 64);
          LegArmorR2.mirror = true;
          setRotation(LegArmorR2, 0F, 0F, 0F);
          BootsR = new ModelRenderer(this, 44, 32);
          BootsR.addBox(-3F, 6F, -2.5F, 5, 6, 5);
          BootsR.setRotationPoint(0F, 0F, 0F);
          BootsR.setTextureSize(64, 64);
          BootsR.mirror = true;
          setRotation(BootsR, 0F, 0F, 0F);
          BootsL2 = new ModelRenderer(this, 21, 47);
          BootsL2.addBox(1.8F, 9F, -3.8F, 2, 3, 2);
          BootsL2.setRotationPoint(0F, 0F, 0F);
          BootsL2.setTextureSize(64, 64);
          BootsL2.mirror = true;
          setRotation(BootsL2, 0F, 0.7853982F, 0F);
          BootsR2 = new ModelRenderer(this, 21, 47);
          BootsR2.addBox(1.8F, 9F, -3.8F, 2, 3, 2);
          BootsR2.setRotationPoint(0F, 0F, 0F);
          BootsR2.setTextureSize(64, 64);
          BootsR2.mirror = true;
          setRotation(BootsR2, 0F, 0.7853982F, 0F);
          GlovesL1 = new ModelRenderer(this, 31, 44);
          GlovesL1.addBox(3F, 6F, -2F, 1, 4, 4);
          GlovesL1.setRotationPoint(0F, 0F, 0F);
          GlovesL1.setTextureSize(64, 64);
          GlovesL1.mirror = true;
          setRotation(GlovesL1, 0F, 0F, 0F);
          GlovesR1 = new ModelRenderer(this, 31, 44);
          GlovesR1.addBox(-4F, 6F, -2F, 1, 4, 4);
          GlovesR1.setRotationPoint(0F, 0F, 0F);
          GlovesR1.setTextureSize(64, 64);
          GlovesR1.mirror = true;
          setRotation(GlovesR1, 0F, 0F, 0F);
          BoorsL1 = new ModelRenderer(this, 52, 46);
          BoorsL1.addBox(-1.5F, 9F, -4F, 3, 3, 3);
          BoorsL1.setRotationPoint(0F, 0F, 0F);
          BoorsL1.setTextureSize(64, 64);
          BoorsL1.mirror = true;
          setRotation(BoorsL1, 0F, 0F, 0F);
          BoorsR1 = new ModelRenderer(this, 52, 46);
          BoorsR1.addBox(-1.5F, 9F, -4F, 3, 3, 3);
          BoorsR1.setRotationPoint(0F, 0F, 0F);
          BoorsR1.setTextureSize(64, 64);
          BoorsR1.mirror = true;
          setRotation(BoorsR1, 0F, 0F, 0F);
          GlovesL2 = new ModelRenderer(this, 38, 33);
          GlovesL2.addBox(3.5F, 7F, -0.5F, 1, 4, 1);
          GlovesL2.setRotationPoint(0F, 0F, 0F);
          GlovesL2.setTextureSize(64, 64);
          GlovesL2.mirror = true;
          setRotation(GlovesL2, 0F, 0F, 0F);
          GlovesR2 = new ModelRenderer(this, 38, 33);
          GlovesR2.addBox(-4.5F, 7F, -0.5F, 1, 4, 1);
          GlovesR2.setRotationPoint(0F, 0F, 0F);
          GlovesR2.setTextureSize(64, 64);
          GlovesR2.mirror = true;
          setRotation(GlovesR2, 0F, 0F, 0F);
      
          bipedRightArm.addChild(RShouderBase);
          bipedRightArm.addChild(RShoulderSpikeTopB);
          bipedRightArm.addChild(RShoulderSpikeB1);
          bipedRightArm.addChild(RShoulderSpikeB2);
          bipedRightArm.addChild(RShoulderWing);
          bipedRightArm.addChild(RShoulderSpikeBaseB);
          bipedRightArm.addChild(RShoulderBottom);
          bipedRightArm.addChild(RShoulder);
          bipedRightArm.addChild(RShoulderT1);
          bipedRightArm.addChild(RShoulderT2);
          bipedRightArm.addChild(RShoulderSpikeBaseF);
          bipedRightArm.addChild(RShoulderSpikeF1);
          bipedRightArm.addChild(RShoulderSpikeF2);
          bipedRightArm.addChild(RShoulderSpikeTopF);
          
    
          bipedLeftArm.addChild(LShoulderSpikeB1);
          bipedLeftArm.addChild(LShoulderSpikeTopB);
          bipedLeftArm.addChild(LShoulderSpikeB2);
          bipedLeftArm.addChild(LShoulderSpikeBaseB);
          bipedLeftArm.addChild(LShoulderBottom);
          bipedLeftArm.addChild(LShoulderT1);
          bipedLeftArm.addChild(LShoulderT2);
          bipedLeftArm.addChild(LShouderBase);
          bipedLeftArm.addChild(LShoulderWing);
          bipedLeftArm.addChild(LShoulder);
          bipedLeftArm.addChild(LShoulderSpikeF1);
          bipedLeftArm.addChild(LShoulderSpikeF2);
          bipedLeftArm.addChild(LShoulderSpikeTopF);
          bipedLeftArm.addChild(LShoulderSpikeBaseF);
          bipedLeftArm.addChild(LShoulderT2);
          
          bipedBody.addChild(ArmorPlate5);
          bipedBody.addChild(ArmorPlate6);
          bipedBody.addChild(ArmorPlateMiddle);
          bipedBody.addChild(ArmorPlate1);
          bipedBody.addChild(ArmorPlate2);
          bipedBody.addChild(ArmorPlate3);
          bipedBody.addChild(ArmorPlate4);
          bipedBody.addChild(ArmorBase);
          bipedBody.addChild(ArmorB2);
          bipedBody.addChild(ArmorB1);
          bipedBody.addChild(ArmorBackB);
          bipedBody.addChild(Burr);
          bipedBody.addChild(Belt);
          bipedBody.addChild(Armor);
    
          bipedLeftLeg.addChild(BootsL);
          bipedLeftLeg.addChild(BoorsL1);
          bipedLeftLeg.addChild(BootsL2);
          bipedLeftLeg.addChild(LegArmorL1);
          bipedLeftLeg.addChild(LegArmorL2);
          
          bipedRightLeg.addChild(BootsR);
          bipedRightLeg.addChild(BoorsR1);
          bipedRightLeg.addChild(BootsR2);
          bipedRightLeg.addChild(LegArmorR1);
          bipedRightLeg.addChild(LegArmorR2);
          
          bipedRightArm.addChild(GlovesR1);
          bipedRightArm.addChild(GlovesR2);
    
          bipedLeftArm.addChild(GlovesL1);
          bipedLeftArm.addChild(GlovesL2);
      }
      
      @Override
      public void render(Entity entity, float f, float f1, float f2, float f3, float f4, float f5)
      {
        super.render(entity, f, f1, f2, f3, f4, f5);
        setRotationAngles(f, f1, f2, f3, f4, f5, entity);
      }
      
      private void setRotation(ModelRenderer model, float x, float y, float z)
      {
        model.rotateAngleX = x;
        model.rotateAngleY = y;
        model.rotateAngleZ = z;
      }
      
    }

     

    attaching model code for armor: 

    Spoiler
    
    	@SideOnly(Side.CLIENT)
    	@Override
    	public ModelBiped getArmorModel(EntityLivingBase entityLiving, ItemStack itemStack, EntityEquipmentSlot armorSlot, ModelBiped _default) 
    	{
    		if(!itemStack.isEmpty()) 
    		{
    			if(itemStack.getItem() instanceof ItemArmor) 
    			{
    				ArmorShadeModel armorModel = new ArmorShadeModel(0.25f);
    				ArmorShadeModel armorModelLegs = new ArmorShadeModel(0.25f);
    				
    				armorModel.bipedHead.showModel = armorSlot == EntityEquipmentSlot.HEAD;
    				armorModel.bipedHeadwear.showModel = armorSlot == EntityEquipmentSlot.HEAD;
    				armorModel.bipedBody.showModel = (armorSlot == EntityEquipmentSlot.CHEST) || (armorSlot == EntityEquipmentSlot.CHEST);
    				armorModel.bipedRightArm.showModel = armorSlot == EntityEquipmentSlot.CHEST;
    				armorModel.bipedLeftArm.showModel = armorSlot == EntityEquipmentSlot.CHEST;
    				armorModelLegs.bipedRightLeg.showModel = (armorSlot == EntityEquipmentSlot.LEGS) || (armorSlot == EntityEquipmentSlot.FEET);
    				armorModelLegs.bipedLeftLeg.showModel = (armorSlot == EntityEquipmentSlot.LEGS) || (armorSlot == EntityEquipmentSlot.FEET);
    
    				armorModel.isSneak = _default.isSneak;
    				armorModel.isRiding = _default.isRiding;
    				armorModel.isChild = _default.isChild;
    				armorModel.rightArmPose = _default.rightArmPose;
    				armorModel.leftArmPose = _default.leftArmPose;
    				
    				armorModelLegs.isSneak = _default.isSneak;
    				armorModelLegs.isRiding = _default.isRiding;
    				armorModelLegs.isChild = _default.isChild;
    				armorModelLegs.rightArmPose = _default.rightArmPose;
    				armorModelLegs.leftArmPose = _default.leftArmPose;
    
    				return armorModel;
    			}
    		}
    		
    		return null;
    	}	

     

    and armor textures: 

    Spoiler

    shade_layer_1.png.cdf7c88b408a00186e7ffb9bcbaaad4c.pngshade_layer_2.png.f43703991520a50253d80d042c9c2d9f.png

     

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.