Custom model not working

Started by StyBuilder on Sun, 10/13/2019 - 04:50

Topic category: Help with MCreator modding

Last seen on 22:46, 1. Nov 2019
Joined Jul 2017
User points:

Statistics:

  • Comments:
  • Forum topics:
  • Modifications:
  • Wiki pages:
Custom model not working
Sun, 10/13/2019 - 04:50

I made a new portal model and i made sure i used the java/json model type but it turns purple and black when i create the block... I tried to use and obj but it decided to be masive and the textures didnt work...

just a portalIf you have any way of fixing this that would be great...

Also a follow up question: How would I get if a player is falling because im trying to make him not take fall damage but it seems the override fall distance doesnt work, because I dont know when the player is falling.

https://mcreator.net/wiki/my…
Sun, 10/13/2019 - 10:36

https://mcreator.net/wiki/my-json-model-renders-broken-texture

The solution to this problem and many other problems can be found in our knowledge base: https://mcreator.net/support/knowledgebase Please check the knowledge base before opening a new topic on the issue which has a known fix.

Last seen on 22:46, 1. Nov 2019
Joined Jul 2017
User points:

Statistics:

  • Comments:
  • Forum topics:
  • Modifications:
  • Wiki pages:
I did everything that the…
Sun, 10/13/2019 - 15:49

I did everything that the page said to do thigh and it still didn't work

You can paste the contents…
Sun, 10/13/2019 - 15:57

You can paste the contents of the console here when you see a block/item with a broken texture, but keep in mind I won't bother replying if the issue is one of the things listed on the page I linked.

Last seen on 22:46, 1. Nov 2019
Joined Jul 2017
User points:

Statistics:

  • Comments:
  • Forum topics:
  • Modifications:
  • Wiki pages:
I did everything the page…
Sun, 10/13/2019 - 16:11

I did everything the page said but it still didn't work properly

You can paste the contents…
Sun, 10/13/2019 - 16:16

You can paste the contents of the console here when you see a block/item with a broken texture

Last seen on 18:53, 13. Oct 2019
Joined Jun 2019
User points:

Statistics:

  • Comments:
  • Forum topics:
  • Modifications:
  • Wiki pages:
Off topic, but what program…
Sun, 10/13/2019 - 17:43

Off topic, but what program did you use for that model? (the sceenshot)

Last seen on 22:46, 1. Nov 2019
Joined Jul 2017
User points:

Statistics:

  • Comments:
  • Forum topics:
  • Modifications:
  • Wiki pages:
I used blockbench... Btw I…
Sun, 10/13/2019 - 18:08

I used blockbench... Btw I encourage people to use it heavily, its easy to use and its free.

 

Last seen on 22:46, 1. Nov 2019
Joined Jul 2017
User points:

Statistics:

  • Comments:
  • Forum topics:
  • Modifications:
  • Wiki pages:
I did everything again and…
Mon, 10/14/2019 - 15:37

