Jump to content
Search In
  • More options...
Find results that contain...
Find results in...

[1.12.2] Problem with loading blockstate on client


TimeConqueror
 Share

Recommended Posts

So I have a block with two properties:

Spoiler

public class BlockGOLSubordinate extends Block {
    public static final PropertyEnum<EnumPosOffset> OFFSET = PropertyEnum.create("offset", EnumPosOffset.class);
    public static final PropertyBool ACTIVATED = PropertyBool.create("activated");

    public BlockGOLSubordinate() {
        super(Material.IRON);
        setBlockUnbreakable();
        setLightLevel(1.0F);
    }

    @Override
    public IBlockState getStateFromMeta(int meta) {
        int index = meta > 7 ? meta - 8 : meta;
        boolean activated = meta > 7;
        return getDefaultState().withProperty(OFFSET, EnumPosOffset.byIndex(index)).withProperty(ACTIVATED, activated);
    }

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

    @Override
    public int getMetaFromState(IBlockState state) {
        int meta = state.getValue(OFFSET).getIndex();
        meta += state.getValue(ACTIVATED) ? 8 : 0;

        return meta;
    }

    @Override
    public boolean canCreatureSpawn(IBlockState state, IBlockAccess world, BlockPos pos, EntityLiving.SpawnPlacementType type) {
        return false;
    }

    @Override
    public boolean hasTileEntity(IBlockState state) {
        return true;
    }

    @Nullable
    @Override
    public TileEntity createTileEntity(World world, IBlockState state) {
        return new TileEntityGOLSubordinate();
    }

    public enum EnumPosOffset implements IStringSerializable {
        NORTH(0, "north"),
        NORTH_EAST(1, "north_east"),
        EAST(2, "east"),
        SOUTH_EAST(3, "south_east"),
        SOUTH(4, "south"),
        SOUTH_WEST(5, "south_west"),
        WEST(6, "west"),
        NORTH_WEST(7, "north_west");

        private static final EnumPosOffset[] LOOKUP = new EnumPosOffset[EnumPosOffset.values().length];

        static {
            for (EnumPosOffset value : values()) {
                LOOKUP[value.index] = value;
            }
        }

        private final String name;
        private final int index;

        EnumPosOffset(int index, String name){
            this.index = index;
            this.name = name;
        }

        public static EnumPosOffset byIndex(int index){
            return LOOKUP[index];
        }

        @Override
        public String getName() {
            return name;
        }

        public int getIndex() {
            return index;
        }

        @Override
        public String toString() {
            return name;
        }
    }
}

 

Registry on client side:

ModelLoader.setCustomModelResourceLocation(Item.getItemFromBlock(block), 0, new ModelResourceLocation(block.getRegistryName(), "inventory"));

 

Somehow it produces the errors:

Spoiler

[18:23:46] [main/ERROR] [FML]: Exception loading model for variant lootgames:gol_subordinate#activated=true,offset=east for blockstate "lootgames:gol_subordinate[activated=true,offset=east]"
net.minecraftforge.client.model.ModelLoaderRegistry$LoaderException: Exception loading model lootgames:gol_subordinate#activated=true,offset=east 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:132) [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_181]
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:1.8.0_181]
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_181]
    at java.lang.reflect.Method.invoke(Method.java:498) ~[?:1.8.0_181]
    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_181]
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:1.8.0_181]
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_181]
    at java.lang.reflect.Method.invoke(Method.java:498) ~[?:1.8.0_181]
    at net.minecraftforge.gradle.GradleStartCommon.launch(GradleStartCommon.java:97) [start/:?]
    at GradleStart.main(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:?]
    ... 21 more
