Вообщем, всем хай!
У меня проблема с рендером моделки.Он тупа не показывается.
Вот код.
заранее спасибо.
У меня проблема с рендером моделки.Он тупа не показывается.
Вот код.
Код:
//Главный класс
package ru.tiaryy.manual;
import cpw.mods.fml.common.Mod;
import cpw.mods.fml.common.Mod.EventHandler;
import cpw.mods.fml.common.Mod.Instance;
import cpw.mods.fml.common.SidedProxy;
import cpw.mods.fml.common.event.FMLPreInitializationEvent;
import cpw.mods.fml.common.registry.GameRegistry;
import net.minecraft.item.Item;
@Mod (modid = "Tiaryy", name = "Tiaryy", version = "0.1")
public class main
{
@Instance("Tiaryy")
public static main instance;
@SidedProxy(clientSide = "ru.tiaryy.manual.ClientProxy", serverSide = "ru.tiaryy.manual.CommonProxy")
public static CommonProxy proxy;
public static Item Susano;
@EventHandler
public void preLoad(FMLPreInitializationEvent event)
{
Susano = new Susano(0, 1).setUnlocalizedName("susano").setTextureName("blocklol:texture");
GameRegistry.registerItem(Susano, "susano");
}
}
Код:
//Сам моделька
package ru.tiaryy.manual;
import net.minecraft.client.model.ModelBiped;
import net.minecraft.client.model.ModelRenderer;
import net.minecraft.entity.Entity;
public class ModelSusano extends ModelBiped
{
//шейпы мoдели
ModelRenderer Shape0;
ModelRenderer Shape1;
ModelRenderer Shape3;
ModelRenderer Shape4;
ModelRenderer Shape7;
ModelRenderer Shape8;
ModelRenderer Shape10;
ModelRenderer Shape11;
ModelRenderer Shape12;
ModelRenderer Shape13;
ModelRenderer Shape14;
ModelRenderer Shape15;
ModelRenderer Shape16;
ModelRenderer Shape18;
ModelRenderer Shape48;
ModelRenderer Shape49;
ModelRenderer Shape50;
ModelRenderer Shape51;
ModelRenderer Shape52;
ModelRenderer Shape53;
ModelRenderer Shape54;
ModelRenderer Shape55;
ModelRenderer Shape56;
ModelRenderer Shape57;
ModelRenderer Shape58;
ModelRenderer Shape59;
ModelRenderer Shape60;
ModelRenderer Shape61;
ModelRenderer Shape62;
ModelRenderer Shape63;
ModelRenderer Shape64;
ModelRenderer Shape65;
ModelRenderer Shape66;
ModelRenderer Shape67;
ModelRenderer Shape68;
ModelRenderer Shape69;
ModelRenderer Shape70;
ModelRenderer Shape71;
ModelRenderer Shape72;
ModelRenderer Shape73;
ModelRenderer Shape74;
ModelRenderer Shape75;
//oбезательная хрень,(мoдели фиксация на груди)
public ModelRenderer bodyLock;
public ModelSusano(float f)
{
//шейпы мoдели
textureWidth = 512;
textureHeight = 512;
Shape0 = new ModelRenderer(this, 1, 1);
Shape0.addBox(0F, 15F, 0F, 4, 3, 1);
Shape0.setRotationPoint(4F, -18F, -11F);
Shape0.setTextureSize(512, 512);
Shape0.mirror = true;
setRotation(Shape0, 0F, -0.5035275F, 0F);
Shape1 = new ModelRenderer(this, 17, 1);
Shape1.addBox(0F, 15F, 0F, 7, 3, 1);
Shape1.setRotationPoint(7.5F, -18F, -9.08F);
Shape1.setTextureSize(512, 512);
Shape1.mirror = true;
setRotation(Shape1, 0F, -1.22173F, 0F);
Shape3 = new ModelRenderer(this, 41, 1);
Shape3.addBox(0F, 15F, 0F, 7, 3, 1);
Shape3.setRotationPoint(9F, -18F, 4.5F);
Shape3.setTextureSize(512, 512);
Shape3.mirror = true;
setRotation(Shape3, 0F, 1.586679F, 0F);
Shape4 = new ModelRenderer(this, 65, 1);
Shape4.addBox(0F, 15F, 0F, 7, 3, 1);
Shape4.setRotationPoint(5F, -18F, 9.5F);
Shape4.setTextureSize(512, 512);
Shape4.mirror = true;
setRotation(Shape4, 0F, 0.9285152F, 0F);
Shape7 = new ModelRenderer(this, 89, 1);
Shape7.addBox(0F, 15F, 0.01F, 3, 3, 1);
Shape7.setRotationPoint(0.23F, -18F, 11.5F);
Shape7.setTextureSize(512, 512);
Shape7.mirror = true;
setRotation(Shape7, 0F, 0.2234021F, 0F);
Shape8 = new ModelRenderer(this, 105, 1);
Shape8.addBox(0F, 15F, 0.01F, 3, 3, 1);
Shape8.setRotationPoint(-2.5F, -18F, 11.4F);
Shape8.setTextureSize(512, 512);
Shape8.mirror = true;
setRotation(Shape8, 0F, -0.0261799F, 0F);
Shape10 = new ModelRenderer(this, 121, 1);
Shape10.addBox(0F, 15F, 0F, 3, 3, 1);
Shape10.setRotationPoint(2.8F, -18F, 11F);
Shape10.setTextureSize(512, 512);
Shape10.mirror = true;
setRotation(Shape10, 0F, 0.6178466F, 0F);
Shape11 = new ModelRenderer(this, 137, 1);
Shape11.addBox(0F, 15F, 0F, 4, 3, 1);
Shape11.setRotationPoint(-8F, -18F, -8.8F);
Shape11.setTextureSize(512, 512);
Shape11.mirror = true;
setRotation(Shape11, 0F, 0.5078908F, 0F);
Shape12 = new ModelRenderer(this, 153, 1);
Shape12.addBox(0F, 15F, 0F, 7, 3, 1);
Shape12.setRotationPoint(-10.5F, -18F, -2.27F);
Shape12.setTextureSize(512, 512);
Shape12.mirror = true;
setRotation(Shape12, 0F, 1.20515F, 0F);
Shape13 = new ModelRenderer(this, 177, 1);
Shape13.addBox(0F, 15F, 0F, 7, 3, 1);
Shape13.setRotationPoint(-9.5F, -18F, -2.23F);
Shape13.setTextureSize(512, 512);
Shape13.mirror = true;
setRotation(Shape13, 0F, -1.605703F, 0F);
Shape14 = new ModelRenderer(this, 201, 1);
Shape14.addBox(0F, 15F, -0.02F, 7, 3, 1);
Shape14.setRotationPoint(-9.96F, -18F, 4.15F);
Shape14.setTextureSize(512, 512);
Shape14.mirror = true;
setRotation(Shape14, 0F, -0.9285152F, 0F);
Shape15 = new ModelRenderer(this, 225, 1);
Shape15.addBox(-0.01F, 15F, 0F, 3, 3, 1);
Shape15.setRotationPoint(-5.94F, -18F, 9.55F);
Shape15.setTextureSize(512, 512);
Shape15.mirror = true;
setRotation(Shape15, 0F, -0.6440265F, 0F);
Shape16 = new ModelRenderer(this, 241, 1);
Shape16.addBox(-0.01F, 15F, -0.01F, 1, 3, 1);
Shape16.setRotationPoint(-4F, -18F, 11.17F);
Shape16.setTextureSize(512, 512);
Shape16.mirror = true;
setRotation(Shape16, 0F, -0.1396263F, 0F);
Shape18 = new ModelRenderer(this, 249, 1);
Shape18.addBox(0F, 15F, 0.01F, 1, 3, 1);
Shape18.setRotationPoint(-3.3F, -18F, 11.23F);
Shape18.setTextureSize(512, 512);
Shape18.mirror = true;
setRotation(Shape18, 0F, -0.1919862F, 0F);
Shape48 = new ModelRenderer(this, 257, 1);
Shape48.addBox(0F, 15F, -0.02F, 7, 3, 1);
Shape48.setRotationPoint(-9.96F, -8F, 4.15F);
Shape48.setTextureSize(512, 512);
Shape48.mirror = true;
setRotation(Shape48, 0F, -0.9285152F, 0F);
Shape49 = new ModelRenderer(this, 281, 1);
Shape49.addBox(0F, 15F, 0F, 7, 3, 1);
Shape49.setRotationPoint(-9.5F, -8F, -2.23F);
Shape49.setTextureSize(512, 512);
Shape49.mirror = true;
setRotation(Shape49, 0F, -1.605703F, 0F);
Shape50 = new ModelRenderer(this, 305, 1);
Shape50.addBox(0F, 15F, 0F, 7, 3, 1);
Shape50.setRotationPoint(-10.5F, -8F, -2.27F);
Shape50.setTextureSize(512, 512);
Shape50.mirror = true;
setRotation(Shape50, 0F, 1.20515F, 0F);
Shape51 = new ModelRenderer(this, 329, 1);
Shape51.addBox(0F, 15F, 0F, 4, 3, 1);
Shape51.setRotationPoint(-8F, -8F, -8.8F);
Shape51.setTextureSize(512, 512);
Shape51.mirror = true;
setRotation(Shape51, 0F, 0.5078908F, 0F);
Shape52 = new ModelRenderer(this, 345, 1);
Shape52.addBox(-0.01F, 15F, 0F, 3, 3, 1);
Shape52.setRotationPoint(-5.94F, -8F, 9.55F);
Shape52.setTextureSize(512, 512);
Shape52.mirror = true;
setRotation(Shape52, 0F, -0.6440265F, 0F);
Shape53 = new ModelRenderer(this, 361, 1);
Shape53.addBox(-0.01F, 15F, -0.01F, 1, 3, 1);
Shape53.setRotationPoint(-4F, -8F, 11.17F);
Shape53.setTextureSize(512, 512);
Shape53.mirror = true;
setRotation(Shape53, 0F, -0.1396263F, 0F);
Shape54 = new ModelRenderer(this, 369, 1);
Shape54.addBox(0F, 15F, 0.01F, 3, 3, 1);
Shape54.setRotationPoint(-2.5F, -8F, 11.4F);
Shape54.setTextureSize(512, 512);
Shape54.mirror = true;
setRotation(Shape54, 0F, -0.0261799F, 0F);
Shape55 = new ModelRenderer(this, 385, 1);
Shape55.addBox(0F, 15F, 0.01F, 1, 3, 1);
Shape55.setRotationPoint(-3.3F, -8F, 11.23F);
Shape55.setTextureSize(512, 512);
Shape55.mirror = true;
setRotation(Shape55, 0F, -0.1919862F, 0F);
Shape56 = new ModelRenderer(this, 393, 1);
Shape56.addBox(0F, 15F, 0.01F, 3, 3, 1);
Shape56.setRotationPoint(0.23F, -8F, 11.5F);
Shape56.setTextureSize(512, 512);
Shape56.mirror = true;
setRotation(Shape56, 0F, 0.2216568F, 0F);
Shape57 = new ModelRenderer(this, 409, 1);
Shape57.addBox(0F, 15F, 0F, 3, 3, 1);
Shape57.setRotationPoint(2.8F, -8F, 11F);
Shape57.setTextureSize(512, 512);
Shape57.mirror = true;
setRotation(Shape57, 0F, 0.6178466F, 0F);
Shape58 = new ModelRenderer(this, 425, 1);
Shape58.addBox(0F, 15F, 0F, 7, 3, 1);
Shape58.setRotationPoint(5F, -8F, 9.5F);
Shape58.setTextureSize(512, 512);
Shape58.mirror = true;
setRotation(Shape58, 0F, 0.9285152F, 0F);
Shape59 = new ModelRenderer(this, 449, 1);
Shape59.addBox(0F, 15F, 0F, 7, 3, 1);
Shape59.setRotationPoint(9F, -8F, 4.5F);
Shape59.setTextureSize(512, 512);
Shape59.mirror = true;
setRotation(Shape59, 0F, 1.586679F, 0F);
Shape60 = new ModelRenderer(this, 473, 1);
Shape60.addBox(0F, 15F, 0F, 7, 3, 1);
Shape60.setRotationPoint(7.5F, -8F, -9.08F);
Shape60.setTextureSize(512, 512);
Shape60.mirror = true;
setRotation(Shape60, 0F, -1.22173F, 0F);
Shape61 = new ModelRenderer(this, 497, 1);
Shape61.addBox(0F, 15F, 0F, 4, 3, 1);
Shape61.setRotationPoint(4F, -8F, -11F);
Shape61.setTextureSize(512, 512);
Shape61.mirror = true;
setRotation(Shape61, 0F, -0.5035275F, 0F);
Shape62 = new ModelRenderer(this, 1, 9);
Shape62.addBox(0F, 15F, -0.02F, 7, 3, 1);
Shape62.setRotationPoint(-9.96F, 2F, 4.15F);
Shape62.setTextureSize(512, 512);
Shape62.mirror = true;
setRotation(Shape62, 0F, -0.9285152F, 0F);
Shape63 = new ModelRenderer(this, 25, 9);
Shape63.addBox(0F, 15F, 0F, 7, 3, 1);
Shape63.setRotationPoint(-9.5F, 2F, -2.23F);
Shape63.setTextureSize(512, 512);
Shape63.mirror = true;
setRotation(Shape63, 0F, -1.605703F, 0F);
Shape64 = new ModelRenderer(this, 49, 9);
Shape64.addBox(0F, 15F, 0F, 7, 3, 1);
Shape64.setRotationPoint(-10.5F, 2F, -2.27F);
Shape64.setTextureSize(512, 512);
Shape64.mirror = true;
setRotation(Shape64, 0F, 1.20515F, 0F);
Shape65 = new ModelRenderer(this, 73, 9);
Shape65.addBox(0F, 15F, 0F, 4, 3, 1);
Shape65.setRotationPoint(-8F, 2F, -8.8F);
Shape65.setTextureSize(512, 512);
Shape65.mirror = true;
setRotation(Shape65, 0F, 0.5078908F, 0F);
Shape66 = new ModelRenderer(this, 89, 9);
Shape66.addBox(-0.01F, 15F, 0F, 3, 3, 1);
Shape66.setRotationPoint(-5.94F, 2F, 9.55F);
Shape66.setTextureSize(512, 512);
Shape66.mirror = true;
setRotation(Shape66, 0F, -0.6440265F, 0F);
Shape67 = new ModelRenderer(this, 105, 9);
Shape67.addBox(-0.01F, 15F, -0.01F, 1, 3, 1);
Shape67.setRotationPoint(-4F, 2F, 11.17F);
Shape67.setTextureSize(512, 512);
Shape67.mirror = true;
setRotation(Shape67, 0F, -0.1396263F, 0F);
Shape68 = new ModelRenderer(this, 113, 9);
Shape68.addBox(0F, 15F, 0.01F, 3, 3, 1);
Shape68.setRotationPoint(-2.5F, 2F, 11.4F);
Shape68.setTextureSize(512, 512);
Shape68.mirror = true;
setRotation(Shape68, 0F, -0.0261799F, 0F);
Shape69 = new ModelRenderer(this, 129, 9);
Shape69.addBox(0F, 15F, 0.01F, 1, 3, 1);
Shape69.setRotationPoint(-3.3F, 2F, 11.23F);
Shape69.setTextureSize(512, 512);
Shape69.mirror = true;
setRotation(Shape69, 0F, -0.1919862F, 0F);
Shape70 = new ModelRenderer(this, 137, 9);
Shape70.addBox(0F, 15F, 0.01F, 3, 3, 1);
Shape70.setRotationPoint(0.23F, 2F, 11.5F);
Shape70.setTextureSize(512, 512);
Shape70.mirror = true;
setRotation(Shape70, 0F, 0.2216568F, 0F);
Shape71 = new ModelRenderer(this, 153, 9);
Shape71.addBox(0F, 15F, 0F, 3, 3, 1);
Shape71.setRotationPoint(2.8F, 2F, 11F);
Shape71.setTextureSize(512, 512);
Shape71.mirror = true;
setRotation(Shape71, 0F, 0.6178466F, 0F);
Shape72 = new ModelRenderer(this, 169, 9);
Shape72.addBox(0F, 15F, 0F, 7, 3, 1);
Shape72.setRotationPoint(5F, 2F, 9.5F);
Shape72.setTextureSize(512, 512);
Shape72.mirror = true;
setRotation(Shape72, 0F, 0.9285152F, 0F);
Shape73 = new ModelRenderer(this, 193, 9);
Shape73.addBox(0F, 15F, 0F, 7, 3, 1);
Shape73.setRotationPoint(9F, 2F, 4.5F);
Shape73.setTextureSize(512, 512);
Shape73.mirror = true;
setRotation(Shape73, 0F, 1.586679F, 0F);
Shape74 = new ModelRenderer(this, 217, 9);
Shape74.addBox(0F, 15F, 0F, 7, 3, 1);
Shape74.setRotationPoint(7.5F, 2F, -9.08F);
Shape74.setTextureSize(512, 512);
Shape74.mirror = true;
setRotation(Shape74, 0F, -1.22173F, 0F);
Shape75 = new ModelRenderer(this, 241, 9);
Shape75.addBox(0F, 15F, 0F, 4, 3, 1);
Shape75.setRotationPoint(4F, 2F, -11F);
Shape75.setTextureSize(512, 512);
Shape75.mirror = true;
setRotation(Shape75, 0F, -0.5035275F, 0F);
//фиксация брoни на груди
bodyLock = new ModelRenderer(this, 1, 1);
bodyLock.addBox(0F, 0F, 0F, 0, 0, 0);
bodyLock.setRotationPoint(0F, 0F, 0F);
bodyLock.addChild(Shape0);
bodyLock.addChild(Shape1);
bodyLock.addChild(Shape3);
bodyLock.addChild(Shape4);
bodyLock.addChild(Shape7);
bodyLock.addChild(Shape8);
bodyLock.addChild(Shape10);
bodyLock.addChild(Shape11);
bodyLock.addChild(Shape12);
bodyLock.addChild(Shape13);
bodyLock.addChild(Shape14);
bodyLock.addChild(Shape15);
bodyLock.addChild(Shape16);
bodyLock.addChild(Shape18);
bodyLock.addChild(Shape48);
bodyLock.addChild(Shape49);
bodyLock.addChild(Shape50);
bodyLock.addChild(Shape51);
bodyLock.addChild(Shape52);
bodyLock.addChild(Shape53);
bodyLock.addChild(Shape54);
bodyLock.addChild(Shape55);
bodyLock.addChild(Shape56);
bodyLock.addChild(Shape57);
bodyLock.addChild(Shape58);
bodyLock.addChild(Shape59);
bodyLock.addChild(Shape60);
bodyLock.addChild(Shape61);
bodyLock.addChild(Shape62);
bodyLock.addChild(Shape63);
bodyLock.addChild(Shape64);
bodyLock.addChild(Shape65);
bodyLock.addChild(Shape66);
bodyLock.addChild(Shape67);
bodyLock.addChild(Shape68);
bodyLock.addChild(Shape69);
bodyLock.addChild(Shape70);
bodyLock.addChild(Shape71);
bodyLock.addChild(Shape72);
bodyLock.addChild(Shape73);
bodyLock.addChild(Shape74);
bodyLock.addChild(Shape75);
}
public void render(Entity entity, float f, float f1, float f2, float f3, float f4, float f5) {
setRotationAngles(f, f1, f2, f3, f4, f5, entity);
renderWithLock(bipedBody, bodyLock, f5);
}
private void renderWithLock(ModelRenderer bipedBody, ModelRenderer lockblock, float f5) {
setRotation(lockblock, bipedBody.rotateAngleX, bipedBody.rotateAngleY, bipedBody.rotateAngleZ);
lockblock.setRotationPoint(bipedBody.rotationPointX, bipedBody.rotationPointY, bipedBody.rotationPointZ);
lockblock.render(f5);
}
private void setRotation(ModelRenderer model, float x, float y, float z) {
model.rotateAngleX = x;
model.rotateAngleY = y;
model.rotateAngleZ = z;
}
public void setRotationAngles(float f, float f1, float f2, float f3, float f4, float f5, Entity entity) {
super.setRotationAngles(f, f1, f2, f3, f4, f5, entity);
}
Код:
//Итем модельки
package ru.tiaryy.manual;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import net.minecraft.client.renderer.texture.IIconRegister;
import net.minecraft.creativetab.CreativeTabs;
import net.minecraft.entity.Entity;
import net.minecraft.entity.EntityLivingBase;
import net.minecraft.item.ItemArmor;
import net.minecraft.item.ItemArmor.ArmorMaterial;
import net.minecraft.item.ItemStack;
public class Susano
extends ItemArmor
{
public Susano(int id, int armorType)
{
super(ItemArmor.ArmorMaterial.DIAMOND, id, armorType);
setCreativeTab(CreativeTabs.tabCombat);
setMaxStackSize(1);
}
@SideOnly(Side.CLIENT)
public void registerIcons(IIconRegister par1IconRegister)
{
this.itemIcon = par1IconRegister.registerIcon("blocklol/textures/blocks/texture");
}
public String getArmorTexture(ItemStack itemstack, Entity entity, int slot, String type)
{
return "blocklol:textures/blocks/Susano_Madari.png";
}
@SideOnly(Side.CLIENT)
public ModelSusano getArmorModel(EntityLivingBase entityLiving, ItemStack itemStack, int armorSlot)
{
if (armorSlot != 1) {
return null;
}
if ((itemStack != null) && ((itemStack.getItem() instanceof Susano)))
{
ModelSusano model = ClientProxy.getArmorModel1();
model.isSneak = entityLiving.isSneaking();
return model;
}
return null;
}
}
Код:
//ClientProxy
package ru.tiaryy.manual;
import ru.tiaryy.manual.CommonProxy;
import ru.tiaryy.manual.ModelSusano;
public class ClientProxy
extends CommonProxy {
public static ModelSusano getArmorModel1() {
// TODO Auto-generated method stub
return null;
}
}
Код:
//CommonProxy
package ru.tiaryy.manual;
public class CommonProxy {
public void registerRenderers() {
}
}