I did everything again and still got the error:

   
Executing gradle command: runClient
Build info: MCreator 1.9.1, 64-bit, 8124 MB, Windows 10 - cmd, JVM 1.8.0_222, JAVA_HOME: C:\Program Files\Pylo\MCreator\jdk
C:\Users\StyBu\MCreatorWorkspaces\equanox>gradlew -Dorg.gradle.java.home="C:/Program Files/Pylo/MCreator/jdk" -Dorg.gradle.parallel=false -Dorg.gradle.jvmargs="-Xms625m -Xmx2048m" runClient 
This mapping 'snapshot_20171003' was designed for MC 1.12! Use at your own peril.
:deobfCompileDummyTask
:deobfProvidedDummyTask
....
06:14.36 [main/ERROR] [FML]: Exception loading model for variant equanox:minecraft:activatedflarestone#inventory for item "equanox:activatedflarestone", normal location exception: 
net.minecraftforge.client.model.ModelLoaderRegistry$LoaderException: Exception loading model equanox:item/minecraft:activatedflarestone with loader VanillaLoader.INSTANCE, skipping
   at net.minecraftforge.client.model.ModelLoaderRegistry.getModel(ModelLoaderRegistry.java:161
) ~[ModelLoaderRegistry.class:?]
   at net.minecraftforge.client.model.ModelLoader.loadItemModels(ModelLoader.java:302
) ~[ModelLoader.class:?]
   at net.minecraft.client.renderer.block.model.ModelBakery.loadVariantItemModels(ModelBakery.java:175
) ~[ModelBakery.class:?]
   at net.minecraftforge.client.model.ModelLoader.setupModelRegistry(ModelLoader.java:151
) ~[ModelLoader.class:?]
   at net.minecraft.client.renderer.block.model.ModelManager.onResourceManagerReload(ModelManager.java:28
) [ModelManager.class:?]
   at net.minecraft.client.resources.SimpleReloadableResourceManager.registerReloadListener(SimpleReloadableResourceManager.java:121
) [SimpleReloadableResourceManager.class:?]
   at net.minecraft.client.Minecraft.init(Minecraft.java:559
) [Minecraft.class:?]
   at net.minecraft.client.Minecraft.run(Minecraft.java:421
) [Minecraft.class:?]
   at net.minecraft.client.main.Main.main(Main.java:118
) [Main.class:?]
   at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_222]
   at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62
) ~[?:1.8.0_222]
   at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43
) ~[?:1.8.0_222]
   at java.lang.reflect.Method.invoke(Method.java:498
) ~[?:1.8.0_222]
   at net.minecraft.launchwrapper.Launch.launch(Launch.java:135
) [launchwrapper-1.12.jar:?]
   at net.minecraft.launchwrapper.Launch.main(Launch.java:28
) [launchwrapper-1.12.jar:?]
   at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_222]
   at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62
) ~[?:1.8.0_222]
   at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43
) ~[?:1.8.0_222]
   at java.lang.reflect.Method.invoke(Method.java:498
) ~[?:1.8.0_222]
   at net.minecraftforge.gradle.GradleStartCommon.launch(GradleStartCommon.java:97
) [start/:?]
   at GradleStart.main(<a href="file:GradleStart.main(GradleStart.java:25) [start/:?]
.GradleStart:25" style="background-color: rgb(30, 30, 30)">GradleStart.java:25
) [start/:?]
Caused by: java.io.FileNotFoundException: equanox:models/item/minecraft:activatedflarestone.json
   at net.minecraft.client.resources.FallbackResourceManager.getResource(FallbackResourceManager.java:69
) ~[FallbackResourceManager.class:?]
   at net.minecraft.client.resources.SimpleReloadableResourceManager.getResource(SimpleReloadableResourceManager.java:65
) ~[SimpleReloadableResourceManager.class:?]
   at net.minecraft.client.renderer.block.model.ModelBakery.loadModel(ModelBakery.java:334
) ~[ModelBakery.class:?]
   at net.minecraftforge.client.model.ModelLoader.access$1400(ModelLoader.java:115
) ~[ModelLoader.class:?]
   at net.minecraftforge.client.model.ModelLoader$VanillaLoader.loadModel(ModelLoader.java:861
) ~[ModelLoader$VanillaLoader.class:?]
   at net.minecraftforge.client.model.ModelLoaderRegistry.getModel(ModelLoaderRegistry.java:157
) ~[ModelLoaderRegistry.class:?]
   ... 20 more