[18:23:46] [main/ERROR] [FML]: Exception loading model for variant lootgames:gol_subordinate#activated=false,offset=north_west for blockstate "lootgames:gol_subordinate[activated=false,offset=north_west]"
net.minecraftforge.client.model.ModelLoaderRegistry$LoaderException: Exception loading model lootgames:gol_subordinate#activated=false,offset=north_west 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:132) [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_181]
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:1.8.0_181]
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_181]
    at java.lang.reflect.Method.invoke(Method.java:498) ~[?:1.8.0_181]
    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_181]
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:1.8.0_181]
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_181]
    at java.lang.reflect.Method.invoke(Method.java:498) ~[?:1.8.0_181]
    at net.minecraftforge.gradle.GradleStartCommon.launch(GradleStartCommon.java:97) [start/:?]
    at GradleStart.main(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:?]
    ... 21 more
[18:23:46] [main/ERROR] [FML]: Exception loading model for variant lootgames:gol_subordinate#activated=true,offset=south_east for blockstate "lootgames:gol_subordinate[activated=true,offset=south_east]"
net.minecraftforge.client.model.ModelLoaderRegistry$LoaderException: Exception loading model lootgames:gol_subordinate#activated=true,offset=south_east 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:132) [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_181]
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:1.8.0_181]
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_181]
    at java.lang.reflect.Method.invoke(Method.java:498) ~[?:1.8.0_181]
    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_181]
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:1.8.0_181]
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_181]
    at java.lang.reflect.Method.invoke(Method.java:498) ~[?:1.8.0_181]
    at net.minecraftforge.gradle.GradleStartCommon.launch(GradleStartCommon.java:97) [start/:?]
    at GradleStart.main(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:?]
    ... 21 more
[18:23:46] [main/ERROR] [FML]: Exception loading model for variant lootgames:gol_subordinate#activated=true,offset=west for blockstate "lootgames:gol_subordinate[activated=true,offset=west]"
net.minecraftforge.client.model.ModelLoaderRegistry$LoaderException: Exception loading model lootgames:gol_subordinate#activated=true,offset=west 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:132) [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_181]
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:1.8.0_181]
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_181]
    at java.lang.reflect.Method.invoke(Method.java:498) ~[?:1.8.0_181]
    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_181]
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:1.8.0_181]
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_181]
    at java.lang.reflect.Method.invoke(Method.java:498) ~[?:1.8.0_181]
    at net.minecraftforge.gradle.GradleStartCommon.launch(GradleStartCommon.java:97) [start/:?]
    at GradleStart.main(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:?]
    ... 21 more
[18:23:46] [main/FATAL] [FML]: Suppressed additional 11 model loading errors for domain lootgames

 

 

Blockstate file:

Spoiler

{
  "forge_marker": 1,
  "defaults": {
    "model": "block/cube_all"
  },
  "variants": {
    "offset=north, activated=false": {
      "textures": {
        "all": "lootgames:blocks/gameoflight/inactive/north"
      }
    },"offset=north_east, activated=false": {
      "textures": {
        "all": "lootgames:blocks/gameoflight/inactive/north_east"
      }
    },"offset=east, activated=false": {
      "textures": {
        "all": "lootgames:blocks/gameoflight/inactive/east"
      }
    },"offset=south_east, activated=false": {
      "textures": {
        "all": "lootgames:blocks/gameoflight/inactive/south_east"
      }
    },"offset=south, activated=false": {
      "textures": {
        "all": "lootgames:blocks/gameoflight/inactive/south"
      }
    },"offset=south_west, activated=false": {
      "textures": {
        "all": "lootgames:blocks/gameoflight/inactive/south_west"
      }
    },"offset=west, activated=false": {
      "textures": {
        "all": "lootgames:blocks/gameoflight/inactive/west"
      }
    },"offset=north_west, activated=false": {
      "textures": {
        "all": "lootgames:blocks/gameoflight/inactive/north_west"
      }
    },
    "offset=north, activated=true": {
      "textures": {
        "all": "lootgames:blocks/gameoflight/active/north"
      }
    },"offset=north_east, activated=true": {
      "textures": {
        "all": "lootgames:blocks/gameoflight/active/north_east"
      }
    },"offset=east, activated=true": {
      "textures": {
        "all": "lootgames:blocks/gameoflight/active/east"
      }
    },"offset=south_east, activated=true": {
      "textures": {
        "all": "lootgames:blocks/gameoflight/active/south_east"
      }
    },"offset=south, activated=true": {
      "textures": {
        "all": "lootgames:blocks/gameoflight/active/south"
      }
    },"offset=south_west, activated=true": {
      "textures": {
        "all": "lootgames:blocks/gameoflight/active/south_west"
      }
    },"offset=west, activated=true": {
      "textures": {
        "all": "lootgames:blocks/gameoflight/active/west"
      }
    },"offset=north_west, activated=true": {
      "textures": {
        "all": "lootgames:blocks/gameoflight/active/north_west"
      }
    }
  }
}

 

 

