Jump to content

MC 1.12.2 multimodel error


winnetrie

Recommended Posts

After a started creating walls for my mod i see this message appearing multiple times (i think the number of wall blocks i have)

 

I'm pretty sure (99%) it comes from the wall blockstate file. I can't see what's wrong, maybe someone else:

{
    "forge_marker": 1,
    "defaults": {
        "textures": {
		    "wall": "minecraft:blocks/hardened_clay_stained_black",
            "particle": "#wall"
        }    
    },
    
    "variants": {
        "up": {
            "true": {
                "submodel": {"wall_up": {"model": "wall_post"}}
            },
            "false": {}
        },
        "north": {
            "true": {
                "submodel": {"wall_north": {"model": "wall_side","uvlock": true}}
            },
            "false": {}
        },
        "east": {
            "true": {
                "submodel": {"wall_east": {"model": "wall_side","y": 90,"uvlock": true}}
            },
            "false": {}
        },
        "south": {
            "true": {
                "submodel": {"wall_south": {"model": "wall_side","y": 180,"uvlock": true}}
            },
            "false": {}
        },
        "west": {
            "true": {
                "submodel": {"wall_west": {"model": "wall_side","y": 270,"uvlock": true}}
            },
            "false": {}
        },
        
        "normal": {
            "model": "wall_inventory",
            "textures": {
                "all": "minecraft:blocks/hardened_clay_stained_black"
            }
        },
        "variant": {
            "default": {
                "textures": {
                    "all": "minecraft:blocks/hardened_clay_stained_black"
                }
            }
        }
    }
}

Everything in the game is fine, i can't see any visual bugs or something.

 

Here is the wall class:

public class BlockWinnetrieWall extends Block{
	
	public static final PropertyBool UP = PropertyBool.create("up");
    public static final PropertyBool NORTH = PropertyBool.create("north");
    public static final PropertyBool EAST = PropertyBool.create("east");
    public static final PropertyBool SOUTH = PropertyBool.create("south");
    public static final PropertyBool WEST = PropertyBool.create("west");
    
    protected static final AxisAlignedBB[] AABB_BY_INDEX = new AxisAlignedBB[] {new AxisAlignedBB(0.25D, 0.0D, 0.25D, 0.75D, 1.0D, 0.75D), new AxisAlignedBB(0.25D, 0.0D, 0.25D, 0.75D, 1.0D, 1.0D), new AxisAlignedBB(0.0D, 0.0D, 0.25D, 0.75D, 1.0D, 0.75D), new AxisAlignedBB(0.0D, 0.0D, 0.25D, 0.75D, 1.0D, 1.0D), new AxisAlignedBB(0.25D, 0.0D, 0.0D, 0.75D, 1.0D, 0.75D), new AxisAlignedBB(0.3125D, 0.0D, 0.0D, 0.6875D, 0.875D, 1.0D), new AxisAlignedBB(0.0D, 0.0D, 0.0D, 0.75D, 1.0D, 0.75D), new AxisAlignedBB(0.0D, 0.0D, 0.0D, 0.75D, 1.0D, 1.0D), new AxisAlignedBB(0.25D, 0.0D, 0.25D, 1.0D, 1.0D, 0.75D), new AxisAlignedBB(0.25D, 0.0D, 0.25D, 1.0D, 1.0D, 1.0D), new AxisAlignedBB(0.0D, 0.0D, 0.3125D, 1.0D, 0.875D, 0.6875D), new AxisAlignedBB(0.0D, 0.0D, 0.25D, 1.0D, 1.0D, 1.0D), new AxisAlignedBB(0.25D, 0.0D, 0.0D, 1.0D, 1.0D, 0.75D), new AxisAlignedBB(0.25D, 0.0D, 0.0D, 1.0D, 1.0D, 1.0D), new AxisAlignedBB(0.0D, 0.0D, 0.0D, 1.0D, 1.0D, 0.75D), new AxisAlignedBB(0.0D, 0.0D, 0.0D, 1.0D, 1.0D, 1.0D)};
    protected static final AxisAlignedBB[] CLIP_AABB_BY_INDEX = new AxisAlignedBB[] {AABB_BY_INDEX[0].setMaxY(1.5D), AABB_BY_INDEX[1].setMaxY(1.5D), AABB_BY_INDEX[2].setMaxY(1.5D), AABB_BY_INDEX[3].setMaxY(1.5D), AABB_BY_INDEX[4].setMaxY(1.5D), AABB_BY_INDEX[5].setMaxY(1.5D), AABB_BY_INDEX[6].setMaxY(1.5D), AABB_BY_INDEX[7].setMaxY(1.5D), AABB_BY_INDEX[8].setMaxY(1.5D), AABB_BY_INDEX[9].setMaxY(1.5D), AABB_BY_INDEX[10].setMaxY(1.5D), AABB_BY_INDEX[11].setMaxY(1.5D), AABB_BY_INDEX[12].setMaxY(1.5D), AABB_BY_INDEX[13].setMaxY(1.5D), AABB_BY_INDEX[14].setMaxY(1.5D), AABB_BY_INDEX[15].setMaxY(1.5D)};
	
