Everything posted by WickedWilliWonka
-
[1.14.4] Unsewing Workbench - problem with block texturing/recipe
Thanks, tags are pretty useful. Now here's the final recipe: { "type": "minecraft:crafting_shaped", "pattern": [ "aba", "dcd", "eee" ], "key": { "a": { "item": "minecraft:iron_ingot" }, "b": { "item": "minecraft:shears" }, "c": { "item": "minecraft:redstone" }, "d": { "tag": "minecraft:planks" }, "e": { "tag": "minecraft:logs" } }, "result": { "item": "unsewmod:unsew_block", "count": 1 } }
-
[1.14.4] Unsewing Workbench - problem with block texturing/recipe
I removed the metadata but kept the array as I want any kind of planks work for the recipe. Or is there some sort of wildcard? Thanks, with that additional info I got the recipe working now.
-
[1.14.4] Unsewing Workbench - problem with block texturing/recipe
Thanks. I've managed to fix the texture issue, the json was malformed. I also put way too much stuff into it. It now looks like this. assets/unsewmod/blockstates/unsew_block.json { "variants": { "": { "model": "unsewmod:block/unsew_block" } } } I still haven't fixed the recipe issue. I've checked that json as well, but it is valid. Any ideas?
-
[1.14.4] Unsewing Workbench - problem with block texturing/recipe
Greetings! I'm pretty new to Java and therefore modding with Forge. Although I have some coding experience I'm currently running into some issues I haven't been able to fix yet. I consulted the search and the docs. Before I start, let me give you a quick overview of what I'm trying to achieve with my mod. Goal The mod adds an unsewing workbench into the game where the player puts in any leather armor item and receives back around 1/2 of leather that has been used for crafting same item Instead of having players need to install the mod locally, I'd like to make it run on my server and provide it to all players Issues The blockitem renders with the correct textures, but the block itself only renders with the default minecraft texture (added screenshot below) The recipe does not work My code so far, concerning the texture issue assets/unsewmod/blockstates/unsew_block.json { "forge_marker": 1, "defaults": { "textures": { "up": "unsewmod:block/unsew_block_up", "down": "unsewmod:block/unsew_block_down", "east": "unsewmod:block/unsew_block_east", "west": "unsewmod:block/unsew_block_west", "north": "unsewmod:block/unsew_block_north", "south": "unsewmod:block/unsew_block_south" }, "model": "block/cube", "uvlock": false } "variants": {[]} } assets/unsewmod/models/block/unsew_block.json { "parent": "block/cube", "textures": { "up": "unsewmod:block/unsew_block_up", "down": "unsewmod:block/unsew_block_down", "east": "unsewmod:block/unsew_block_east", "west": "unsewmod:block/unsew_block_west", "north": "unsewmod:block/unsew_block_north", "south": "unsewmod:block/unsew_block_south" } } assets/unsewmod/models/item/unsew_block.json { "parent": "unsewmod:block/unsew_block" } I've been consulting the docs about this but somehow I'm doing something wrong, although inheriting from block:cube should do the trick as I understand. I also added a variant instead of a default, but I cannot make minecraft load my textures for the block. The item somehow knows what textures to load, but I don't get it why the block does not. My code so far, concerning the recipe issue assets/unsewmod/recipes/unsew_block.json { "type": "minecraft:crafting_shaped", "pattern": [ "X#X", "XXX", "XXX" ], "key": { "#": { "item": "minecraft:shears" }, "X": [ { "item": "minecraft:planks", "data": 0 }, { "item": "minecraft:planks", "data": 1 }, { "item": "minecraft:planks", "data": 2 }, { "item": "minecraft:planks", "data": 3 }, { "item": "minecraft:planks", "data": 4 }, { "item": "minecraft:planks", "data": 5 } ] }, "result": { "item": "unsewmod:unsew_block", "count": 1 } } I tried several stuff here, instead of using data I tried minecraft:acacia_wood_planks etc, but I get the impression that somehow my recipe isn't being loaded automatically although it should as stated in the docs? I get no error messages in Eclipse's console, only this: [minecraft/RecipeManager]: Loaded 6 recipes Just for completion, here's my classes UnsewMod.java package wickedsmods.unsewmod; import net.minecraftforge.fml.common.Mod; @Mod(value = UnsewMod.MODID) public class UnsewMod { public static final String MODID = "unsewmod"; } ModBlocks.java package wickedsmods.unsewmod; import net.minecraft.block.Block; import net.minecraft.block.material.Material; import net.minecraftforge.common.ToolType; import net.minecraftforge.event.RegistryEvent; import net.minecraftforge.eventbus.api.SubscribeEvent; import net.minecraftforge.fml.common.Mod; import net.minecraftforge.registries.ObjectHolder; @Mod.EventBusSubscriber(modid = UnsewMod.MODID, bus = Mod.EventBusSubscriber.Bus.MOD) @ObjectHolder(UnsewMod.MODID) public class ModBlocks { public static final Block unsew_block = null; @SubscribeEvent public static void registerBlocks(RegistryEvent.Register<Block> event) { event.getRegistry().registerAll( new Block(Block.Properties.create(Material.WOOD).hardnessAndResistance(1).harvestLevel(1).harvestTool(ToolType.AXE)).setRegistryName(UnsewMod.MODID, "unsew_block") ); } } ModItems.java package wickedsmods.unsewmod; import net.minecraft.item.BlockItem; import net.minecraft.item.Item; import net.minecraft.item.ItemGroup; import net.minecraftforge.event.RegistryEvent; import net.minecraftforge.eventbus.api.SubscribeEvent; import net.minecraftforge.fml.common.Mod; import net.minecraftforge.registries.ObjectHolder; @Mod.EventBusSubscriber(modid = UnsewMod.MODID, bus = Mod.EventBusSubscriber.Bus.MOD) @ObjectHolder(UnsewMod.MODID) public class ModItems { //public static final Item unsew_item = null; @SubscribeEvent public static void registerItems(RegistryEvent.Register<Item> event) { event.getRegistry().registerAll( //new Item(new Item.Properties()).setRegistryName(UnsewMod.MODID, "unsew_item"), new BlockItem(ModBlocks.unsew_block, new Item.Properties().group(ItemGroup.BUILDING_BLOCKS)).setRegistryName(ModBlocks.unsew_block.getRegistryName()) ); } } Thank you very much for reading all through this. In case I left something important out, please let me know. If you have any link for more detailed docs, please post them. I know that 1.14.4 is still beta and therefore buggy and subject to changes.
IPS spam blocked by CleanTalk.