Jump to content

Recommended Posts

Posted (edited)

I want to make a block with a custom model which extends ModelBase so it isn't an obj. I started with mostly adapting the Code of the Banner. But when I load the game with my texture I get this
 

  Reveal hidden contents

The texture is matching the Models texturemap.

Code:

Block:

package com.cruelar.cruelars_triforcemod.blocks;

import com.cruelar.cruelars_triforcemod.Cruelars_Triforcemod_Core;
import com.cruelar.cruelars_triforcemod.tileentity.MirrorOfTwilight_TileEntity;
import net.minecraft.block.BlockContainer;
import net.minecraft.block.material.Material;
import net.minecraft.block.properties.PropertyDirection;
import net.minecraft.block.state.BlockFaceShape;
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.EnumFacing;
import net.minecraft.util.math.AxisAlignedBB;
import net.minecraft.util.math.BlockPos;
import net.minecraft.world.IBlockAccess;
import net.minecraft.world.World;
import net.minecraftforge.client.model.ModelLoader;
import net.minecraftforge.fml.relauncher.Side;
import net.minecraftforge.fml.relauncher.SideOnly;

import javax.annotation.Nullable;

public class BlockMirrorOfTwilight extends BlockContainer {
    public static final PropertyDirection FACING = PropertyDirection.create("facing");

    public BlockMirrorOfTwilight(){
        super(Material.ROCK);
        this.setRegistryName("block_mirror_of_twilight");
        this.setUnlocalizedName(Cruelars_Triforcemod_Core.MODID+".block_mirror_of_twilight");
    }

    @Nullable
    @SuppressWarnings("deprecation")
    @Override
    public AxisAlignedBB getCollisionBoundingBox(IBlockState blockState, IBlockAccess worldIn, BlockPos pos)
    {
        return new AxisAlignedBB(0,0,0,1,2,1);
    }

    @Nullable
    @Override
    public TileEntity createNewTileEntity(World worldIn, int meta) {
        return new MirrorOfTwilight_TileEntity();
    }

    @Override
    protected BlockStateContainer createBlockState() {
        return new BlockStateContainer(this, FACING);
    }

    @SideOnly(Side.CLIENT)
    public void initModel(){
        ModelLoader.setCustomModelResourceLocation(Item.getItemFromBlock(this), 0, new ModelResourceLocation(getRegistryName(), "inventory"));
    }

    @SuppressWarnings("deprecation")
    public boolean isBlockNormalCube(IBlockState blockState){
        return false;
    }

    @SuppressWarnings("deprecation")
    public boolean isOpaqueCube(IBlockState blockState){
        return false;
    }

    @Override
    @SuppressWarnings("deprecation")
    public IBlockState getStateFromMeta(int meta) {
        return getDefaultState()
                .withProperty(FACING, EnumFacing.getFront(meta & 7));

    }

    @Override
    public int getMetaFromState(IBlockState blockState) {
        return blockState.getValue(FACING).getIndex();
    }

    public static EnumFacing getFacingFromEntity(BlockPos clickedBlock, EntityLivingBase entity) {
        return EnumFacing.getFacingFromVector(
                (float) (entity.posX - clickedBlock.getX()),
                (float) (entity.posY - clickedBlock.getY()),
                (float) (entity.posZ - clickedBlock.getZ()));
    }

    @Override
    public void onBlockPlacedBy(World world, BlockPos pos, IBlockState state, EntityLivingBase placer, ItemStack stack) {
        world.setBlockState(pos, state.withProperty(FACING, placer.getHorizontalFacing().getOpposite()), 2);
        if (stack.hasDisplayName()) {
            TileEntity lvt_6_1_ = world.getTileEntity(pos);
        }

    }

    @Override
    @SuppressWarnings("deprecation")
    public BlockFaceShape getBlockFaceShape(IBlockAccess worldIn, IBlockState state, BlockPos pos, EnumFacing face)
    {
        return BlockFaceShape.UNDEFINED;
    }
}

TileEntity (only need it for TESR as far as I know, tell me if I'm wrong + methods are only there cause of they're going to be useful for me later on):

package com.cruelar.cruelars_triforcemod.tileentity;

import javax.annotation.Nullable;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.network.play.server.SPacketUpdateTileEntity;
import net.minecraft.tileentity.TileEntity;

public class MirrorOfTwilight_TileEntity extends TileEntity
{

    public NBTTagCompound writeToNBT(NBTTagCompound compound)
    {
        super.writeToNBT(compound);
        return compound;
    }

    public void readFromNBT(NBTTagCompound compound)
    {
        super.readFromNBT(compound);
    }

    @Nullable
    public SPacketUpdateTileEntity getUpdatePacket()
    {
        return new SPacketUpdateTileEntity(this.pos, 6, this.getUpdateTag());
    }

    public NBTTagCompound getUpdateTag()
    {
        return this.writeToNBT(new NBTTagCompound());
    }
}

TESR:

package com.cruelar.cruelars_triforcemod.client.renderer.tileentity;

import com.cruelar.cruelars_triforcemod.model.ModelMirrorOfTwilight;
import com.cruelar.cruelars_triforcemod.tileentity.MirrorOfTwilight_TileEntity;
import net.minecraft.client.renderer.GlStateManager;
import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer;
import net.minecraft.util.ResourceLocation;
import net.minecraft.util.math.BlockPos;
import net.minecraftforge.fml.relauncher.Side;
import net.minecraftforge.fml.relauncher.SideOnly;

import javax.annotation.Nullable;

@SideOnly(Side.CLIENT)
public class TileEntityMirrorOfTwilightRenderer extends TileEntitySpecialRenderer<MirrorOfTwilight_TileEntity> {
    private final ModelMirrorOfTwilight modelMirrorOfTwilight = new ModelMirrorOfTwilight();

    public void render(MirrorOfTwilight_TileEntity te, double x, double y, double z, float partialTicks, int destroyStage, float alpha)
    {
        boolean flag = te.getWorld() != null;
        int i = flag ? te.getBlockMetadata() : 0;
        long j = flag ? te.getWorld().getTotalWorldTime() : 0L;
        GlStateManager.pushMatrix();
        float f = 0.6666667F;
            float f2 = 0.0F;

            if (i == 2)
            {
                f2 = 180.0F;
            }

            if (i == 4)
            {
                f2 = 90.0F;
            }

            if (i == 5)
            {
                f2 = -90.0F;
            }

            GlStateManager.translate((float)x + 0.5F, (float)y - 0.16666667F, (float)z + 0.5F);
            GlStateManager.rotate(-f2, 0.0F, 1.0F, 0.0F);
            GlStateManager.translate(0.0F, -0.3125F, -0.4375F);

        BlockPos blockpos = te.getPos();
        float f3 = (float)(blockpos.getX() * 7 + blockpos.getY() * 9 + blockpos.getZ() * 13) + (float)j + partialTicks;
        GlStateManager.enableRescaleNormal();
        ResourceLocation resourcelocation = this.getResourceLocation(te);

        if (resourcelocation != null)
        {
            this.bindTexture(resourcelocation);
            GlStateManager.pushMatrix();
            GlStateManager.scale(0.6666667F, -0.6666667F, -0.6666667F);
            this.modelMirrorOfTwilight.render();
            GlStateManager.popMatrix();
        }

        GlStateManager.color(1.0F, 1.0F, 1.0F, alpha);
        GlStateManager.popMatrix();
    }

    @Nullable
    private ResourceLocation getResourceLocation(MirrorOfTwilight_TileEntity mirrrorObj)
    {
        return new ResourceLocation("cruelars_triforcemod:textures/blocks/mirror_of_twilight.png");
    }
}

Model:

package com.cruelar.cruelars_triforcemod.model;

import net.minecraft.client.model.ModelBase;
import net.minecraft.client.model.ModelRenderer;
import net.minecraft.entity.Entity;
import net.minecraftforge.fml.relauncher.Side;
import net.minecraftforge.fml.relauncher.SideOnly;

/**
 * ModelMirrorOfTwilight - Cruelar
 * Created using Tabula 7.0.0
 */
public class ModelMirrorOfTwilight extends ModelBase {
    public ModelRenderer standbottom;
    public ModelRenderer standmiddle;
    public ModelRenderer standaxisY;
    public ModelRenderer standmainframebottom;
    public ModelRenderer mirror;
    public ModelRenderer standmainframeright;
    public ModelRenderer standmainframeleft;
    public ModelRenderer standaxisXleft;
    public ModelRenderer standaxisXright;
    public ModelRenderer misc1left;
    public ModelRenderer misc2left;
    public ModelRenderer misc3left;
    public ModelRenderer misc4left;
    public ModelRenderer misc5left;
    public ModelRenderer misc1right;
    public ModelRenderer misc2right;
    public ModelRenderer misc3right;
    public ModelRenderer misc4right;
    public ModelRenderer misc5right;