	private IBlockState parentBlock;
	public static final PropertyEnum<EnumType> VARIANT = PropertyEnum.<EnumType>create("variant", EnumType.class);

	public BlockWinnetrieWall(IBlockState modelBlock, ResourceLocation registryname) {
		super(modelBlock.getMaterial());
		
		this.setDefaultState(this.blockState.getBaseState().withProperty(UP, Boolean.valueOf(false)).withProperty(NORTH, Boolean.valueOf(false)).withProperty(EAST, Boolean.valueOf(false)).withProperty(SOUTH, Boolean.valueOf(false)).withProperty(WEST, Boolean.valueOf(false)).withProperty(VARIANT, EnumType.DEFAULT));
		setUnlocalizedName(registryname.toString());
		setRegistryName(registryname);
		setCreativeTab(Utilities.WINNETRIETERRACOTTAEXPANSION);
		useNeighborBrightness = true;
		parentBlock = modelBlock;
	}
	
	@Override
	public SoundType getSoundType(IBlockState state, World world, BlockPos pos, @Nullable Entity entity){
		
        return parentBlock.getBlock().getSoundType(state, world, pos, entity);
    }
	
	
	@Override
    public float getBlockHardness(IBlockState blockState, World worldIn, BlockPos pos)
    {
        return parentBlock.getBlockHardness(worldIn, pos);
    }
	
	@Override
    public MapColor getMapColor(IBlockState state, IBlockAccess worldIn, BlockPos pos)
    {
        
    	return parentBlock.getMapColor(worldIn, pos);
    }
	
	@Override
	public int damageDropped(IBlockState state) {
		
		return 0;
		
	}
	
	@Override
	public IBlockState getStateFromMeta(int meta)
    {
        return this.getDefaultState();
    }

    @Override
    public int getMetaFromState(IBlockState state)
    {
        return state.getValue(VARIANT).ordinal();
    }
    
	@Override
	protected BlockStateContainer createBlockState()
    {
        return new BlockStateContainer(this, new IProperty[] {UP, NORTH, EAST, WEST, SOUTH, VARIANT});
    }
	
	public enum EnumType implements IStringSerializable {

		DEFAULT();

		@Override
		@Nonnull
		public String getName() {

			return "default";

		}

	}
	
	public AxisAlignedBB getBoundingBox(IBlockState state, IBlockAccess source, BlockPos pos)
    {
        state = this.getActualState(state, source, pos);
        return AABB_BY_INDEX[getAABBIndex(state)];
    }

    public void addCollisionBoxToList(IBlockState state, World worldIn, BlockPos pos, AxisAlignedBB entityBox, List<AxisAlignedBB> collidingBoxes, @Nullable Entity entityIn, boolean isActualState)
    {
        if (!isActualState)
        {
            state = this.getActualState(state, worldIn, pos);
        }

        addCollisionBoxToList(pos, entityBox, collidingBoxes, CLIP_AABB_BY_INDEX[getAABBIndex(state)]);
    }

