Jump to content

Recommended Posts

Posted

I just made a json model of a 2x3x3 block, i tought you could do this becouse making it 1.5 blocks tall worked, i get this error:

 

Spoiler

[21:26:53] [Client thread/ERROR] [FML]: Could not load vanilla model parent 'walkingdeadmod:block/airdrop' for 'net.minecraft.client.renderer.block.model.ModelBlock@7acff702
net.minecraftforge.client.model.ModelLoaderRegistry$LoaderException: Exception loading model walkingdeadmod:block/airdrop with loader VanillaLoader.INSTANCE, skipping
    at net.minecraftforge.client.model.ModelLoaderRegistry.getModel(ModelLoaderRegistry.java:153) ~[ModelLoaderRegistry.class:?]
    at net.minecraftforge.client.model.ModelLoaderRegistry.getModelOrLogError(ModelLoaderRegistry.java:203) [ModelLoaderRegistry.class:?]
    at net.minecraftforge.client.model.ModelLoader$VanillaModelWrapper.getTextures(ModelLoader.java:498) [ModelLoader$VanillaModelWrapper.class:?]
    at net.minecraftforge.client.model.ModelLoaderRegistry.getModel(ModelLoaderRegistry.java:163) [ModelLoaderRegistry.class:?]
    at net.minecraftforge.client.model.ModelLoader.loadItemModels(ModelLoader.java:336) [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:156) [ModelLoader.class:?]
    at net.minecraft.client.renderer.block.model.ModelManager.onResourceManagerReload(ModelManager.java:28) [ModelManager.class:?]
    at net.minecraft.client.resources.SimpleReloadableResourceManager.notifyReloadListeners(SimpleReloadableResourceManager.java:132) [SimpleReloadableResourceManager.class:?]
    at net.minecraft.client.resources.SimpleReloadableResourceManager.reloadResources(SimpleReloadableResourceManager.java:113) [SimpleReloadableResourceManager.class:?]
    at net.minecraft.client.Minecraft.refreshResources(Minecraft.java:800) [Minecraft.class:?]
    at net.minecraftforge.fml.client.FMLClientHandler.finishMinecraftLoading(FMLClientHandler.java:366) [FMLClientHandler.class:?]
    at net.minecraft.client.Minecraft.init(Minecraft.java:562) [Minecraft.class:?]
    at net.minecraft.client.Minecraft.run(Minecraft.java:387) [Minecraft.class:?]
    at net.minecraft.client.main.Main.main(Main.java:118) [Main.class:?]
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_121]
    at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_121]
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_121]
    at java.lang.reflect.Method.invoke(Unknown Source) ~[?:1.8.0_121]
    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_121]
    at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_121]
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_121]
    at java.lang.reflect.Method.invoke(Unknown Source) ~[?:1.8.0_121]
    at net.minecraftforge.gradle.GradleStartCommon.launch(GradleStartCommon.java:97) [start/:?]
    at GradleStart.main(GradleStart.java:26) [start/:?]
Caused by: com.google.gson.JsonParseException: 'to' specifier exceeds the allowed boundaries: Vector3f[36.0, 2.0, 32.0]
    at net.minecraft.client.renderer.block.model.BlockPart$Deserializer.parsePositionTo(BlockPart.java:192) ~[BlockPart$Deserializer.class:?]
    at net.minecraft.client.renderer.block.model.BlockPart$Deserializer.deserialize(BlockPart.java:77) ~[BlockPart$Deserializer.class:?]
    at net.minecraft.client.renderer.block.model.BlockPart$Deserializer.deserialize(BlockPart.java:70) ~[BlockPart$Deserializer.class:?]
    at com.google.gson.TreeTypeAdapter.read(TreeTypeAdapter.java:58) ~[TreeTypeAdapter.class:?]
    at com.google.gson.Gson.fromJson(Gson.java:803) ~[Gson.class:?]
    at com.google.gson.Gson.fromJson(Gson.java:868) ~[Gson.class:?]
    at com.google.gson.Gson$1.deserialize(Gson.java:126) ~[Gson$1.class:?]
    at net.minecraft.client.renderer.block.model.ModelBlock$Deserializer.getModelElements(ModelBlock.java:315) ~[ModelBlock$Deserializer.class:?]
    at net.minecraft.client.renderer.block.model.ModelBlock$Deserializer.deserialize(ModelBlock.java:248) ~[ModelBlock$Deserializer.class:?]
    at net.minecraft.client.renderer.block.model.ModelBlock$Deserializer.deserialize(ModelBlock.java:242) ~[ModelBlock$Deserializer.class:?]
    at com.google.gson.TreeTypeAdapter.read(TreeTypeAdapter.java:58) ~[TreeTypeAdapter.class:?]
    at net.minecraft.util.JsonUtils.gsonDeserialize(JsonUtils.java:453) ~[JsonUtils.class:?]
    at net.minecraft.client.renderer.block.model.ModelBlock.deserialize(ModelBlock.java:51) ~[ModelBlock.class:?]
    at net.minecraft.client.renderer.block.model.ModelBakery.loadModel(ModelBakery.java:338) ~[ModelBakery.class:?]
    at net.minecraftforge.client.model.ModelLoader.access$1600(ModelLoader.java:126) ~[ModelLoader.class:?]
    at net.minecraftforge.client.model.ModelLoader$VanillaLoader.loadModel(ModelLoader.java:937) ~[ModelLoader$VanillaLoader.class:?]
    at net.minecraftforge.client.model.ModelLoaderRegistry.getModel(ModelLoaderRegistry.java:149) ~[ModelLoaderRegistry.class:?]

 

 

