Jump to content

winnetrie

Members
  • Posts

    408
  • Joined

  • Last visited

Everything posted by winnetrie

  1. I'm getting closer now. the .json files starts to make sense now. I'm still not done. The slabs can be placed down and can be stacked and have a the right texture. Yet if i give myself the doubleslab with the command, it has no texture and when placed down crashes the game: crash when placing double slab: What i also see now is this: [23:10:25] [Client thread/WARN]: Unable to resolve texture due to upward reference: #all in minecraft:models/block/cube_all [23:10:25] [Client thread/WARN]: Unable to resolve texture due to upward reference: #all in minecraft:models/block/cube_all [23:10:25] [Client thread/WARN]: Unable to resolve texture due to upward reference: #all in minecraft:models/block/cube_all [23:10:25] [Client thread/WARN]: Unable to resolve texture due to upward reference: #all in minecraft:models/block/cube_all [23:10:25] [Client thread/WARN]: Unable to resolve texture due to upward reference: #all in minecraft:models/block/cube_all [23:10:25] [Client thread/WARN]: Unable to resolve texture due to upward reference: #all in minecraft:models/block/cube_all [23:10:25] [Client thread/WARN]: Unable to resolve texture due to upward reference: #all in minecraft:models/block/cube_all Why is that? Here a picture: Edit: I removed the itemblock for chalkstonedoubleslab from the registry and also the render register for chalkstonedoubleslab. This removes completely an item for it from the game. I'm not sure this is the right way? On the other side, no 1 is going to miss it, because noone is using doubleslabs or am i wrong?
  2. They do stack on eachother now, so the slabs are working. They have no texture right now. none of them.
  3. What do you mean with 'you didn't specify'? Isn't it what i do then? I tried this now: { "forge_marker": 1, "defaults": { "textures": { "top": "tem:blocks/chalkstone", "bottom": "tem:blocks/chalkstone", "side": "tem:blocks/chalkstone" } }, "variants": { "half": { "bottom": { "model": "minecraft:half_slab" }, "top": { "model": "minecraft:upper_slab" } "variant": { "true": { "textures": { "all": "tem:blocks/chalkstone" } }, "false": { "textures": { "all": "tem:blocks/chalkstone" } } } } } But it still gives me the same errors.
  4. I could really need some help. I have really no clue how to create slabs in 1.10+ This is as far i could get: BlockCustomSlab: BlockCustomHalfSlab: BlockCustomDoubleSlab: and here my ModBlocks class: I also want to know how to get the forge style .json file right. As for now this is what it does now: -The slab in the inventory has no texture -When placed down the slab has the right texture. -The slabs do not stack on eachother. -I have some errors about the model [Client thread/ERROR] [FML]: Exception loading model for variant tem:BlockChalkstoneHalfSlab#half=top,variant=true for blockstate "tem:BlockChalkstoneHalfSlab[half=top,variant=true]" net.minecraftforge.client.model.ModelLoaderRegistry$LoaderException: Exception loading model tem:BlockChalkstoneHalfSlab#half=top,variant=true with loader VariantLoader.INSTANCE, skipping log:
  5. Alright and how would the json file look like? i tried this for halfslab and this for doubleslab:
  6. Ok i think i'm almost there. How do i register it now? Since registerBlock is deprecated. I did it like this in 1.7.10: But how it's done in 1.10+?
  7. For updating my 1.7.10 mod i also like to create slabs and stairs. Could someone help me pointing out how to start with slabs? Do i extend on the BlockSlab class? Or do i create 1 myself and what after that?
  8. Alright it works now It looks like this now: I also copied the generated.json file from minecraft over to my block model folder. That way i can reference to it. If i put it in my item model folder he still keeps looking for it in the block model folder even when i do this: "model": "tem:item/generated" The game is then searching for tem:block/item/generated.json To fix this i dragged the file to the block folder. At least i think it's ok like this. If not plz tell me. For now it is all working for me.
  9. Is this an item model file for the model folder or do i have to put this in the blockstate folder? cuz my items are now invisible
  10. I mean how would that .json file look like. I can make 16 different models for the items (16 .json files) I know how to do that. I was wondering if i could also do it all in 1 file, just like the blocks. I experimented with some stuff. I have 16 different clayballs (items). i made a .json file in the blockstate folder for those items, just like i did for blocks. This works, but it makes cuboids of it, while i want it flat ofc. It looks like this: Ofc i know it will be a cuboid, because of this line: "model": "minecraft:cube_all" How do i get a flat item?
  11. I know how to make a forge style.json file for creating metablocks, but how i do it for items? As far as i know items do not have blockstates. Or isn't it possble to make it in 1 file for items?
  12. You have a point there, maybe i can try this. The reason for what i try to do is because i think it looks nicer. It's not nessecary. If i would create a lot of different blocks, i could use constants maybe. An example i declare a constant as clayhardness and give it a value 10. So everytime i want to set a blocks hardness as hardened clay, i fill in the clayhardness constant. I think i have choices enough, but i do not understand all that blockstate stuff yet. Thank you all!
  13. Something like this.: this.setHardness(Blocks.STAINED_HARDENED_CLAY.getBlockState().getBlockHardness()); that gives me an error saying to replace getBlockHardness with getBlock
  14. But .getBlockHardness is deprecated. Is there another way then?
  15. As i can see i am extending it: public class BlockBrickedClay extends Block implements IMetaBlockName{ public static final PropertyEnum TYPE = PropertyEnum.create("type", BlockBrickedClay.EnumType.class); public BlockBrickedClay(Material material, float hardness, float resistance) { super(material); setHardness(hardness); setResistance(resistance); setDefaultState(this.blockState.getBaseState().withProperty(TYPE, EnumType.WHITE)); setUnlocalizedName(References.temBlocks.BRICKEDCLAY.getUnlocalizedName()); setRegistryName(References.temBlocks.BRICKEDCLAY.getRegistryName()); setCreativeTab(Tem.blockstab); } } I am making a bricked version for the hardened clayblocks, just like you have bricked stone. Now i instead of giving it manual the hardness, i want it to get it from the original hardened clayblock
  16. i know with this : setHardness(hardness); I can set the hardness of a block, but what if i want to use the hardness from an other block. Let's say from hardened clay. How do i achieve this? I tried with .blockHardness but that says "field not visible"
  17. Nice thank you very much. I have it working now: public static void registerRenders(){ registerRender(cheese); registerMetaRender(bricks,0,"type=white"); registerMetaRender(bricks,1,"type=orange"); registerMetaRender(bricks,2,"type=magenta"); registerMetaRender(bricks,3,"type=light_blue"); registerMetaRender(bricks,4,"type=yellow"); registerMetaRender(bricks,5,"type=lime"); registerMetaRender(bricks,6,"type=pink"); registerMetaRender(bricks,7,"type=gray"); registerMetaRender(bricks,8,"type=silver"); registerMetaRender(bricks,9,"type=cyan"); registerMetaRender(bricks,10,"type=purple"); registerMetaRender(bricks,11,"type=blue"); registerMetaRender(bricks,12,"type=brown"); registerMetaRender(bricks,13,"type=green"); registerMetaRender(bricks,14,"type=red"); registerMetaRender(bricks,15,"type=black"); } private static void registerMetaRender(Block block, int meta, String variant){ ModelLoader.setCustomModelResourceLocation(Item.getItemFromBlock(block), meta, new ModelResourceLocation(block.getRegistryName(),variant)); } private static void registerRender(Block block){ ModelLoader.setCustomModelResourceLocation(Item.getItemFromBlock(block), 0, new ModelResourceLocation(block.getRegistryName(),"inventory")); //Minecraft.getMinecraft().getRenderItem().getItemModelMesher().register(item, 0, new ModelResourceLocation(item.getRegistryName(),"inventory")); }
  18. I think i still don't understand how this works. I see an error in the console: Caused by: java.io.FileNotFoundException: tem:models/item/BlockBricks.json I'm confused now , i thought i didn't need to make a model for it. Edit: i have also this: [12:40:17] [Client thread/ERROR] [FML]: Exception loading model for variant tem:blockstates/BlockBrick#variants for item "tem:BlockBricks", blockstate location exception:
  19. What do i need to change here? the "inventory"? private static void registerMetaRender(Block block, int meta){ ModelLoader.setCustomModelResourceLocation(Item.getItemFromBlock(block), meta, new ModelResourceLocation(block.getRegistryName(),"inventory")); }
  20. i have this and it works : Do i have to do the same for the item model?
  21. the forge blockstates format looks a bit diffecult to understand. If i would use 1 model file how would i pass all the 16 types from my blockstate json to the model json? That's something i don't understand. Now for every type i have a model file. Can you help me explain this better. I read the example on the page there, but i don't understand it Edit: I tried this { "forge_marker": 1, "defaults": { "textures": { "texture": "tem:blocks/bricks_white", }, "model": "block/cube_all", "uvlock": true }, "variants": { "type": { "white":{ "textures": { "texture": "tem:blocks/bricks_white" } } } } } that doesn't work
  22. oh yes i got it working now: public static void registerRenders(){ registerRender(cheese); registerMetaRender(bricks,0,"bricks_white"); registerMetaRender(bricks,1,"bricks_orange"); registerMetaRender(bricks,2,"bricks_magenta"); registerMetaRender(bricks,3,"bricks_light_blue"); } private static void registerMetaRender(Block block, int meta, String file){ ModelLoader.setCustomModelResourceLocation(Item.getItemFromBlock(block), meta, new ModelResourceLocation(References.MOD_ID + ":" + file,"inventory")); //Minecraft.getMinecraft().getRenderItem().getItemModelMesher().register(item, 0, new ModelResourceLocation(item.getRegistryName(),"inventory")); } I will check on the Forge blockstates format
  23. I have created a block wich comes in 16 types (the 16 colors). All is working fine, they have the right texture but the item does not. this is the blockstate for BlockBricks.json: { "variants": { "type=white": { "model":"tem:bricks_white" }, "type=orange": { "model":"tem:bricks_orange" }, "type=magenta": { "model":"tem:bricks_magenta" }, "type=light_blue": { "model":"tem:bricks_light_blue" }, "type=yellow": { "model":"tem:bricks_yellow" }, "type=lime": { "model":"tem:bricks_lime" }, "type=pink": { "model":"tem:bricks_pink" }, "type=gray": { "model":"tem:bricks_gray" }, "type=silver": { "model":"tem:bricks_silver" }, "type=cyan": { "model":"tem:bricks_cyan" }, "type=purple": { "model":"tem:bricks_purple" }, "type=blue": { "model":"tem:bricks_blue" }, "type=brown": { "model":"tem:bricks_brown" }, "type=green": { "model":"tem:bricks_green" }, "type=red": { "model":"tem:bricks_red" }, "type=black": { "model":"tem:bricks_black" } } } this is 1 of the 16 block models (bricks_black.json): { "parent":"block/cube_all", "textures": { "all": "tem:blocks/bricks_black" } } the other 15 looks the same, only other color name. this is my item model for BlockBricks.json: { "parent": "block/cube_all", "textures": { "all": "tem:blocks/bricks_black" } } ofc this only set the first of all 16 items. So ingame i have 1 item with a texture and the other 15 not. Since the item model json has to be the same name as the registryname, i have no clue
  24. Yeah mostly it is just a small thing. A typo! my clientproxy looks now like this: public class ClientProxy implements CommonProxy{ @Override public void ItemRenderRegistry() { registerRender(ModItems.cheese); //ModItems.registerRenders(); System.out.println("renders have been registered"); } private static void registerRender(Item item){ ModelLoader.setCustomModelResourceLocation(item, 0, new ModelResourceLocation(item.getRegistryName(),"inventory")); //Minecraft.getMinecraft().getRenderItem().getItemModelMesher().register(item, 0, new ModelResourceLocation(item.getRegistryName(),"inventory")); } } @swordkorn I wouldn't know why implementing it is wrong for you? extends is for extending a class implements is for implementing an interface As far as i know you can only extend 1 class but you can implement as many interfaces you want. Implementing interfaces can be very usefull. Is it needed for what the use i have? No absolutely not, extending would be sufficient. Perhaps for more advanced modding you would probebly need to implement multiple interfaces.
  25. No i found the problem i edited my previous post
×
×
  • Create New...

Important Information

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