Edited by TimeConqueror
correction
Link to comment
Share on other sites

1 hour ago, TimeConqueror said:

"forge_marker": 1,

 

1 hour ago, TimeConqueror said:

"offset=north_east, activated=false"

 

So, you want to use the forge system, and then don't use the forge system?

 

If you aren't using the Forge system, then you have to match exactly.

activated=true, offset=east

and

activated=true,offset=east

aren't the same.

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.

Link to comment
Share on other sites

But this also doesn't work:

Spoiler

{
  "forge_marker": 1,
  "defaults": {
    "model": "block/cube_all"
  },
  "variants": {
    "activated=false,offset=north": {
      "textures": {
        "all": "lootgames:blocks/gameoflight/inactive/north"
      }
    },
    "activated=false,offset=north_east": {
      "textures": {
        "all": "lootgames:blocks/gameoflight/inactive/north_east"
      }
    },
    "activated=false,offset=east": {
      "textures": {
        "all": "lootgames:blocks/gameoflight/inactive/east"
      }
    },
    "activated=false,offset=south_east": {
      "textures": {
        "all": "lootgames:blocks/gameoflight/inactive/south_east"
      }
    },
    "activated=false,offset=south": {
      "textures": {
        "all": "lootgames:blocks/gameoflight/inactive/south"
      }
    },
    "activated=false,offset=south_west": {
      "textures": {
        "all": "lootgames:blocks/gameoflight/inactive/south_west"
      }
    },
    "activated=false,offset=west": {
      "textures": {
        "all": "lootgames:blocks/gameoflight/inactive/west"
      }
    },
    "activated=false,offset=north_west": {
      "textures": {
        "all": "lootgames:blocks/gameoflight/inactive/north_west"
      }
    },
    "activated=true,offset=north": {
      "textures": {
        "all": "lootgames:blocks/gameoflight/active/north"
      }
    },
    "activated=true,offset=north_east": {
      "textures": {
        "all": "lootgames:blocks/gameoflight/active/north_east"
      }
    },
    "activated=true,offset=east": {
      "textures": {
        "all": "lootgames:blocks/gameoflight/active/east"
      }
    },
    "activated=true,offset=south_east": {
      "textures": {
        "all": "lootgames:blocks/gameoflight/active/south_east"
      }
    },
    "activated=true,offset=south": {
      "textures": {
        "all": "lootgames:blocks/gameoflight/active/south"
      }
    },
    "activated=true,offset=south_west": {
      "textures": {
        "all": "lootgames:blocks/gameoflight/active/south_west"
      }
    },
    "activated=true,offset=west": {
      "textures": {
        "all": "lootgames:blocks/gameoflight/active/west"
      }
    },
    "activated=true,offset=north_west": {
      "textures": {
        "all": "lootgames:blocks/gameoflight/active/north_west"
      }
    }
  }
}

 

So what I'm doing wrong?

 

All I need is to set custom texture for each blockstate (total amount of property combination is 16), and I also don't want to write model.json for each combination. So I made that file, as you see above in hope, that it will be better.

Edited by TimeConqueror
Link to comment
Share on other sites

I found this example:

https://github.com/Choonster-Minecraft-Mods/TestMod3/blob/f939bffae46369516cba420a571591de59cebb43/src/main/resources/assets/testmod3/blockstates/colored_multi_rotatable.json

And that's very similar to what I want to do. Instead of uvlock, I will place

"model" : "cube_all"

 