    @Nullable
    public AxisAlignedBB getCollisionBoundingBox(IBlockState blockState, IBlockAccess worldIn, BlockPos pos)
    {
        blockState = this.getActualState(blockState, worldIn, pos);
        return CLIP_AABB_BY_INDEX[getAABBIndex(blockState)];
    }

    private static int getAABBIndex(IBlockState state)
    {
        int i = 0;

        if (((Boolean)state.getValue(NORTH)).booleanValue())
        {
            i |= 1 << EnumFacing.NORTH.getHorizontalIndex();
        }

        if (((Boolean)state.getValue(EAST)).booleanValue())
        {
            i |= 1 << EnumFacing.EAST.getHorizontalIndex();
        }

        if (((Boolean)state.getValue(SOUTH)).booleanValue())
        {
            i |= 1 << EnumFacing.SOUTH.getHorizontalIndex();
        }

        if (((Boolean)state.getValue(WEST)).booleanValue())
        {
            i |= 1 << EnumFacing.WEST.getHorizontalIndex();
        }

        return i;
    }


    public boolean isFullCube(IBlockState state)
    {
        return false;
    }

    /**
     * Determines if an entity can path through this block
     */
    public boolean isPassable(IBlockAccess worldIn, BlockPos pos)
    {
        return false;
    }

    /**
     * Used to determine ambient occlusion and culling when rebuilding chunks for render
     */
    public boolean isOpaqueCube(IBlockState state)
    {
        return false;
    }

    private boolean canConnectTo(IBlockAccess worldIn, BlockPos pos, EnumFacing p_176253_3_)
    {
        IBlockState iblockstate = worldIn.getBlockState(pos);
        Block block = iblockstate.getBlock();
        BlockFaceShape blockfaceshape = iblockstate.getBlockFaceShape(worldIn, pos, p_176253_3_);
        boolean flag = blockfaceshape == BlockFaceShape.MIDDLE_POLE_THICK || blockfaceshape == BlockFaceShape.MIDDLE_POLE ;//&& block instanceof BlockFenceGate;
        return !isExcepBlockForAttachWithPiston(block) && blockfaceshape == BlockFaceShape.SOLID || flag;
    }

    protected static boolean isExcepBlockForAttachWithPiston(Block p_194143_0_)
    {
        return Block.isExceptBlockForAttachWithPiston(p_194143_0_) || p_194143_0_ == Blocks.BARRIER || p_194143_0_ == Blocks.MELON_BLOCK || p_194143_0_ == Blocks.PUMPKIN || p_194143_0_ == Blocks.LIT_PUMPKIN;
    }

 

    @SideOnly(Side.CLIENT)
    public boolean shouldSideBeRendered(IBlockState blockState, IBlockAccess blockAccess, BlockPos pos, EnumFacing side)
    {
        return side == EnumFacing.DOWN ? super.shouldSideBeRendered(blockState, blockAccess, pos, side) : true;
    }


    /**
     * Get the actual Block state of this Block at the given position. This applies properties not visible in the
     * metadata, such as fence connections.
     */
    public IBlockState getActualState(IBlockState state, IBlockAccess worldIn, BlockPos pos)
    {
        boolean flag =  canWallConnectTo(worldIn, pos, EnumFacing.NORTH);
        boolean flag1 = canWallConnectTo(worldIn, pos, EnumFacing.EAST);
        boolean flag2 = canWallConnectTo(worldIn, pos, EnumFacing.SOUTH);
        boolean flag3 = canWallConnectTo(worldIn, pos, EnumFacing.WEST);
        boolean flag4 = flag && !flag1 && flag2 && !flag3 || !flag && flag1 && !flag2 && flag3;
        return state.withProperty(UP, Boolean.valueOf(!flag4 || !worldIn.isAirBlock(pos.up()))).withProperty(NORTH, Boolean.valueOf(flag)).withProperty(EAST, Boolean.valueOf(flag1)).withProperty(SOUTH, Boolean.valueOf(flag2)).withProperty(WEST, Boolean.valueOf(flag3));
    }



