Rubber Wood button for #1739

This commit is contained in:
drcrazy 2019-08-21 02:03:58 +03:00
parent 1b500e6e65
commit 2f30d848af
13 changed files with 101 additions and 10 deletions

View file

@ -0,0 +1,17 @@
package techreborn.blocks.misc;
import net.fabricmc.fabric.api.block.FabricBlockSettings;
import net.minecraft.block.Material;
import net.minecraft.block.WoodButtonBlock;
import net.minecraft.sound.BlockSoundGroup;
/**
* @author drcrazy
*
*/
public class RubberButtonBlock extends WoodButtonBlock {
public RubberButtonBlock() {
super(FabricBlockSettings.of(Material.PART).noCollision().strength(0.5f, 0.5f).sounds(BlockSoundGroup.WOOD).build());
}
}

View file

@ -1,6 +1,3 @@
/**
*
*/
package techreborn.blocks.misc;
import net.fabricmc.fabric.api.block.FabricBlockSettings;

View file

@ -45,6 +45,7 @@ import techreborn.blocks.misc.BlockRubberLog;
import techreborn.blocks.misc.BlockRubberPlank;
import techreborn.blocks.misc.BlockRubberPlankStair;
import techreborn.blocks.misc.BlockRubberSapling;
import techreborn.blocks.misc.RubberButtonBlock;
import techreborn.blocks.misc.RubberTrapdoorBlock;
import techreborn.config.TechRebornConfig;
import techreborn.init.ModFluids;
@ -128,6 +129,7 @@ public class ModRegistry {
.strength(2.0F, 15.0F).sounds(BlockSoundGroup.WOOD).build()), "rubber_fence_gate"), itemGroup);
RebornRegistry.registerBlock(TRContent.RUBBER_PLANK_STAIR = InitUtils.setup(new BlockRubberPlankStair(), "rubber_plank_stair"), itemGroup);
RebornRegistry.registerBlock(TRContent.RUBBER_TRAPDOOR = InitUtils.setup(new RubberTrapdoorBlock(), "rubber_trapdoor"), itemGroup);
RebornRegistry.registerBlock(TRContent.RUBBER_BUTTON = InitUtils.setup(new RubberButtonBlock(), "rubber_button"), itemGroup);
TechReborn.LOGGER.debug("TechReborns Blocks Loaded");
}

View file

