Skip to content

Commit

Permalink
Metro Trapdoor
Browse files Browse the repository at this point in the history
  • Loading branch information
a0a7 committed Sep 25, 2023
1 parent 20f3ef2 commit e32f44c
Show file tree
Hide file tree
Showing 6 changed files with 145 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,9 @@
import com.simibubi.create.content.decoration.slidingDoor.SlidingDoorBlock;
import com.tterrag.registrate.builders.BlockBuilder;
import net.minecraft.world.item.CreativeModeTab;
import net.minecraft.world.level.block.TrapDoorBlock;
import systems.alexander.bellsandwhistles.BellsAndWhistles;
import systems.alexander.bellsandwhistles.block.custom.MetalBogieStepsBlock;
import systems.alexander.bellsandwhistles.block.custom.MetalGrabRailsBlock;
import systems.alexander.bellsandwhistles.block.custom.PilotBlock;
import systems.alexander.bellsandwhistles.block.custom.PlatformBlock;
import systems.alexander.bellsandwhistles.block.custom.*;
import systems.alexander.bellsandwhistles.item.ModCreativeModeTab;
import systems.alexander.bellsandwhistles.item.ModItems;
import net.minecraft.tags.BlockTags;
Expand Down Expand Up @@ -53,17 +51,22 @@ public static <T extends Block, P> NonNullFunction<BlockBuilder<T, P>, BlockBuil

public static final RegistryObject<Block> CORRUGATED_METRO_CASING = registerBlock("corrugated_metro_casing",
() -> new CasingBlock(BlockBehaviour.Properties.copy(Blocks.MOSSY_COBBLESTONE).sound(SoundType.METAL), true));
public static final RegistryObject<Block> METRO_DOOR = registerBlock("metro_door",
public static final RegistryObject<Block> SLIDING_METRO_DOOR = registerBlock("sliding_metro_door",
() -> new SlidingDoorBlock(BlockBehaviour.Properties.copy(Blocks.MOSSY_COBBLESTONE).sound(SoundType.METAL).noOcclusion(), false));
public static final RegistryObject<Block> FOLDING_METRO_DOOR = registerBlock("folding_metro_door",
() -> new SlidingDoorBlock(BlockBehaviour.Properties.copy(Blocks.MOSSY_COBBLESTONE).sound(SoundType.METAL).noOcclusion(), true));

public static final RegistryObject<Block> METRO_TRAPDOOR = registerBlock("metro_trapdoor",
() -> new TrainTrapdoorBlock(BlockBehaviour.Properties.copy(Blocks.MOSSY_COBBLESTONE).sound(SoundType.METAL).noOcclusion()));

public static final RegistryObject<Block> METRO_WINDOW = registerBlock("metro_window",
() -> new TrapDoorBlock(BlockBehaviour.Properties.copy(Blocks.MOSSY_COBBLESTONE).sound(SoundType.METAL).noOcclusion()));

public static final RegistryObject<Block> METRO_PANEL = registerBlock("metro_panel",
() -> new TrainTrapdoorBlock(BlockBehaviour.Properties.copy(Blocks.MOSSY_COBBLESTONE).sound(SoundType.METAL).noOcclusion()));
() -> new PanelBlock(BlockBehaviour.Properties.copy(Blocks.MOSSY_COBBLESTONE).sound(SoundType.METAL).noOcclusion()));

public static final RegistryObject<Block> CORRUGATED_METRO_PANEL = registerBlock("corrugated_metro_panel",
() -> new TrainTrapdoorBlock(BlockBehaviour.Properties.copy(Blocks.MOSSY_COBBLESTONE).sound(SoundType.METAL).noOcclusion()));
() -> new PanelBlock(BlockBehaviour.Properties.copy(Blocks.MOSSY_COBBLESTONE).sound(SoundType.METAL).noOcclusion()));


