Skip to content

Commit 304b2e1

Browse files
TimeBatherCopilotzlw380MegumiKasugadadadsdf
committed
init: migration from NeoKuaYue
Co-authored-by: Copilot <198982749+Copilot@users.noreply.github.com> Co-authored-by: zlw380 <496607959@qq.com> Co-authored-by: MegumiKasuga <1926195023@qq.com> Co-authored-by: dadadsdf <13969336971@163.com> Co-authored-by: HTony03 <HTony03@foxmail.com> Co-authored-by: aurora4123 <1652039138@qq.com>
1 parent e105a33 commit 304b2e1

47 files changed

Lines changed: 2701 additions & 1 deletion

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
package cn.kycraft.kuayue.parts.carriages.c22;
2+
3+
import cn.kycraft.kuayue.parts.core.panel.SlabBlock;
4+
import net.minecraft.core.BlockPos;
5+
import net.minecraft.world.level.BlockGetter;
6+
import net.minecraft.world.level.block.state.BlockState;
7+
import net.minecraft.world.phys.shapes.CollisionContext;
8+
import net.minecraft.world.phys.shapes.VoxelShape;
9+
10+
public class AirVentBlock extends SlabBlock {
11+
12+
public AirVentBlock(Properties pProperties) {
13+
super(pProperties, false);
14+
}
15+
16+
@Override
17+
public VoxelShape getShape(BlockState pState, BlockGetter pLevel, BlockPos pPos, CollisionContext pContext) {
18+
return box(5, 0, 5, 12, 4, 12);
19+
}
20+
21+
@Override
22+
public VoxelShape getCollisionShape(BlockState pState, BlockGetter pLevel, BlockPos pPos, CollisionContext pContext) {
23+
return getShape(pState, pLevel, pPos, pContext);
24+
}
25+
}
Lines changed: 124 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,124 @@
1+
package cn.kycraft.kuayue.parts.carriages.c22;
2+
3+
import cn.kycraft.kuayue.KuaYue;
4+
import cn.kycraft.kuayue.parts.KuaYueTrainPanelModule;
5+
import cn.kycraft.kuayue.parts.core.panel.*;
6+
import cn.kycraft.kuayue.parts.core.panel.custom_rendered.CustomRenderedDoorBlock;
7+
import cn.kycraft.kuayue.parts.core.panel.custom_rendered.CustomRenderedEndFaceBlock;
8+
import cn.kycraft.kuayue.parts.core.panel.registration.PanelReg;
9+
import cn.kycraft.kuayue.parts.core.panel.registration.SlabReg;
10+
import cn.kycraft.kuayue.parts.core.panel.window.TrainOpenableWindowBlock;
11+
import cn.kycraft.kuayue.parts.core.panel.window.TrainSmallWindowBlock;
12+
import io.micronaut.context.annotation.Context;
13+
import lib.kasuga.registration.RegistryGroup;
14+
import lib.kasuga.registration.minecraft.block.BlockRegConfigurations;
15+
import lib.kasuga.registration.minecraft.item.ItemRegConfigurations;
16+
import net.createmod.catnip.data.Couple;
17+
import net.minecraft.resources.ResourceLocation;
18+
import net.minecraft.world.item.DyeColor;
19+
import net.minecraft.world.level.block.RenderShape;
20+
import net.minecraft.world.phys.Vec3;
21+
22+
import static cn.kycraft.kuayue.parts.KuaYueTrainPanelModule.TRAIN_PANEL_TAB;
23+
24+
@Context()
25+
public class C22Panel {
26+
27+
public static final RegistryGroup GROUP_C22 =
28+
new RegistryGroup().configure(
29+
BlockRegConfigurations.adopt(block -> block
30+
.noOcclusion()
31+
.strength(1.5f, 3f)
32+
.mapColor(DyeColor.BLUE)
33+
)
34+
).configure(
35+
ItemRegConfigurations.adopt(
36+
item -> item.stacksTo(8)
37+
.tabTo(TRAIN_PANEL_TAB)
38+
)
39+
).setParent(KuaYueTrainPanelModule.REGISTRY_GROUP);
40+
41+
public static final SlabReg<SlabBlock> C22_FLOOR =
42+
new SlabReg<>("22_floor", p -> new SlabBlock(p, false))
43+
.setParent(GROUP_C22);
44+
45+
public static final SlabReg<SlabBlock> C22_FLOOR_CENTER =
46+
new SlabReg<>("22_floor_center", p -> new SlabBlock(p, false))
47+
.setParent(GROUP_C22);
48+
49+
public static final PanelReg<TrainPanelBlock> C22_PANEL_BOTTOM =
50+
new PanelReg<>("22_panel_bottom", TrainPanelBlock::new)
51+
.setParent(GROUP_C22);
52+
53+
public static final PanelReg<TrainPanelBlock> C22_PANEL_MIDDLE =
54+
new PanelReg<>("22_panel_middle", TrainPanelBlock::new)
55+
.setParent(GROUP_C22);
56+
57+
public static final SlabReg<LadderBlock> C22_LADDER =
58+
new SlabReg<>("22_ladder", p -> new LadderBlock(p, false))
59+
.setParent(GROUP_C22);
60+
61+
public static final PanelReg<TrainSmallWindowBlock> C22_WINDOW =
62+
new PanelReg<>("22_window", TrainSmallWindowBlock::new)
63+
.setParent(GROUP_C22);
64+
65+
public static final PanelReg<TrainOpenableWindowBlock> C22_LARGE_WINDOW =
66+
new PanelReg<>("22_large_window", p -> new TrainOpenableWindowBlock(p, 2))
67+
.setParent(GROUP_C22);
68+
69+
public static final PanelReg<TrainOpenableWindowBlock> C22_DOUBLE_SMALL_WINDOW =
70+
new PanelReg<>("22_double_small_window", p -> new TrainOpenableWindowBlock(p, 2))
71+
.setParent(GROUP_C22);
72+
73+
public static final PanelReg<TrainOpenableWindowBlock> C22_SMALL_WINDOW =
74+
new PanelReg<>("22_small_window", p -> new TrainOpenableWindowBlock(p, 1))
75+
.setParent(GROUP_C22);
76+
77+
public static final PanelReg<CustomRenderedDoorBlock> DOOR_22 =
78+
new PanelReg<>("22_door", p -> new CustomRenderedDoorBlock(
79+
p,
80+
Couple.create(
81+
ResourceLocation.fromNamespaceAndPath(KuaYue.MODID, "carriage/carriage_22/door/22_door_bottom_lh"),
82+
ResourceLocation.fromNamespaceAndPath(KuaYue.MODID, "carriage/carriage_22/door/22_door_upper_lh")
83+
),
84+
Couple.create(
85+
ResourceLocation.fromNamespaceAndPath(KuaYue.MODID, "carriage/carriage_22/door/22_door_bottom"),
86+
ResourceLocation.fromNamespaceAndPath(KuaYue.MODID, "carriage/carriage_22/door/22_door_upper")
87+
),
88+
new Vec3(0, 0, 0),
89+
new Vec3(0, 0, 0),
90+
RenderShape.ENTITYBLOCK_ANIMATED,
91+
false
92+
))
93+
.setParent(GROUP_C22);
94+
95+
public static final SlabReg<SlabBlock> C22_COUPLER =
96+
new SlabReg<>("22_coupler", p -> new SlabBlock(p, false))
97+
.setParent(GROUP_C22);
98+
99+
public static final PanelReg<CustomRenderedEndFaceBlock> C22_END_FACE =
100+
new PanelReg<>("22_end_face", p -> new CustomRenderedEndFaceBlock(
101+
p,
102+
TrainPanelProperties.DoorType.NO_DOOR,
103+
null,
104+
null,
105+
"carriage/carriage_22/22_end_face"
106+
))
107+
.setParent(GROUP_C22);
108+
109+
public static final PanelReg<TrainPanelBlock> C22_CARPORT_PANEL_TOP =
110+
new PanelReg<>("22_carport_panel_top", TrainPanelBlock::new)
111+
.setParent(GROUP_C22);
112+
113+
public static final PanelReg<TrainHingePanelBlock> C22_CARPORT_PANEL_TOP_LAMP =
114+
new PanelReg<>("22_carport_panel_top_lamp", TrainHingePanelBlock::new)
115+
.setParent(GROUP_C22);
116+
117+
public static final SlabReg<SlabBlock> C22_CARPORT_TOP_CAP =
118+
new SlabReg<>("22_carport_top_cap", p -> new SlabBlock(p, true))
119+
.setParent(GROUP_C22);
120+
121+
public static final SlabReg<AirVentBlock> C22_AIR_VENT =
122+
new SlabReg<>("22_air_vent", AirVentBlock::new)
123+
.setParent(GROUP_C22);
124+
}
Lines changed: 143 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,143 @@
1+
package cn.kycraft.kuayue.parts.carriages.c25;
2+
3+
import cn.kycraft.kuayue.KuaYue;
4+
import cn.kycraft.kuayue.parts.KuaYueTrainPanelModule;
5+
import cn.kycraft.kuayue.parts.core.panel.*;
6+
import cn.kycraft.kuayue.parts.core.panel.custom_rendered.CustomRenderedDoorBlock;
7+
import cn.kycraft.kuayue.parts.core.panel.custom_rendered.CustomRenderedEndFaceBlock;
8+
import cn.kycraft.kuayue.parts.core.panel.registration.PanelReg;
9+
import cn.kycraft.kuayue.parts.core.panel.registration.SlabReg;
10+
import cn.kycraft.kuayue.parts.core.panel.window.TrainOpenableWindowBlock;
11+
import cn.kycraft.kuayue.parts.core.panel.window.TrainSmallWindowBlock;
12+
import cn.kycraft.kuayue.parts.core.panel.window.TrainUnOpenableWindowBlock;
13+
import io.micronaut.context.annotation.Context;
14+
import lib.kasuga.registration.RegistryGroup;
15+
import lib.kasuga.registration.minecraft.block.BlockRegConfigurations;
16+
import lib.kasuga.registration.minecraft.item.ItemRegConfigurations;
17+
import net.createmod.catnip.data.Couple;
18+
import net.minecraft.resources.ResourceLocation;
19+
import net.minecraft.world.item.DyeColor;
20+
import net.minecraft.world.level.block.RenderShape;
21+
import net.minecraft.world.phys.Vec3;
22+
23+
import static cn.kycraft.kuayue.parts.KuaYueTrainPanelModule.TRAIN_PANEL_TAB;
24+
25+
@Context()
26+
public class C25BPanel {
27+
28+
public static final RegistryGroup GROUP_C25B =
29+
new RegistryGroup().configure(
30+
BlockRegConfigurations.adopt(block -> block
31+
.noOcclusion()
32+
.strength(1.5f, 3f)
33+
.mapColor(DyeColor.BLUE)
34+
)
35+
).configure(
36+
ItemRegConfigurations.adopt(
37+
item -> item.stacksTo(8)
38+
.tabTo(TRAIN_PANEL_TAB)
39+
)
40+
).setParent(KuaYueTrainPanelModule.REGISTRY_GROUP);
41+
42+
public static final PanelReg<TrainPanelBlock> PANEL_BOTTOM_25B =
43+
new PanelReg<>("panel_bottom_25b", TrainPanelBlock::new)
44+
.setParent(GROUP_C25B);
45+
46+
public static final PanelReg<TrainPanelBlock> PANEL_MIDDLE_25B =
47+
new PanelReg<>("panel_middle_25b", TrainPanelBlock::new)
48+
.setParent(GROUP_C25B);
49+
50+
public static final PanelReg<TrainHingePanelBlock> PANEL_SYMBOL_MARSHALLED_25B =
51+
new PanelReg<>("panel_symbol_marshalled_25b", TrainHingePanelBlock::new)
52+
.setParent(GROUP_C25B);
53+
54+
public static final PanelReg<TrainPanelBlock> PANEL_TOP_25B =
55+
new PanelReg<>("panel_top_25b", TrainPanelBlock::new)
56+
.setParent(GROUP_C25B);
57+
58+
public static final PanelReg<TrainPanelBlock> PANEL_TOP_25B_2 =
59+
new PanelReg<>("panel_top_25b_2", TrainPanelBlock::new)
60+
.setParent(GROUP_C25B);
61+
62+
public static final PanelReg<TrainSmallWindowBlock> WINDOW_OC_25B =
63+
new PanelReg<>("window_oc_25b", TrainSmallWindowBlock::new)
64+
.setParent(GROUP_C25B);
65+
66+
public static final PanelReg<TrainSmallWindowBlock> WINDOW_OC_SMALL_25B =
67+
new PanelReg<>("window_oc_small_25b", TrainSmallWindowBlock::new)
68+
.setParent(GROUP_C25B);
69+
70+
public static final PanelReg<TrainSmallWindowBlock> WINDOW_OC_TOILET_25B =
71+
new PanelReg<>("window_oc_toilet_25b", TrainSmallWindowBlock::new)
72+
.setParent(GROUP_C25B);
73+
74+
public static final PanelReg<TrainOpenableWindowBlock> WINDOW_OC_WIDE_25B =
75+
new PanelReg<>("window_oc_wide_25b", p -> new TrainOpenableWindowBlock(p, 2))
76+
.setParent(GROUP_C25B);
77+
78+
public static final PanelReg<TrainUnOpenableWindowBlock> WINDOW_OC_WIDE_SEALED_25B =
79+
new PanelReg<>("window_oc_wide_sealed_25b", p -> new TrainUnOpenableWindowBlock(p, 2))
80+
.setParent(GROUP_C25B);
81+
82+
public static final PanelReg<CustomRenderedDoorBlock> DOOR_25B =
83+
new PanelReg<>("door_25b", p -> new CustomRenderedDoorBlock(
84+
p,
85+
Couple.create(
86+
ResourceLocation.fromNamespaceAndPath(KuaYue.MODID, "door/original_25b_door_bottom_hinge"),
87+
ResourceLocation.fromNamespaceAndPath(KuaYue.MODID, "door/original_25b_door_top_hinge")
88+
),
89+
Couple.create(
90+
ResourceLocation.fromNamespaceAndPath(KuaYue.MODID, "door/original_25b_door_bottom"),
91+
ResourceLocation.fromNamespaceAndPath(KuaYue.MODID, "door/original_25b_door_top")
92+
),
93+
new Vec3(0, 0, 0),
94+
new Vec3(0, 0, -.124),
95+
RenderShape.ENTITYBLOCK_ANIMATED,
96+
false
97+
))
98+
.setParent(GROUP_C25B);
99+
100+
public static final PanelReg<CustomRenderedEndFaceBlock> END_FACE_25B_1 =
101+
new PanelReg<>("end_face_25b_1", p -> new CustomRenderedEndFaceBlock(
102+
p,
103+
TrainPanelProperties.DoorType.ROTATE_SINGLE_SIDED,
104+
"carriage/carriage25b/end_face/end_face_door_original_25b",
105+
null,
106+
"carriage/carriage25b/end_face/end_face_original_25b_1"
107+
))
108+
.setParent(GROUP_C25B);
109+
110+
public static final PanelReg<CustomRenderedEndFaceBlock> END_FACE_25B_2 =
111+
new PanelReg<>("end_face_25b_2", p -> new CustomRenderedEndFaceBlock(
112+
p,
113+
TrainPanelProperties.DoorType.ROTATE_SINGLE_SIDED,
114+
"carriage/carriage25b/end_face/end_face_door_original_25b",
115+
null,
116+
"carriage/carriage25b/end_face/end_face_original_25b_2"
117+
))
118+
.setParent(GROUP_C25B);
119+
120+
public static final PanelReg<CustomRenderedEndFaceBlock> END_FACE_25B_3 =
121+
new PanelReg<>("end_face_25b_3", p -> new CustomRenderedEndFaceBlock(
122+
p,
123+
TrainPanelProperties.DoorType.ROTATE_SINGLE_SIDED,
124+
"carriage/carriage25b/end_face/end_face_door_original_25b",
125+
null,
126+
"carriage/carriage25b/end_face/end_face_original_25b_3"
127+
))
128+
.setParent(GROUP_C25B);
129+
130+
public static final SlabReg<SlabBlock> FLOOR_25B =
131+
new SlabReg<>("floor_25b", p -> new SlabBlock(p, false))
132+
.mapColor(DyeColor.GREEN)
133+
.setParent(GROUP_C25B);
134+
135+
public static final SlabReg<SlabBlock> TOILET_DD_25B =
136+
new SlabReg<>("toilet_dd_25b", p -> new SlabBlock(p, false))
137+
.mapColor(DyeColor.GREEN)
138+
.setParent(GROUP_C25B);
139+
140+
public static final SlabReg<LadderBlock> LADDER_25B =
141+
new SlabReg<>("ladder_25b", LadderBlock::new)
142+
.setParent(GROUP_C25B);
143+
}

0 commit comments

Comments
 (0)