Rubber Wood door for #1739

This commit is contained in:
drcrazy 2019-08-21 14:06:03 +03:00
parent 7e5ba45eb4
commit 8d8bb88942
16 changed files with 218 additions and 0 deletions

View file

@ -1,3 +1,27 @@
/*
* This file is part of TechReborn, licensed under the MIT License (MIT).
*
* Copyright (c) 2018 TechReborn
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in all
* copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*/
package techreborn.blocks.misc;
import net.fabricmc.fabric.api.block.FabricBlockSettings;

View file

@ -0,0 +1,42 @@
/*
* This file is part of TechReborn, licensed under the MIT License (MIT).
*
* Copyright (c) 2018 TechReborn
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in all
* copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*/
package techreborn.blocks.misc;
import net.fabricmc.fabric.api.block.FabricBlockSettings;
import net.minecraft.block.DoorBlock;
import net.minecraft.block.Material;
import net.minecraft.block.MaterialColor;
import net.minecraft.sound.BlockSoundGroup;
/**
* @author drcrazy
*
*/
public class RubberDoorBlock extends DoorBlock {
public RubberDoorBlock() {
super(FabricBlockSettings.of(Material.WOOD, MaterialColor.SPRUCE).strength(3.0f, 3.0f).sounds(BlockSoundGroup.WOOD).build());
}
}

View file

@ -1,3 +1,27 @@
/*
* This file is part of TechReborn, licensed under the MIT License (MIT).
*
* Copyright (c) 2018 TechReborn
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in all
* copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*/
package techreborn.blocks.misc;
import net.fabricmc.fabric.api.block.FabricBlockSettings;

View file

@ -1,3 +1,27 @@
/*
* This file is part of TechReborn, licensed under the MIT License (MIT).
*
* Copyright (c) 2018 TechReborn
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in all
* copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*/
package techreborn.blocks.misc;
import net.fabricmc.fabric.api.block.FabricBlockSettings;

View file

@ -46,6 +46,7 @@ import techreborn.blocks.misc.BlockRubberPlank;
import techreborn.blocks.misc.BlockRubberPlankStair;
import techreborn.blocks.misc.BlockRubberSapling;
import techreborn.blocks.misc.RubberButtonBlock;
import techreborn.blocks.misc.RubberDoorBlock;
import techreborn.blocks.misc.RubberPressurePlateBlock;
import techreborn.blocks.misc.RubberTrapdoorBlock;
import techreborn.config.TechRebornConfig;
@ -132,6 +133,7 @@ public class ModRegistry {
RebornRegistry.registerBlock(TRContent.RUBBER_TRAPDOOR = InitUtils.setup(new RubberTrapdoorBlock(), "rubber_trapdoor"), itemGroup);
RebornRegistry.registerBlock(TRContent.RUBBER_BUTTON = InitUtils.setup(new RubberButtonBlock(), "rubber_button"), itemGroup);
RebornRegistry.registerBlock(TRContent.RUBBER_PRESSURE_PLATE = InitUtils.setup(new RubberPressurePlateBlock(), "rubber_pressure_plate"), itemGroup);
RebornRegistry.registerBlock(TRContent.RUBBER_DOOR = InitUtils.setup(new RubberDoorBlock(), "rubber_door"), itemGroup);
TechReborn.LOGGER.debug("TechReborns Blocks Loaded");
}

View file