06:14.36 [main/ERROR] [FML]: Exception loading model for variant equanox:minecraft:activatedflarestone#inventory for item "equanox:activatedflarestone", blockstate location exception: 
net.minecraftforge.client.model.ModelLoaderRegistry$LoaderException: Exception loading model equanox:minecraft:activatedflarestone#inventory with loader VariantLoader.INSTANCE, skipping
   at net.minecraftforge.client.model.ModelLoaderRegistry.getModel(ModelLoaderRegistry.java:161
) ~[ModelLoaderRegistry.class:?]
   at net.minecraftforge.client.model.ModelLoader.loadItemModels(ModelLoader.java:296
) ~[ModelLoader.class:?]
   at net.minecraft.client.renderer.block.model.ModelBakery.loadVariantItemModels(ModelBakery.java:175
) ~[ModelBakery.class:?]
   at net.minecraftforge.client.model.ModelLoader.setupModelRegistry(ModelLoader.java:151
) ~[ModelLoader.class:?]
   at net.minecraft.client.renderer.block.model.ModelManager.onResourceManagerReload(ModelManager.java:28
) [ModelManager.class:?]
   at net.minecraft.client.resources.SimpleReloadableResourceManager.registerReloadListener(SimpleReloadableResourceManager.java:121
) [SimpleReloadableResourceManager.class:?]
   at net.minecraft.client.Minecraft.init(Minecraft.java:559
) [Minecraft.class:?]
   at net.minecraft.client.Minecraft.run(Minecraft.java:421
) [Minecraft.class:?]
   at net.minecraft.client.main.Main.main(Main.java:118
) [Main.class:?]
   at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_222]
   at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62
) ~[?:1.8.0_222]
   at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43
) ~[?:1.8.0_222]
   at java.lang.reflect.Method.invoke(Method.java:498
) ~[?:1.8.0_222]
   at net.minecraft.launchwrapper.Launch.launch(Launch.java:135
) [launchwrapper-1.12.jar:?]
   at net.minecraft.launchwrapper.Launch.main(Launch.java:28
) [launchwrapper-1.12.jar:?]
   at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_222]
   at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62
) ~[?:1.8.0_222]
   at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43
) ~[?:1.8.0_222]
   at java.lang.reflect.Method.invoke(Method.java:498
) ~[?:1.8.0_222]
   at net.minecraftforge.gradle.GradleStartCommon.launch(GradleStartCommon.java:97
) [start/:?]
   at GradleStart.main(<a href="file:GradleStart.main(GradleStart.java:25) [start/:?]
.GradleStart:25" style="background-color: rgb(30, 30, 30)">GradleStart.java:25
) [start/:?]
Caused by: net.minecraft.client.renderer.block.model.ModelBlockDefinition$MissingVariantException
   at net.minecraft.client.renderer.block.model.ModelBlockDefinition.getVariant(ModelBlockDefinition.java:83
) ~[ModelBlockDefinition.class:?]
   at net.minecraftforge.client.model.ModelLoader$VariantLoader.loadModel(ModelLoader.java:1175
) ~[ModelLoader$VariantLoader.class:?]
   at net.minecraftforge.client.model.ModelLoaderRegistry.getModel(ModelLoaderRegistry.java:157
) ~[ModelLoaderRegistry.class:?]
   ... 20 more
06:14.36 [main/ERROR] [FML]: Exception loading model for variant equanox:activatedflarestone#normal for blockstate "equanox:activatedflarestone"
net.minecraftforge.client.model.ModelLoaderRegistry$LoaderException: Exception loading model equanox:activatedflarestone#normal with loader VariantLoader.INSTANCE, skipping
   at net.minecraftforge.client.model.ModelLoaderRegistry.getModel(ModelLoaderRegistry.java:161
) ~[ModelLoaderRegistry.class:?]
   at net.minecraftforge.client.model.ModelLoader.registerVariant(ModelLoader.java:235
) ~[ModelLoader.class:?]
   at net.minecraft.client.renderer.block.model.ModelBakery.loadBlock(ModelBakery.java:153
) ~[ModelBakery.class:?]
   at net.minecraftforge.client.model.ModelLoader.loadBlocks(ModelLoader.java:223
) ~[ModelLoader.class:?]
   at net.minecraftforge.client.model.ModelLoader.setupModelRegistry(ModelLoader.java:150
) ~[ModelLoader.class:?]
   at net.minecraft.client.renderer.block.model.ModelManager.onResourceManagerReload(ModelManager.java:28
) [ModelManager.class:?]
   at net.minecraft.client.resources.SimpleReloadableResourceManager.registerReloadListener(SimpleReloadableResourceManager.java:121
) [SimpleReloadableResourceManager.class:?]
   at net.minecraft.client.Minecraft.init(Minecraft.java:559
) [Minecraft.class:?]
   at net.minecraft.client.Minecraft.run(Minecraft.java:421
) [Minecraft.class:?]
   at net.minecraft.client.main.Main.main(Main.java:118
) [Main.class:?]
   at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_222]
   at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62
) ~[?:1.8.0_222]
   at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43
) ~[?:1.8.0_222]
   at java.lang.reflect.Method.invoke(Method.java:498
) ~[?:1.8.0_222]
   at net.minecraft.launchwrapper.Launch.launch(Launch.java:135
) [launchwrapper-1.12.jar:?]
   at net.minecraft.launchwrapper.Launch.main(Launch.java:28
) [launchwrapper-1.12.jar:?]
   at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_222]
   at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62
) ~[?:1.8.0_222]
   at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43
) ~[?:1.8.0_222]
   at java.lang.reflect.Method.invoke(Method.java:498
) ~[?:1.8.0_222]
   at net.minecraftforge.gradle.GradleStartCommon.launch(GradleStartCommon.java:97
) [start/:?]
   at GradleStart.main(<a href="file:GradleStart.main(GradleStart.java:25) [start/:?]
.GradleStart:25" style="background-color: rgb(30, 30, 30)">GradleStart.java:25
) [start/:?]
Caused by: net.minecraftforge.client.model.ModelLoaderRegistry$LoaderException: Exception loading model equanox:block/minecraft:activatedflarestone with loader VanillaLoader.INSTANCE, skipping
   at net.minecraftforge.client.model.ModelLoaderRegistry.getModel(ModelLoaderRegistry.java:161
) ~[ModelLoaderRegistry.class:?]
   at net.minecraftforge.client.model.ModelLoader$WeightedRandomModel.<init>(ModelLoader.java:658
) ~[ModelLoader$WeightedRandomModel.class:?]
   at net.minecraftforge.client.model.ModelLoader$VariantLoader.loadModel(ModelLoader.java:1176
) ~[ModelLoader$VariantLoader.class:?]
   at net.minecraftforge.client.model.ModelLoaderRegistry.getModel(ModelLoaderRegistry.java:157
) ~[ModelLoaderRegistry.class:?]
   ... 21 more
