From 1ddf09fc3cfb2e2175d6e698bf0e803b01185c27 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=AD=90=E6=82=A6=E8=A7=A3=E8=AF=B4?= Date: Tue, 6 Aug 2024 20:26:57 +0800 Subject: [PATCH] Metal Pole (Line 9) --- .../ziyue/tjmetro/mod/BlockEntityTypes.java | 1 + .../java/ziyue/tjmetro/mod/BlockList.java | 2 + .../ziyue/tjmetro/mod/RegistryClient.java | 16 ++- .../ziyue/tjmetro/mod/TianjinMetroClient.java | 2 + .../tjmetro/mod/block/BlockMetalPoleBMT.java | 121 ++++++++++++++++++ .../mod/block/base/BlockCustomColorBase.java | 5 + .../mod/packet/ClientPacketHelper.java | 2 +- .../tjmetro/mod/screen/ColorPickerScreen.java | 11 +- .../tjmetro/blockstates/metal_pole_bmt.json | 82 ++++++++++++ .../resources/assets/tjmetro/lang/en_us.json | 1 + .../models/block/metal_pole_bmt_connect.json | 20 +++ .../block/metal_pole_bmt_horizontal.json | 20 +++ .../models/block/metal_pole_bmt_vertical.json | 20 +++ .../tjmetro/models/item/metal_pole_bmt.json | 3 + 14 files changed, 295 insertions(+), 11 deletions(-) create mode 100644 fabric/src/main/java/ziyue/tjmetro/mod/block/BlockMetalPoleBMT.java create mode 100644 fabric/src/main/resources/assets/tjmetro/blockstates/metal_pole_bmt.json create mode 100644 fabric/src/main/resources/assets/tjmetro/models/block/metal_pole_bmt_connect.json create mode 100644 fabric/src/main/resources/assets/tjmetro/models/block/metal_pole_bmt_horizontal.json create mode 100644 fabric/src/main/resources/assets/tjmetro/models/block/metal_pole_bmt_vertical.json create mode 100644 fabric/src/main/resources/assets/tjmetro/models/item/metal_pole_bmt.json diff --git a/fabric/src/main/java/ziyue/tjmetro/mod/BlockEntityTypes.java b/fabric/src/main/java/ziyue/tjmetro/mod/BlockEntityTypes.java index 96e22b9..b98dbb2 100644 --- a/fabric/src/main/java/ziyue/tjmetro/mod/BlockEntityTypes.java +++ b/fabric/src/main/java/ziyue/tjmetro/mod/BlockEntityTypes.java @@ -63,6 +63,7 @@ public interface BlockEntityTypes BlockEntityTypeRegistryObject RAILWAY_SIGN_TIANJIN_BMT_6_EVEN = Registry.registerBlockEntityType("railway_sign_tianjin_bmt_6_even", (pos, state) -> new BlockRailwaySignTianjinBMT.BlockEntity(6, false, pos, state), BlockList.RAILWAY_SIGN_TIANJIN_BMT_6_EVEN::get); BlockEntityTypeRegistryObject RAILWAY_SIGN_TIANJIN_BMT_7_EVEN = Registry.registerBlockEntityType("railway_sign_tianjin_bmt_7_even", (pos, state) -> new BlockRailwaySignTianjinBMT.BlockEntity(7, false, pos, state), BlockList.RAILWAY_SIGN_TIANJIN_BMT_7_EVEN::get); BlockEntityTypeRegistryObject APG_DOOR_TIANJIN = Registry.registerBlockEntityType("apg_door_tianjin", BlockAPGDoorTianjin.BlockEntity::new, BlockList.APG_DOOR_TIANJIN::get); + BlockEntityTypeRegistryObject METAL_POLE_BMT = Registry.registerBlockEntityType("metal_pole_bmt", BlockMetalPoleBMT.BlockEntity::new, BlockList.METAL_POLE_BMT::get); static void registerBlockEntities() { // Calling this class to initialize constants diff --git a/fabric/src/main/java/ziyue/tjmetro/mod/BlockList.java b/fabric/src/main/java/ziyue/tjmetro/mod/BlockList.java index e882a00..163fe8d 100644 --- a/fabric/src/main/java/ziyue/tjmetro/mod/BlockList.java +++ b/fabric/src/main/java/ziyue/tjmetro/mod/BlockList.java @@ -3,6 +3,7 @@ import org.mtr.mapping.holder.Block; import org.mtr.mapping.holder.Blocks; import org.mtr.mapping.mapper.BlockHelper; +import org.mtr.mapping.mapper.BlockItemExtension; import org.mtr.mapping.mapper.SlabBlockExtension; import org.mtr.mapping.registry.BlockRegistryObject; import org.mtr.mod.block.BlockCeiling; @@ -113,6 +114,7 @@ public interface BlockList BlockRegistryObject APG_DOOR_TIANJIN = Registry.registerBlock("apg_door_tianjin", () -> new Block(new BlockAPGDoorTianjin())); BlockRegistryObject APG_GLASS_TIANJIN = Registry.registerBlock("apg_glass_tianjin", () -> new Block(new BlockAPGGlassTianjin())); BlockRegistryObject APG_GLASS_END_TIANJIN = Registry.registerBlock("apg_glass_end_tianjin", () -> new Block(new BlockAPGGlassEndTianjin())); + BlockRegistryObject METAL_POLE_BMT = Registry.registerBlockWithBlockItem("metal_pole_bmt", () -> new Block(new BlockMetalPoleBMT()), BlockItemExtension::new, DECORATION); static void registerBlocks() { // Calling this class to initialize constants diff --git a/fabric/src/main/java/ziyue/tjmetro/mod/RegistryClient.java b/fabric/src/main/java/ziyue/tjmetro/mod/RegistryClient.java index 9951098..7346533 100644 --- a/fabric/src/main/java/ziyue/tjmetro/mod/RegistryClient.java +++ b/fabric/src/main/java/ziyue/tjmetro/mod/RegistryClient.java @@ -1,15 +1,15 @@ package ziyue.tjmetro.mod; +import net.fabricmc.fabric.api.client.rendering.v1.ColorProviderRegistry; import org.mtr.mapping.holder.Identifier; +import org.mtr.mapping.holder.Item; +import org.mtr.mapping.holder.ItemConvertible; import org.mtr.mapping.holder.RenderLayer; import org.mtr.mapping.mapper.BlockEntityExtension; import org.mtr.mapping.mapper.BlockEntityRenderer; import org.mtr.mapping.mapper.EntityExtension; import org.mtr.mapping.mapper.EntityRenderer; -import org.mtr.mapping.registry.BlockEntityTypeRegistryObject; -import org.mtr.mapping.registry.BlockRegistryObject; -import org.mtr.mapping.registry.EntityTypeRegistryObject; -import org.mtr.mapping.registry.PacketHandler; +import org.mtr.mapping.registry.*; import org.mtr.mod.InitClient; import ziyue.tjmetro.mod.block.base.BlockCustomColorBase; @@ -27,17 +27,21 @@ public static void registerBlockStationColor(BlockRegistryObject... blocks) { REGISTRY_CLIENT.registerBlockColors((state, world, pos, tintIndex) -> InitClient.getStationColor(pos), blocks); } + public static void registerItemCustomColor(int color, Item item) { + ColorProviderRegistry.ITEM.register((stack, index) -> color, item.data); + } + public static void registerBlockCustomColor(BlockRegistryObject... blocks) { for (BlockRegistryObject block : blocks) { REGISTRY_CLIENT.registerBlockColors((state, world, pos, tintIndex) -> { try { if (world.getBlockEntity(pos).data instanceof BlockCustomColorBase.BlockEntityBase) { final BlockCustomColorBase.BlockEntityBase entity = (BlockCustomColorBase.BlockEntityBase) world.getBlockEntity(pos).data; - if (entity.color != -1) return entity.color; + return entity.color == -1 ? entity.getDefaultColor(pos) : entity.color; } } catch (Exception ignored) { } - return InitClient.getStationColor(pos); + return 8355711; }, block); } } diff --git a/fabric/src/main/java/ziyue/tjmetro/mod/TianjinMetroClient.java b/fabric/src/main/java/ziyue/tjmetro/mod/TianjinMetroClient.java index 609007a..75abb17 100644 --- a/fabric/src/main/java/ziyue/tjmetro/mod/TianjinMetroClient.java +++ b/fabric/src/main/java/ziyue/tjmetro/mod/TianjinMetroClient.java @@ -95,6 +95,8 @@ public static void init() { RegistryClient.registerBlockStationColor(BlockList.STATION_COLOR_CEILING, BlockList.STATION_COLOR_CEILING_LIGHT, BlockList.STATION_COLOR_CEILING_NO_LIGHT, BlockList.STATION_COLOR_CEILING_NOT_LIT); RegistryClient.registerBlockStationColor(BlockList.STATION_NAME_SIGN_1); RegistryClient.registerBlockCustomColor(BlockList.CUSTOM_COLOR_CONCRETE, BlockList.CUSTOM_COLOR_CONCRETE_SLAB, BlockList.CUSTOM_COLOR_CONCRETE_STAIRS); + RegistryClient.registerBlockCustomColor(BlockList.METAL_POLE_BMT); + RegistryClient.registerItemCustomColor(0xfff100, BlockList.METAL_POLE_BMT.get().asItem()); RegistryClient.setupPackets("packet"); diff --git a/fabric/src/main/java/ziyue/tjmetro/mod/block/BlockMetalPoleBMT.java b/fabric/src/main/java/ziyue/tjmetro/mod/block/BlockMetalPoleBMT.java new file mode 100644 index 0000000..cca2ce8 --- /dev/null +++ b/fabric/src/main/java/ziyue/tjmetro/mod/block/BlockMetalPoleBMT.java @@ -0,0 +1,121 @@ +package ziyue.tjmetro.mod.block; + +import org.jetbrains.annotations.NotNull; +import org.mtr.mapping.holder.*; +import org.mtr.mapping.mapper.BlockEntityExtension; +import org.mtr.mapping.mapper.BlockExtension; +import org.mtr.mapping.mapper.BlockHelper; +import org.mtr.mapping.mapper.DirectionHelper; +import org.mtr.mapping.tool.HolderBase; +import org.mtr.mod.block.IBlock; +import ziyue.tjmetro.mod.BlockEntityTypes; +import ziyue.tjmetro.mod.BlockList; +import ziyue.tjmetro.mod.block.base.BlockCustomColorBase; + +import javax.annotation.Nonnull; +import javax.annotation.Nullable; +import java.util.List; + +public class BlockMetalPoleBMT extends BlockCustomColorBase implements DirectionHelper +{ + public static final BooleanProperty NORTH = BooleanProperty.of("north"); + public static final BooleanProperty EAST = BooleanProperty.of("east"); + public static final BooleanProperty SOUTH = BooleanProperty.of("south"); + public static final BooleanProperty WEST = BooleanProperty.of("west"); + + public BlockMetalPoleBMT() { + this(BlockHelper.createBlockSettings(false).nonOpaque()); + } + + public BlockMetalPoleBMT(BlockSettings blockSettings) { + super(blockSettings); + } + + @Nullable + @Override + public BlockState getPlacementState2(ItemPlacementContext ctx) { + final Direction direction = ctx.getSide(); + return getDefaultState2().with(new Property<>(NORTH.data), false).with(new Property<>(EAST.data), false).with(new Property<>(SOUTH.data), false).with(new Property<>(WEST.data), false) + .with(new Property<>(FACING_NORMAL.data), direction == Direction.UP ? Direction.DOWN.data : direction.data); + } + + @Nonnull + @Override + public BlockState getStateForNeighborUpdate2(BlockState state, Direction direction, BlockState neighborState, WorldAccess world, BlockPos pos, BlockPos neighborPos) { + if (IBlock.getStatePropertySafe(state, FACING_NORMAL) != Direction.DOWN) return state; + + boolean shouldConnect = false; + if (IBlockExtension.isBlock(neighborState, BlockList.METAL_POLE_BMT.get())) { + if (IBlock.getStatePropertySafe(neighborState, FACING_NORMAL) != Direction.DOWN) { + shouldConnect = true; + } + } + switch (direction) { + case NORTH: + return state.with(new Property<>(NORTH.data), shouldConnect); + case EAST: + return state.with(new Property<>(EAST.data), shouldConnect); + case SOUTH: + return state.with(new Property<>(SOUTH.data), shouldConnect); + case WEST: + return state.with(new Property<>(WEST.data), shouldConnect); + } + return state; + } + + @Nonnull + @Override + public VoxelShape getOutlineShape2(BlockState state, BlockView world, BlockPos pos, ShapeContext context) { + final Direction direction = IBlock.getStatePropertySafe(state, FACING_NORMAL); + if (direction == Direction.DOWN) { + final VoxelShape pole = Block.createCuboidShape(6.0, 0.0, 6.0, 10.0, 16.0, 10.0); + VoxelShape connect = Block.createCuboidShape(0, 0, 0, 0, 0, 0); + if (IBlock.getStatePropertySafe(state, NORTH)) { + connect = VoxelShapes.union(connect, IBlock.getVoxelShapeByDirection(6, 0, 0, 10, 4, 6, Direction.NORTH)); + } + if (IBlock.getStatePropertySafe(state, EAST)) { + connect = VoxelShapes.union(connect, IBlock.getVoxelShapeByDirection(6, 0, 0, 10, 4, 6, Direction.EAST)); + } + if (IBlock.getStatePropertySafe(state, SOUTH)) { + connect = VoxelShapes.union(connect, IBlock.getVoxelShapeByDirection(6, 0, 0, 10, 4, 6, Direction.SOUTH)); + } + if (IBlock.getStatePropertySafe(state, WEST)) { + connect = VoxelShapes.union(connect, IBlock.getVoxelShapeByDirection(6, 0, 0, 10, 4, 6, Direction.WEST)); + } + return VoxelShapes.union(pole, connect); + } + return IBlock.getVoxelShapeByDirection(6, 0, 0, 10, 4, 16, direction); + } + + @Override + public BlockEntityExtension createBlockEntity(BlockPos blockPos, BlockState blockState) { + return new BlockEntity(blockPos, blockState); + } + + @Nonnull + @Override + public String getTranslationKey2() { + return "block.tjmetro.metal_pole_bmt"; + } + + @Override + public void addBlockProperties(List> properties) { + properties.add(FACING_NORMAL); + properties.add(NORTH); + properties.add(EAST); + properties.add(SOUTH); + properties.add(WEST); + } + + public static class BlockEntity extends BlockEntityBase + { + public BlockEntity(BlockPos blockPos, BlockState blockState) { + super(BlockEntityTypes.METAL_POLE_BMT.get(), blockPos, blockState); + } + + @Override + public int getDefaultColor(BlockPos pos) { + return 0xfff100; + } + } +} diff --git a/fabric/src/main/java/ziyue/tjmetro/mod/block/base/BlockCustomColorBase.java b/fabric/src/main/java/ziyue/tjmetro/mod/block/base/BlockCustomColorBase.java index fe4d35b..83d86aa 100644 --- a/fabric/src/main/java/ziyue/tjmetro/mod/block/base/BlockCustomColorBase.java +++ b/fabric/src/main/java/ziyue/tjmetro/mod/block/base/BlockCustomColorBase.java @@ -5,6 +5,7 @@ import org.mtr.mapping.mapper.BlockExtension; import org.mtr.mapping.mapper.BlockWithEntity; import org.mtr.mapping.mapper.TextHelper; +import org.mtr.mod.InitClient; import ziyue.tjmetro.mod.Registry; import ziyue.tjmetro.mod.block.IBlockExtension; import ziyue.tjmetro.mod.packet.PacketOpenBlockEntityScreen; @@ -45,6 +46,10 @@ public BlockEntityBase(BlockEntityType type, BlockPos blockPos, BlockState bl super(type, blockPos, blockState); } + public int getDefaultColor(BlockPos pos) { + return InitClient.getStationColor(pos); + } + @Override public void readCompoundTag(CompoundTag compoundTag) { color = compoundTag.getInt(COLOR_ID); diff --git a/fabric/src/main/java/ziyue/tjmetro/mod/packet/ClientPacketHelper.java b/fabric/src/main/java/ziyue/tjmetro/mod/packet/ClientPacketHelper.java index ce06902..f920ce8 100644 --- a/fabric/src/main/java/ziyue/tjmetro/mod/packet/ClientPacketHelper.java +++ b/fabric/src/main/java/ziyue/tjmetro/mod/packet/ClientPacketHelper.java @@ -30,7 +30,7 @@ public static void openBlockEntityScreen(BlockPos blockPos) { openScreen(new RoadblockContentScreen(blockPos, entity.content), screen -> screen instanceof RoadblockContentScreen); } else if (blockEntity.data instanceof BlockCustomColorBase.BlockEntityBase) { final BlockCustomColorBase.BlockEntityBase entity = (BlockCustomColorBase.BlockEntityBase) blockEntity.data; - openScreen(new ColorPickerScreen(blockPos, entity.color), screen -> screen instanceof ColorPickerScreen); + openScreen(new ColorPickerScreen(blockPos, entity), screen -> screen instanceof ColorPickerScreen); } else if (blockEntity.data instanceof BlockRailwaySignWallDouble.BlockEntity) { openScreen(new RailwaySignDoubleScreen(blockPos), screen -> screen instanceof RailwaySignDoubleScreen); } else if (blockEntity.data instanceof BlockRailwaySignBase.BlockEntityBase) { diff --git a/fabric/src/main/java/ziyue/tjmetro/mod/screen/ColorPickerScreen.java b/fabric/src/main/java/ziyue/tjmetro/mod/screen/ColorPickerScreen.java index a5b63f5..c8731ca 100644 --- a/fabric/src/main/java/ziyue/tjmetro/mod/screen/ColorPickerScreen.java +++ b/fabric/src/main/java/ziyue/tjmetro/mod/screen/ColorPickerScreen.java @@ -10,6 +10,7 @@ import org.mtr.mod.client.IDrawing; import org.mtr.mod.data.IGui; import ziyue.tjmetro.mod.RegistryClient; +import ziyue.tjmetro.mod.block.base.BlockCustomColorBase; import ziyue.tjmetro.mod.packet.PacketUpdateCustomColor; import java.awt.*; @@ -24,6 +25,7 @@ public class ColorPickerScreen extends ScreenExtension implements IGui protected final BlockPos pos; protected final int oldColor; + protected final BlockCustomColorBase.BlockEntityBase entity; protected final TextFieldWidgetExtension textFieldColor; protected final TextFieldWidgetExtension textFieldRed; protected final TextFieldWidgetExtension textFieldGreen; @@ -33,17 +35,18 @@ public class ColorPickerScreen extends ScreenExtension implements IGui protected static final int RIGHT_WIDTH = 60; - public ColorPickerScreen(BlockPos pos, int oldColor) { + public ColorPickerScreen(BlockPos pos, BlockCustomColorBase.BlockEntityBase entity) { super(); this.pos = pos; - this.oldColor = oldColor; + this.oldColor = entity.color; + this.entity = entity; textFieldColor = new TextFieldWidgetExtension(0, 0, 0, SQUARE_SIZE, 6, TextCase.UPPER, "[^\\dA-F]", TextHelper.literal(Integer.toHexString(oldColor).toUpperCase(Locale.ENGLISH)).getString()); textFieldRed = new TextFieldWidgetExtension(0, 0, 0, SQUARE_SIZE, 3, TextCase.DEFAULT, "\\D", TextHelper.literal(String.valueOf((oldColor >> 16) & 0xFF)).getString()); textFieldGreen = new TextFieldWidgetExtension(0, 0, 0, SQUARE_SIZE, 3, TextCase.DEFAULT, "\\D", TextHelper.literal(String.valueOf((oldColor >> 8) & 0xFF)).getString()); textFieldBlue = new TextFieldWidgetExtension(0, 0, 0, SQUARE_SIZE, 3, TextCase.DEFAULT, "\\D", TextHelper.literal(String.valueOf(oldColor & 0xFF)).getString()); checkboxDefaultColor = new CheckboxWidgetExtension(0, 0, 0, 20, TextHelper.translatable("gui.tjmetro.default_color"), true, checked -> { if (checked) { - setHsb(InitClient.getStationColor(pos), true); + setHsb(entity.getDefaultColor(pos), true); } }); checkboxDefaultColor.setChecked(oldColor == -1); @@ -67,7 +70,7 @@ protected void init2() { IDrawing.setPositionAndWidth(checkboxDefaultColor, SQUARE_SIZE * 4 + getMainWidth() + 3, SQUARE_SIZE, RIGHT_WIDTH - TEXT_FIELD_PADDING); IDrawing.setPositionAndWidth(buttonReset, startX, getMainHeight(), RIGHT_WIDTH); - setHsb(oldColor == -1 ? InitClient.getStationColor(pos) : oldColor, true); + setHsb(oldColor == -1 ? entity.getDefaultColor(pos) : oldColor, true); textFieldColor.setChangedListener2(text -> textCallback(text, -1)); textFieldRed.setChangedListener2(text -> textCallback(text, 16)); diff --git a/fabric/src/main/resources/assets/tjmetro/blockstates/metal_pole_bmt.json b/fabric/src/main/resources/assets/tjmetro/blockstates/metal_pole_bmt.json new file mode 100644 index 0000000..9263319 --- /dev/null +++ b/fabric/src/main/resources/assets/tjmetro/blockstates/metal_pole_bmt.json @@ -0,0 +1,82 @@ +{ + "multipart": [ + { + "when": { + "facing": "north" + }, + "apply": { + "model": "tjmetro:block/metal_pole_bmt_horizontal" + } + }, + { + "when": { + "facing": "east" + }, + "apply": { + "model": "tjmetro:block/metal_pole_bmt_horizontal", + "y": 90 + } + }, + { + "when": { + "facing": "south" + }, + "apply": { + "model": "tjmetro:block/metal_pole_bmt_horizontal", + "y": 180 + } + }, + { + "when": { + "facing": "west" + }, + "apply": { + "model": "tjmetro:block/metal_pole_bmt_horizontal", + "y": 270 + } + }, + { + "when": { + "facing": "down" + }, + "apply": { + "model": "tjmetro:block/metal_pole_bmt_vertical" + } + }, + { + "when": { + "north": true + }, + "apply": { + "model": "tjmetro:block/metal_pole_bmt_connect" + } + }, + { + "when": { + "east": true + }, + "apply": { + "model": "tjmetro:block/metal_pole_bmt_connect", + "y": 90 + } + }, + { + "when": { + "south": true + }, + "apply": { + "model": "tjmetro:block/metal_pole_bmt_connect", + "y": 180 + } + }, + { + "when": { + "west": true + }, + "apply": { + "model": "tjmetro:block/metal_pole_bmt_connect", + "y": 270 + } + } + ] +} \ No newline at end of file diff --git a/fabric/src/main/resources/assets/tjmetro/lang/en_us.json b/fabric/src/main/resources/assets/tjmetro/lang/en_us.json index e8004f9..e2831e1 100644 --- a/fabric/src/main/resources/assets/tjmetro/lang/en_us.json +++ b/fabric/src/main/resources/assets/tjmetro/lang/en_us.json @@ -49,6 +49,7 @@ "block.tjmetro.station_name_entrance_tianjin_bmt_pinyin": "Station Name (Entrance, Tianjin, Line 9, Pinyin)", "block.tjmetro.station_name_plate": "Station Name Plate (Line 9)", "block.tjmetro.apg_tianjin": "Automatic Platform Gates (Tianjin)", + "block.tjmetro.metal_pole_bmt": "Metal Pole (Line 9)", "gui.tjmetro.service_corridor_sign_cjk": "暖行服务连廊", "gui.tjmetro.contact_station_for_help_cjk": "如需帮助请联系车站", diff --git a/fabric/src/main/resources/assets/tjmetro/models/block/metal_pole_bmt_connect.json b/fabric/src/main/resources/assets/tjmetro/models/block/metal_pole_bmt_connect.json new file mode 100644 index 0000000..3074ef4 --- /dev/null +++ b/fabric/src/main/resources/assets/tjmetro/models/block/metal_pole_bmt_connect.json @@ -0,0 +1,20 @@ +{ + "parent": "block/block", + "textures": { + "particle": "mtr:block/metal" + }, + "elements": [ + { + "from": [ 6, 0, 0 ], + "to": [ 10, 4, 6 ], + "faces": { + "down": { "texture": "#particle", "tintindex": 0, "cullface": "down" }, + "up": { "texture": "#particle", "tintindex": 0, "cullface": "up" }, + "east": { "texture": "#particle", "tintindex": 0 }, + "west": { "texture": "#particle", "tintindex": 0 }, + "north": { "texture": "#particle", "tintindex": 0 }, + "south": { "texture": "#particle", "tintindex": 0 } + } + } + ] +} diff --git a/fabric/src/main/resources/assets/tjmetro/models/block/metal_pole_bmt_horizontal.json b/fabric/src/main/resources/assets/tjmetro/models/block/metal_pole_bmt_horizontal.json new file mode 100644 index 0000000..13346e0 --- /dev/null +++ b/fabric/src/main/resources/assets/tjmetro/models/block/metal_pole_bmt_horizontal.json @@ -0,0 +1,20 @@ +{ + "parent": "block/block", + "textures": { + "particle": "mtr:block/metal" + }, + "elements": [ + { + "from": [ 6, 0, 0 ], + "to": [ 10, 4, 16 ], + "faces": { + "down": { "texture": "#particle", "tintindex": 0, "cullface": "down" }, + "up": { "texture": "#particle", "tintindex": 0, "cullface": "up" }, + "east": { "texture": "#particle", "tintindex": 0 }, + "west": { "texture": "#particle", "tintindex": 0 }, + "north": { "texture": "#particle", "tintindex": 0 }, + "south": { "texture": "#particle", "tintindex": 0 } + } + } + ] +} diff --git a/fabric/src/main/resources/assets/tjmetro/models/block/metal_pole_bmt_vertical.json b/fabric/src/main/resources/assets/tjmetro/models/block/metal_pole_bmt_vertical.json new file mode 100644 index 0000000..a04db4e --- /dev/null +++ b/fabric/src/main/resources/assets/tjmetro/models/block/metal_pole_bmt_vertical.json @@ -0,0 +1,20 @@ +{ + "parent": "block/block", + "textures": { + "particle": "mtr:block/metal" + }, + "elements": [ + { + "from": [ 6, 0, 6 ], + "to": [ 10, 16, 10 ], + "faces": { + "down": { "texture": "#particle", "tintindex": 0, "cullface": "down" }, + "up": { "texture": "#particle", "tintindex": 0, "cullface": "up" }, + "east": { "texture": "#particle", "tintindex": 0 }, + "west": { "texture": "#particle", "tintindex": 0 }, + "north": { "texture": "#particle", "tintindex": 0 }, + "south": { "texture": "#particle", "tintindex": 0 } + } + } + ] +} diff --git a/fabric/src/main/resources/assets/tjmetro/models/item/metal_pole_bmt.json b/fabric/src/main/resources/assets/tjmetro/models/item/metal_pole_bmt.json new file mode 100644 index 0000000..b60ba87 --- /dev/null +++ b/fabric/src/main/resources/assets/tjmetro/models/item/metal_pole_bmt.json @@ -0,0 +1,3 @@ +{ + "parent": "mtr:block/station_pole" +}