i know that it errors becouse the model is to big, is there a way to make it work with a bigger model?

package com.walkingdead.walkingdeadmod.blocks.lootblocks;

import java.util.ArrayList;
import java.util.List;

import com.walkingdead.walkingdeadmod.WalkingDeadMod;
import com.walkingdead.walkingdeadmod.weapons.ModTools;

import net.minecraft.block.Block;
import net.minecraft.block.SoundType;
import net.minecraft.block.material.Material;
import net.minecraft.block.state.IBlockState;
import net.minecraft.item.ItemStack;
import net.minecraft.util.math.BlockPos;
import net.minecraft.world.IBlockAccess;

public class Airdrop extends Block {
	
	
    public Airdrop(Material material, String name) {
        super(material);
        this.setUnlocalizedName(name);
        this.setCreativeTab(WalkingDeadMod.WalkingDead);
        this.setHardness(10F);
        this.setResistance(1000F);
        this.setSoundType(SoundType.GROUND);
        this.setBlockUnbreakable();
    }


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


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

 modclass

Posted

JSON models with sizes that are bigger than 1 cube (16x16x16) already behave strange enough with incorrect UVs and bounding box issues. Solution: use custom IBakedModel(s)/make your block consist of multiple 1x1x1 'parts'

Here is a good example of the 'weirdness' I am talking about.

 

Posted

If your block has a collision bounds greater than 1x1x1 you're in trouble there too: it won't work either.  Getting fences to work properly was a problem Mojang took several versions to get right.

Apparently I'm a complete and utter jerk and come to this forum just like to make fun of people, be confrontational, and make your personal life miserable.  If you think this is the case, JUST REPORT ME.  Otherwise you're just going to get reported when you reply to my posts and point it out, because odds are, I was trying to be nice.

 

Exception: If you do not understand Java, I WILL NOT HELP YOU and your thread will get locked.

 

DO NOT PM ME WITH PROBLEMS. No help will be given.

Posted
57 minutes ago, Draco18s said:

If your block has a collision bounds greater than 1x1x1 you're in trouble there too: it won't work either.  Getting fences to work properly was a problem Mojang took several versions to get right.

What kind of trouble?

Posted

Basically, you'll collide from some directions and not others and general wonkiness.  The only, the only, direction it is safe to extend a collision box outside the 1x1x1 cube is +Y and even then only an extra half-block.

  • Like 1

Apparently I'm a complete and utter jerk and come to this forum just like to make fun of people, be confrontational, and make your personal life miserable.  If you think this is the case, JUST REPORT ME.  Otherwise you're just going to get reported when you reply to my posts and point it out, because odds are, I was trying to be nice.

 

Exception: If you do not understand Java, I WILL NOT HELP YOU and your thread will get locked.

 

DO NOT PM ME WITH PROBLEMS. No help will be given.

Posted

See how doors work.

The debugger is a powerful and necessary tool in any IDE, so learn how to use it. You'll be able to tell us more and get better help here if you investigate your runtime problems in the debugger before posting.

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