Caused by: java.io.FileNotFoundException: equanox:models/block/minecraft:activatedflarestone.json
   at net.minecraft.client.resources.FallbackResourceManager.getResource(FallbackResourceManager.java:69
) ~[FallbackResourceManager.class:?]
   at net.minecraft.client.resources.SimpleReloadableResourceManager.getResource(SimpleReloadableResourceManager.java:65
) ~[SimpleReloadableResourceManager.class:?]
   at net.minecraft.client.renderer.block.model.ModelBakery.loadModel(ModelBakery.java:334
) ~[ModelBakery.class:?]
   at net.minecraftforge.client.model.ModelLoader.access$1400(ModelLoader.java:115
) ~[ModelLoader.class:?]
   at net.minecraftforge.client.model.ModelLoader$VanillaLoader.loadModel(ModelLoader.java:861
) ~[ModelLoader$VanillaLoader.class:?]
   at net.minecraftforge.client.model.ModelLoaderRegistry.getModel(ModelLoaderRegistry.java:157
) ~[ModelLoaderRegistry.class:?]
   at net.minecraftforge.client.model.ModelLoader$WeightedRandomModel.<init>(ModelLoader.java:658
) ~[ModelLoader$WeightedRandomModel.class:?]
   at net.minecraftforge.client.model.ModelLoader$VariantLoader.loadModel(ModelLoader.java:1176
) ~[ModelLoader$VariantLoader.class:?]
   at net.minecraftforge.client.model.ModelLoaderRegistry.getModel(ModelLoaderRegistry.java:157
) ~[ModelLoaderRegistry.class:?]
   ... 21 more

 

Could you upload JSON model…
Mon, 10/14/2019 - 15:36

Could you upload JSON model source to pastebin and paste it here?

Last seen on 22:46, 1. Nov 2019
Joined Jul 2017
User points:

Statistics:

  • Comments:
  • Forum topics:
  • Modifications:
  • Wiki pages:
Are you talking about the…
Mon, 10/14/2019 - 23:35

Are you talking about the mcreator code that I've been trying to edit? Or are you asking for something else?

Here is the java:

package net.mcreator.equanox;

import net.minecraftforge.fml.relauncher.SideOnly;
import net.minecraftforge.fml.relauncher.Side;
import net.minecraftforge.fml.common.registry.GameRegistry;
import net.minecraftforge.client.model.ModelLoader;
import net.minecraftforge.client.event.ModelRegistryEvent;

import net.minecraft.world.World;
import net.minecraft.util.math.BlockPos;
import net.minecraft.util.EnumParticleTypes;
import net.minecraft.util.EnumHand;
import net.minecraft.util.EnumFacing;
import net.minecraft.item.ItemBlock;
import net.minecraft.item.Item;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.creativetab.CreativeTabs;
import net.minecraft.client.renderer.block.model.ModelResourceLocation;
import net.minecraft.client.Minecraft;
import net.minecraft.block.state.IBlockState;
import net.minecraft.block.material.Material;
import net.minecraft.block.SoundType;
import net.minecraft.block.Block;