@ -91,6 +91,7 @@ public class TRContent {
public static Block RUBBER_TRAPDOOR;
public static Block RUBBER_BUTTON;
public static Block RUBBER_PRESSURE_PLATE;
public static Block RUBBER_DOOR;
// Armor
public static Item CLOAKING_DEVICE;

View file

@ -0,0 +1,36 @@
{
"variants": {
"facing=east,half=lower,hinge=left,open=false": { "model": "techreborn:block/rubber/rubber_door_bottom" },
"facing=south,half=lower,hinge=left,open=false": { "model": "techreborn:block/rubber/rubber_door_bottom", "y": 90 },
"facing=west,half=lower,hinge=left,open=false": { "model": "techreborn:block/rubber/rubber_door_bottom", "y": 180 },
"facing=north,half=lower,hinge=left,open=false": { "model": "techreborn:block/rubber/rubber_door_bottom", "y": 270 },
"facing=east,half=lower,hinge=right,open=false": { "model": "techreborn:block/rubber/rubber_door_bottom_hinge" },
"facing=south,half=lower,hinge=right,open=false": { "model": "techreborn:block/rubber/rubber_door_bottom_hinge", "y": 90 },
"facing=west,half=lower,hinge=right,open=false": { "model": "techreborn:block/rubber/rubber_door_bottom_hinge", "y": 180 },
"facing=north,half=lower,hinge=right,open=false": { "model": "techreborn:block/rubber/rubber_door_bottom_hinge", "y": 270 },
"facing=east,half=lower,hinge=left,open=true": { "model": "techreborn:block/rubber/rubber_door_bottom_hinge", "y": 90 },
"facing=south,half=lower,hinge=left,open=true": { "model": "techreborn:block/rubber/rubber_door_bottom_hinge", "y": 180 },
"facing=west,half=lower,hinge=left,open=true": { "model": "techreborn:block/rubber/rubber_door_bottom_hinge", "y": 270 },
"facing=north,half=lower,hinge=left,open=true": { "model": "techreborn:block/rubber/rubber_door_bottom_hinge" },
"facing=east,half=lower,hinge=right,open=true": { "model": "techreborn:block/rubber/rubber_door_bottom", "y": 270 },
"facing=south,half=lower,hinge=right,open=true": { "model": "techreborn:block/rubber/rubber_door_bottom" },
"facing=west,half=lower,hinge=right,open=true": { "model": "techreborn:block/rubber/rubber_door_bottom", "y": 90 },
"facing=north,half=lower,hinge=right,open=true": { "model": "techreborn:block/rubber/rubber_door_bottom", "y": 180 },
"facing=east,half=upper,hinge=left,open=false": { "model": "techreborn:block/rubber/rubber_door_top" },
"facing=south,half=upper,hinge=left,open=false": { "model": "techreborn:block/rubber/rubber_door_top", "y": 90 },
"facing=west,half=upper,hinge=left,open=false": { "model": "techreborn:block/rubber/rubber_door_top", "y": 180 },
"facing=north,half=upper,hinge=left,open=false": { "model": "techreborn:block/rubber/rubber_door_top", "y": 270 },
"facing=east,half=upper,hinge=right,open=false": { "model": "techreborn:block/rubber/rubber_door_top_hinge" },
"facing=south,half=upper,hinge=right,open=false": { "model": "techreborn:block/rubber/rubber_door_top_hinge", "y": 90 },
"facing=west,half=upper,hinge=right,open=false": { "model": "techreborn:block/rubber/rubber_door_top_hinge", "y": 180 },
"facing=north,half=upper,hinge=right,open=false": { "model": "techreborn:block/rubber/rubber_door_top_hinge", "y": 270 },
"facing=east,half=upper,hinge=left,open=true": { "model": "techreborn:block/rubber/rubber_door_top_hinge", "y": 90 },
"facing=south,half=upper,hinge=left,open=true": { "model": "techreborn:block/rubber/rubber_door_top_hinge", "y": 180 },
"facing=west,half=upper,hinge=left,open=true": { "model": "techreborn:block/rubber/rubber_door_top_hinge", "y": 270 },
"facing=north,half=upper,hinge=left,open=true": { "model": "techreborn:block/rubber/rubber_door_top_hinge" },
"facing=east,half=upper,hinge=right,open=true": { "model": "techreborn:block/rubber/rubber_door_top", "y": 270 },
"facing=south,half=upper,hinge=right,open=true": { "model": "techreborn:block/rubber/rubber_door_top" },
"facing=west,half=upper,hinge=right,open=true": { "model": "techreborn:block/rubber/rubber_door_top", "y": 90 },
"facing=north,half=upper,hinge=right,open=true": { "model": "techreborn:block/rubber/rubber_door_top", "y": 180 }
}
}

View file

@ -93,6 +93,7 @@
"block.techreborn.rubber_trapdoor": "Rubber Wood Trapdoor",
"block.techreborn.rubber_button": "Rubber Wood Button",
"block.techreborn.rubber_pressure_plate": "Rubber Wood Pressure Plate",
"block.techreborn.rubber_door": "Rubber Wood Door",
"block.techreborn.refined_iron_fence": "Iron Fence",
"block.techreborn.reinforced_glass": "Reinforced Glass",

View file

@ -0,0 +1,7 @@
{
"parent": "minecraft:block/door_bottom",
"textures": {
"bottom": "techreborn:block/rubber_planks",
"top": "techreborn:block/rubber_planks"
}
}

View file

@ -0,0 +1,7 @@
{
"parent": "minecraft:block/door_bottom_rh",
"textures": {
"bottom": "techreborn:block/rubber_planks",
"top": "techreborn:block/rubber_planks"
}
}

View file

@ -0,0 +1,7 @@
{
"parent": "minecraft:block/door_top",
"textures": {
"bottom": "techreborn:block/rubber_planks",
"top": "techreborn:block/rubber_planks"
}
}

View file

@ -0,0 +1,7 @@
{
"parent": "minecraft:block/door_top_rh",
"textures": {
"bottom": "techreborn:block/rubber_planks",
"top": "techreborn:block/rubber_planks"
}
}

View file

@ -0,0 +1,6 @@
{
"parent": "minecraft:item/generated",
"textures": {
"layer0": "minecraft:item/spruce_door"
}
}

View file

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

View file

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

View file

@ -0,0 +1,18 @@
{
"type": "minecraft:crafting_shaped",
"group": "wooden_door",
"pattern": [
"##",
"##",
"##"
],
"key": {
"#": {
"item": "techreborn:rubber_planks"
}
},
"result": {
"item": "techreborn:rubber_door",
"count": 3
}
}