Рендер Techne блока в 1.8

Статус
В этой теме нельзя размещать новые ответы.
21
0
Блок и итем отрендерил. Всё показывается.
Проблема в том что нету патикл эффектов при разбивании блока.
2efafd7ec9f0.jpg

И блок ставится выше чем надо. Сам стол чуть меньше обычного блока.
66b444999a06.jpg

Если надо код то пишите.
 
Можно поподробнее плиз. 
Итем я рендерил через .json. IItemrender в 1.8 не работает. Остальное всё по стандартному. О какой иконке идёт речь?
 
GODZAR,что тебе нужно, что ты вообще хочешь.Погляди в классы другие, к примеру в..Блок с эндер миром, ну телепортер или как его там.
 
Вот код:Сама модель:
Код:
public class ModelModChest extends ModelBase
{
    ModelRenderer tabletop;
    ModelRenderer leg1;
    ModelRenderer leg2;
    ModelRenderer leg3;
    ModelRenderer leg4;
  
  public ModelModChest()
  {
    textureWidth = 64;
    textureHeight = 32;
    
      tabletop = new ModelRenderer(this, 0, 0);
      tabletop.addBox(0F, 0F, 0F, 16, 3, 16);
      tabletop.setRotationPoint(-8F, 12F, -8F);
      tabletop.setTextureSize(64, 32);
      tabletop.mirror = true;
      setRotation(tabletop, 0F, 0F, 0F);
      leg1 = new ModelRenderer(this, 16, 19);
      leg1.addBox(0F, 0F, 0F, 4, 9, 4);
      leg1.setRotationPoint(-8F, 15F, -8F);
      leg1.setTextureSize(64, 32);
      leg1.mirror = true;
      setRotation(leg1, 0F, 0F, 0F);
      leg2 = new ModelRenderer(this, 0, 19);
      leg2.addBox(0F, 0F, 0F, 4, 9, 4);
      leg2.setRotationPoint(-8F, 15F, 4F);
      leg2.setTextureSize(64, 32);
      leg2.mirror = true;
      setRotation(leg2, 0F, 0F, 0F);
      leg3 = new ModelRenderer(this, 48, 19);
      leg3.addBox(0F, 0F, 0F, 4, 9, 4);
      leg3.setRotationPoint(4F, 15F, 4F);
      leg3.setTextureSize(64, 32);
      leg3.mirror = true;
      setRotation(leg3, 0F, 0F, 0F);
      leg4 = new ModelRenderer(this, 32, 19);
      leg4.addBox(0F, 0F, 0F, 4, 9, 4);
      leg4.setRotationPoint(4F, 15F, -8F);
      leg4.setTextureSize(64, 32);
      leg4.mirror = true;
      setRotation(leg4, 0F, 0F, 0F);
  }
  
  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);
    tabletop.render(f5);
    leg1.render(f5);
    leg2.render(f5);
    leg3.render(f5);
    leg4.render(f5);
  }
  
  public void renderModel(float f)
  {
        tabletop.render(f);
        leg1.render(f);
        leg2.render(f);
        leg3.render(f);
        leg4.render(f);
  }

  
  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);
  }
}
Рендер модели:
Код:
public class ModChestRender extends TileEntitySpecialRenderer
{
    private static final ResourceLocation texture = new ResourceLocation(Main.MODID + ":" + "textures/models/ModChest.png");
    private ModelModChest model;
    public ModChestRender()
    {
        this.model = new ModelModChest();
    }
    
    @Override
    public void renderTileEntityAt(TileEntity tileentity, double x, double y, double z, float f, int i)
    {
        GL11.glPushMatrix();
            GL11.glTranslatef((float) x + 0.5F, (float) y + 1.5F, (float) z + 0.5F);
            GL11.glRotatef(180, 0F, 0F, 1F);
            this.bindTexture(texture);            
            GL11.glPushMatrix();
                this.model.renderModel(0.0625F);
            GL11.glPopMatrix();            
        GL11.glPopMatrix();        
    }
}
Блок:
Код:
public class ModChest extends BlockContainer
{
    public ModChest(Material material)
    {
        super(material);
        this.setHardness(1.5F);
        this.setResistance(5.0F);
        this.setHarvestLevel("axe", 0);
        this.setStepSound(Block.soundTypeWood);
        this.setBlockBounds(0, 0, 0, 1.0F, 0.75F, 1.0F);
    }
    
    @Override
    public boolean isOpaqueCube()
    {
        return false;
    }
    
    @Override
    public boolean isFullCube()
    {
        return false;
    }

    @Override
    public TileEntity createNewTileEntity(World worldIn, int meta)
    {
        return new TileEntityModChest();
    }
}
А это то что в json blockstates
Код:
{
    "variants": {
        "normal": { "model": "rpgmod:ModChest" }
    }
}
models/block
Код:
{
    "textures": {
        "top": "rpgmod:blocks/ModChest_top",
        "side": "rpgmod:blocks/ModChest_side",
        "bottom": "rpgmod:blocks/ModChest_bottom"
    },
    "elements": [
        {   "from": [ 0, 0, 0 ],
            "to": [ 16, 12, 16 ],
            "faces": {
                "down":  { "texture": "#bottom", "cullface": "down" },
                "up":    { "texture": "#top", "cullface": "up" },
                "north": { "texture": "#side", "cullface": "north" },
                "south": { "texture": "#side", "cullface": "south" },
                "west":  { "texture": "#side", "cullface": "west" },
                "east":  { "texture": "#side", "cullface": "east" }
            }
        }
    ]
}
models/item
Код:
{
    "parent": "rpgmod:block/ModChest",
    "display": {
        "thirdperson": {
            "rotation": [ 10, -45, 170 ],
            "translation": [ 0, 1.5, -2.75 ],
            "scale": [ 0.375, 0.375, 0.375 ]
        }
    }
}


Мне нужно решение тех проблем которые указаны в первом посте.
 
Ничего страшного в 1.8 нет. Вон и Табула скоро поддержиать будет. Или уже поддерживает, слоупок.пнг.
А так да, у тебя не стоит источник частиц:

Код:
"textures": {
    "particle": "blocks/rail_activator_powered",
 
Спасибо большое. Хоть я и делал так. Видимо криво патикл написал.
Думаю можно закрывать если нету идей по второму пункту.
 
Второе невозможно сделать. Блок в Майне - 1х1х1, и точка.
 
Статус
В этой теме нельзя размещать новые ответы.
Назад
Сверху