    /**
     * Get the geometry of the queried face at the given position and state. This is used to decide whether things like
     * buttons are allowed to be placed on the face, or how glass panes connect to the face, among other things.
     * <p>
     * Common values are {@code SOLID}, which is the default, and {@code UNDEFINED}, which represents something that
     * does not fit the other descriptions and will generally cause other things not to connect to the face.
     * 
     * @return an approximation of the form of the given face
     */
    public BlockFaceShape getBlockFaceShape(IBlockAccess worldIn, IBlockState state, BlockPos pos, EnumFacing face)
    {
        return face != EnumFacing.UP && face != EnumFacing.DOWN ? BlockFaceShape.MIDDLE_POLE_THICK : BlockFaceShape.CENTER_BIG;
    }

    /* ======================================== FORGE START ======================================== */

    @Override
    public boolean canBeConnectedTo(IBlockAccess world, BlockPos pos, EnumFacing facing)
    {
        Block connector = world.getBlockState(pos.offset(facing)).getBlock();
        return connector instanceof BlockWall || connector  instanceof BlockWinnetrieWall;
    }

    private boolean canWallConnectTo(IBlockAccess world, BlockPos pos, EnumFacing facing)
    {
        BlockPos other = pos.offset(facing);
        Block block = world.getBlockState(other).getBlock();
        return block.canBeConnectedTo(world, other, facing.getOpposite()) || canConnectTo(world, other, facing.getOpposite());
    }
    
    public boolean canPlaceTorchOnTop(IBlockState state, IBlockAccess world, BlockPos pos)
    {
        return true;
    }

For the most part i just copy-pasted the whole BlockWall class, because of the enums that's hardcoded in that class (cobblestone & mossy cobblestone).

I do not get any other errors of any kind. Only the multimodel part

Link to comment
Share on other sites

What is the error?

About Me

Spoiler

My Discord - Cadiboo#8887

My WebsiteCadiboo.github.io

My ModsCadiboo.github.io/projects

My TutorialsCadiboo.github.io/tutorials

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)

Link to comment
Share on other sites

Oh right, haha , i forgot the add the error.

It's this: 

[Client thread/ERROR] [FML]: MultiModel minecraft:builtin/missing is empty (no base model or parts were provided/resolved)

 

I don't think it's something ver bad, but ennoying.

I have this message now 64 times, because i have added 64 walls 

Edited by winnetrie
Link to comment
Share on other sites

Isolate the error, place breakpoints, find the cause and solve it

About Me

Spoiler

My Discord - Cadiboo#8887

My WebsiteCadiboo.github.io

My ModsCadiboo.github.io/projects

My TutorialsCadiboo.github.io/tutorials

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)

Link to comment
Share on other sites

8 hours ago, Cadiboo said:

Isolate the error, place breakpoints, find the cause and solve it

Well , i did that already before. I know where the problem, what it is and why it does it. Just not how to solve it.

I tried providing a dummy model and this seems to take away the multimodel error while not affecting my wall.

I knew the wall blockstate needed a sort of base model, the problem is when providing 1 that model will be visible in all blockstates. Not something you want ofcourse. By providing a dummy model wich contains just a comment, fixes that visual bug/glitch however you want to call it. Important, the dummy model has to contain some information or else it won't load it or perhaps it will give an error.

 

Look here:

{
    "forge_marker": 1,
    "defaults": {
        "textures": {
		    "wall": "minecraft:blocks/concrete_pink",
            "particle": "#wall"
        }    
    },
    
    "variants": {
        "up": {
            "true": {
                "submodel": {"wall_up": {"model": "wall_post"}}
            },
            "false": {}
        },
        "north": {
            "true": {
                "submodel": {"wall_north": {"model": "wall_side","uvlock": true}}
            },
            "false": {}
        },
        "east": {
            "true": {
                "submodel": {"wall_east": {"model": "wall_side","y": 90,"uvlock": true}}
            },
            "false": {}
        },
        "south": {
            "true": {
                "submodel": {"wall_south": {"model": "wall_side","y": 180,"uvlock": true}}
            },
            "false": {}
        },
        "west": {
            "true": {
                "submodel": {"wall_west": {"model": "wall_side","y": 270,"uvlock": true}}
            },
            "false": {}
        },
        
        "normal": {
            "model": "wall_inventory",
            "textures": {
                "all": "minecraft:blocks/concrete_pink"
            }
        },
        "variant": {
            "default": {
			    "model": "winnetriesexpansionmod:dummy",
                "textures": {
                    "all": "minecraft:blocks/concrete_pink"
                }
            }
        }
    }
}

 

