Iron door

This commit is contained in:
quat1024 2023-07-23 20:35:52 -04:00
parent fd699c18db
commit 893ce0acc9
10 changed files with 196 additions and 0 deletions

View File

@ -34,6 +34,7 @@ public class Templates implements ModInitializer {
public static final Block DOOR = Registry.register(Registries.BLOCK, id("door") , new TemplateDoorBlock(cp(Blocks.OAK_DOOR), BlockSetType.OAK));
public static final Block FENCE = Registry.register(Registries.BLOCK, id("fence") , new TemplateFenceBlock(cp(Blocks.OAK_FENCE)));
public static final Block FENCE_GATE = Registry.register(Registries.BLOCK, id("fence_gate") , new TemplateFenceGateBlock(cp(Blocks.OAK_FENCE_GATE)));
public static final Block IRON_DOOR = Registry.register(Registries.BLOCK, id("iron_door") , new TemplateDoorBlock(cp(Blocks.IRON_DOOR), BlockSetType.IRON));
public static final Block IRON_TRAPDOOR = Registry.register(Registries.BLOCK, id("iron_trapdoor") , new TemplateTrapdoorBlock(cp(Blocks.IRON_TRAPDOOR), BlockSetType.IRON));
public static final Block LEVER = Registry.register(Registries.BLOCK, id("lever") , new TemplateLeverBlock(cp(Blocks.LEVER)));
public static final Block PANE = Registry.register(Registries.BLOCK, id("pane") , new TemplatePaneBlock(cp(Blocks.GLASS_PANE)));
@ -59,6 +60,7 @@ public class Templates implements ModInitializer {
DOOR,
FENCE,
FENCE_GATE,
IRON_DOOR,
IRON_TRAPDOOR,
LEVER,
PANE,
@ -93,6 +95,7 @@ public class Templates implements ModInitializer {
Registry.register(Registries.ITEM, id("door") , new BlockItem(DOOR, new Item.Settings()));
Registry.register(Registries.ITEM, id("fence") , new BlockItem(FENCE, new Item.Settings()));
Registry.register(Registries.ITEM, id("fence_gate") , new BlockItem(FENCE_GATE, new Item.Settings()));
Registry.register(Registries.ITEM, id("iron_door") , new BlockItem(IRON_DOOR, new Item.Settings()));
Registry.register(Registries.ITEM, id("iron_trapdoor") , new BlockItem(IRON_TRAPDOOR, new Item.Settings()));
Registry.register(Registries.ITEM, id("lever") , new BlockItem(LEVER, new Item.Settings()));
Registry.register(Registries.ITEM, id("pane") , new BlockItem(PANE, new Item.Settings()));
@ -126,6 +129,7 @@ public class Templates implements ModInitializer {
e.add(FENCE_GATE);
e.add(DOOR);
e.add(TRAPDOOR);
e.add(IRON_DOOR);
e.add(IRON_TRAPDOOR);
e.add(PRESSURE_PLATE);
e.add(BUTTON);

View File

@ -63,6 +63,7 @@ public class TemplatesClient implements ClientModInitializer {
Templates.DOOR,
Templates.FENCE,
Templates.FENCE_GATE,
Templates.IRON_DOOR,
Templates.IRON_TRAPDOOR,
Templates.LEVER,
Templates.PANE,

View File

@ -0,0 +1,124 @@
{
"variants": {
"facing=east,half=lower,hinge=left,open=false": {
"model": "templates:door_bottom_left_special"
},
"facing=east,half=lower,hinge=left,open=true": {
"model": "templates:door_bottom_left_open_special",
"y": 90
},
"facing=east,half=lower,hinge=right,open=false": {
"model": "templates:door_bottom_right_special"
},
"facing=east,half=lower,hinge=right,open=true": {
"model": "templates:door_bottom_right_open_special",
"y": 270
},
"facing=east,half=upper,hinge=left,open=false": {
"model": "templates:door_top_left_special"
},
"facing=east,half=upper,hinge=left,open=true": {
"model": "templates:door_top_left_open_special",
"y": 90
},
"facing=east,half=upper,hinge=right,open=false": {
"model": "templates:door_top_right_special"
},
"facing=east,half=upper,hinge=right,open=true": {
"model": "templates:door_top_right_open_special",
"y": 270
},
"facing=north,half=lower,hinge=left,open=false": {
"model": "templates:door_bottom_left_special",
"y": 270
},
"facing=north,half=lower,hinge=left,open=true": {
"model": "templates:door_bottom_left_open_special"
},
"facing=north,half=lower,hinge=right,open=false": {
"model": "templates:door_bottom_right_special",
"y": 270
},
"facing=north,half=lower,hinge=right,open=true": {
"model": "templates:door_bottom_right_open_special",
"y": 180
},
"facing=north,half=upper,hinge=left,open=false": {
"model": "templates:door_top_left_special",
"y": 270
},
"facing=north,half=upper,hinge=left,open=true": {
"model": "templates:door_top_left_open_special"
},
"facing=north,half=upper,hinge=right,open=false": {
"model": "templates:door_top_right_special",
"y": 270
},
"facing=north,half=upper,hinge=right,open=true": {
"model": "templates:door_top_right_open_special",
"y": 180
},
"facing=south,half=lower,hinge=left,open=false": {
"model": "templates:door_bottom_left_special",
"y": 90
},
"facing=south,half=lower,hinge=left,open=true": {
"model": "templates:door_bottom_left_open_special",
"y": 180
},
"facing=south,half=lower,hinge=right,open=false": {
"model": "templates:door_bottom_right_special",
"y": 90
},
"facing=south,half=lower,hinge=right,open=true": {
"model": "templates:door_bottom_right_open_special"
},
"facing=south,half=upper,hinge=left,open=false": {
"model": "templates:door_top_left_special",
"y": 90
},
"facing=south,half=upper,hinge=left,open=true": {
"model": "templates:door_top_left_open_special",
"y": 180
},
"facing=south,half=upper,hinge=right,open=false": {
"model": "templates:door_top_right_special",
"y": 90
},
"facing=south,half=upper,hinge=right,open=true": {
"model": "templates:door_top_right_open_special"
},
"facing=west,half=lower,hinge=left,open=false": {
"model": "templates:door_bottom_left_special",
"y": 180
},
"facing=west,half=lower,hinge=left,open=true": {
"model": "templates:door_bottom_left_open_special",
"y": 270
},
"facing=west,half=lower,hinge=right,open=false": {
"model": "templates:door_bottom_right_special",
"y": 180
},
"facing=west,half=lower,hinge=right,open=true": {
"model": "templates:door_bottom_right_open_special",
"y": 90
},
"facing=west,half=upper,hinge=left,open=false": {
"model": "templates:door_top_left_special",
"y": 180
},
"facing=west,half=upper,hinge=left,open=true": {
"model": "templates:door_top_left_open_special",
"y": 270
},
"facing=west,half=upper,hinge=right,open=false": {
"model": "templates:door_top_right_special",
"y": 180
},
"facing=west,half=upper,hinge=right,open=true": {
"model": "templates:door_top_right_open_special",
"y": 90
}
}
}

View File

@ -8,6 +8,7 @@
"block.templates.door": "Door Template",
"block.templates.fence": "Fence Template",
"block.templates.fence_gate": "Fence Gate Template",
"block.templates.iron_door": "Iron Door Template",
"block.templates.iron_trapdoor": "Iron Trapdoor Template",
"block.templates.lever": "Lever Template",
"block.templates.pane": "Pane Template",

View File

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

View File

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

View File

@ -1,6 +1,7 @@
{
"replace": false,
"values": [
"templates:iron_door",
"templates:iron_trapdoor"
]
}

View File

@ -9,6 +9,7 @@
"templates:door",
"templates:fence",
"templates:fence_gate",
"templates:iron_door",
"templates:iron_trapdoor",
"templates:lever",
"templates:pane",

View File

@ -0,0 +1,28 @@
{
"type": "minecraft:block",
"pools": [
{
"rolls": 1,
"entries": [
{
"type": "minecraft:item",
"name": "templates:iron_door",
"conditions": [
{
"block": "templates:iron_door",
"condition": "minecraft:block_state_property",
"properties": {
"half": "lower"
}
}
]
}
],
"conditions": [
{
"condition": "minecraft:survives_explosion"
}
]
}
]
}

View File

@ -0,0 +1,24 @@
{
"type": "minecraft:crafting_shaped",
"pattern": [
"II ",
"II~",
"IIX"
],
"key": {
"I": {
"item": "minecraft:bamboo"
},
"~": {
"item": "minecraft:string"
},
"X": {
"item": "minecraft:iron_ingot"
}
},
"result": {
"item": "templates:door",
"count": 2
},
"group": "templates"
}