    public ModelMirrorOfTwilight() {
        this.textureWidth = 64;
        this.textureHeight = 32;
        this.misc2right = new ModelRenderer(this, 36, 0);
        this.misc2right.mirror = true;
        this.misc2right.setRotationPoint(-2.5F, 19.0F, 0.5F);
        this.misc2right.addBox(-0.5F, -1.0F, -0.5F, 1, 2, 1, 0.0F);
        this.standaxisXright = new ModelRenderer(this, 0, 12);
        this.standaxisXright.mirror = true;
        this.standaxisXright.setRotationPoint(-5.5F, 10.0F, 0.0F);
        this.standaxisXright.addBox(-0.5F, -1.0F, -1.0F, 1, 2, 2, 0.0F);
        this.misc4left = new ModelRenderer(this, 36, 0);
        this.misc4left.setRotationPoint(4.5F, 21.0F, 0.5F);
        this.misc4left.addBox(-0.5F, -1.0F, -0.5F, 1, 2, 1, 0.0F);
        this.mirror = new ModelRenderer(this, 0, 0);
        this.mirror.setRotationPoint(0.0F, 9.5F, 0.0F);
        this.mirror.addBox(-5.0F, -4.5F, -1.0F, 10, 10, 2, 0.0F);
        this.setRotateAngle(mirror, -0.3490658503988659F, 0.0F, 0.0F);
        this.misc2left = new ModelRenderer(this, 36, 0);
        this.misc2left.setRotationPoint(2.5F, 19.0F, 0.5F);
        this.misc2left.addBox(-0.5F, -1.0F, -0.5F, 1, 2, 1, 0.0F);
        this.standbottom = new ModelRenderer(this, 40, 0);
        this.standbottom.setRotationPoint(0.0F, 22.0F, 0.0F);
        this.standbottom.addBox(-2.0F, -2.0F, -2.0F, 4, 4, 4, 0.0F);
        this.misc5right = new ModelRenderer(this, 30, 3);
        this.misc5right.mirror = true;
        this.misc5right.setRotationPoint(-3.5F, 22.5F, 0.5F);
        this.misc5right.addBox(-1.5F, -0.5F, -0.5F, 3, 1, 1, 0.0F);
        this.misc5left = new ModelRenderer(this, 30, 3);
        this.misc5left.setRotationPoint(3.5F, 22.5F, 0.5F);
        this.misc5left.addBox(-1.5F, -0.5F, -0.5F, 3, 1, 1, 0.0F);
        this.misc1left = new ModelRenderer(this, 40, 0);
        this.misc1left.setRotationPoint(3.5F, 18.5F, 0.5F);
        this.misc1left.addBox(-0.5F, -0.5F, -0.5F, 1, 1, 1, 0.0F);
        this.standmiddle = new ModelRenderer(this, 32, 5);
        this.standmiddle.setRotationPoint(0.0F, 19.0F, 0.0F);
        this.standmiddle.addBox(-1.0F, -1.0F, -1.0F, 2, 2, 2, 0.0F);
        this.standaxisXleft = new ModelRenderer(this, 0, 12);
        this.standaxisXleft.setRotationPoint(5.5F, 10.0F, 0.0F);
        this.standaxisXleft.addBox(-0.5F, -1.0F, -1.0F, 1, 2, 2, 0.0F);
        this.standmainframeright = new ModelRenderer(this, 56, 0);
        this.standmainframeright.mirror = true;
        this.standmainframeright.setRotationPoint(-7.0F, 12.0F, 0.0F);
        this.standmainframeright.addBox(-1.0F, -4.0F, -1.0F, 2, 8, 2, 0.0F);
        this.standmainframeleft = new ModelRenderer(this, 56, 0);
        this.standmainframeleft.setRotationPoint(7.0F, 12.0F, 0.0F);
        this.standmainframeleft.addBox(-1.0F, -4.0F, -1.0F, 2, 8, 2, 0.0F);
        this.misc3right = new ModelRenderer(this, 30, 0);
        this.misc3right.mirror = true;
        this.misc3right.setRotationPoint(-3.0F, 20.5F, 0.5F);
        this.misc3right.addBox(-1.0F, -0.5F, -0.5F, 2, 1, 1, 0.0F);
        this.standaxisY = new ModelRenderer(this, 2, 12);
        this.standaxisY.setRotationPoint(0.0F, 17.0F, 0.0F);
        this.standaxisY.addBox(-2.0F, -1.0F, -2.0F, 4, 2, 4, 0.0F);
        this.standmainframebottom = new ModelRenderer(this, 0, 28);
        this.standmainframebottom.setRotationPoint(0.0F, 17.0F, 0.0F);
        this.standmainframebottom.addBox(-8.0F, -1.0F, -1.0F, 16, 2, 2, 0.0F);
        this.misc3left = new ModelRenderer(this, 30, 0);
        this.misc3left.setRotationPoint(3.0F, 20.5F, 0.5F);
        this.misc3left.addBox(-1.0F, -0.5F, -0.5F, 2, 1, 1, 0.0F);
        this.misc4right = new ModelRenderer(this, 36, 0);
        this.misc4right.mirror = true;
        this.misc4right.setRotationPoint(-4.5F, 21.0F, 0.5F);
        this.misc4right.addBox(-0.5F, -1.0F, -0.5F, 1, 2, 1, 0.0F);
        this.misc1right = new ModelRenderer(this, 40, 0);
        this.misc1right.mirror = true;
        this.misc1right.setRotationPoint(-3.5F, 18.5F, 0.5F);
        this.misc1right.addBox(-0.5F, -0.5F, -0.5F, 1, 1, 1, 0.0F);
    }

    @Override
    @SideOnly(Side.CLIENT)
    public void render(Entity entity, float f, float f1, float f2, float f3, float f4, float f5) { 
        this.misc2right.render(f5);
        this.standaxisXright.render(f5);
        this.misc4left.render(f5);
        this.mirror.render(f5);
        this.misc2left.render(f5);
        this.standbottom.render(f5);
        this.misc5right.render(f5);
        this.misc5left.render(f5);
        this.misc1left.render(f5);
        this.standmiddle.render(f5);
        this.standaxisXleft.render(f5);
        this.standmainframeright.render(f5);
        this.standmainframeleft.render(f5);
        this.misc3right.render(f5);
        this.standaxisY.render(f5);
        this.standmainframebottom.render(f5);
        this.misc3left.render(f5);
        this.misc4right.render(f5);
        this.misc1right.render(f5);
    }

    @SideOnly(Side.CLIENT)
    public void render(){
        this.render((Entity)null,0,0,0,0,0,0.0625F);
    }

    /**
     * This is a helper function from Tabula to set the rotation of model parts
     */
    public void setRotateAngle(ModelRenderer modelRenderer, float x, float y, float z) {
        modelRenderer.rotateAngleX = x;
        modelRenderer.rotateAngleY = y;
        modelRenderer.rotateAngleZ = z;
    }
}

blockstate json

{
  "forge_marker": 1,
  "defaults": {
    "custom":{},
    "model": "cruelars_triforcemod:block_mirror_of_twilight"
  },
  "variants": {
    "normal": [{}],
    "inventory": [{}],
    "facing": {
      "south": {},
      "north": {"y":180},
      "east": {"y":270},
      "west": {"y":90}
    }
  }
}

model json

{
  "parent": "block/cube_all",
  "textures":{
    "all": "cruelars_triforcemod:blocks/mirror_of_twilight"
  }
}

 

Edited by _Cruelar_

My Projects:

Cruelars Triforcemod (1.12 release; 1.14 alpha soon coming)

 

Important:

As my mod is on at least 10 different third party sites without my permission, I want to warn you about that with a link to StopModReposts

Posted
  1. Not Helpful.
  2. The Vanilla Banner does that.
  3. Should I then make an Entity like the ArmorStand and make it immobile? Or what should I do?

My Projects:

Cruelars Triforcemod (1.12 release; 1.14 alpha soon coming)

 

Important:

As my mod is on at least 10 different third party sites without my permission, I want to warn you about that with a link to StopModReposts

Posted

Can you tell us what would happen if you imported the model as an OBJ file? and what file extension were you using when you got the error?

Forge 1.8.9 and below are not supported in the forums anymore. Please upgrade to a later version.

 

My experimental mod: new GitHub page to be created... (Add your favorite TCGs in MC! [WIP])

 

When asking for assistance with modding or making mods, paste the log (located in .minecraft/logs folder for mod users or in the console for mod makers).

Posted (edited)
  On 8/8/2018 at 8:55 PM, Animus_Surge said:

Can you tell us what would happen if you imported the model as an OBJ file?

Expand  

I don't want to us obj as my programm for objs has problems with textures causing the import to fail.(I use 3DBuilder from Windows. If you know a better one please tell me.)

  On 8/8/2018 at 8:55 PM, Animus_Surge said:

and what file extension were you using when you got the error?

Expand  

for the texture png.

  On 8/8/2018 at 9:11 PM, diesieben07 said:

Make a normal block model.

Expand  

As you might see in the first post the model is clearly not a normal Block. Can you give me a clear reason why this isn't possible.

The only thing that I should add here is that the model around one and a half block high is.

Edited by _Cruelar_

My Projects:

Cruelars Triforcemod (1.12 release; 1.14 alpha soon coming)

 

Important:

As my mod is on at least 10 different third party sites without my permission, I want to warn you about that with a link to StopModReposts

