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

Mattah12

Members
  • Posts

    14
  • Joined

  • Last visited

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

Mattah12's Achievements

Tree Puncher

Tree Puncher (2/8)

0

Reputation

  1. I'll have a peruse through that then thanks.
  2. I have a custom crafting table block, Foundry, with slots arranged in a ring formation. There is a also a slot I use for a tool that gets hurt upon use. I have set up a custom recipe class also - https://github.com/Mattah12/Kanohi_Craft2022/blob/master/src/main/java/com/Mattah12/kanohicraft/recipes/FoundryRecipe.java What I want to know is how I'd go about making a datagen class for this custom recipe type? My plans will require a lot of possible recipes so I don't want to have to manually create all the jsons. I already have datagen set up for vanilla crafting, but can't get my head around how I go about creating the pattern. - https://github.com/Mattah12/Kanohi_Craft2022/blob/master/src/main/java/com/Mattah12/kanohicraft/datagen/KanRecipes.java Can that be done in the existing KanRecipes class? Would it require a new one?
  3. You fixed both my issues, thanks. Working code in spoilers below should anyone else want to know.
  4. Not sure why you're not seeing my most up-to-dat repo, but I'm now using: createItemTable("lightstone_torch", Registration.LIGHTSTONE_TORCH_ITEM.get()); createItemTable("lightstone_refined_torch", Registration.LIGHTSTONE_REFINED_TORCH_ITEM.get()); createItemTable("wall_lightstone_torch", Registration.LIGHTSTONE_TORCH_ITEM.get()); createItemTable("wall_lightstone_refined_torch", Registration.LIGHTSTONE_REFINED_TORCH_ITEM.get()); //AND protected LootTable.Builder createItemTable(String name, Item item) { LootPool.Builder builder = LootPool.lootPool() .name(name) .setRolls(ConstantValue.exactly(1)) .add(LootItem.lootTableItem(item)); return LootTable.lootTable().withPool(builder); }
  5. So I have two custom torches, both registered as below: public static final RegistryObject<Block> LIGHTSTONE_TORCH = BLOCKS.register("lightstone_torch", () -> new TorchBlock(BlockBehaviour.Properties.of(Material.DECORATION) .noCollission().noOcclusion().instabreak().lightLevel((p_50886_) -> {return 10;}) .sound(SoundType.GLASS), ParticleTypes.FLAME)); public static final RegistryObject<Block> WALL_LIGHTSTONE_TORCH = BLOCKS.register ("wall_lightstone_torch", () -> new WallTorchBlock((BlockBehaviour.Properties.of(Material.DECORATION) .noCollission().instabreak().lightLevel((p_152607_) -> {return 10;}) .sound(SoundType.GLASS).dropsLike(Registration.LIGHTSTONE_TORCH.get())), ParticleTypes.FLAME)); public static final RegistryObject<StandingAndWallBlockItem> LIGHTSTONE_TORCH_ITEM = ITEMS.register("lightstone_torch", () -> new StandingAndWallBlockItem(Registration.LIGHTSTONE_TORCH.get(), Registration.WALL_LIGHTSTONE_TORCH.get(), new Item.Properties().tab(ModSetup.ITEM_GROUP))); I was originally erroneously using createSimpleTable, under the assumption that torches in part act like blocks. Obviously that did not work so I am trying the below method: protected LootTable.Builder createItemTable(String name, Item item) { LootPool.Builder builder = LootPool.lootPool() .name(name) .setRolls(ConstantValue.exactly(1)) .add(LootItem.lootTableItem(item)); return LootTable.lootTable().withPool(builder); } This doesn't work either so I'm now a bit stumped. Full repo is here https://github.com/Mattah12/Kanohi_Craft2022/tree/master/src/main/java/com/Mattah12/kanohicraft My other issue is that the torches are rendering as in the linked pic, and not solid like a vanilla torch. https://imgur.com/a/Fo7TfzW
  6. Funilly enough I was just doing that as it was causing issues with my loot tables. I think I also have more work to do on the WALL blocks but thats tomorrows problem.
  7. Ah OK, so more like this? public static final RegistryObject<StandingAndWallBlockItem> LIGHTSTONE_TORCH_ITEM = ITEMS.register("lightstone_torch_item", () -> new StandingAndWallBlockItem(Registration.LIGHTSTONE_TORCH.get(), Registration.WALL_LIGHTSTONE_TORCH.get(), new Item.Properties()));
  8. I'm looking to make a custom torch (well two but anyway). I've been looking at vanilla and think I'm almost there, but just having some issues with registration. In particular where I'm calling fromBlock for the two TORCH_ITEMS below cannot be resolved: public static final RegistryObject<Block> LIGHTSTONE_TORCH = BLOCKS.register("lightstone_torch", () -> new TorchBlock(BlockBehaviour.Properties.of(Material.DECORATION) .noCollission().instabreak().lightLevel((p_50886_) -> {return 10;}) .sound(SoundType.GLASS), ParticleTypes.FLAME)); public static final RegistryObject<Block> WALL_LIGHTSTONE_TORCH = BLOCKS.register ("wall_lightstone_torch", () -> new WallTorchBlock((BlockBehaviour.Properties.of(Material.DECORATION) .noCollission().instabreak().lightLevel((p_152607_) -> {return 10;}) .sound(SoundType.GLASS).dropsLike(Registration.LIGHTSTONE_TORCH.get())), ParticleTypes.FLAME)); public static final RegistryObject<Item> LIGHTSTONE_TORCH_ITEM = new StandingAndWallBlockItem.fromBlock(LIGHTSTONE_TORCH).ItemProperties(); public static final RegistryObject<Block> LIGHTSTONE_REFINED_TORCH = BLOCKS.register("lightstone_refined_torch", () -> new TorchBlock(BlockBehaviour.Properties.of(Material.DECORATION) .noCollission().instabreak().lightLevel((p_50886_) -> {return 15;}) .sound(SoundType.GLASS), ParticleTypes.FLAME)); public static final RegistryObject<Block> WALL_LIGHTSTONE_REFINED_TORCH = BLOCKS.register ("wall_lightstone_refined_torch", () -> new WallTorchBlock((BlockBehaviour.Properties.of(Material.DECORATION) .noCollission().instabreak().lightLevel((p_152607_) -> {return 15;}) .sound(SoundType.GLASS).dropsLike(Registration.LIGHTSTONE_REFINED_TORCH.get())), ParticleTypes.FLAME)); public static final RegistryObject<Item> LIGHTSTONE_REFINED_TORCH_ITEM = new StandingAndWallBlockItem.fromBlock(LIGHTSTONE_REFINED_TORCH).ItemProperties(); Rest of my datagen is here should it be needed - https://github.com/Mattah12/Kanohi_Craft2022/tree/master/src/main/java/com/Mattah12/kanohicraft/datagen
  9. Hey this did the trick, thank you! Just need to refine my actual texture pngs now.
  10. Hmm, still no luck { "parent": "minecraft:block/block", "textures": { "particle": "kanohicraft:block/lightstone_block_deepslate" }, "elements": [ { "from": [ 0, 0, 0 ], "to": [ 16, 16, 16 ], "faces": { "down": { "texture": "kanohicraft:block/lightstone_block_deepslate_gems", "cullface": "down" }, "up": { "texture": "kanohicraft:block/lightstone_block_deepslate_gems", "cullface": "up" }, "north": { "texture": "kanohicraft:block/lightstone_block_deepslate_gems", "cullface": "north" }, "south": { "texture": "kanohicraft:block/lightstone_block_deepslate_gems", "cullface": "south" }, "west": { "texture": "kanohicraft:block/lightstone_block_deepslate_gems", "cullface": "west" }, "east": { "texture": "kanohicraft:block/lightstone_block_deepslate_gems", "cullface": "east" } } }, { "from": [ 0, 0, 0 ], "to": [ 16, 16, 16], "faces": { "down": { "texture": "kanohicraft:block/lightstone_block_deepslate", "cullface": "down" }, "up": { "texture": "kanohicraft:block/lightstone_block_deepslate", "cullface": "up" }, "north": { "texture": "kanohicraft:block/lightstone_block_deepslate", "cullface": "north" }, "south": { "texture": "kanohicraft:block/lightstone_block_deepslate", "cullface": "south" }, "west": { "texture": "kanohicraft:block/lightstone_block_deepslate", "cullface": "west" }, "east": { "texture": "kanohicraft:block/lightstone_block_deepslate", "cullface": "east" } } } ] } My log has the following lines, which makes me think I may have a typo or am misnaming something somewhere. Perhaps fresh eyes tomorrow will do better. But great if anyone notices something in the meantime. [30Jun2022 20:32:35.963] [Worker-Main-14/WARN] [net.minecraft.client.resources.model.ModelBakery/]: Unable to resolve texture reference: kanohicraft:block/lightstone_block_overworld_gems in kanohicraft:block/lightstone_block_overworld [30Jun2022 20:32:35.966] [Worker-Main-14/WARN] [net.minecraft.client.resources.model.ModelBakery/]: Unable to resolve texture reference: kanohicraft:block/lightstone_block_overworld in kanohicraft:block/lightstone_block_overworld [30Jun2022 20:32:35.966] [Worker-Main-14/WARN] [net.minecraft.client.resources.model.ModelBakery/]: Unable to resolve texture reference: kanohicraft:block/lightstone_block_overworld_gems in kanohicraft:item/lightstone_block_overworld [30Jun2022 20:32:35.966] [Worker-Main-14/WARN] [net.minecraft.client.resources.model.ModelBakery/]: Unable to resolve texture reference: kanohicraft:block/lightstone_block_overworld in kanohicraft:item/lightstone_block_overworld [30Jun2022 20:32:35.966] [Worker-Main-14/WARN] [net.minecraft.client.resources.model.ModelBakery/]: Unable to resolve texture reference: kanohicraft:block/lightstone_block_deepslate_gems in kanohicraft:item/lightstone_block_deepslate [30Jun2022 20:32:35.967] [Worker-Main-14/WARN] [net.minecraft.client.resources.model.ModelBakery/]: Unable to resolve texture reference: kanohicraft:block/lightstone_block_deepslate in kanohicraft:item/lightstone_block_deepslate [30Jun2022 20:32:35.968] [Worker-Main-14/WARN] [net.minecraft.client.resources.model.ModelBakery/]: Unable to resolve texture reference: kanohicraft:block/lightstone_block_deepslate_gems in kanohicraft:block/lightstone_block_deepslate [30Jun2022 20:32:35.968] [Worker-Main-14/WARN] [net.minecraft.client.resources.model.ModelBakery/]: Unable to resolve texture reference: kanohicraft:block/lightstone_block_deepslate in kanohicraft:block/lightstone_block_deepslate
  11. Hmmm, still getting the purple and black 'no texture'. What does cullface do? { "parent": "minecraft:block/block", "particle": "kanohicraft:block/lightstone_block_overworld", "elements": [ { "from": [ 0, 0, 0 ], "to": [ 16, 16, 16 ], "faces": { "down": { "texture": "kanohicraft:block/lightstone_block_deepslate_gems", "cullface": "down" }, "up": { "texture": "kanohicraft:block/lightstone_block_deepslate_gems", "cullface": "up" }, "north": { "texture": "kanohicraft:block/lightstone_block_deepslate_gems", "cullface": "north" }, "south": { "texture": "kanohicraft:block/lightstone_block_deepslate_gems", "cullface": "south" }, "west": { "texture": "kanohicraft:block/lightstone_block_deepslate_gems", "cullface": "west" }, "east": { "texture": "kanohicraft:block/lightstone_block_deepslate_gems", "cullface": "east" } } }, { "from": [ 0, 0, 0 ], "to": [ 16, 16, 16], "faces": { "down": { "texture": "kanohicraft:block/lightstone_block_deepslate", "cullface": "down" }, "up": { "texture": "kanohicraft:block/lightstone_block_deepslate", "cullface": "up" }, "north": { "texture": "kanohicraft:block/lightstone_block_deepslate", "cullface": "north" }, "south": { "texture": "kanohicraft:block/lightstone_block_deepslate", "cullface": "south" }, "west": { "texture": "kanohicraft:block/lightstone_block_deepslate", "cullface": "west" }, "east": { "texture": "kanohicraft:block/lightstone_block_deepslate", "cullface": "east" } } } ] }
  12. Thanks both for the replies. So something like this? { "parent": "minecraft:block/block", "elements": [ { "from": [ 0, 0, 0 ], "to": [ 16, 16, 16 ], "faces": { "down": { "texture": "kanohicraft:block/lightstone_block_overworld_gems", "cullface": "down" }, "up": { "texture": "kanohicraft:block/lightstone_block_overworld_gems", "cullface": "up" }, "north": { "texture": "kanohicraft:block/lightstone_block_overworld_gems", "cullface": "north" }, "south": { "texture": "kanohicraft:block/lightstone_block_overworld_gems", "cullface": "south" }, "west": { "texture": "kanohicraft:block/lightstone_block_overworld_gems", "cullface": "west" }, "east": { "texture": "kanohicraft:block/lightstone_block_overworld_gems", "cullface": "east" } } }, { "from": [ 1, 1, 1 ], "to": [ 15, 15, 15 ], "faces": { "down": { "texture": "kanohicraft:block/lightstone_block_overworld", "cullface": "down" }, "up": { "texture": "kanohicraft:block/lightstone_block_overworld", "cullface": "up" }, "north": { "texture": "kanohicraft:block/lightstone_block_overworld", "cullface": "north" }, "south": { "texture": "kanohicraft:block/lightstone_block_overworld", "cullface": "south" }, "west": { "texture": "kanohicraft:block/lightstone_block_overworld", "cullface": "west" }, "east": { "texture": "kanohicraft:block/lightstone_block_overworld", "cullface": "east" } } } ] }
  13. I'm trying to create a block that has semi-transparent gems encrusted in it. My previous attempts using the .translucent property and just the one texture layer resulted in a block that I could see right through into the world behind. So therefore I thought that two texture layers would be the way to go. I've tried two different ways with no success, using both block/block and block/cube and cube_all. { "parent": "minecraft:block/block", "textures": { "layer0": "kanohicraft:block/lightstone_block_deepslate", "layer1": "kanohicraft:block/lightstone_block_deepslate_gems" } } { "parent": "minecraft:block/block", "textures": { "down": { "layer0": "kanohicraft:block/lightstone_block_overworld", "layer1": "kanohicraft:block/lightstone_block_overworld_gems" }, "up": { "layer0": "kanohicraft:block/lightstone_block_overworld", "layer1": "kanohicraft:block/lightstone_block_overworld_gems" }, "north": { "layer0": "kanohicraft:block/lightstone_block_overworld", "layer1": "kanohicraft:block/lightstone_block_overworld_gems" }, "south": { "layer0": "kanohicraft:block/lightstone_block_overworld", "layer1": "kanohicraft:block/lightstone_block_overworld_gems" }, "east": { "layer0": "kanohicraft:block/lightstone_block_overworld", "layer1": "kanohicraft:block/lightstone_block_overworld_gems" }, "west": { "layer0": "kanohicraft:block/lightstone_block_overworld", "layer1": "kanohicraft:block/lightstone_block_overworld_gems" } } } If anyone has done something similar they could point me towards? Full repo is here - https://github.com/Mattah12/Kanohi_Craft2022/tree/master/src
  14. I have eight items, each a different colour. I would like to create variants of all 8 items using all 8 colour combinations. These items all use the custom tag 'Mask'. Can tags be used with getItemColor?
×
×
  • Create New...

Important Information

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