import java.util.Random;
import java.util.HashMap;

@Elementsequanox.ModElement.Tag
public class MCreatorActivatedFlareStone extends Elementsequanox.ModElement {
	@GameRegistry.ObjectHolder("equanox:activatedflarestone")
	public static final Block block = null;

	public MCreatorActivatedFlareStone(Elementsequanox instance) {
		super(instance, 38);
	}

	@Override
	public void initElements() {
		elements.blocks.add(() -> new BlockCustom());
		elements.items.add(() -> new ItemBlock(block).setRegistryName(block.getRegistryName()));
	}

	@SideOnly(Side.CLIENT)
	@Override
	public void registerModels(ModelRegistryEvent event) {
		ModelLoader.setCustomModelResourceLocation(Item.getItemFromBlock(block), 0, new ModelResourceLocation("equanox:minecraft:activatedflarestone",
				"inventory"));
	}

	public static class BlockCustom extends Block {
		public BlockCustom() {
			super(Material.ANVIL);
			setRegistryName("activatedflarestone");
			setUnlocalizedName("activatedflarestone");
			setSoundType(SoundType.ANVIL);
			setHardness(14F);
			setResistance(40F);
			setLightLevel(1F);
			setLightOpacity(0);
			setCreativeTab(CreativeTabs.BUILDING_BLOCKS);
		}

		@Override
		public boolean isOpaqueCube(IBlockState state) {
			return false;
		}

		@SideOnly(Side.CLIENT)
		@Override
		public void randomDisplayTick(IBlockState state, World world, BlockPos pos, Random random) {
			super.randomDisplayTick(state, world, pos, random);
			EntityPlayer entity = Minecraft.getMinecraft().player;
			int x = pos.getX();
			int y = pos.getY();
			int z = pos.getZ();
			Block block = this;
			int i = x;
			int j = y;
			int k = z;
			if (true)
				for (int l = 0; l < 4; ++l) {
					double d0 = (i + random.nextFloat());
					double d1 = (j + random.nextFloat());
					double d2 = (k + random.nextFloat());
					int i1 = random.nextInt(2) * 2 - 1;
					double d3 = (random.nextFloat() - 0.5D) * 0.5D;
					double d4 = (random.nextFloat() - 0.5D) * 0.5D;
					double d5 = (random.nextFloat() - 0.5D) * 0.5D;
					world.spawnParticle(EnumParticleTypes.END_ROD, d0, d1, d2, d3, d4, d5);
				}
		}

		@Override
		public boolean onBlockActivated(World world, BlockPos pos, IBlockState state, EntityPlayer entity, EnumHand hand, EnumFacing side,
				float hitX, float hitY, float hitZ) {
			super.onBlockActivated(world, pos, state, entity, hand, side, hitX, hitY, hitZ);
			int x = pos.getX();
			int y = pos.getY();
			int z = pos.getZ();
			Block block = this;
			{
				java.util.HashMap<String, Object> $_dependencies = new java.util.HashMap<>();
				$_dependencies.put("entity", entity);
				MCreatorActivatedFlareStoneOnBlockRightClicked.executeProcedure($_dependencies);
			}
			return true;
		}
	}
}

And here are the 3 json codes for the model:

{
  "parent": "equanox:minecraft:block/activatedflarestone",
  "display": {
    "thirdperson": {
      "rotation": [
        10,
        -45,
        170
      ],
      "translation": [
        0,
        1.5,
        -2.75
      ],
      "scale": [
        0.375,
        0.375,
        0.375
      ]
    }
  }
}

 

{
  "variants": {
    "normal": {
      "model": "equanox:minecraft:activatedflarestone"
    }
  }
}

 

{
  "parent": "equanox:minecraft:custom/crystalflareportalfixed",
  "textures": {
    "all": "equanox:minecraft:blocks/portal",
    "particle": "equanox:minecraft:blocks/portal",
    "1": "equanox:minecraft:blocks/portal",
    "missing": "equanox:minecraft:blocks/"
  }
}

I hope this is what you needed