But how may I determine all 16 combinations in "variants : {}" and add to each variant its own texture, if my own example above doesn't work?

Edited by TimeConqueror
Link to comment
Share on other sites

The cube_all model takes one texture reference, "all" and applies that texture to all faces.

 

This is a vanilla model, and the json for it is visible in the minecraft source cache.

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.

Link to comment
Share on other sites

15 minutes ago, Draco18s said:

The cube_all model takes one texture reference, "all" and applies that texture to all faces.

 

This is a vanilla model, and the json for it is visible in the minecraft source cache.

I understand this, but the question was: 

Quote

But how may I determine all 16 combinations in "variants : {}" and add to each variant its own texture, if my own example above doesn't work?

 

Link to comment
Share on other sites

In each variant, put:

"textures" { "all":"your/variant_texture1" }

This is basic blockstate stuff.

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.

Link to comment
Share on other sites

"textures" { "all":"your/variant_texture1" }

Can't produce any errors. If you have errors, its in the other parts, namely how you're defining your variants.

 

I recommend using the Forge system, as its a lot easier to work with and doesn't require that you smoosh the two properties together.

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.

Link to comment
Share on other sites

12 hours ago, Draco18s said:

"textures" { "all":"your/variant_texture1" }

Can't produce any errors. If you have errors, its in the other parts, namely how you're defining your variants.

 

I recommend using the Forge system, as its a lot easier to work with and doesn't require that you smoosh the two properties together.

But what if I need unique texture for each combination.

 

And the second question is: Can I use combination of variants (like:

"variant=east,activated=true" : {}

) and inner variants (like:

"variant" : {
	"east" : {
		"activated" : {
			"true" : {
				....
			}
		}
	}
}

)

with forge system?

Edited by TimeConqueror
Link to comment
Share on other sites

Then you have to have them in your blockstate file alphabetically.

 

 

variant=east,activated=true

does not equal

activated=true,variant=east

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.

Link to comment
Share on other sites

Inner variants don't exist.

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.