Posted
  On 8/9/2018 at 8:32 AM, _Cruelar_ said:

Can you give me a clear reason why this isn't possible.

Expand  

It isn't that it isn't possible, its that it is a bad idea. A TESRs code is called every frame it is rendered and sent to the GPU every frame as well. While a normal model is hatched together with the rest of them and sent to the GPU. Greatly reducing the burden on the machine.

  On 8/9/2018 at 8:32 AM, _Cruelar_ said:

As you might see in the first post the model is clearly not a normal Block.

Expand  

Well it is obviously made of cubes since you are using ModelBase. Why not just use a json format for your model. There are plenty of programs to do this and it isn't hard to do yourself. I personally use cubik studios.

 

  On 8/9/2018 at 8:32 AM, _Cruelar_ said:

I don't want to us obj as my programm for objs has problems with textures causing the import to fail.(I use 3DBuilder from Windows. If you know a better one please tell me.)

Expand  

Blender is an obj model creator if you can use it. And there is obviously Google for this question.

VANILLA MINECRAFT CLASSES ARE THE BEST RESOURCES WHEN MODDING

I will be posting 1.15.2 modding tutorials on this channel. If you want to be notified of it do the normal YouTube stuff like subscribing, ect.

Forge and vanilla BlockState generator.

Posted
  On 8/9/2018 at 9:02 AM, Animefan8888 said:

Why not just use a json format for your model.

Expand  

I never tried to make a json model so I wanted to avoid it. *sigh* I'll try. Thanks.

  On 8/9/2018 at 9:02 AM, Animefan8888 said:

Blender is an obj model creator if you can use it.

Expand  

Thanks.

  On 8/9/2018 at 9:02 AM, Animefan8888 said:

And there is obviously Google for this question.

Expand  

Yes but I thought I get in a modder forum more likely programs that are handy for mc modding.

My Projects:

Cruelars Triforcemod (1.12 release; 1.14 alpha soon coming)

 

Important:

As my mod is on at least 10 different third party sites without my permission, I want to warn you about that with a link to StopModReposts

Posted