    • This is the last line before the crash: [ebwizardry]: Synchronising spell emitters for PixelTraveler But I have no idea what this means
    • What in particular? I barely used that mod this time around, and it's never been a problem in the past.
    • Im trying to build my mod using shade since i use the luaj library however i keep getting this error Reason: Task ':reobfJar' uses this output of task ':shadowJar' without declaring an explicit or implicit dependency. This can lead to incorrect results being produced, depending on what order the tasks are executed. So i try adding reobfJar.dependsOn shadowJar  Could not get unknown property 'reobfJar' for object of type org.gradle.api.internal.artifacts.dsl.dependencies.DefaultDependencyHandler. my gradle file plugins { id 'eclipse' id 'idea' id 'maven-publish' id 'net.minecraftforge.gradle' version '[6.0,6.2)' id 'com.github.johnrengelman.shadow' version '7.1.2' id 'org.spongepowered.mixin' version '0.7.+' } apply plugin: 'net.minecraftforge.gradle' apply plugin: 'org.spongepowered.mixin' apply plugin: 'com.github.johnrengelman.shadow' version = mod_version group = mod_group_id base { archivesName = mod_id } // Mojang ships Java 17 to end users in 1.18+, so your mod should target Java 17. java.toolchain.languageVersion = JavaLanguageVersion.of(17) //jarJar.enable() println "Java: ${System.getProperty 'java.version'}, JVM: ${System.getProperty 'java.vm.version'} (${System.getProperty 'java.vendor'}), Arch: ${System.getProperty 'os.arch'}" minecraft { mappings channel: mapping_channel, version: mapping_version copyIdeResources = true runs { configureEach { workingDirectory project.file('run') property 'forge.logging.markers', 'REGISTRIES' property 'forge.logging.console.level', 'debug' arg "-mixin.config=derp.mixin.json" mods { "${mod_id}" { source sourceSets.main } } } client { // Comma-separated list of namespaces to load gametests from. Empty = all namespaces. property 'forge.enabledGameTestNamespaces', mod_id } server { property 'forge.enabledGameTestNamespaces', mod_id args '--nogui' } gameTestServer { property 'forge.enabledGameTestNamespaces', mod_id } data { workingDirectory project.file('run-data') args '--mod', mod_id, '--all', '--output', file('src/generated/resources/'), '--existing', file('src/main/resources/') } } } sourceSets.main.resources { srcDir 'src/generated/resources' } repositories { flatDir { dirs './libs' } maven { url = "https://jitpack.io" } } configurations { shade implementation.extendsFrom shade } dependencies { minecraft "net.minecraftforge:forge:${minecraft_version}-${forge_version}" implementation 'org.luaj:luaj-jse-3.0.2' implementation fg.deobf("com.github.Virtuoel:Pehkui:${pehkui_version}") annotationProcessor 'org.spongepowered:mixin:0.8.5:processor' minecraftLibrary 'luaj:luaj-jse:3.0.2' shade 'luaj:luaj-jse:3.0.2' } // Example for how to get properties into the manifest for reading at runtime. tasks.named('jar', Jar).configure { manifest { attributes([ 'Specification-Title' : mod_id, 'Specification-Vendor' : mod_authors, 'Specification-Version' : '1', // We are version 1 of ourselves 'Implementation-Title' : project.name, 'Implementation-Version' : project.jar.archiveVersion, 'Implementation-Vendor' : mod_authors, 'Implementation-Timestamp': new Date().format("yyyy-MM-dd'T'HH:mm:ssZ"), "TweakClass" : "org.spongepowered.asm.launch.MixinTweaker", "TweakOrder" : 0, "MixinConfigs" : "derp.mixin.json" ]) } rename 'mixin.refmap.json', 'derp.mixin-refmap.json' } shadowJar { archiveClassifier = '' configurations = [project.configurations.shade] finalizedBy 'reobfShadowJar' } assemble.dependsOn shadowJar reobf { re shadowJar {} } publishing { publications { mavenJava(MavenPublication) { artifact jar } } repositories { maven { url "file://${project.projectDir}/mcmodsrepo" } } } my entire project:https://github.com/kevin051606/DERP-Mod/tree/Derp-1.0-1.20
    • All versions of Minecraft Forge suddenly black screen even without mods (tried reinstalling original Minecraft, Java, updating drivers doesn't work)
  • Topics

×
×
  • Create New...

Important Information

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