Jump to content

EphraimFE

Members
  • Posts

    6
  • Joined

  • Last visited

Everything posted by EphraimFE

  1. Got it! { "forge_marker": 1, "defaults": { "textures": { "all": "fe:blocks/anc_stone_brick_def" }, "model": "cube_all", "uvlock": true }, "variants": { // mossy is a boolean property. "mossy": { "true": { "textures": { "all": "fe:blocks/anc_stone_brick_mossy" } }, "false": { } } } } This issue was, if you can believe it, an extra comma when I removed uvlock...whoops... Thanks guys.
  2. Eventually I will have stone bricks, mossy stone bricks, mossy chiseled stone bricks, chiseled stone bricks, ornate(or something) stone bricks, mossy ornate stone bricks...etc. Eventually it will be extremely complex and I'd like to keep my blockstate all one file. Additionally, I would like them all to count as BlockAncStoneBricks so I can use them in code equally (say if I require the player to place 5 stone bricks - every variant should count which is why I'm using meta). Its also a good learning experience. What he means is why don't you just assign the model to the block in the blockstate to "block/cube_all" and then apply the texture using the "textures" tag like so. "connected_down=true,connected_east=true,connected_north=true,connected_south=true,connected_up=true,connected_west=false":{ "model": "cube_all", "textures": { "west": "westFacingTexture" //just use "all": "texturepath" } } Don't mind the insane amount of variants (connected textures done with a forge blockstate json). Oh I gotcha, that's brilliant I don't know why I didn't think about that. { "forge_marker": 1, "defaults": { "textures": { "all": "fe:blocks/anc_stone_brick_def" }, "model": "block/cube_all", }, "variants": { "mossy": { "true": { "textures": { "all": "fe:blocks/anc_stone_brick_moss" } }, "false": { } } } } With these changes, I get more errors, however. [16:00:36] [Client thread/WARN]: Unable to resolve texture due to upward reference: #all in minecraft:models/block/cube_all [16:00:37] [Client thread/WARN]: Unable to resolve texture due to upward reference: #all in minecraft:models/block/cube_all [16:00:37] [Client thread/WARN]: Unable to resolve texture due to upward reference: #all in minecraft:models/block/cube_all [16:00:37] [Client thread/WARN]: Unable to resolve texture due to upward reference: #all in minecraft:models/block/cube_all [16:00:37] [Client thread/WARN]: Unable to resolve texture due to upward reference: #all in minecraft:models/block/cube_all [16:00:37] [Client thread/ERROR] [FML]: Exception loading model for variant fe:BlockAncStoneBrick#mossy=false for blockstate "fe:BlockAncStoneBrick[mossy=false]" net.minecraftforge.client.model.ModelLoaderRegistry$LoaderException: Exception loading model fe:BlockAncStoneBrick#mossy=false with loader VariantLoader.INSTANCE, skipping
  3. I tried it, still didnt work. Heres an example of the model using this (I think), pressure_plate_up { "parent": "block/thin_block", "textures": { "particle": "#texture" }, "elements": [ { "from": [ 1, 0, 1 ], "to": [ 15, 1, 15 ], "faces": { "down": { "uv": [ 1, 1, 15, 15 ], "texture": "#texture", "cullface": "down" }, "up": { "uv": [ 1, 1, 15, 15 ], "texture": "#texture" }, "north": { "uv": [ 1, 15, 15, 16 ], "texture": "#texture" }, "south": { "uv": [ 1, 15, 15, 16 ], "texture": "#texture" }, "west": { "uv": [ 1, 15, 15, 16 ], "texture": "#texture" }, "east": { "uv": [ 1, 15, 15, 16 ], "texture": "#texture" } } } ] } Note I've also tried { "parent": "block/cube_all", "textures": { "all": { "texture": "#texture" } } } My block's model is named ancBlockStoneBrick in my models directory. Before I started turning this block into a metablock it worked fine and displayed the default stone brick texture. Eventually I will have stone bricks, mossy stone bricks, mossy chiseled stone bricks, chiseled stone bricks, ornate(or something) stone bricks, mossy ornate stone bricks...etc. Eventually it will be extremely complex and I'd like to keep my blockstate all one file. Additionally, I would like them all to count as BlockAncStoneBricks so I can use them in code equally (say if I require the player to place 5 stone bricks - every variant should count which is why I'm using meta). Its also a good learning experience. Nope, just in the code i posted
  4. Whenever the resources are reloaded: [18:28:54] [Client thread/WARN]: Unable to resolve texture due to upward reference: #all in minecraft:models/block/cube_all [18:28:54] [Client thread/WARN]: Unable to resolve texture due to upward reference: #all in minecraft:models/block/cube_all [18:28:54] [Client thread/WARN]: Unable to resolve texture due to upward reference: #all in minecraft:models/block/cube_all [18:28:54] [Client thread/WARN]: Unable to resolve texture due to upward reference: #all in minecraft:models/block/cube_all [18:28:54] [Client thread/WARN]: Unable to resolve texture due to upward reference: #all in minecraft:models/block/cube_all [18:28:54] [Client thread/WARN]: Unable to resolve texture due to upward reference: #all in minecraft:models/block/cube_all [18:28:54] [Client thread/WARN]: Unable to resolve texture due to upward reference: #all in minecraft:models/block/cube_all [18:28:54] [Client thread/WARN]: Unable to resolve texture due to upward reference: #all in minecraft:models/block/cube_all [18:28:54] [Client thread/WARN]: Unable to resolve texture due to upward reference: #all in minecraft:models/block/cube_all [18:28:54] [Client thread/WARN]: Unable to resolve texture due to upward reference: #all in minecraft:models/block/cube_all [18:28:54] [Client thread/WARN]: Unable to resolve texture due to upward reference: #all in minecraft:models/block/cube_all [18:28:54] [Client thread/WARN]: Unable to resolve texture due to upward reference: #all in minecraft:models/block/cube_all [18:28:54] [Client thread/WARN]: Unable to resolve texture due to upward reference: #all in minecraft:models/block/cube_all [18:28:54] [Client thread/WARN]: Unable to resolve texture due to upward reference: #all in minecraft:models/block/cube_all [18:28:54] [Client thread/WARN]: Unable to resolve texture due to upward reference: #all in minecraft:models/block/cube_all [18:28:54] [Client thread/WARN]: Unable to resolve texture due to upward reference: #all in minecraft:models/block/cube_all [18:28:54] [Client thread/WARN]: Unable to resolve texture due to upward reference: #all in minecraft:models/block/cube_all [18:28:54] [Client thread/WARN]: Unable to resolve texture due to upward reference: #all in minecraft:models/block/cube_all [18:28:55] [Client thread/WARN]: Unable to resolve texture due to upward reference: #all in minecraft:models/block/cube_all
  5. I'm still working on figuring this concept out myself (though simpler application). I believe this page, may be of some use. https://mcforge.readthedocs.io/en/latest/blockstates/forgeBlockstates/
  6. I'm trying to create a copy of stone bricks with a slightly different texture and some different properties. I'd like them all to be in a single class within my ModBlocks package, BlockAncStoneBrick. One form of the block is MOSSY which can either be true or false. Later on, I would have chiseled blocks but unlike vanilla's stone brick I can have chiseled mossy blocks. My plan is to have one blockstate that can read all the different varients. I've looked at https://mcforge.readthedocs.io/en/latest/blockstates/forgeBlockstates/ but I can't get it to work. I 'm getting purple and black blocks. My Blocks class: package eph.fe.blocks; import eph.fe.Main; import eph.fe.Reference; import net.minecraft.block.Block; import net.minecraft.block.BlockStoneBrick; import net.minecraft.block.material.Material; import net.minecraft.block.properties.IProperty; import net.minecraft.block.properties.PropertyBool; import net.minecraft.block.properties.PropertyDirection; import net.minecraft.block.properties.PropertyEnum; import net.minecraft.block.properties.PropertyInteger; import net.minecraft.block.state.BlockStateContainer; import net.minecraft.block.state.IBlockState; import net.minecraft.util.EnumFacing; import net.minecraft.util.IStringSerializable; import net.minecraft.world.storage.loot.functions.SetMetadata; public class BlockAncStoneBrick extends Block { public static final PropertyBool MOSSY = PropertyBool.create("mossy"); public BlockAncStoneBrick() { super(Material.ROCK); setUnlocalizedName(Reference.feBlocks.ANCSTONEBRICK.getUnlocalizedName()); setRegistryName(Reference.feBlocks.ANCSTONEBRICK.getRegistryName()); setCreativeTab(Main.ANCIENT_TAB); setDefaultState(this.blockState.getBaseState().withProperty(MOSSY, false)); } @Override protected BlockStateContainer createBlockState() { return new BlockStateContainer(this, MOSSY); } @Override public int getMetaFromState(IBlockState state) { int i = 0; if (state.getValue(MOSSY) == true) i++; return i; } @Override public IBlockState getStateFromMeta(int meta) { if (meta % 2 == 0) return getDefaultState().withProperty(MOSSY, true); else return getDefaultState().withProperty(MOSSY, false); } } Blockstate { "forge_marker": 1, "defaults": { "textures": { "texture": "fe:blocks/anc_stone_brick_def" }, "model": "fe:ancStoneBrick", "uvlock": true }, "variants": { "mossy": { "true": { "textures": { "texture": "fe:blocks/anc_stone_brick_moss" } }, "false": { } } } } Model { //"parent": "block/cube_all" <--whether this is here or not error persists "textures": { "all": "#texture" } } If I had to guess, I'd say there was something wrong with my model json. The documentation I had didn't mention anything about the model json (just the blockstate) so I tried to copy the pressure plate one. Anyone know what's up?[/code]
×
×
  • Create New...

Important Information

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