So I made a model with blockbench(cause of blockbench having a webapp, didn't wanted to install something for one object). But Forge tells me the textures aren't there, although I checked that and they are in the right folder.

In the Java code I changed nothing than deleting the TESR and the TileEntity so here is he log output:

  Reveal hidden contents

My model. json:

{
	"credit": "Made with Blockbench",
	"textures": {
		"0": "cruelars_triforcemod:blocks/mirror_front",
		"1": "cruelars_triforcemod:blocks/mirror_gold",
		"2": "cruelars_triforcemod:blocks/mirror_gold_striped",
		"3": "cruelars_triforcemod:blocks/mirror_dark",
		"4": "cruelars_triforcemod:blocks/mirror_back",
		"5": "cruelars_triforcemod:blocks/mirror_dark_striped"
	},
	"elements": [
		{
			"from": [6, 0, 6],
			"to": [10, 4, 10],
			"rotation": {"angle": 0, "axis": "y", "origin": [8, 2, 8]},
			"faces": {
				"north": {"uv": [0, 0, 16, 16], "texture": "#2"},
				"east": {"uv": [0, 0, 16, 16], "texture": "#2"},
				"south": {"uv": [0, 0, 16, 16], "texture": "#2"},
				"west": {"uv": [0, 0, 16, 16], "texture": "#2"},
				"up": {"uv": [0, 0, 4, 4], "texture": "#1"},
				"down": {"uv": [0, 0, 4, 4], "texture": "#1"}
			}
		},
		{
			"from": [7, 4, 7],
			"to": [9, 6, 9],
			"rotation": {"angle": 0, "axis": "y", "origin": [8, 5, 8]},
			"faces": {
				"north": {"uv": [0, 0, 16, 16], "texture": "#5"},
				"east": {"uv": [0, 0, 16, 16], "texture": "#5"},
				"south": {"uv": [0, 0, 16, 16], "texture": "#5"},
				"west": {"uv": [0, 0, 16, 16], "texture": "#5"}
			}
		},
		{
			"from": [6, 6, 6],
			"to": [10, 8, 10],
			"rotation": {"angle": 0, "axis": "y", "origin": [8, 7, 8]},
			"faces": {
				"north": {"uv": [0, 0, 16, 8], "texture": "#2"},
				"east": {"uv": [0, 0, 16, 8], "texture": "#2"},
				"south": {"uv": [0, 0, 16, 8], "texture": "#2"},
				"west": {"uv": [0, 0, 16, 8], "texture": "#2"},
				"up": {"uv": [0, 0, 4, 2], "texture": "#1"},
				"down": {"uv": [0, 0, 4, 2], "texture": "#1"}
			}
		},
		{
			"from": [0, 6, 7],
			"to": [16, 8, 9],
			"rotation": {"angle": 0, "axis": "y", "origin": [8, 7, 8]},
			"faces": {
				"north": {"uv": [0, 0, 16, 16], "texture": "#5"},
				"east": {"uv": [0, 0, 16, 16], "texture": "#5"},
				"south": {"uv": [0, 0, 16, 16], "texture": "#5"},
				"west": {"uv": [0, 0, 16, 16], "texture": "#5"},
				"up": {"uv": [0, 0, 1, 1], "texture": "#3"},
				"down": {"uv": [0, 0, 1, 1], "texture": "#3"}
			}
		},
		{
			"from": [0, 8, 7],
			"to": [2, 16, 9],
			"rotation": {"angle": 0, "axis": "y", "origin": [1, 12, 8]},
			"faces": {
				"north": {"uv": [0, 0, 16, 16], "texture": "#5", "rotation": 270},
				"east": {"uv": [0, 0, 1, 1], "texture": "#3"},
				"south": {"uv": [0, 0, 16, 16], "texture": "#5", "rotation": 90},
				"west": {"uv": [0, 0, 8, 2], "texture": "#5", "rotation": 90},
				"up": {"uv": [0, 0, 2, 2], "texture": "#3"}
			}
		},
		{
			"from": [14, 8, 7],
			"to": [16, 16, 9],
			"rotation": {"angle": 0, "axis": "y", "origin": [15, 12, 8]},
			"faces": {
				"north": {"uv": [0, 0, 16, 16], "texture": "#5", "rotation": 90},
				"east": {"uv": [0, 0, 8, 2], "texture": "#5", "rotation": 90},
				"south": {"uv": [0, 0, 16, 16], "texture": "#5", "rotation": 270},
				"west": {"uv": [0, 0, 2, 8], "texture": "#3"},
				"up": {"uv": [0, 0, 2, 2], "texture": "#3"}
			}
		},
		{
			"from": [2, 13, 7],
			"to": [3, 15, 9],
			"rotation": {"angle": 0, "axis": "y", "origin": [2.5, 14, 8]},
			"faces": {
				"north": {"uv": [0, 0, 16, 16], "texture": "#5"},
				"east": {"uv": [0, 0, 1, 2], "texture": "#3"},
				"south": {"uv": [0, 0, 1, 2], "texture": "#3"},
				"up": {"uv": [0, 0, 1, 2], "texture": "#3"},
				"down": {"uv": [0, 0, 1, 2], "texture": "#3"}
			}
		},
		{
			"from": [13, 13, 7],
			"to": [14, 15, 9],
			"rotation": {"angle": 0, "axis": "y", "origin": [13.5, 14, 8]},
			"faces": {
				"north": {"uv": [0, 0, 16, 16], "texture": "#5"},
				"south": {"uv": [0, 0, 16, 16], "texture": "#5"},
				"west": {"uv": [0, 0, 2, 2], "texture": "#3"},
				"up": {"uv": [0, 0, 1, 2], "texture": "#3"},
				"down": {"uv": [0, 0, 1, 2], "texture": "#3"}
			}
		},
		{
			"from": [3, 9, 7],
			"to": [13, 19, 9],
			"rotation": {"angle": 22.5, "axis": "x", "origin": [8, 14, 8]},
			"faces": {
				"north": {"uv": [0, 0, 16, 16], "texture": "#0"},
				"east": {"uv": [0, 0, 2, 10], "texture": "#3"},
				"south": {"uv": [0, 0, 16, 16], "texture": "#4"},
				"west": {"uv": [0, 0, 2, 10], "texture": "#3"},
				"up": {"uv": [0, 0, 2, 10], "texture": "#3"},
				"down": {"uv": [0, 0, 2, 10], "texture": "#3"}
			}
		},
		{
			"from": [3, 0, 7],
			"to": [6, 1, 8],
			"faces": {
				"north": {"uv": [0, 0, 3, 1], "texture": "#1"},
				"east": {"uv": [0, 0, 3, 1], "texture": "#1"},
				"south": {"uv": [0, 0, 3, 1], "texture": "#1"},
				"west": {"uv": [0, 0, 3, 1], "texture": "#1"},
				"up": {"uv": [0, 0, 3, 1], "texture": "#1"},
				"down": {"uv": [0, 0, 3, 1], "texture": "#1"}
			}
		},
		{
			"from": [10, 0, 7],
			"to": [13, 1, 8],
			"faces": {
				"north": {"uv": [0, 0, 3, 1], "texture": "#1"},
				"east": {"uv": [0, 0, 3, 1], "texture": "#1"},
				"south": {"uv": [0, 0, 3, 1], "texture": "#1"},
				"west": {"uv": [0, 0, 3, 1], "texture": "#1"},
				"up": {"uv": [0, 0, 3, 1], "texture": "#1"},
				"down": {"uv": [0, 0, 3, 1], "texture": "#1"}
			}
		},
		{
			"from": [3, 1, 7],
			"to": [4, 3, 8],
			"faces": {
				"north": {"uv": [0, 0, 1, 2], "texture": "#1"},
				"east": {"uv": [0, 0, 1, 2], "texture": "#1"},
				"south": {"uv": [0, 0, 1, 2], "texture": "#1"},
				"west": {"uv": [0, 0, 1, 2], "texture": "#1"},
				"up": {"uv": [0, 0, 1, 2], "texture": "#1"}
			}
		},
		{
			"from": [12, 1, 7],
			"to": [13, 3, 8],
			"faces": {
				"north": {"uv": [0, 0, 1, 2], "texture": "#1"},
				"east": {"uv": [0, 0, 1, 2], "texture": "#1"},
				"south": {"uv": [0, 0, 1, 2], "texture": "#1"},
				"west": {"uv": [0, 0, 1, 2], "texture": "#1"},
				"up": {"uv": [0, 0, 1, 2], "texture": "#1"}
			}
		},
		{
			"from": [4, 2, 7],
			"to": [6, 3, 8],
			"faces": {
				"north": {"uv": [0, 0, 2, 1], "texture": "#1"},
				"east": {"uv": [0, 0, 2, 1], "texture": "#1"},
				"south": {"uv": [0, 0, 2, 1], "texture": "#1"},
				"west": {"uv": [0, 0, 2, 1], "texture": "#1"},
				"up": {"uv": [0, 0, 2, 1], "texture": "#1"},
				"down": {"uv": [0, 0, 2, 1], "texture": "#1"}
			}
		},
		{
			"from": [10, 2, 7],
			"to": [12, 3, 8],
			"faces": {
				"north": {"uv": [0, 0, 2, 1], "texture": "#1"},
				"east": {"uv": [0, 0, 2, 1], "texture": "#1"},
				"south": {"uv": [0, 0, 2, 1], "texture": "#1"},
				"west": {"uv": [0, 0, 2, 1], "texture": "#1"},
				"up": {"uv": [0, 0, 2, 1], "texture": "#1"},
				"down": {"uv": [0, 0, 2, 1], "texture": "#1"}
			}
		},
		{
			"from": [5, 3, 7],
			"to": [6, 5, 8],
			"faces": {
				"north": {"uv": [0, 0, 1, 2], "texture": "#1"},
				"east": {"uv": [0, 0, 1, 2], "texture": "#1"},
				"south": {"uv": [0, 0, 1, 2], "texture": "#1"},
				"west": {"uv": [0, 0, 1, 2], "texture": "#1"},
				"up": {"uv": [0, 0, 1, 2], "texture": "#1"}
			}
		},
		{
			"from": [10, 3, 7],
			"to": [11, 5, 8],
			"faces": {
				"north": {"uv": [0, 0, 1, 2], "texture": "#1"},
				"east": {"uv": [0, 0, 1, 2], "texture": "#1"},
				"south": {"uv": [0, 0, 1, 2], "texture": "#1"},
				"west": {"uv": [0, 0, 1, 2], "texture": "#1"},
				"up": {"uv": [0, 0, 1, 2], "texture": "#1"}
			}
		},
		{
			"from": [4, 4, 7],
			"to": [5, 5, 8],
			"faces": {
				"north": {"uv": [0, 0, 1, 1], "texture": "#1"},
				"east": {"uv": [0, 0, 1, 1], "texture": "#1"},
				"south": {"uv": [0, 0, 1, 1], "texture": "#1"},
				"west": {"uv": [0, 0, 1, 1], "texture": "#1"},
				"up": {"uv": [0, 0, 1, 1], "texture": "#1"},
				"down": {"uv": [0, 0, 1, 1], "texture": "#1"}
			}
		},
		{
			"from": [11, 4, 7],
			"to": [12, 5, 8],
			"faces": {
				"north": {"uv": [0, 0, 1, 1], "texture": "#1"},
				"east": {"uv": [0, 0, 1, 1], "texture": "#1"},
				"south": {"uv": [0, 0, 1, 1], "texture": "#1"},
				"west": {"uv": [0, 0, 1, 1], "texture": "#1"},
				"up": {"uv": [0, 0, 1, 1], "texture": "#1"},
				"down": {"uv": [0, 0, 1, 1], "texture": "#1"}
			}
		}
	],
	"display": {
		"thirdperson_righthand": {
			"scale": [0.5, 0.5, 0.5],
			"rotation": [0, 180, -30],
			"translation": [0, 0, 0]
		},
		"thirdperson_lefthand": {
			"scale": [0.5, 0.5, 0.5],
			"rotation": [0, 180, -30]
		},
		"firstperson_righthand": {
			"scale": [0.5, 0.5, 0.5],
			"rotation": [0, 180, 0]
		},
		"firstperson_lefthand": {
			"scale": [0.5, 0.5, 0.5],
			"rotation": [0, 180, 0]
		},
		"ground": {
			"scale": [0.5, 0.5, 0.5]
		},
		"fixed": {
			"translation": [0, -1, -1]
		},
		"gui": {
			"scale": [0.7, 0.7, 0.7],
			"rotation": [0, 180, 0],
			"translation": [0, -1, 0]
		}
	}
}

All my textures are in assets/cruelars_triforcemod/textures/blocks

My Projects:

Cruelars Triforcemod (1.12 release; 1.14 alpha soon coming)

 

Important:

As my mod is on at least 10 different third party sites without my permission, I want to warn you about that with a link to StopModReposts

Posted
  On 8/9/2018 at 11:05 AM, _Cruelar_ said:

So I made a model with blockbench(cause of blockbench having a webapp, didn't wanted to install something for one object). But Forge tells me the textures aren't there, although I checked that and they are in the right folder.

In the Java code I changed nothing than deleting the TESR and the TileEntity so here is he log output:

  Reveal hidden contents

My model. json:

{
	"credit": "Made with Blockbench",
	"textures": {
		"0": "cruelars_triforcemod:blocks/mirror_front",
		"1": "cruelars_triforcemod:blocks/mirror_gold",
		"2": "cruelars_triforcemod:blocks/mirror_gold_striped",
		"3": "cruelars_triforcemod:blocks/mirror_dark",
		"4": "cruelars_triforcemod:blocks/mirror_back",
		"5": "cruelars_triforcemod:blocks/mirror_dark_striped"
	},
	"elements": [
		{
			"from": [6, 0, 6],
			"to": [10, 4, 10],
			"rotation": {"angle": 0, "axis": "y", "origin": [8, 2, 8]},
			"faces": {
				"north": {"uv": [0, 0, 16, 16], "texture": "#2"},
				"east": {"uv": [0, 0, 16, 16], "texture": "#2"},
				"south": {"uv": [0, 0, 16, 16], "texture": "#2"},
				"west": {"uv": [0, 0, 16, 16], "texture": "#2"},
				"up": {"uv": [0, 0, 4, 4], "texture": "#1"},
				"down": {"uv": [0, 0, 4, 4], "texture": "#1"}
			}
		},
		{
			"from": [7, 4, 7],
			"to": [9, 6, 9],
			"rotation": {"angle": 0, "axis": "y", "origin": [8, 5, 8]},
			"faces": {
				"north": {"uv": [0, 0, 16, 16], "texture": "#5"},
				"east": {"uv": [0, 0, 16, 16], "texture": "#5"},
				"south": {"uv": [0, 0, 16, 16], "texture": "#5"},
				"west": {"uv": [0, 0, 16, 16], "texture": "#5"}
			}
		},
		{
			"from": [6, 6, 6],
			"to": [10, 8, 10],
			"rotation": {"angle": 0, "axis": "y", "origin": [8, 7, 8]},
			"faces": {
				"north": {"uv": [0, 0, 16, 8], "texture": "#2"},
				"east": {"uv": [0, 0, 16, 8], "texture": "#2"},
				"south": {"uv": [0, 0, 16, 8], "texture": "#2"},
				"west": {"uv": [0, 0, 16, 8], "texture": "#2"},
				"up": {"uv": [0, 0, 4, 2], "texture": "#1"},
				"down": {"uv": [0, 0, 4, 2], "texture": "#1"}
			}
		},
		{
			"from": [0, 6, 7],
			"to": [16, 8, 9],
			"rotation": {"angle": 0, "axis": "y", "origin": [8, 7, 8]},
			"faces": {
				"north": {"uv": [0, 0, 16, 16], "texture": "#5"},
				"east": {"uv": [0, 0, 16, 16], "texture": "#5"},
				"south": {"uv": [0, 0, 16, 16], "texture": "#5"},
				"west": {"uv": [0, 0, 16, 16], "texture": "#5"},
				"up": {"uv": [0, 0, 1, 1], "texture": "#3"},
				"down": {"uv": [0, 0, 1, 1], "texture": "#3"}
			}
		},
		{
			"from": [0, 8, 7],
			"to": [2, 16, 9],
			"rotation": {"angle": 0, "axis": "y", "origin": [1, 12, 8]},
			"faces": {
				"north": {"uv": [0, 0, 16, 16], "texture": "#5", "rotation": 270},
				"east": {"uv": [0, 0, 1, 1], "texture": "#3"},
				"south": {"uv": [0, 0, 16, 16], "texture": "#5", "rotation": 90},
				"west": {"uv": [0, 0, 8, 2], "texture": "#5", "rotation": 90},
				"up": {"uv": [0, 0, 2, 2], "texture": "#3"}
			}
		},
		{
			"from": [14, 8, 7],
			"to": [16, 16, 9],
			"rotation": {"angle": 0, "axis": "y", "origin": [15, 12, 8]},
			"faces": {
				"north": {"uv": [0, 0, 16, 16], "texture": "#5", "rotation": 90},
				"east": {"uv": [0, 0, 8, 2], "texture": "#5", "rotation": 90},
				"south": {"uv": [0, 0, 16, 16], "texture": "#5", "rotation": 270},
				"west": {"uv": [0, 0, 2, 8], "texture": "#3"},
				"up": {"uv": [0, 0, 2, 2], "texture": "#3"}
			}
		},
		{
			"from": [2, 13, 7],
			"to": [3, 15, 9],
			"rotation": {"angle": 0, "axis": "y", "origin": [2.5, 14, 8]},
			"faces": {
				"north": {"uv": [0, 0, 16, 16], "texture": "#5"},
				"east": {"uv": [0, 0, 1, 2], "texture": "#3"},
				"south": {"uv": [0, 0, 1, 2], "texture": "#3"},
				"up": {"uv": [0, 0, 1, 2], "texture": "#3"},
				"down": {"uv": [0, 0, 1, 2], "texture": "#3"}
			}
		},
		{
			"from": [13, 13, 7],
			"to": [14, 15, 9],
			"rotation": {"angle": 0, "axis": "y", "origin": [13.5, 14, 8]},
			"faces": {
				"north": {"uv": [0, 0, 16, 16], "texture": "#5"},
				"south": {"uv": [0, 0, 16, 16], "texture": "#5"},
				"west": {"uv": [0, 0, 2, 2], "texture": "#3"},
				"up": {"uv": [0, 0, 1, 2], "texture": "#3"},
				"down": {"uv": [0, 0, 1, 2], "texture": "#3"}
			}
		},
		{
			"from": [3, 9, 7],
			"to": [13, 19, 9],
			"rotation": {"angle": 22.5, "axis": "x", "origin": [8, 14, 8]},
			"faces": {
				"north": {"uv": [0, 0, 16, 16], "texture": "#0"},
				"east": {"uv": [0, 0, 2, 10], "texture": "#3"},
				"south": {"uv": [0, 0, 16, 16], "texture": "#4"},
				"west": {"uv": [0, 0, 2, 10], "texture": "#3"},
				"up": {"uv": [0, 0, 2, 10], "texture": "#3"},
				"down": {"uv": [0, 0, 2, 10], "texture": "#3"}
			}
		},
		{
			"from": [3, 0, 7],
			"to": [6, 1, 8],
			"faces": {
				"north": {"uv": [0, 0, 3, 1], "texture": "#1"},
				"east": {"uv": [0, 0, 3, 1], "texture": "#1"},
				"south": {"uv": [0, 0, 3, 1], "texture": "#1"},
				"west": {"uv": [0, 0, 3, 1], "texture": "#1"},
				"up": {"uv": [0, 0, 3, 1], "texture": "#1"},
				"down": {"uv": [0, 0, 3, 1], "texture": "#1"}
			}
		},
		{
			"from": [10, 0, 7],
			"to": [13, 1, 8],
			"faces": {
				"north": {"uv": [0, 0, 3, 1], "texture": "#1"},
				"east": {"uv": [0, 0, 3, 1], "texture": "#1"},
				"south": {"uv": [0, 0, 3, 1], "texture": "#1"},
				"west": {"uv": [0, 0, 3, 1], "texture": "#1"},
				"up": {"uv": [0, 0, 3, 1], "texture": "#1"},
				"down": {"uv": [0, 0, 3, 1], "texture": "#1"}
			}
		},
		{
			"from": [3, 1, 7],
			"to": [4, 3, 8],
			"faces": {
				"north": {"uv": [0, 0, 1, 2], "texture": "#1"},
				"east": {"uv": [0, 0, 1, 2], "texture": "#1"},
				"south": {"uv": [0, 0, 1, 2], "texture": "#1"},
				"west": {"uv": [0, 0, 1, 2], "texture": "#1"},
				"up": {"uv": [0, 0, 1, 2], "texture": "#1"}
			}
		},
		{
			"from": [12, 1, 7],
			"to": [13, 3, 8],
			"faces": {
				"north": {"uv": [0, 0, 1, 2], "texture": "#1"},
				"east": {"uv": [0, 0, 1, 2], "texture": "#1"},
				"south": {"uv": [0, 0, 1, 2], "texture": "#1"},
				"west": {"uv": [0, 0, 1, 2], "texture": "#1"},
				"up": {"uv": [0, 0, 1, 2], "texture": "#1"}
			}
		},
		{
			"from": [4, 2, 7],
			"to": [6, 3, 8],
			"faces": {
				"north": {"uv": [0, 0, 2, 1], "texture": "#1"},
				"east": {"uv": [0, 0, 2, 1], "texture": "#1"},
				"south": {"uv": [0, 0, 2, 1], "texture": "#1"},
				"west": {"uv": [0, 0, 2, 1], "texture": "#1"},
				"up": {"uv": [0, 0, 2, 1], "texture": "#1"},
				"down": {"uv": [0, 0, 2, 1], "texture": "#1"}
			}
		},
		{
			"from": [10, 2, 7],
			"to": [12, 3, 8],
			"faces": {
				"north": {"uv": [0, 0, 2, 1], "texture": "#1"},
				"east": {"uv": [0, 0, 2, 1], "texture": "#1"},
				"south": {"uv": [0, 0, 2, 1], "texture": "#1"},
				"west": {"uv": [0, 0, 2, 1], "texture": "#1"},
				"up": {"uv": [0, 0, 2, 1], "texture": "#1"},
				"down": {"uv": [0, 0, 2, 1], "texture": "#1"}
			}
		},
		{
			"from": [5, 3, 7],
			"to": [6, 5, 8],
			"faces": {
				"north": {"uv": [0, 0, 1, 2], "texture": "#1"},
				"east": {"uv": [0, 0, 1, 2], "texture": "#1"},
				"south": {"uv": [0, 0, 1, 2], "texture": "#1"},
				"west": {"uv": [0, 0, 1, 2], "texture": "#1"},
				"up": {"uv": [0, 0, 1, 2], "texture": "#1"}
			}
		},
		{
			"from": [10, 3, 7],
			"to": [11, 5, 8],
			"faces": {
				"north": {"uv": [0, 0, 1, 2], "texture": "#1"},
				"east": {"uv": [0, 0, 1, 2], "texture": "#1"},
				"south": {"uv": [0, 0, 1, 2], "texture": "#1"},
				"west": {"uv": [0, 0, 1, 2], "texture": "#1"},
				"up": {"uv": [0, 0, 1, 2], "texture": "#1"}
			}
		},
		{
			"from": [4, 4, 7],
			"to": [5, 5, 8],
			"faces": {
				"north": {"uv": [0, 0, 1, 1], "texture": "#1"},
				"east": {"uv": [0, 0, 1, 1], "texture": "#1"},
				"south": {"uv": [0, 0, 1, 1], "texture": "#1"},
				"west": {"uv": [0, 0, 1, 1], "texture": "#1"},
				"up": {"uv": [0, 0, 1, 1], "texture": "#1"},
				"down": {"uv": [0, 0, 1, 1], "texture": "#1"}
			}
		},
		{
			"from": [11, 4, 7],
			"to": [12, 5, 8],
			"faces": {
				"north": {"uv": [0, 0, 1, 1], "texture": "#1"},
				"east": {"uv": [0, 0, 1, 1], "texture": "#1"},
				"south": {"uv": [0, 0, 1, 1], "texture": "#1"},
				"west": {"uv": [0, 0, 1, 1], "texture": "#1"},
				"up": {"uv": [0, 0, 1, 1], "texture": "#1"},
				"down": {"uv": [0, 0, 1, 1], "texture": "#1"}
			}
		}
	],
	"display": {
		"thirdperson_righthand": {
			"scale": [0.5, 0.5, 0.5],
			"rotation": [0, 180, -30],
			"translation": [0, 0, 0]
		},
		"thirdperson_lefthand": {
			"scale": [0.5, 0.5, 0.5],
			"rotation": [0, 180, -30]
		},
		"firstperson_righthand": {
			"scale": [0.5, 0.5, 0.5],
			"rotation": [0, 180, 0]
		},
		"firstperson_lefthand": {
			"scale": [0.5, 0.5, 0.5],
			"rotation": [0, 180, 0]
		},
		"ground": {
			"scale": [0.5, 0.5, 0.5]
		},
		"fixed": {
			"translation": [0, -1, -1]
		},
		"gui": {
			"scale": [0.7, 0.7, 0.7],
			"rotation": [0, 180, 0],
			"translation": [0, -1, 0]
		}
	}
}

All my textures are in assets/cruelars_triforcemod/textures/blocks

Expand  

Please post the full log including the model bakery errors

About Me

  Reveal hidden contents

Versions below 1.14.4 are no longer supported on this forum. Use the latest version to receive support.

When asking support remember to include all relevant log files (logs are found in .minecraft/logs/), code if applicable and screenshots if possible.

Only download mods from trusted sites like CurseForge (minecraft.curseforge.com). A list of bad sites can be found here, with more information available at stopmodreposts.org

Edit your own signature at www.minecraftforge.net/forum/settings/signature/ (Make sure to check its compatibility with the Dark Theme)

Posted

Full log starting with Attempting connection

  Reveal hidden contents

What I read out of it is missing variants for Up and down. Logical looking at the Model.

mirror_of_time_model.jpg.d81c7ca66c2d47a3b7e9649b4712e43b.jpg

My Projects:

Cruelars Triforcemod (1.12 release; 1.14 alpha soon coming)

 

Important:

As my mod is on at least 10 different third party sites without my permission, I want to warn you about that with a link to StopModReposts

Posted

Just a guess, but I think you would need a separate JSON and PNG for the texture itself.

Forge 1.8.9 and below are not supported in the forums anymore. Please upgrade to a later version.

 

My experimental mod: new GitHub page to be created... (Add your favorite TCGs in MC! [WIP])

 

When asking for assistance with modding or making mods, paste the log (located in .minecraft/logs folder for mod users or in the console for mod makers).

Posted (edited)

would the textures work if you did this (in your case):

{
	"credit": "Made with Blockbench",
	"textures": {
		"0": "cruelars_triforcemod:blocks/mirror_front",
		"1": "cruelars_triforcemod:blocks/mirror_gold",
		"2": "cruelars_triforcemod:blocks/mirror_gold_striped", //get rid of these and replace the numbers in the elements selector with the locations of the textures
		"3": "cruelars_triforcemod:blocks/mirror_dark",
		"4": "cruelars_triforcemod:blocks/mirror_back",
		"5": "cruelars_triforcemod:blocks/mirror_dark_striped"
	},
	"elements": [
		{
			"from": [6, 0, 6],
			"to": [10, 4, 10],
			"rotation": {"angle": 0, "axis": "y", "origin": [8, 2, 8]},
			"faces": {
				"north": {"uv": [0, 0, 16, 16], "texture": "#2"},
				"east": {"uv": [0, 0, 16, 16], "texture": "#2"},
				"south": {"uv": [0, 0, 16, 16], "texture": "#2"},
				"west": {"uv": [0, 0, 16, 16], "texture": "#2"},
				"up": {"uv": [0, 0, 4, 4], "texture": "#1"},
				"down": {"uv": [0, 0, 4, 4], "texture": "#1"}
			}
		},
		...
}

or try switching the items in the "textures" selector so it's sort of like:

"[texture location]": "#1"

 

Edited by Animus_Surge

Forge 1.8.9 and below are not supported in the forums anymore. Please upgrade to a later version.

 

My experimental mod: new GitHub page to be created... (Add your favorite TCGs in MC! [WIP])

 

When asking for assistance with modding or making mods, paste the log (located in .minecraft/logs folder for mod users or in the console for mod makers).

Posted

I'm not sure why this should fix it as the Problem isn't him not finding any texture but not finding the six specified textures of the Model.

I'll try to use the texture on a block let's see if the Error occurs there. This might tell us where the Problem is.

My Projects:

Cruelars Triforcemod (1.12 release; 1.14 alpha soon coming)

 

Important:

As my mod is on at least 10 different third party sites without my permission, I want to warn you about that with a link to StopModReposts

Posted
  On 8/9/2018 at 7:50 PM, _Cruelar_ said:

I'm not sure why this should fix it as the Problem isn't him not finding any texture but not finding the six specified textures of the Model.

I'll try to use the texture on a block let's see if the Error occurs there. This might tell us where the Problem is.

Expand  

Post your blockstate json and your updated block code.

VANILLA MINECRAFT CLASSES ARE THE BEST RESOURCES WHEN MODDING

I will be posting 1.15.2 modding tutorials on this channel. If you want to be notified of it do the normal YouTube stuff like subscribing, ect.

Forge and vanilla BlockState generator.

Posted
  On 8/9/2018 at 7:50 PM, _Cruelar_ said:

I'll try to use the texture on a block let's see if the Error occurs there.

Expand  

Let's say rocks are pink now ?

  On 8/9/2018 at 7:57 PM, Animefan8888 said:

Post your blockstate json and your updated block code.

Expand  

Block

package com.cruelar.cruelars_triforcemod.blocks;

import com.cruelar.cruelars_triforcemod.Cruelars_Triforcemod_Core;
import com.cruelar.cruelars_triforcemod.tileentity.MirrorOfTwilight_TileEntity;
import net.minecraft.block.Block;
import net.minecraft.block.BlockContainer;
import net.minecraft.block.BlockHorizontal;
import net.minecraft.block.material.Material;
import net.minecraft.block.properties.PropertyDirection;
import net.minecraft.block.state.BlockFaceShape;
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.EnumFacing;
import net.minecraft.util.math.AxisAlignedBB;
import net.minecraft.util.math.BlockPos;
import net.minecraft.world.IBlockAccess;
import net.minecraft.world.World;
import net.minecraftforge.client.model.ModelLoader;
import net.minecraftforge.fml.relauncher.Side;
import net.minecraftforge.fml.relauncher.SideOnly;

import javax.annotation.Nullable;

public class BlockMirrorOfTwilight /*extends BlockContainer*/extends Block {
    public static final PropertyDirection FACING = PropertyDirection.create("facing");

    public BlockMirrorOfTwilight(){
        super(Material.ROCK);
        this.setRegistryName("block_mirror_of_twilight");
        this.setUnlocalizedName(Cruelars_Triforcemod_Core.MODID+".block_mirror_of_twilight");
    }

    @Nullable
    @SuppressWarnings("deprecation")
    @Override
    public AxisAlignedBB getCollisionBoundingBox(IBlockState blockState, IBlockAccess worldIn, BlockPos pos) {
        return new AxisAlignedBB(0,0,0,1,2,1);
    }

    @Override
    protected BlockStateContainer createBlockState() {
        return new BlockStateContainer(this, FACING);
    }

    @SideOnly(Side.CLIENT)
    public void initModel(){
        ModelLoader.setCustomModelResourceLocation(Item.getItemFromBlock(this), 0, new ModelResourceLocation(getRegistryName(), "inventory"));
    }

    @Override
    @SuppressWarnings("deprecation")
    public boolean isBlockNormalCube(IBlockState blockState){
        return false;
    }

    @Override
    @SuppressWarnings("deprecation")
    public boolean isOpaqueCube(IBlockState blockState){
        return false;
    }

    @Override
    @SuppressWarnings("deprecation")
    public boolean isFullBlock(IBlockState state) {
        return false;
    }

    @Override
    @SuppressWarnings("deprecation")
    public boolean isTopSolid(IBlockState state)
    {
        return false;
    }


    @Override
    @SuppressWarnings("deprecation")
    public IBlockState getStateFromMeta(int meta) {
        return getDefaultState()
                .withProperty(FACING, EnumFacing.getFront(meta & 5));

    }

    @Override
    public int getMetaFromState(IBlockState blockState) {
        return blockState.getValue(FACING).getIndex();
    }

    public static EnumFacing getFacingFromEntity(BlockPos clickedBlock, EntityLivingBase entity) {
        return EnumFacing.getFacingFromVector(
                (float) (entity.posX - clickedBlock.getX()),
                (float) 0,
                (float) (entity.posZ - clickedBlock.getZ()));
    }

    @Override
    public void onBlockPlacedBy(World world, BlockPos pos, IBlockState state, EntityLivingBase placer, ItemStack stack) {
        world.setBlockState(pos, state.withProperty(FACING, placer.getHorizontalFacing().getOpposite()), 2);
    }

    @Override
    @SuppressWarnings("deprecation")
    public BlockFaceShape getBlockFaceShape(IBlockAccess worldIn, IBlockState state, BlockPos pos, EnumFacing face) {
        return BlockFaceShape.UNDEFINED;
    }
}

blockstate.json

{
  "forge_marker": 1,
  "defaults": {
    "custom":{},
    "model": "cruelars_triforcemod:block_mirror_of_twilight"
  },
  "variants": {
    "normal": [{}],
    "inventory": [{}],
    "facing": {
      "north": {},
      "south": {"y":180},
      "west": {"y":270},
      "east": {"y":90}
    }
  }
}

model.json

{
	"credit": "Made with Blockbench",
	"textures": {
		"0": "cruelars_triforcemod:blocks/mirror_front",
		"1": "cruelars_triforcemod:blocks/mirror_gold",
		"2": "cruelars_triforcemod:blocks/mirror_gold_striped",
		"3": "cruelars_triforcemod:blocks/mirror_dark",
		"4": "cruelars_triforcemod:blocks/mirror_back",
		"5": "cruelars_triforcemod:blocks/mirror_dark_striped"
	},
	"elements": [
		{
			"from": [6, 0, 6],
			"to": [10, 4, 10],
			"rotation": {"angle": 0, "axis": "y", "origin": [8, 2, 8]},
			"faces": {
				"north": {"uv": [0, 0, 16, 16], "texture": "#2"},
				"east": {"uv": [0, 0, 16, 16], "texture": "#2"},
				"south": {"uv": [0, 0, 16, 16], "texture": "#2"},
				"west": {"uv": [0, 0, 16, 16], "texture": "#2"},
				"up": {"uv": [0, 0, 4, 4], "texture": "#1"},
				"down": {"uv": [0, 0, 4, 4], "texture": "#1"}
			}
		},
		{
			"from": [7, 4, 7],
			"to": [9, 6, 9],
			"rotation": {"angle": 0, "axis": "y", "origin": [8, 5, 8]},
			"faces": {
				"north": {"uv": [0, 0, 16, 16], "texture": "#5"},
				"east": {"uv": [0, 0, 16, 16], "texture": "#5"},
				"south": {"uv": [0, 0, 16, 16], "texture": "#5"},
				"west": {"uv": [0, 0, 16, 16], "texture": "#5"}
			}
		},
		{
			"from": [6, 6, 6],
			"to": [10, 8, 10],
			"rotation": {"angle": 0, "axis": "y", "origin": [8, 7, 8]},
			"faces": {
				"north": {"uv": [0, 0, 16, 8], "texture": "#2"},
				"east": {"uv": [0, 0, 16, 8], "texture": "#2"},
				"south": {"uv": [0, 0, 16, 8], "texture": "#2"},
				"west": {"uv": [0, 0, 16, 8], "texture": "#2"},
				"up": {"uv": [0, 0, 4, 2], "texture": "#1"},
				"down": {"uv": [0, 0, 4, 2], "texture": "#1"}
			}
		},
		{
			"from": [0, 6, 7],
			"to": [16, 8, 9],
			"rotation": {"angle": 0, "axis": "y", "origin": [8, 7, 8]},
			"faces": {
				"north": {"uv": [0, 0, 16, 16], "texture": "#5"},
				"east": {"uv": [0, 0, 16, 16], "texture": "#5"},
				"south": {"uv": [0, 0, 16, 16], "texture": "#5"},
				"west": {"uv": [0, 0, 16, 16], "texture": "#5"},
				"up": {"uv": [0, 0, 1, 1], "texture": "#3"},
				"down": {"uv": [0, 0, 1, 1], "texture": "#3"}
			}
		},
		{
			"from": [0, 8, 7],
			"to": [2, 16, 9],
			"rotation": {"angle": 0, "axis": "y", "origin": [1, 12, 8]},
			"faces": {
				"north": {"uv": [0, 0, 16, 16], "texture": "#5", "rotation": 270},
				"east": {"uv": [0, 0, 1, 1], "texture": "#3"},
				"south": {"uv": [0, 0, 16, 16], "texture": "#5", "rotation": 90},
				"west": {"uv": [0, 0, 8, 2], "texture": "#5", "rotation": 90},
				"up": {"uv": [0, 0, 2, 2], "texture": "#3"}
			}
		},
		{
			"from": [14, 8, 7],
			"to": [16, 16, 9],
			"rotation": {"angle": 0, "axis": "y", "origin": [15, 12, 8]},
			"faces": {
				"north": {"uv": [0, 0, 16, 16], "texture": "#5", "rotation": 90},
				"east": {"uv": [0, 0, 8, 2], "texture": "#5", "rotation": 90},
				"south": {"uv": [0, 0, 16, 16], "texture": "#5", "rotation": 270},
				"west": {"uv": [0, 0, 2, 8], "texture": "#3"},
				"up": {"uv": [0, 0, 2, 2], "texture": "#3"}
			}
		},
		{
			"from": [2, 13, 7],
			"to": [3, 15, 9],
			"rotation": {"angle": 0, "axis": "y", "origin": [2.5, 14, 8]},
			"faces": {
				"north": {"uv": [0, 0, 16, 16], "texture": "#5"},
				"east": {"uv": [0, 0, 1, 2], "texture": "#3"},
				"south": {"uv": [0, 0, 1, 2], "texture": "#3"},
				"up": {"uv": [0, 0, 1, 2], "texture": "#3"},
				"down": {"uv": [0, 0, 1, 2], "texture": "#3"}
			}
		},
		{
			"from": [13, 13, 7],
			"to": [14, 15, 9],
			"rotation": {"angle": 0, "axis": "y", "origin": [13.5, 14, 8]},
			"faces": {
				"north": {"uv": [0, 0, 16, 16], "texture": "#5"},
				"south": {"uv": [0, 0, 16, 16], "texture": "#5"},
				"west": {"uv": [0, 0, 2, 2], "texture": "#3"},
				"up": {"uv": [0, 0, 1, 2], "texture": "#3"},
				"down": {"uv": [0, 0, 1, 2], "texture": "#3"}
			}
		},
		{
			"from": [3, 9, 7],
			"to": [13, 19, 9],
			"rotation": {"angle": 22.5, "axis": "x", "origin": [8, 14, 8]},
			"faces": {
				"north": {"uv": [0, 0, 16, 16], "texture": "#0"},
				"east": {"uv": [0, 0, 2, 10], "texture": "#3"},
				"south": {"uv": [0, 0, 16, 16], "texture": "#4"},
				"west": {"uv": [0, 0, 2, 10], "texture": "#3"},
				"up": {"uv": [0, 0, 2, 10], "texture": "#3"},
				"down": {"uv": [0, 0, 2, 10], "texture": "#3"}
			}
		},
		{
			"from": [3, 0, 7],
			"to": [6, 1, 8],
			"faces": {
				"north": {"uv": [0, 0, 3, 1], "texture": "#1"},
				"east": {"uv": [0, 0, 3, 1], "texture": "#1"},
				"south": {"uv": [0, 0, 3, 1], "texture": "#1"},
				"west": {"uv": [0, 0, 3, 1], "texture": "#1"},
				"up": {"uv": [0, 0, 3, 1], "texture": "#1"},
				"down": {"uv": [0, 0, 3, 1], "texture": "#1"}
			}
		},
		{
			"from": [10, 0, 7],
			"to": [13, 1, 8],
			"faces": {
				"north": {"uv": [0, 0, 3, 1], "texture": "#1"},
				"east": {"uv": [0, 0, 3, 1], "texture": "#1"},
				"south": {"uv": [0, 0, 3, 1], "texture": "#1"},
				"west": {"uv": [0, 0, 3, 1], "texture": "#1"},
				"up": {"uv": [0, 0, 3, 1], "texture": "#1"},
				"down": {"uv": [0, 0, 3, 1], "texture": "#1"}
			}
		},
		{
			"from": [3, 1, 7],
			"to": [4, 3, 8],
			"faces": {
				"north": {"uv": [0, 0, 1, 2], "texture": "#1"},
				"east": {"uv": [0, 0, 1, 2], "texture": "#1"},
				"south": {"uv": [0, 0, 1, 2], "texture": "#1"},
				"west": {"uv": [0, 0, 1, 2], "texture": "#1"},
				"up": {"uv": [0, 0, 1, 2], "texture": "#1"}
			}
		},
		{
			"from": [12, 1, 7],
			"to": [13, 3, 8],
			"faces": {
				"north": {"uv": [0, 0, 1, 2], "texture": "#1"},
				"east": {"uv": [0, 0, 1, 2], "texture": "#1"},
				"south": {"uv": [0, 0, 1, 2], "texture": "#1"},
				"west": {"uv": [0, 0, 1, 2], "texture": "#1"},
				"up": {"uv": [0, 0, 1, 2], "texture": "#1"}
			}
		},
		{
			"from": [4, 2, 7],
			"to": [6, 3, 8],
			"faces": {
				"north": {"uv": [0, 0, 2, 1], "texture": "#1"},
				"east": {"uv": [0, 0, 2, 1], "texture": "#1"},
				"south": {"uv": [0, 0, 2, 1], "texture": "#1"},
				"west": {"uv": [0, 0, 2, 1], "texture": "#1"},
				"up": {"uv": [0, 0, 2, 1], "texture": "#1"},
				"down": {"uv": [0, 0, 2, 1], "texture": "#1"}
			}
		},
		{
			"from": [10, 2, 7],
			"to": [12, 3, 8],
			"faces": {
				"north": {"uv": [0, 0, 2, 1], "texture": "#1"},
				"east": {"uv": [0, 0, 2, 1], "texture": "#1"},
				"south": {"uv": [0, 0, 2, 1], "texture": "#1"},
				"west": {"uv": [0, 0, 2, 1], "texture": "#1"},
				"up": {"uv": [0, 0, 2, 1], "texture": "#1"},
				"down": {"uv": [0, 0, 2, 1], "texture": "#1"}
			}
		},
		{
			"from": [5, 3, 7],
			"to": [6, 5, 8],
			"faces": {
				"north": {"uv": [0, 0, 1, 2], "texture": "#1"},
				"east": {"uv": [0, 0, 1, 2], "texture": "#1"},
				"south": {"uv": [0, 0, 1, 2], "texture": "#1"},
				"west": {"uv": [0, 0, 1, 2], "texture": "#1"},
				"up": {"uv": [0, 0, 1, 2], "texture": "#1"}
			}
		},
		{
			"from": [10, 3, 7],
			"to": [11, 5, 8],
			"faces": {
				"north": {"uv": [0, 0, 1, 2], "texture": "#1"},
				"east": {"uv": [0, 0, 1, 2], "texture": "#1"},
				"south": {"uv": [0, 0, 1, 2], "texture": "#1"},
				"west": {"uv": [0, 0, 1, 2], "texture": "#1"},
				"up": {"uv": [0, 0, 1, 2], "texture": "#1"}
			}
		},
		{
			"from": [4, 4, 7],
			"to": [5, 5, 8],
			"faces": {
				"north": {"uv": [0, 0, 1, 1], "texture": "#1"},
				"east": {"uv": [0, 0, 1, 1], "texture": "#1"},
				"south": {"uv": [0, 0, 1, 1], "texture": "#1"},
				"west": {"uv": [0, 0, 1, 1], "texture": "#1"},
				"up": {"uv": [0, 0, 1, 1], "texture": "#1"},
				"down": {"uv": [0, 0, 1, 1], "texture": "#1"}
			}
		},
		{
			"from": [11, 4, 7],
			"to": [12, 5, 8],
			"faces": {
				"north": {"uv": [0, 0, 1, 1], "texture": "#1"},
				"east": {"uv": [0, 0, 1, 1], "texture": "#1"},
				"south": {"uv": [0, 0, 1, 1], "texture": "#1"},
				"west": {"uv": [0, 0, 1, 1], "texture": "#1"},
				"up": {"uv": [0, 0, 1, 1], "texture": "#1"},
				"down": {"uv": [0, 0, 1, 1], "texture": "#1"}
			}
		}
	],
	"display": {
		"thirdperson_righthand": {
			"scale": [0.5, 0.5, 0.5],
			"rotation": [0, 180, -30],
			"translation": [0, 0, 0]
		},
		"thirdperson_lefthand": {
			"scale": [0.5, 0.5, 0.5],
			"rotation": [0, 180, -30]
		},
		"firstperson_righthand": {
			"scale": [0.5, 0.5, 0.5],
			"rotation": [0, 180, 0]
		},
		"firstperson_lefthand": {
			"scale": [0.5, 0.5, 0.5],
			"rotation": [0, 180, 0]
		},
		"ground": {
			"scale": [0.5, 0.5, 0.5]
		},
		"fixed": {
			"translation": [0, -1, -1]
		},
		"gui": {
			"scale": [0.7, 0.7, 0.7],
			"rotation": [0, 180, 0],
			"translation": [0, -1, 0]
		}
	}
}

 

My Projects:

Cruelars Triforcemod (1.12 release; 1.14 alpha soon coming)

 

Important:

As my mod is on at least 10 different third party sites without my permission, I want to warn you about that with a link to StopModReposts

Posted
  On 8/9/2018 at 8:03 PM, _Cruelar_ said:

public static final PropertyDirection FACING = PropertyDirection.create("facing");

Expand  

This also has a UP and DOWN variant. Also post a picture of your file paths for your textures.

VANILLA MINECRAFT CLASSES ARE THE BEST RESOURCES WHEN MODDING

I will be posting 1.15.2 modding tutorials on this channel. If you want to be notified of it do the normal YouTube stuff like subscribing, ect.

Forge and vanilla BlockState generator.

Posted
  On 8/9/2018 at 8:29 PM, Animefan8888 said:

This also has a UP and DOWN variant.

Expand  

Tried with BlockHorizontal.Facing got an error from that when Placed.

  On 8/9/2018 at 8:29 PM, Animefan8888 said:

 Also post a picture of your file paths for your textures.

Expand  

1367054417_ScreenshotRecources1.PNG.21fdbeaa478f90ad0eb1386b62be70b4.PNG1973652825_ScreenshotRecources2.PNG.a7ece29282c5968ab9f4b068fd8d26e9.PNG

My Projects:

Cruelars Triforcemod (1.12 release; 1.14 alpha soon coming)

 

Important:

As my mod is on at least 10 different third party sites without my permission, I want to warn you about that with a link to StopModReposts

Posted
  On 8/9/2018 at 8:36 PM, _Cruelar_ said:

Tried with BlockHorizontal.Facing got an error from that when Placed.

Expand  

Post the error instead of adding extra unused variants.

VANILLA MINECRAFT CLASSES ARE THE BEST RESOURCES WHEN MODDING

I will be posting 1.15.2 modding tutorials on this channel. If you want to be notified of it do the normal YouTube stuff like subscribing, ect.

Forge and vanilla BlockState generator.

Posted
  On 8/9/2018 at 8:39 PM, Animefan8888 said:

Post the error

Expand  
  Reveal hidden contents

 

My Projects:

Cruelars Triforcemod (1.12 release; 1.14 alpha soon coming)

 

Important:

As my mod is on at least 10 different third party sites without my permission, I want to warn you about that with a link to StopModReposts

Posted
@Override
@SuppressWarnings("deprecation")
public IBlockState getStateFromMeta(int meta) {
    return getDefaultState()
            .withProperty(BlockHorizontal.FACING, EnumFacing.getFront(meta & 5));

}

@Override
public int getMetaFromState(IBlockState blockState) {
    return blockState.getValue(BlockHorizontal.FACING).getIndex();
}

More like this? Because this causes the game to crash after Pre Init.

  Reveal hidden contents

 

My Projects:

Cruelars Triforcemod (1.12 release; 1.14 alpha soon coming)

 

Important:

As my mod is on at least 10 different third party sites without my permission, I want to warn you about that with a link to StopModReposts

Posted

what does the current code look like for the JSON file(s) and the main class?

Forge 1.8.9 and below are not supported in the forums anymore. Please upgrade to a later version.

 

My experimental mod: new GitHub page to be created... (Add your favorite TCGs in MC! [WIP])

 

When asking for assistance with modding or making mods, paste the log (located in .minecraft/logs folder for mod users or in the console for mod makers).

Posted
  On 8/9/2018 at 9:02 PM, _Cruelar_ said:

Thanks. Back to the Main Problem. it's still the missing texture texture

Expand  

Post the newest log, and remove everything else that is also causing a texture/model error.

VANILLA MINECRAFT CLASSES ARE THE BEST RESOURCES WHEN MODDING

I will be posting 1.15.2 modding tutorials on this channel. If you want to be notified of it do the normal YouTube stuff like subscribing, ect.

Forge and vanilla BlockState generator.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Announcements



  • Recently Browsing

    • No registered users viewing this page.
  • Posts

    • My name is Richie Leo, and I’m sharing this message with a heart full of gratitude and hope. Several months ago, I was a victim of a devastating online scam that cost me a staggering $873,463. I was devastated, confused, and had nearly given up on ever recovering my money — until I came across Wizard George Cyber Service. Through their exceptional cyber recovery expertise and deep investigative skills, Wizard George and his team were able to trace, track, and recover the full amount that was stolen from me. Their professionalism, speed, and transparency truly amazed me. If you’re reading this and you’ve been scammed — whether it’s crypto, investment fraud, or any kind of online theft — don’t give up. I strongly recommend reaching out to Wizard George Cyber Service. 📧 Em: wizardgeorgecyberservice(AT) g m a l L. C o M
    • Alright, here is the log file https://mclo.gs/5eCwafV
    • Please read the FAQ (https://forums.minecraftforge.net/topic/125488-rules-and-frequently-asked-questions-faq/) and post log files as described there, using a site such as https://mclo.gs/ and post the link here.  
    • I tried updating the mods in my modpack which caused incompatibilities so i have tried to revert them back to their older versions i was using before. In the logs it doesnt show me any clear incompatibilities except for tfmg & entity texture features, but when i try to remove those it still doesn't work. I have tried removing the forge-client.toml file which was a suggestion i found on  a few other posts. This is the log file i get. [inline log removed] Any help would be appreciated. Thanks in advance
    • I don't use KubeJS, never even heard of it. But after doing what "Ugdhar" suggested earlier in this post with the "config/Mekanism/generator-storage.toml", I tried going into an individual save's serverconfig folder, and just deleting everything except the parcool folder (I have that mod installed.) Then, a bit of loading and temporary freezing later, seems to have worked. Even when quitting to menu and loading back in, or also when quitting to menu, exiting to desktop, and re-launching MC, choose a save and loading it.
  • Topics

  • Who's Online (See full list)

×
×
  • Create New...

Important Information

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