@ -89,6 +89,7 @@ public class TRContent {
public static Block RUBBER_FENCE;
public static Block RUBBER_FENCE_GATE;
public static Block RUBBER_TRAPDOOR;
public static Block RUBBER_BUTTON;
// Armor
public static Item CLOAKING_DEVICE;

View file

@ -0,0 +1,28 @@
{
"variants": {
"face=floor,facing=east,powered=false": { "model": "techreborn:block/rubber/rubber_button", "y": 90 },
"face=floor,facing=west,powered=false": { "model": "techreborn:block/rubber/rubber_button", "y": 270 },
"face=floor,facing=south,powered=false": { "model": "techreborn:block/rubber/rubber_button", "y": 180 },
"face=floor,facing=north,powered=false": { "model": "techreborn:block/rubber/rubber_button" },
"face=wall,facing=east,powered=false": { "model": "techreborn:block/rubber/rubber_button", "uvlock": true, "x": 90, "y": 90 },
"face=wall,facing=west,powered=false": { "model": "techreborn:block/rubber/rubber_button", "uvlock": true, "x": 90, "y": 270 },
"face=wall,facing=south,powered=false": { "model": "techreborn:block/rubber/rubber_button", "uvlock": true, "x": 90, "y": 180 },
"face=wall,facing=north,powered=false": { "model": "techreborn:block/rubber/rubber_button", "uvlock": true, "x": 90 },
"face=ceiling,facing=east,powered=false": { "model": "techreborn:block/rubber/rubber_button", "x": 180, "y": 270 },
"face=ceiling,facing=west,powered=false": { "model": "techreborn:block/rubber/rubber_button", "x": 180, "y": 90 },
"face=ceiling,facing=south,powered=false": { "model": "techreborn:block/rubber/rubber_button", "x": 180 },
"face=ceiling,facing=north,powered=false": { "model": "techreborn:block/rubber/rubber_button", "x": 180, "y": 180 },
"face=floor,facing=east,powered=true": { "model": "techreborn:block/rubber/rubber_button_pressed", "y": 90 },
"face=floor,facing=west,powered=true": { "model": "techreborn:block/rubber/rubber_button_pressed", "y": 270 },
"face=floor,facing=south,powered=true": { "model": "techreborn:block/rubber/rubber_button_pressed", "y": 180 },
"face=floor,facing=north,powered=true": { "model": "techreborn:block/rubber/rubber_button_pressed" },
"face=wall,facing=east,powered=true": { "model": "techreborn:block/rubber/rubber_button_pressed", "uvlock": true, "x": 90, "y": 90 },
"face=wall,facing=west,powered=true": { "model": "techreborn:block/rubber/rubber_button_pressed", "uvlock": true, "x": 90, "y": 270 },
"face=wall,facing=south,powered=true": { "model": "techreborn:block/rubber/rubber_button_pressed", "uvlock": true, "x": 90, "y": 180 },
"face=wall,facing=north,powered=true": { "model": "techreborn:block/rubber/rubber_button_pressed", "uvlock": true, "x": 90 },
"face=ceiling,facing=east,powered=true": { "model": "techreborn:block/rubber/rubber_button_pressed", "x": 180, "y": 270 },
"face=ceiling,facing=west,powered=true": { "model": "techreborn:block/rubber/rubber_button_pressed", "x": 180, "y": 90 },
"face=ceiling,facing=south,powered=true": { "model": "techreborn:block/rubber/rubber_button_pressed", "x": 180 },
"face=ceiling,facing=north,powered=true": { "model": "techreborn:block/rubber/rubber_button_pressed", "x": 180, "y": 180 }
}
}

View file

@ -84,13 +84,14 @@
"_comment1": "Blocks",
"block.techreborn.rubber_log": "Rubber Wood",
"block.techreborn.rubber_planks": "Rubber Wood Planks",
"block.techreborn.rubber_plank_slab": "Rubber Plank Slab",
"block.techreborn.rubber_plank_stair": "Rubber Plank Stair",
"block.techreborn.rubber_leaves": "Rubber Leaves",
"block.techreborn.rubber_sapling": "Rubber Sapling",
"block.techreborn.rubber_fence": "Rubber Fence",
"block.techreborn.rubber_fence_gate": "Rubber Fence Gate",
"block.techreborn.rubber_trapdoor": "Rubber Trapdoor",
"block.techreborn.rubber_plank_slab": "Rubber Wood Plank Slab",
"block.techreborn.rubber_plank_stair": "Rubber Wood Plank Stair",
"block.techreborn.rubber_leaves": "Rubber Wood Leaves",
"block.techreborn.rubber_sapling": "Rubber Wood Sapling",
"block.techreborn.rubber_fence": "Rubber Wood Fence",
"block.techreborn.rubber_fence_gate": "Rubber Wood Fence Gate",
"block.techreborn.rubber_trapdoor": "Rubber Wood Trapdoor",
"block.techreborn.rubber_button": "Rubber Wood Button",
"block.techreborn.refined_iron_fence": "Iron Fence",
"block.techreborn.reinforced_glass": "Reinforced Glass",

View file

@ -0,0 +1,6 @@
{
"parent": "minecraft:block/button",
"textures": {
"texture": "techreborn:block/rubber_planks"
}
}

View file

@ -0,0 +1,6 @@
{
"parent": "minecraft:block/button_inventory",
"textures": {
"texture": "techreborn:block/rubber_planks"
}
}

View file

@ -0,0 +1,6 @@
{
"parent": "minecraft:block/button_pressed",
"textures": {
"texture": "techreborn:block/rubber_planks"
}
}

View file

@ -0,0 +1,3 @@
{
"parent": "techreborn:block/rubber/rubber_button_inventory"
}

View file

@ -0,0 +1,6 @@
{
"replace": false,
"values": [
"techreborn:rubber_button"
]
}

View file

@ -0,0 +1,6 @@
{
"replace": false,
"values": [
"techreborn:rubber_button"
]
}

View file

@ -0,0 +1,12 @@
{
"type": "minecraft:crafting_shapeless",
"group": "wooden_button",
"ingredients": [
{
"item": "techreborn:rubber_planks"
}
],
"result": {
"item": "techreborn:rubber_button"
}
}