Jump to content

Recommended Posts

Posted (edited)

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

Posted (edited)

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
Posted (edited)

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
Posted

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.

Posted
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?

 

Posted

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.

Posted
41 minutes ago, Draco18s said:

In each variant, put:


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

This is basic blockstate stuff.

Eaah, but as you see, I wrote in first two messages that this doesn't work, even without spaces.

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

Posted (edited)
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
Posted

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.

Posted
5 minutes ago, Draco18s said:

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

 

 


variant=east,activated=true

does not equal


activated=true,variant=east

And what about inner variants as I wrote message above?

Posted

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.

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

    • I have a custom 3d model which works perfectly. BUT I want it to be held diffrently on the players hand when the item is being used. My JSON file under assets/examplemod/items looks like this: { "model": { "type": "minecraft:condition", "on_false": { "type": "minecraft:model", "model": "examplemod:item/example_item" }, "on_true": { "type": "minecraft:model", "model": "examplemod:item/example_item_using" }, "property": "minecraft:using_item" } }   This works fine until the item is used. The correct model will be displayed but with a full black texture instead of the actuall texture. Any idea why? (I want to use the exact same texture for both items, because their model is the same just diffrent displays on firstperson_righthand and firstperson_lefthand). The models JSON's are fully blockbench files inlcuding the elements, display, textures with texture_size.   Also is this the correct way to do it? Because it feels so dumb to change the exact same model just for a diffrent right- and lefthand view.   (fyi: ItemUseAnimation is BLOCK for this item)
    • I just backed up my world then tried to create new mod with currently equipped mod but with new world still made same error. Sooo I think it's not world error. also It's working fine on singleplayer. + but it made some another weird error with new world
    • Maybe the file is too large - you can upload the log file via Mediafire
    • Create a new instance and start with Embeddium + Oculus Then add new mods one by one or in groups The "IncompatibleClassChangeError: class net.coderbot.iris.gui.option.ShadowDistanceOption" often appears in connection with an incompatible mod
    • I hosted forge modded server using feather client I was able to join without any issues yesterday, but today after I tested my shader on my single world then tried to join the world but it made error meassage. (I also changed server.properties's render settings, but I reverted it as same as yesterday) So I removed my shader and removed optifine on server and on my mod file then it made this error: Internal Exception: io.netty.handler.codec.DecoderException: net.minecraft.ResourceLocationException: Non [a-z0-9/-1 character in path of location: inecraft:ask_server\u0012\u0001\uFFFD\n\u0007targets\u001D\u0001\u0014minecraft:ask_server\u0012\u0002\uFFFD\n\uFFFD\n\u0002id!\u0014minecraft:ask_server\u0002 \u0001\uFFFD\n\u0006target\u0006\u0001\u0002\u0001\uFFFD\n\ttarget My server/client is 1.20.1 forge. And I got 34 mods total, it was working pretty fine yesterday (I did not add/remove any mods before it started happening) I hope it's not about my worlds, it's been quite long since using this world I'm not native english speaker so there may be grammar issue! Thank you for reading!
  • Topics

×
×
  • Create New...

Important Information

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