introduced cherry button
This commit is contained in:
parent
83fa41f982
commit
4bf3a96749
|
@ -0,0 +1,10 @@
|
|||
package net.parsell.cherry.common.blocks;
|
||||
|
||||
import net.minecraft.block.AbstractBlock;
|
||||
import net.minecraft.block.WoodenButtonBlock;
|
||||
|
||||
public class CherryButtonBlock extends WoodenButtonBlock {
|
||||
public CherryButtonBlock(AbstractBlock.Settings settings) {
|
||||
super(settings);
|
||||
}
|
||||
}
|
|
@ -35,6 +35,8 @@ public class CherryBlocks {
|
|||
public static final Block CHERRYTRAPDOOR = registerTrapDoor("cherry_trapdoor", FabricBlockSettings.copyOf(Blocks.OAK_TRAPDOOR), 5, 20); //TODO: recipe, loot_tables, tags (as required)
|
||||
public static final Block CHERRYSLAB = registerSlab("cherry_slab", FabricBlockSettings.copyOf(Blocks.OAK_SLAB), 5, 20); // TODO: recipe, loot tables, tags (as required)
|
||||
public static final Block CHERRYSTAIRS = registerStair("cherry_stairs", CHERRYPLANKS.getDefaultState(), FabricBlockSettings.copyOf(Blocks.OAK_STAIRS), 5, 20); //TODO: recipe, loot tables, tags (as required)
|
||||
public static final Block CHERRYBUTTON = registerButton("cherry_button", FabricBlockSettings.copyOf(Blocks.OAK_BUTTON), 5, 20);
|
||||
public static final Block CHERRYPRESSUREPLATE = reigsterPressurePlate("cherry_pressure_plate", FabricBlockSettings.copyOf(Blocks.OAK_PRESSURE_PLATE), 5, 20);
|
||||
|
||||
private static Block registerBlock(String blockID, FabricBlockSettings settings, int burnChance, int burnSpread) {
|
||||
Block block = new Block(settings);
|
||||
|
@ -57,6 +59,13 @@ public class CherryBlocks {
|
|||
return block;
|
||||
}
|
||||
|
||||
private static Block registerButton(String blockID, FabricBlockSettings settings, int burnChance, int burnSpread) {
|
||||
Block block = new CherryButtonBlock(settings);
|
||||
Registry.register(Registry.BLOCK, new Identifier("cherry", blockID), block);
|
||||
FlammableBlockRegistry.getDefaultInstance().add(block, burnChance, burnSpread);
|
||||
return block;
|
||||
}
|
||||
|
||||
private static Block registerFence(String blockID, FabricBlockSettings settings, int burnChance, int burnSpread) {
|
||||
Block block = new FenceBlock(settings);
|
||||
Registry.register(Registry.BLOCK, new Identifier("cherry", blockID), block);
|
||||
|
|
|
@ -0,0 +1,118 @@
|
|||
{
|
||||
"variants": {
|
||||
"face=ceiling,facing=east,powered=false": {
|
||||
"model": "cherry:block/cherry_button",
|
||||
"y": 270,
|
||||
"x": 180
|
||||
},
|
||||
"face=ceiling,facing=east,powered=true": {
|
||||
"model": "cherry:block/cherry_button_pressed",
|
||||
"y": 270,
|
||||
"x": 180
|
||||
},
|
||||
"face=ceiling,facing=north,powered=false": {
|
||||
"model": "cherry:block/cherry_button",
|
||||
"y": 180,
|
||||
"x": 180
|
||||
},
|
||||
"face=ceiling,facing=north,powered=true": {
|
||||
"model": "cherry:block/cherry_button_pressed",
|
||||
"y": 180,
|
||||
"x": 180
|
||||
},
|
||||
"face=ceiling,facing=south,powered=false": {
|
||||
"model": "cherry:block/cherry_button",
|
||||
"x": 180
|
||||
},
|
||||
"face=ceiling,facing=south,powered=true": {
|
||||
"model": "cherry:block/cherry_button_pressed",
|
||||
"x": 180
|
||||
},
|
||||
"face=ceiling,facing=west,powered=false": {
|
||||
"model": "cherry:block/cherry_button",
|
||||
"y": 90,
|
||||
"x": 180
|
||||
},
|
||||
"face=ceiling,facing=west,powered=true": {
|
||||
"model": "cherry:block/cherry_button_pressed",
|
||||
"y": 90,
|
||||
"x": 180
|
||||
},
|
||||
"face=floor,facing=east,powered=false": {
|
||||
"model": "cherry:block/cherry_button",
|
||||
"y": 90
|
||||
},
|
||||
"face=floor,facing=east,powered=true": {
|
||||
"model": "cherry:block/cherry_button_pressed",
|
||||
"y": 90
|
||||
},
|
||||
"face=floor,facing=north,powered=false": {
|
||||
"model": "cherry:block/cherry_button"
|
||||
},
|
||||
"face=floor,facing=north,powered=true": {
|
||||
"model": "cherry:block/cherry_button_pressed"
|
||||
},
|
||||
"face=floor,facing=south,powered=false": {
|
||||
"model": "cherry:block/cherry_button",
|
||||
"y": 180
|
||||
},
|
||||
"face=floor,facing=south,powered=true": {
|
||||
"model": "cherry:block/cherry_button_pressed",
|
||||
"y": 180
|
||||
},
|
||||
"face=floor,facing=west,powered=false": {
|
||||
"model": "cherry:block/cherry_button",
|
||||
"y": 270
|
||||
},
|
||||
"face=floor,facing=west,powered=true": {
|
||||
"model": "cherry:block/cherry_button_pressed",
|
||||
"y": 270
|
||||
},
|
||||
"face=wall,facing=east,powered=false": {
|
||||
"model": "cherry:block/cherry_button",
|
||||
"y": 90,
|
||||
"x": 90,
|
||||
"uvlock": true
|
||||
},
|
||||
"face=wall,facing=east,powered=true": {
|
||||
"model": "cherry:block/cherry_button_pressed",
|
||||
"y": 90,
|
||||
"x": 90,
|
||||
"uvlock": true
|
||||
},
|
||||
"face=wall,facing=north,powered=false": {
|
||||
"model": "cherry:block/cherry_button",
|
||||
"x": 90,
|
||||
"uvlock": true
|
||||
},
|
||||
"face=wall,facing=north,powered=true": {
|
||||
"model": "cherry:block/cherry_button_pressed",
|
||||
"x": 90,
|
||||
"uvlock": true
|
||||
},
|
||||
"face=wall,facing=south,powered=false": {
|
||||
"model": "cherry:block/cherry_button",
|
||||
"y": 180,
|
||||
"x": 90,
|
||||
"uvlock": true
|
||||
},
|
||||
"face=wall,facing=south,powered=true": {
|
||||
"model": "cherry:block/cherry_button_pressed",
|
||||
"y": 180,
|
||||
"x": 90,
|
||||
"uvlock": true
|
||||
},
|
||||
"face=wall,facing=west,powered=false": {
|
||||
"model": "cherry:block/cherry_button",
|
||||
"y": 270,
|
||||
"x": 90,
|
||||
"uvlock": true
|
||||
},
|
||||
"face=wall,facing=west,powered=true": {
|
||||
"model": "cherry:block/cherry_button_pressed",
|
||||
"y": 270,
|
||||
"x": 90,
|
||||
"uvlock": true
|
||||
}
|
||||
}
|
||||
}
|
|
@ -10,5 +10,6 @@
|
|||
"block.cherry.cherry_door": "Cherry Door",
|
||||
"block.cherry.cherry_trapdoor": "Cherry Trapdoor",
|
||||
"block.cherry.cherry_slab": "Cherry Slab",
|
||||
"block.cherry.cherry_stairs": "Cherry Stairs"
|
||||
"block.cherry.cherry_stairs": "Cherry Stairs",
|
||||
"block.cherry.cherry_button": "Cherry Button"
|
||||
}
|
|
@ -0,0 +1,6 @@
|
|||
{
|
||||
"parent": "minecraft:block/button",
|
||||
"textures": {
|
||||
"texture": "cherry:block/cherry_planks"
|
||||
}
|
||||
}
|
|
@ -0,0 +1,6 @@
|
|||
{
|
||||
"parent": "minecraft:block/button_inventory",
|
||||
"textures": {
|
||||
"texture": "cherry:block/cherry_planks"
|
||||
}
|
||||
}
|
|
@ -0,0 +1,6 @@
|
|||
{
|
||||
"parent": "minecraft:block/button_pressed",
|
||||
"textures": {
|
||||
"texture": "cherry:block/cherry_planks"
|
||||
}
|
||||
}
|
|
@ -0,0 +1,3 @@
|
|||
{
|
||||
"parent": "cherry:block/cherry_button_inventory"
|
||||
}
|
Loading…
Reference in New Issue