Here the dummy model:

{
    "__comment": "An empty model",
    "elements": [

    ]
}

 

I think this can be very helpfull to others with the same problem. I saw alot of mods i play who has the same error spam in the log, so i'm pretty sure this multumodel stuff is a real thing among other modders.

Link to comment
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now


  • Recently Browsing

    • No registered users viewing this page.
  • Posts

    • What is that in my files?
    • Hi! I tried the above method, but it did not work. There's my function. The message appears in the chat, but the item is not added to the inventory. I can’t figure out what the problem is, so please help. @SubscribeEvent public void onJoin(EntityJoinLevelEvent event) { if (event.getEntity() instanceof Player && event.getEntity().getCommandSenderWorld().isClientSide) { Minecraft.getInstance().player.getInventory().add(new ItemStack(Items.CARROT)); Entity playerEntity = event.getEntity(); playerEntity.sendSystemMessage(Component.nullToEmpty("Hello!")); } }  
    • Hi guys ! New around here.So my problem is,I'm trying to play modded minecraft with my gf.We played on lan perfectly.But when we try to make a server for hamachi,It displays an error message.   [08Haz2023 18:30:33.491] [main/INFO] [cpw.mods.modlauncher.Launcher/MODLAUNCHER]: ModLauncher running: args [--launchTarget, forgeserver, --fml.forgeVersion, 43.2.8, --fml.mcVersion, 1.19.2, --fml.forgeGroup, net.minecraftforge, --fml.mcpVersion, 20220805.130853] [08Haz2023 18:30:33.497] [main/INFO] [cpw.mods.modlauncher.Launcher/MODLAUNCHER]: ModLauncher 10.0.8+10.0.8+main.0ef7e830 starting: java version 19.0.1 by Oracle Corporation; OS Windows 10 arch amd64 version 10.0 [08Haz2023 18:30:33.798] [main/INFO] [optifine.OptiFineTransformationService/]: OptiFineTransformationService.onLoad [08Haz2023 18:30:33.799] [main/INFO] [optifine.OptiFineTransformationService/]: OptiFine ZIP file URL: union:/C:/Users/user/Desktop/Yeni%20klasör/mods/OptiFine-OptiFine-1.19.2_HD_U_I1.jar%23118!/ [08Haz2023 18:30:33.848] [main/INFO] [optifine.OptiFineTransformationService/]: OptiFine ZIP file: C:\Users\user\Desktop\Yeni klasör\mods\OptiFine-OptiFine-1.19.2_HD_U_I1.jar [08Haz2023 18:30:33.850] [main/INFO] [optifine.OptiFineTransformer/]: Target.PRE_CLASS is available [08Haz2023 18:30:33.916] [main/INFO] [mixin/]: SpongePowered MIXIN Subsystem Version=0.8.5 Source=union:/C:/Users/user/Desktop/Yeni%20klasör/libraries/org/spongepowered/mixin/0.8.5/mixin-0.8.5.jar%2363!/ Service=ModLauncher Env=SERVER [08Haz2023 18:30:33.927] [main/INFO] [optifine.OptiFineTransformationService/]: OptiFineTransformationService.initialize [08Haz2023 18:30:34.282] [main/WARN] [net.minecraftforge.fml.loading.moddiscovery.ModFileParser/LOADING]: Mod file C:\Users\user\Desktop\Yeni klasör\libraries\net\minecraftforge\fmlcore\1.19.2-43.2.8\fmlcore-1.19.2-43.2.8.jar is missing mods.toml file [08Haz2023 18:30:34.287] [main/WARN] [net.minecraftforge.fml.loading.moddiscovery.ModFileParser/LOADING]: Mod file C:\Users\user\Desktop\Yeni klasör\libraries\net\minecraftforge\javafmllanguage\1.19.2-43.2.8\javafmllanguage-1.19.2-43.2.8.jar is missing mods.toml file [08Haz2023 18:30:34.291] [main/WARN] [net.minecraftforge.fml.loading.moddiscovery.ModFileParser/LOADING]: Mod file C:\Users\user\Desktop\Yeni klasör\libraries\net\minecraftforge\lowcodelanguage\1.19.2-43.2.8\lowcodelanguage-1.19.2-43.2.8.jar is missing mods.toml file [08Haz2023 18:30:34.296] [main/WARN] [net.minecraftforge.fml.loading.moddiscovery.ModFileParser/LOADING]: Mod file C:\Users\user\Desktop\Yeni klasör\libraries\net\minecraftforge\mclanguage\1.19.2-43.2.8\mclanguage-1.19.2-43.2.8.jar is missing mods.toml file [08Haz2023 18:30:34.386] [main/INFO] [net.minecraftforge.fml.loading.moddiscovery.JarInJarDependencyLocator/]: No dependencies to load found. Skipping! [08Haz2023 18:30:35.056] [main/INFO] [optifine.OptiFineTransformationService/]: OptiFineTransformationService.transformers [08Haz2023 18:30:35.063] [main/INFO] [optifine.OptiFineTransformer/]: Targets: 386 [08Haz2023 18:30:35.557] [main/INFO] [optifine.OptiFineTransformationService/]: additionalClassesLocator: [optifine., net.optifine.] [08Haz2023 18:30:35.906] [main/INFO] [mixin/]: Compatibility level set to JAVA_17 [08Haz2023 18:30:35.953] [main/ERROR] [mixin/]: Mixin config rottencreatures-common.mixins.json does not specify "minVersion" property [08Haz2023 18:30:35.957] [main/ERROR] [mixin/]: Mixin config rottencreatures.mixins.json does not specify "minVersion" property [08Haz2023 18:30:36.099] [main/INFO] [mixin/]: Successfully loaded Mixin Connector [org.tlauncher.MixinConnector] [08Haz2023 18:30:36.101] [main/INFO] [cpw.mods.modlauncher.LaunchServiceHandler/MODLAUNCHER]: Launching target 'forgeserver' with arguments [] [08Haz2023 18:30:36.122] [main/WARN] [mixin/]: Reference map '${refmap_target}refmap.json' for corgilib.forge.mixins.json could not be read. If this is a development environment you can ignore this message [08Haz2023 18:30:36.139] [main/WARN] [mixin/]: Reference map 'rottencreatures-forge-refmap.json' for rottencreatures.mixins.json could not be read. If this is a development environment you can ignore this message [08Haz2023 18:30:36.565] [main/ERROR] [net.minecraftforge.fml.loading.RuntimeDistCleaner/DISTXFORM]: Attempted to load class net/minecraft/client/gui/screens/Screen for invalid dist DEDICATED_SERVER [08Haz2023 18:30:36.566] [main/WARN] [mixin/]: Error loading class: net/minecraft/client/gui/screens/TitleScreen (java.lang.RuntimeException: Attempted to load class net/minecraft/client/gui/screens/Screen for invalid dist DEDICATED_SERVER) [08Haz2023 18:30:36.566] [main/WARN] [mixin/]: @Mixin target net.minecraft.client.gui.screens.TitleScreen was not found tlskincape-mixins.json:MixinMainMenu [08Haz2023 18:30:36.581] [main/WARN] [mixin/]: Error loading class: net/minecraft/client/model/PlayerModel (java.lang.ClassNotFoundException: net.minecraft.client.model.PlayerModel) [08Haz2023 18:30:36.582] [main/WARN] [mixin/]: @Mixin target net.minecraft.client.model.PlayerModel was not found tlskincape-mixins.json:MixinPlayerModel   that's from logs folder.
    • LivingAttackEvent is called inside the hurt function of LivingEntity. this means that whenever a living entity is attacked, forge will create an instance of new LivingAttackEvent and hand it to all subscribed functions 
    • ok after quitting and restarting I now get this crash report  
  • Topics

×
×
  • Create New...

Important Information

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