Link to comment
Share on other sites

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
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.

 Share



  • Recently Browsing

    No registered users viewing this page.

  • Posts

    • Yes I'm on 1.18.1 the latest version of forge and all mods are for 1.18 was working fine then just crashed and when I try to get back in just keeps crashing
    • Are you using right version of minecraft? like, using 1.12.2 mod on 1.18 will not works.
    • So my game keeps crashing and im unsure why   Any help would be great       ---- Minecraft Crash Report ---- // Surprise! Haha. Well, this is awkward. Time: 25/01/2022, 11:05 Description: Exception in server tick loop java.lang.NoSuchMethodError: 'net.minecraft.nbt.CompoundTag com.unrealdinnerbone.jamd.block.PortalTileEntity.save(net.minecraft.nbt.CompoundTag)'     at com.unrealdinnerbone.jamd.block.PortalTileEntity.m_5995_(PortalTileEntity.java:67) ~[JAMD-1.4.3-build.21+mc1.18.jar%2355!/:1.4.3-build.21+mc1.18] {re:classloading}     at net.minecraft.network.protocol.game.ClientboundLevelChunkPacketData$BlockEntityInfo.m_195691_(ClientboundLevelChunkPacketData.java:153) ~[client-1.18.1-20211210.034407-srg.jar%2364!/:?] {re:classloading}     at net.minecraft.network.protocol.game.ClientboundLevelChunkPacketData.<init>(ClientboundLevelChunkPacketData.java:44) ~[client-1.18.1-20211210.034407-srg.jar%2364!/:?] {re:classloading}     at net.minecraft.network.protocol.game.ClientboundLevelChunkWithLightPacket.<init>(ClientboundLevelChunkWithLightPacket.java:24) ~[client-1.18.1-20211210.034407-srg.jar%2364!/:?] {re:classloading}     at net.minecraft.server.level.ChunkMap.m_183760_(ChunkMap.java:1125) ~[client-1.18.1-20211210.034407-srg.jar%2364!/:?] {re:classloading}     at net.minecraft.server.level.ChunkMap.m_183754_(ChunkMap.java:785) ~[client-1.18.1-20211210.034407-srg.jar%2364!/:?] {re:classloading}     at net.minecraft.server.level.ChunkMap.m_140192_(ChunkMap.java:923) ~[client-1.18.1-20211210.034407-srg.jar%2364!/:?] {re:classloading}     at net.minecraft.server.level.ChunkMap.m_140199_(ChunkMap.java:1045) ~[client-1.18.1-20211210.034407-srg.jar%2364!/:?] {re:classloading}     at net.minecraft.server.level.ServerChunkCache.m_8463_(ServerChunkCache.java:458) ~[client-1.18.1-20211210.034407-srg.jar%2364!/:?] {re:classloading,pl:accesstransformer:B}     at net.minecraft.server.level.ServerLevel$EntityCallbacks.m_141985_(ServerLevel.java:1551) ~[client-1.18.1-20211210.034407-srg.jar%2364!/:?] {re:classloading}     at net.minecraft.server.level.ServerLevel$EntityCallbacks.m_141985_(ServerLevel.java:1534) ~[client-1.18.1-20211210.034407-srg.jar%2364!/:?] {re:classloading}     at net.minecraft.world.level.entity.PersistentEntitySectionManager.m_157575_(PersistentEntitySectionManager.java:135) ~[client-1.18.1-20211210.034407-srg.jar%2364!/:?] {re:classloading}     at net.minecraft.world.level.entity.PersistentEntitySectionManager.addEntityWithoutEvent(PersistentEntitySectionManager.java:98) ~[client-1.18.1-20211210.034407-srg.jar%2364!/:?] {re:classloading}     at net.minecraft.world.level.entity.PersistentEntitySectionManager.addNewEntityWithoutEvent(PersistentEntitySectionManager.java:76) ~[client-1.18.1-20211210.034407-srg.jar%2364!/:?] {re:classloading}     at net.minecraft.server.level.ServerLevel.m_8853_(ServerLevel.java:827) ~[client-1.18.1-20211210.034407-srg.jar%2364!/:?] {re:classloading,pl:accesstransformer:B}     at net.minecraft.server.level.ServerLevel.m_8834_(ServerLevel.java:771) ~[client-1.18.1-20211210.034407-srg.jar%2364!/:?] {re:classloading,pl:accesstransformer:B}     at net.minecraft.server.players.PlayerList.m_11261_(PlayerList.java:190) ~[client-1.18.1-20211210.034407-srg.jar%2364!/:?] {re:classloading}     at net.minecraft.server.network.ServerLoginPacketListenerImpl.m_143699_(ServerLoginPacketListenerImpl.java:138) ~[client-1.18.1-20211210.034407-srg.jar%2364!/:?] {re:classloading}     at net.minecraft.server.network.ServerLoginPacketListenerImpl.m_10055_(ServerLoginPacketListenerImpl.java:125) ~[client-1.18.1-20211210.034407-srg.jar%2364!/:?] {re:classloading}     at net.minecraft.server.network.ServerLoginPacketListenerImpl.m_10050_(ServerLoginPacketListenerImpl.java:69) ~[client-1.18.1-20211210.034407-srg.jar%2364!/:?] {re:classloading}     at net.minecraft.network.Connection.m_129483_(Connection.java:229) ~[client-1.18.1-20211210.034407-srg.jar%2364!/:?] {re:classloading}     at net.minecraft.server.network.ServerConnectionListener.m_9721_(ServerConnectionListener.java:142) ~[client-1.18.1-20211210.034407-srg.jar%2364!/:?] {re:classloading}     at net.minecraft.server.MinecraftServer.m_5703_(MinecraftServer.java:882) ~[client-1.18.1-20211210.034407-srg.jar%2364!/:?] {re:classloading,pl:accesstransformer:B}     at net.minecraft.server.MinecraftServer.m_5705_(MinecraftServer.java:808) ~[client-1.18.1-20211210.034407-srg.jar%2364!/:?] {re:classloading,pl:accesstransformer:B}     at net.minecraft.client.server.IntegratedServer.m_5705_(IntegratedServer.java:86) ~[client-1.18.1-20211210.034407-srg.jar%2364!/:?] {re:classloading,pl:runtimedistcleaner:A}     at net.minecraft.server.MinecraftServer.m_130011_(MinecraftServer.java:668) ~[client-1.18.1-20211210.034407-srg.jar%2364!/:?] {re:classloading,pl:accesstransformer:B}     at net.minecraft.server.MinecraftServer.m_177918_(MinecraftServer.java:258) ~[client-1.18.1-20211210.034407-srg.jar%2364!/:?] {re:classloading,pl:accesstransformer:B}     at java.lang.Thread.run(Thread.java:833) [?:?] {} A detailed walkthrough of the error, its code path and all known details is as follows: --------------------------------------------------------------------------------------- -- System Details -- Details:     Minecraft Version: 1.18.1     Minecraft Version ID: 1.18.1     Operating System: Windows 10 (amd64) version 10.0     Java Version: 17.0.1, Microsoft     Java VM Version: OpenJDK 64-Bit Server VM (mixed mode), Microsoft     Memory: 11204298824 bytes (10685 MiB) / 16341008384 bytes (15584 MiB) up to 34359738368 bytes (32768 MiB)     CPUs: 12     Processor Vendor: GenuineIntel     Processor Name: Intel(R) Core(TM) i5-10600KF CPU @ 4.10GHz     Identifier: Intel64 Family 6 Model 165 Stepping 5     Microarchitecture: unknown     Frequency (GHz): 4.10     Number of physical packages: 1     Number of physical CPUs: 6     Number of logical CPUs: 12     Graphics card #0 name: NVIDIA GeForce RTX 3060     Graphics card #0 vendor: NVIDIA (0x10de)     Graphics card #0 VRAM (MB): 4095.00     Graphics card #0 deviceId: 0x2503     Graphics card #0 versionInfo: DriverVersion=30.0.15.1123     Memory slot #0 capacity (MB): 8192.00     Memory slot #0 clockSpeed (GHz): 2.13     Memory slot #0 type: DDR4     Memory slot #1 capacity (MB): 8192.00     Memory slot #1 clockSpeed (GHz): 2.13     Memory slot #1 type: DDR4     Memory slot #2 capacity (MB): 8192.00     Memory slot #2 clockSpeed (GHz): 2.13     Memory slot #2 type: DDR4     Memory slot #3 capacity (MB): 8192.00     Memory slot #3 clockSpeed (GHz): 2.13     Memory slot #3 type: DDR4     Virtual memory max (MB): 34716.61     Virtual memory used (MB): 25990.04     Swap memory total (MB): 2048.00     Swap memory used (MB): 0.00     JVM Flags: 9 total; -XX:HeapDumpPath=MojangTricksIntelDriversForPerformance_javaw.exe_minecraft.exe.heapdump -Xss1M -Xmx32G -XX:+UnlockExperimentalVMOptions -XX:+UseG1GC -XX:G1NewSizePercent=20 -XX:G1ReservePercent=20 -XX:MaxGCPauseMillis=50 -XX:G1HeapRegionSize=32M     Server Running: true     Player Count: 1 / 8; [ServerPlayer['Player'/400, l='ServerLevel[world]', x=180.20, y=66.00, z=114.99]]     Data Packs: vanilla, mod:forge, mod:charginggadgets (incompatible), mod:supermartijn642configlib, mod:buildinggadgets (incompatible), mod:buildhelper (incompatible), mod:mcjtylib (incompatible), mod:supermartijn642corelib, mod:mininggadgets (incompatible), mod:rftoolsbase (incompatible), mod:rftoolsbuilder (incompatible), mod:journeymap, mod:jamd (incompatible), mod:cyclic (incompatible)     Type: Integrated Server (map_client.txt)     Is Modded: Definitely; Client brand changed to 'forge'; Server brand changed to 'forge'     ModLauncher: 9.1.0+9.1.0+main.6690ee51     ModLauncher launch target: forgeclient     ModLauncher naming: srg     ModLauncher services:          mixin PLUGINSERVICE          eventbus PLUGINSERVICE          object_holder_definalize PLUGINSERVICE          runtime_enum_extender PLUGINSERVICE          capability_token_subclass PLUGINSERVICE          accesstransformer PLUGINSERVICE          runtimedistcleaner PLUGINSERVICE          mixin TRANSFORMATIONSERVICE          fml TRANSFORMATIONSERVICE     FML Language Providers:         minecraft@1.0         javafml@null     Mod List:         client-1.18.1-20211210.034407-srg.jar             |Minecraft                     |minecraft                     |1.18.1              |DONE      |Manifest: a1:d4:5e:04:4f:d3:d6:e0:7b:37:97:cf:77:b0:de:ad:4a:47:ce:8c:96:49:5f:0a:cf:8c:ae:b2:6d:4b:8a:3f         charginggadgets-1.5.0.jar                         |Charging Gadgets              |charginggadgets               |1.5.0               |DONE      |Manifest: NOSIGNATURE         supermartijn642configlib-1.0.9-mc1.18.jar         |SuperMartijn642's Config Lib  |supermartijn642configlib      |1.0.9               |DONE      |Manifest: NOSIGNATURE         buildinggadgets-3.10.1-build.3+mc1.18.jar         |Building Gadgets              |buildinggadgets               |3.9.0               |DONE      |Manifest: NOSIGNATURE         torojimaBuildHelper-3.5.0.0.jar                   |Torojima's Buildhelper        |buildhelper                   |3.5.0.0             |DONE      |Manifest: NOSIGNATURE         mcjtylib-1.18-6.0.7.jar                           |McJtyLib                      |mcjtylib                      |1.18-6.0.7          |DONE      |Manifest: NOSIGNATURE         supermartijn642corelib-1.0.16-mc1.18.jar          |SuperMartijn642's Core Lib    |supermartijn642corelib        |1.0.16              |DONE      |Manifest: NOSIGNATURE         mininggadgets-1.10.2.jar                          |Mining Gadgets                |mininggadgets                 |1.10.2              |DONE      |Manifest: NOSIGNATURE         forge-1.18.1-39.0.59-universal.jar                |Forge                         |forge                         |39.0.59             |DONE      |Manifest: 84:ce:76:e8:45:35:e4:0e:63:86:df:47:59:80:0f:67:6c:c1:5f:6e:5f:4d:b3:54:47:1a:9f:7f:ed:5e:f2:90         rftoolsbase-1.18-3.0.3.jar                        |RFToolsBase                   |rftoolsbase                   |1.18-3.0.3          |DONE      |Manifest: NOSIGNATURE         rftoolsbuilder-1.18-4.0.5.jar                     |RFToolsBuilder                |rftoolsbuilder                |1.18-4.0.5          |DONE      |Manifest: NOSIGNATURE         journeymap-1.18-5.8.0alpha4.jar                   |Journeymap                    |journeymap                    |5.8.0alpha4         |DONE      |Manifest: NOSIGNATURE         Cyclic-1.18.1-1.6.10.jar                          |Cyclic                        |cyclic                        |1.18.1-1.6.10       |DONE      |Manifest: 1f:47:ac:b1:61:82:96:b8:47:19:16:d2:61:81:11:60:3a:06:4b:61:31:56:7d:44:31:1e:0c:6f:22:5b:4c:ed         JAMD-1.4.3-build.21+mc1.18.jar                    |Just Another Mining Dimension |jamd                          |1.4.3-build.21+mc1.1|DONE      |Manifest: NOSIGNATURE     Crash Report UUID: a6d01207-6e59-4f9f-909e-96ac79ce1194     FML: 39.0     Forge: net.minecraftforge:39.0.59
    • https://www.curseforge.com/minecraft/mc-mods
  • Topics

  • Who's Online (See full list)

×
×
  • Create New...

Important Information

By using this site, you agree to our Privacy Policy.