public static final RegistryObject<Block> METAL_PILOT = registerBlock("metal_pilot",
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
{
"variants": {
"facing=east,half=bottom,open=false": {
"model": "bellsandwhistles:block/metro/window/block_bottom",
"uvlock": true
},
"facing=east,half=bottom,open=true": {
"model": "bellsandwhistles:block/metro/window/block_open",
"y": 90
},
"facing=east,half=top,open=false": {
"model": "bellsandwhistles:block/metro/window/block_top",
"uvlock": true
},
"facing=east,half=top,open=true": {
"model": "bellsandwhistles:block/metro/window/block_open",
"y": 90
},
"facing=north,half=bottom,open=false": {
"model": "bellsandwhistles:block/metro/window/block_bottom",
"uvlock": true
},
"facing=north,half=bottom,open=true": {
"model": "bellsandwhistles:block/metro/window/block_open"
},
"facing=north,half=top,open=false": {
"model": "bellsandwhistles:block/metro/window/block_top",
"uvlock": true
},
"facing=north,half=top,open=true": {
"model": "bellsandwhistles:block/metro/window/block_open"
},
"facing=south,half=bottom,open=false": {
"model": "bellsandwhistles:block/metro/window/block_bottom",
"uvlock": true
},
"facing=south,half=bottom,open=true": {
"model": "bellsandwhistles:block/metro/window/block_open",
"y": 180
},
"facing=south,half=top,open=false": {
"model": "bellsandwhistles:block/metro/window/block_top",
"uvlock": true
},
"facing=south,half=top,open=true": {
"model": "bellsandwhistles:block/metro/window/block_open",
"y": 180
},
"facing=west,half=bottom,open=false": {
"model": "bellsandwhistles:block/metro/window/block_bottom",
"uvlock": true
},
"facing=west,half=bottom,open=true": {
"model": "bellsandwhistles:block/metro/window/block_open",
"y": 270
},
"facing=west,half=top,open=false": {
"model": "bellsandwhistles:block/metro/window/block_top",
"uvlock": true
},
"facing=west,half=top,open=true": {
"model": "bellsandwhistles:block/metro/window/block_open",
"y": 270
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
{
"parent": "block/block",
"credit": "Made with Blockbench",
"textures": {
"0": "bellsandwhistles:block/metro/metro_door_side",
"1": "bellsandwhistles:block/metro/metro_window",
"particle": "bellsandwhistles:block/metro/metro_window"
},
"elements": [
{
"from": [0, 0, 0],
"to": [16, 3, 16],
"faces": {
"north": {"uv": [0, 0, 16, 3], "texture": "#0"},
"east": {"uv": [0, 0, 16, 3], "texture": "#0"},
"south": {"uv": [0, 0, 16, 3], "texture": "#0"},
"west": {"uv": [0, 0, 16, 3], "texture": "#0"},
"up": {"uv": [0, 0, 16, 16], "rotation": 180, "texture": "#1"},
"down": {"uv": [0, 0, 16, 16], "texture": "#1"}
}
}
]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
{
"credit": "Made with Blockbench",
"parent": "block/block",
"textures": {
"0": "bellsandwhistles:block/metro/metro_door_side",
"1": "bellsandwhistles:block/metro/metro_window",
"particle": "bellsandwhistles:block/metro/metro_window"
},
"elements": [
{
"from": [0, 0, 13],
"to": [16, 16, 16],
"faces": {
"north": {"uv": [0, 0, 16, 16], "rotation": 180, "texture": "#1"},
"east": {"uv": [0, 0, 16, 3], "rotation": 90, "texture": "#0"},
"south": {"uv": [0, 0, 16, 16], "rotation": 180, "texture": "#1"},
"west": {"uv": [0, 0, 16, 3], "rotation": 270, "texture": "#0"},
"up": {"uv": [0, 0, 16, 3], "texture": "#0"},
"down": {"uv": [0, 0, 16, 3], "rotation": 180, "texture": "#0"}
}
}
]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
{
"parent": "block/block",
"credit": "Made with Blockbench",
"textures": {
"0": "bellsandwhistles:block/metro/metro_door_side",
"1": "bellsandwhistles:block/metro/metro_window",
"particle": "bellsandwhistles:block/metro/metro_window"
},
"elements": [
{
"from": [0, 13, 0],
"to": [16, 16, 16],
"faces": {
"north": {"uv": [0, 0, 16, 3], "texture": "#0"},
"east": {"uv": [0, 0, 16, 3], "texture": "#0"},
"south": {"uv": [0, 0, 16, 3], "texture": "#0"},
"west": {"uv": [0, 0, 16, 3], "texture": "#0"},
"up": {"uv": [0, 0, 16, 16], "rotation": 180, "texture": "#1"},
"down": {"uv": [0, 0, 16, 16], "texture": "#1"}
}
}
]
}
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit e32f44c

Please sign in to comment.