introduction of log variants

This commit is contained in:
Justin Parsell 2021-02-26 23:08:08 -05:00
parent e19141804c
commit 217b0b2c3e
22 changed files with 214 additions and 3 deletions

View File

@ -7,11 +7,15 @@ import net.minecraft.block.Block;
import net.minecraft.block.Blocks; import net.minecraft.block.Blocks;
import net.minecraft.block.LeavesBlock; import net.minecraft.block.LeavesBlock;
import net.minecraft.block.PillarBlock; import net.minecraft.block.PillarBlock;
import net.minecraft.item.AxeItem;
import net.minecraft.util.Identifier; import net.minecraft.util.Identifier;
import net.minecraft.util.registry.Registry; import net.minecraft.util.registry.Registry;
public class CherryBlocks { public class CherryBlocks {
public static final Block CHERRYLOG = registerPillar("cherry_log", FabricBlockSettings.copyOf(Blocks.OAK_LOG), 5, 5); public static final Block CHERRYLOG = registerPillar("cherry_log", FabricBlockSettings.copyOf(Blocks.OAK_LOG), 5, 5);
public static final Block CHERRYWOOD = registerPillar("cherry_wood", FabricBlockSettings.copyOf(Blocks.OAK_WOOD), 5, 5);
public static final Block CHERRYLOGSTRIPPED = registerPillar("stripped_cherry_log", FabricBlockSettings.copyOf(Blocks.STRIPPED_OAK_LOG), 5, 5);
public static final Block CHERRYWOODSTRIPPED = registerPillar("stripped_cherry_wood", FabricBlockSettings.copyOf(Blocks.STRIPPED_OAK_WOOD), 5, 5);
public static final Block CHERRYLEAVES = registerLeaves("cherry_leaves", FabricBlockSettings.copyOf(Blocks.OAK_LEAVES), 30, 60, 6649929); public static final Block CHERRYLEAVES = registerLeaves("cherry_leaves", FabricBlockSettings.copyOf(Blocks.OAK_LEAVES), 30, 60, 6649929);
public static final Block CHERRYPLANKS = registerBlock("cherry_planks", FabricBlockSettings.copyOf(Blocks.OAK_PLANKS), 5, 20); public static final Block CHERRYPLANKS = registerBlock("cherry_planks", FabricBlockSettings.copyOf(Blocks.OAK_PLANKS), 5, 20);

View File

@ -11,6 +11,9 @@ import net.minecraft.util.registry.Registry;
public class CherryItems { public class CherryItems {
private static void registerBlockItems(){ private static void registerBlockItems(){
registerBlockItem("cherry_log", CherryBlocks.CHERRYLOG, ItemGroup.BUILDING_BLOCKS); registerBlockItem("cherry_log", CherryBlocks.CHERRYLOG, ItemGroup.BUILDING_BLOCKS);
registerBlockItem("cherry_wood", CherryBlocks.CHERRYWOOD, ItemGroup.BUILDING_BLOCKS);
registerBlockItem("stripped_cherry_log", CherryBlocks.CHERRYLOGSTRIPPED, ItemGroup.BUILDING_BLOCKS);
registerBlockItem("stripped_cherry_wood", CherryBlocks.CHERRYWOODSTRIPPED, ItemGroup.BUILDING_BLOCKS);
registerBlockItem("cherry_leaves", CherryBlocks.CHERRYLEAVES, ItemGroup.BUILDING_BLOCKS, 6649929); registerBlockItem("cherry_leaves", CherryBlocks.CHERRYLEAVES, ItemGroup.BUILDING_BLOCKS, 6649929);
registerBlockItem("cherry_planks", CherryBlocks.CHERRYPLANKS, ItemGroup.BUILDING_BLOCKS); registerBlockItem("cherry_planks", CherryBlocks.CHERRYPLANKS, ItemGroup.BUILDING_BLOCKS);
} }

View File

@ -0,0 +1,16 @@
{
"variants": {
"axis=y": {
"model": "cherry:block/cherry_wood"
},
"axis=z": {
"model": "cherry:block/cherry_wood",
"x": 90
},
"axis=x": {
"model": "cherry:block/cherry_wood",
"x": 90,
"y": 90
}
}
}

View File

@ -0,0 +1,16 @@
{
"variants": {
"axis=y": {
"model": "cherry:block/stripped_cherry_log"
},
"axis=z": {
"model": "cherry:block/stripped_cherry_log",
"x": 90
},
"axis=x": {
"model": "cherry:block/stripped_cherry_log",
"x": 90,
"y": 90
}
}
}

View File

@ -0,0 +1,16 @@
{
"variants": {
"axis=y": {
"model": "cherry:block/stripped_cherry_wood"
},
"axis=z": {
"model": "cherry:block/stripped_cherry_wood",
"x": 90
},
"axis=x": {
"model": "cherry:block/stripped_cherry_wood",
"x": 90,
"y": 90
}
}
}

View File

@ -1,5 +1,8 @@
{ {
"block.cherry.cherry_log": "Cherry Log", "block.cherry.cherry_log": "Cherry Log",
"block.cherry.cherry_wood": "Cherry Wood",
"block.cherry.stripped_cherry_log": "Stripped Cherry Log",
"block.cherry.stripped_cherry_wood": "Stripped Cherry Wood",
"block.cherry.cherry_leaves": "Cherry Leaves", "block.cherry.cherry_leaves": "Cherry Leaves",
"block.cherry.cherry_planks": "Cherry Planks" "block.cherry.cherry_planks": "Cherry Planks"
} }

View File

@ -0,0 +1,7 @@
{
"parent": "block/cube_column",
"textures": {
"end": "cherry:block/cherry_log",
"side": "cherry:block/cherry_log"
}
}

View File

@ -0,0 +1,7 @@
{
"parent": "block/cube_column",
"textures": {
"end": "cherry:block/stripped_cherry_log_top",
"side": "cherry:block/stripped_cherry_log"
}
}

View File

@ -0,0 +1,7 @@
{
"parent": "block/cube_column",
"textures": {
"end": "cherry:block/stripped_cherry_log",
"side": "cherry:block/stripped_cherry_log"
}
}

View File

@ -0,0 +1,4 @@
{
"parent": "cherry:block/cherry_wood"
}

View File

@ -0,0 +1,4 @@
{
"parent": "cherry:block/stripped_cherry_log"
}

View File

@ -0,0 +1,4 @@
{
"parent": "cherry:block/stripped_cherry_wood"
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

View File

@ -0,0 +1,20 @@
{
"type": "minecraft:block",
"pools": [
{
"rolls": 1,
"entries": [
{
"type": "minecraft:item",
"name": "cherry:cherry_planks"
}
],
"conditions": [
{
"condition": "minecraft:survives_explosion"
}
]
}
]
}

View File

@ -0,0 +1,20 @@
{
"type": "minecraft:block",
"pools": [
{
"rolls": 1,
"entries": [
{
"type": "minecraft:item",
"name": "cherry:cherry_wood"
}
],
"conditions": [
{
"condition": "minecraft:survives_explosion"
}
]
}
]
}

View File

@ -0,0 +1,20 @@
{
"type": "minecraft:block",
"pools": [
{
"rolls": 1,
"entries": [
{
"type": "minecraft:item",
"name": "cherry:stripped_cherry_wood"
}
],
"conditions": [
{
"condition": "minecraft:survives_explosion"
}
]
}
]
}

View File

@ -0,0 +1,20 @@
{
"type": "minecraft:block",
"pools": [
{
"rolls": 1,
"entries": [
{
"type": "minecraft:item",
"name": "cherry:stripped_cherry_wood"
}
],
"conditions": [
{
"condition": "minecraft:survives_explosion"
}
]
}
]
}

View File

@ -0,0 +1,17 @@
{
"type": "minecraft:crafting_shaped",
"group": "bark",
"pattern": [
"##",
"##"
],
"key": {
"#": {
"item": "cherry:cherry_log"
}
},
"result": {
"item": "cherry:cherry_wood",
"count": 3
}
}

View File

@ -0,0 +1,17 @@
{
"type": "minecraft:crafting_shaped",
"group": "bark",
"pattern": [
"##",
"##"
],
"key": {
"#": {
"item": "cherry:stripped_cherry_log"
}
},
"result": {
"item": "cherry:stripped_cherry_wood",
"count": 3
}
}

View File

@ -1,6 +1,9 @@
{ {
"replace": false, "replace": false,
"values": [ "values": [
"cherry:cherry_log" "cherry:cherry_log",
"cherry:cherry_wood",
"cherry:stripped_cherry_log",
"cherry:stripped_cherry_wood"
] ]
} }

View File

@ -1,6 +1,9 @@
{ {
"replace": false, "replace": false,
"values": [ "values": [
"cherry:cherry_log" "cherry:cherry_log",
"cherry:cherry_wood",
"cherry:stripped_cherry_log",
"cherry:stripped_cherry_wood"
] ]
} }