diff --git a/src/main/java/me/woach/bone/block/BlocksRegistry.java b/src/main/java/me/woach/bone/block/BlocksRegistry.java index fba06e6..4002ded 100644 --- a/src/main/java/me/woach/bone/block/BlocksRegistry.java +++ b/src/main/java/me/woach/bone/block/BlocksRegistry.java @@ -1,5 +1,7 @@ package me.woach.bone.block; +import java.util.function.Supplier; + import me.woach.bone.Bone; import net.fabricmc.fabric.api.object.builder.v1.block.FabricBlockSettings; import net.minecraft.block.Block; @@ -7,13 +9,11 @@ import net.minecraft.registry.Registry; import net.minecraft.sound.BlockSoundGroup; -import java.util.function.Supplier; - public enum BlocksRegistry { BONE_FORGE_BLOCK("bone_forge", BoneForgeBlock::new), BONE_FIRE_BLOCK("bone_fire", BoneFireBlock::new), - CHARCOAL_BLOCK("charcoal_block", () -> new Block( - FabricBlockSettings.create().requiresTool().strength(3.0f).sounds(BlockSoundGroup.STONE).burnable())); + FIREWOOD_BLOCK("firewood_block", () -> new Block( + FabricBlockSettings.create().strength(1.5f).sounds(BlockSoundGroup.WOOD).burnable())); private final String path; private final Supplier blockSupplier; diff --git a/src/main/java/me/woach/bone/items/ItemsRegistry.java b/src/main/java/me/woach/bone/items/ItemsRegistry.java index 401746f..eca1385 100644 --- a/src/main/java/me/woach/bone/items/ItemsRegistry.java +++ b/src/main/java/me/woach/bone/items/ItemsRegistry.java @@ -1,5 +1,8 @@ package me.woach.bone.items; +import java.util.Arrays; +import java.util.function.Supplier; + import me.woach.bone.Bone; import me.woach.bone.block.BlocksRegistry; import me.woach.bone.material.BonesteelArmorMaterial; @@ -7,35 +10,34 @@ import net.fabricmc.fabric.api.item.v1.FabricItemSettings; import net.fabricmc.fabric.api.itemgroup.v1.ItemGroupEvents; import net.minecraft.data.client.BlockStateVariantMap.QuadFunction; -import net.minecraft.item.*; +import net.minecraft.item.ArmorItem; import net.minecraft.item.ArmorItem.Type; +import net.minecraft.item.AxeItem; +import net.minecraft.item.BlockItem; +import net.minecraft.item.HoeItem; +import net.minecraft.item.Item; +import net.minecraft.item.PickaxeItem; +import net.minecraft.item.ShovelItem; +import net.minecraft.item.ToolMaterial; import net.minecraft.registry.Registries; import net.minecraft.registry.Registry; import net.minecraft.util.Rarity; -import java.util.Arrays; -import java.util.function.Supplier; - public enum ItemsRegistry { BONE_ITEM("bone", BoneItem::new), BONE_FORGE_BLOCK_ITEM("bone_forge", () -> new BlockItem(BlocksRegistry.BONE_FORGE_BLOCK.get(), new FabricItemSettings())), - CHARCOAL_BLOCK_ITEM("charcoal_block", () -> new BlockItem(BlocksRegistry.CHARCOAL_BLOCK.get(), + FIREWOOD_BLOCK_BLOCK_ITEM("firewood_block", () -> new BlockItem(BlocksRegistry.FIREWOOD_BLOCK.get(), new FabricItemSettings())), BONESTEEL_HELMET("bonesteel_helmet", () -> ItemBuilder.newItemArmor(Type.HELMET)), BONESTEEL_CHESTPLATE("bonesteel_chestplate", () -> ItemBuilder.newItemArmor(Type.CHESTPLATE)), BONESTEEL_LEGGINGS("bonesteel_leggings", () -> ItemBuilder.newItemArmor(Type.LEGGINGS)), BONESTEEL_BOOTS("bonesteel_boots", () -> ItemBuilder.newItemArmor(Type.BOOTS)), - BONESTEEL_PICKAXE("bonesteel_pickaxe", () -> - ItemBuilder.newToolItem(PickaxeItem::new, 1, -2.4f)), - BONESTEEL_AXE("bonesteel_axe", () -> - ItemBuilder.newToolItem(AxeItem::new, 6.0f, -2.9f)), - BONESTEEL_SHOVEL("bonesteel_shovel", () -> - ItemBuilder.newToolItem(ShovelItem::new, 1.5F, -3.0F)), - BONESTEEL_HOE("bonesteel_hoe", () -> - ItemBuilder.newToolItem(HoeItem::new, -1, -1.0F)), - BONESTEEL_SWORD("bonesteel_sword", () -> - ItemBuilder.newToolItem(HoeItem::new, 3, -2.2F)), + BONESTEEL_PICKAXE("bonesteel_pickaxe", () -> ItemBuilder.newToolItem(PickaxeItem::new, 1, -2.4f)), + BONESTEEL_AXE("bonesteel_axe", () -> ItemBuilder.newToolItem(AxeItem::new, 6.0f, -2.9f)), + BONESTEEL_SHOVEL("bonesteel_shovel", () -> ItemBuilder.newToolItem(ShovelItem::new, 1.5F, -3.0F)), + BONESTEEL_HOE("bonesteel_hoe", () -> ItemBuilder.newToolItem(HoeItem::new, -1, -1.0F)), + BONESTEEL_SWORD("bonesteel_sword", () -> ItemBuilder.newToolItem(HoeItem::new, 3, -2.2F)), AMETHYST_DUST("amethyst_dust", ItemBuilder::newItemDust), LAPIS_DUST("lapis_dust", ItemBuilder::newItemDust), EMERALD_DUST("emerald_dust", ItemBuilder::newItemDust), @@ -64,9 +66,8 @@ public static void registerAll() { register(item.path, item.get()); } ItemGroupEvents.modifyEntriesEvent(Bone.ITEM_GROUP).register(entries -> entries.addAll( - Arrays.stream(values()).filter(item -> item.addToItemGroup).map(item -> - item.get().getDefaultStack()).toList()) - ); + Arrays.stream(values()).filter(item -> item.addToItemGroup).map(item -> item.get().getDefaultStack()) + .toList())); } public Item get() { @@ -88,13 +89,14 @@ protected static Item newItemArmor(Type armorType) { return new ArmorItem(new BonesteelArmorMaterial(), armorType, new FabricItemSettings().rarity(Rarity.EPIC)); } - protected static Item newToolItem(QuadFunction toolCreator, - int damage, float attackspeed) { + protected static Item newToolItem(QuadFunction toolCreator, + int damage, float attackspeed) { return toolCreator.apply(BonesteelToolMaterial.INSTANCE, damage, attackspeed, new FabricItemSettings().rarity(Rarity.EPIC)); } - protected static Item newToolItem(QuadFunction toolCreator, - float damage, float attackspeed) { + + protected static Item newToolItem(QuadFunction toolCreator, + float damage, float attackspeed) { return toolCreator.apply(BonesteelToolMaterial.INSTANCE, damage, attackspeed, new FabricItemSettings().rarity(Rarity.EPIC)); } diff --git a/src/main/resources/assets/bone/blockstates/charcoal_block.json b/src/main/resources/assets/bone/blockstates/firewood_block.json similarity index 51% rename from src/main/resources/assets/bone/blockstates/charcoal_block.json rename to src/main/resources/assets/bone/blockstates/firewood_block.json index a8eda14..be7ed9b 100644 --- a/src/main/resources/assets/bone/blockstates/charcoal_block.json +++ b/src/main/resources/assets/bone/blockstates/firewood_block.json @@ -1,7 +1,7 @@ { "variants": { "": { - "model": "bone:block/charcoal_block" + "model": "bone:block/firewood_block" } } } \ No newline at end of file diff --git a/src/main/resources/assets/bone/lang/en_us.json b/src/main/resources/assets/bone/lang/en_us.json index ed1f540..5713fc3 100644 --- a/src/main/resources/assets/bone/lang/en_us.json +++ b/src/main/resources/assets/bone/lang/en_us.json @@ -1,6 +1,6 @@ { "block.bone.bone_forge": "Bone Forge", - "block.bone.charcoal_block": "Block of Charcoal", + "block.bone.firewood_block": "Bundle of Firewood", "block.bone.bone_fire": "Bone Fire", "block.bone.bone_fire.type=jord": "Jord Fire", "block.bone.bone_fire.type=aegir": "Aegir Fire", diff --git a/src/main/resources/assets/bone/models/block/charcoal_block.json b/src/main/resources/assets/bone/models/block/charcoal_block.json deleted file mode 100644 index 01c10e7..0000000 --- a/src/main/resources/assets/bone/models/block/charcoal_block.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "parent": "block/cube_all", - "textures": { - "all": "bone:block/charcoal_block" - } -} \ No newline at end of file diff --git a/src/main/resources/assets/bone/models/block/firewood_block.json b/src/main/resources/assets/bone/models/block/firewood_block.json new file mode 100644 index 0000000..8c27b14 --- /dev/null +++ b/src/main/resources/assets/bone/models/block/firewood_block.json @@ -0,0 +1,81 @@ +{ + "credit": "Made with Blockbench", + "texture_size": [ + 64, + 64 + ], + "textures": { + "1": "bone:block/firewood_block", + "particle": "bone:block/firewood_block" + }, + "elements": [ + { + "from": [ + 0, + 0, + 0 + ], + "to": [ + 16, + 16, + 16 + ], + "faces": { + "north": { + "uv": [ + 0, + 0, + 4, + 4 + ], + "texture": "#1" + }, + "east": { + "uv": [ + 0, + 4, + 4, + 8 + ], + "texture": "#1" + }, + "south": { + "uv": [ + 4, + 0, + 8, + 4 + ], + "texture": "#1" + }, + "west": { + "uv": [ + 4, + 4, + 8, + 8 + ], + "texture": "#1" + }, + "up": { + "uv": [ + 4, + 12, + 0, + 8 + ], + "texture": "#1" + }, + "down": { + "uv": [ + 12, + 0, + 8, + 4 + ], + "texture": "#1" + } + } + } + ] +} \ No newline at end of file diff --git a/src/main/resources/assets/bone/models/item/charcoal_block.json b/src/main/resources/assets/bone/models/item/charcoal_block.json deleted file mode 100644 index e1283bb..0000000 --- a/src/main/resources/assets/bone/models/item/charcoal_block.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "bone:block/charcoal_block" -} \ No newline at end of file diff --git a/src/main/resources/assets/bone/models/item/firewood_block.json b/src/main/resources/assets/bone/models/item/firewood_block.json new file mode 100644 index 0000000..c153d12 --- /dev/null +++ b/src/main/resources/assets/bone/models/item/firewood_block.json @@ -0,0 +1,85 @@ +{ + "parent": "bone:block/firewood_block", + "display": { + "ground": { + "translation": [ + 0, + 2, + 0 + ], + "scale": [ + 0.3, + 0.3, + 0.3 + ] + }, + "gui": { + "rotation": [ + 30, + 225, + 0 + ], + "translation": [ + 0, + 0, + 0 + ], + "scale": [ + 0.625, + 0.625, + 0.625 + ] + }, + "thirdperson_righthand": { + "rotation": [ + 10, + -45, + 0 + ], + "translation": [ + 0, + 1.5, + -2.75 + ], + "scale": [ + 0.375, + 0.375, + 0.375 + ] + }, + "firstperson_righthand": { + "rotation": [ + 0, + -135, + 25 + ], + "translation": [ + 0, + 4, + 2 + ], + "scale": [ + 0.4, + 0.4, + 0.4 + ] + }, + "fixed": { + "rotation": [ + 0, + 0, + 0 + ], + "translation": [ + 0, + 0, + 0 + ], + "scale": [ + 0.5, + 0.5, + 0.5 + ] + } + } +} \ No newline at end of file diff --git a/src/main/resources/assets/bone/textures/block/charcoal_block.png b/src/main/resources/assets/bone/textures/block/charcoal_block.png deleted file mode 100644 index 90bc9fe..0000000 Binary files a/src/main/resources/assets/bone/textures/block/charcoal_block.png and /dev/null differ diff --git a/src/main/resources/assets/bone/textures/block/firewood_block.png b/src/main/resources/assets/bone/textures/block/firewood_block.png new file mode 100644 index 0000000..1f5e341 Binary files /dev/null and b/src/main/resources/assets/bone/textures/block/firewood_block.png differ diff --git a/src/main/resources/data/bone/loot_tables/blocks/charcoal_block.json b/src/main/resources/data/bone/loot_tables/blocks/charcoal_block.json index 7cf7162..223cb90 100644 --- a/src/main/resources/data/bone/loot_tables/blocks/charcoal_block.json +++ b/src/main/resources/data/bone/loot_tables/blocks/charcoal_block.json @@ -6,7 +6,7 @@ "entries": [ { "type": "minecraft:item", - "name": "bone:charcoal_block" + "name": "bone:firewood_block" } ], "conditions": [ diff --git a/src/main/resources/data/bone/recipes/charcoal.json b/src/main/resources/data/bone/recipes/charcoal.json deleted file mode 100644 index e91ba53..0000000 --- a/src/main/resources/data/bone/recipes/charcoal.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "type": "minecraft:crafting_shapeless", - "ingredients": [ - { - "item": "bone:charcoal_block" - } - ], - "result": { - "item": "minecraft:charcoal", - "count": 9 - } -} \ No newline at end of file diff --git a/src/main/resources/data/bone/recipes/charcoal_block.json b/src/main/resources/data/bone/recipes/firewood_block.json similarity index 51% rename from src/main/resources/data/bone/recipes/charcoal_block.json rename to src/main/resources/data/bone/recipes/firewood_block.json index 6977f7e..8febe02 100644 --- a/src/main/resources/data/bone/recipes/charcoal_block.json +++ b/src/main/resources/data/bone/recipes/firewood_block.json @@ -1,16 +1,19 @@ { "type": "minecraft:crafting_shaped", "pattern": [ - "###", - "###", - "###" + "LLL", + "CCC", + "LLL" ], "key": { - "#": { + "L": { + "tag": "c:logs" + }, + "C": { "item": "minecraft:charcoal" } }, "result": { - "item": "bone:charcoal_block" + "item": "bone:firewood_block" } } \ No newline at end of file diff --git a/src/main/resources/data/minecraft/tags/blocks/infiniburn_overworld.json b/src/main/resources/data/minecraft/tags/blocks/infiniburn_overworld.json index 4629455..43b6797 100644 --- a/src/main/resources/data/minecraft/tags/blocks/infiniburn_overworld.json +++ b/src/main/resources/data/minecraft/tags/blocks/infiniburn_overworld.json @@ -1,6 +1,6 @@ { "replace": false, "values": [ - "bone:charcoal_block" + "bone:firewood_block" ] } \ No newline at end of file diff --git a/src/main/resources/data/minecraft/tags/blocks/mineable/axe.json b/src/main/resources/data/minecraft/tags/blocks/mineable/axe.json new file mode 100644 index 0000000..43b6797 --- /dev/null +++ b/src/main/resources/data/minecraft/tags/blocks/mineable/axe.json @@ -0,0 +1,6 @@ +{ + "replace": false, + "values": [ + "bone:firewood_block" + ] +} \ No newline at end of file diff --git a/src/main/resources/data/minecraft/tags/blocks/mineable/pickaxe.json b/src/main/resources/data/minecraft/tags/blocks/mineable/pickaxe.json index 2f2e5e6..dfaec6e 100644 --- a/src/main/resources/data/minecraft/tags/blocks/mineable/pickaxe.json +++ b/src/main/resources/data/minecraft/tags/blocks/mineable/pickaxe.json @@ -1,7 +1,6 @@ { "replace": false, "values": [ - "bone:bone_forge", - "bone:charcoal_block" + "bone:bone_forge" ] } \ No newline at end of file diff --git a/src/main/resources/data/minecraft/tags/blocks/needs_iron_tool.json b/src/main/resources/data/minecraft/tags/blocks/needs_iron_tool.json index 2f2e5e6..dfaec6e 100644 --- a/src/main/resources/data/minecraft/tags/blocks/needs_iron_tool.json +++ b/src/main/resources/data/minecraft/tags/blocks/needs_iron_tool.json @@ -1,7 +1,6 @@ { "replace": false, "values": [ - "bone:bone_forge", - "bone:charcoal_block" + "bone:bone_forge" ] } \ No newline at end of file diff --git a/src/main/resources/data/minecraft/worldgen/configured_feature/lake_lava.json b/src/main/resources/data/minecraft/worldgen/configured_feature/lake_lava.json new file mode 100644 index 0000000..cae7cd8 --- /dev/null +++ b/src/main/resources/data/minecraft/worldgen/configured_feature/lake_lava.json @@ -0,0 +1,20 @@ +{ + "type": "minecraft:lake", + "config": { + "fluid": { + "type": "minecraft:simple_state_provider", + "state": { + "Name": "bone:spring_water", + "Properties": { + "level": "0" + } + } + }, + "barrier": { + "type": "minecraft:simple_state_provider", + "state": { + "Name": "minecraft:stone" + } + } + } +} \ No newline at end of file