1
1
package org.valkyrienskies.eureka
2
2
3
- import net.minecraft.core.Registry
3
+ import net.minecraft.core.registries.Registries
4
4
import net.minecraft.world.item.BlockItem
5
5
import net.minecraft.world.item.Item
6
6
import net.minecraft.world.level.block.Block
7
7
import net.minecraft.world.level.block.Blocks
8
8
import net.minecraft.world.level.block.FireBlock
9
9
import net.minecraft.world.level.block.SoundType
10
10
import net.minecraft.world.level.block.state.BlockBehaviour
11
- import net.minecraft.world.level.material.Material
12
- import net.minecraft.world.level.material.MaterialColor
13
- import org.valkyrienskies.eureka.block.*
11
+ import net.minecraft.world.level.material.MapColor
12
+ import org.valkyrienskies.eureka.block.AnchorBlock
13
+ import org.valkyrienskies.eureka.block.BallastBlock
14
+ import org.valkyrienskies.eureka.block.BalloonBlock
15
+ import org.valkyrienskies.eureka.block.EngineBlock
16
+ import org.valkyrienskies.eureka.block.FloaterBlock
17
+ import org.valkyrienskies.eureka.block.ShipHelmBlock
18
+ import org.valkyrienskies.eureka.block.WoodType
14
19
import org.valkyrienskies.eureka.registry.DeferredRegister
15
20
import org.valkyrienskies.mod.common.hooks.VSGameEvents
16
21
17
22
@Suppress(" unused" )
18
23
object EurekaBlocks {
19
- private val BLOCKS = DeferredRegister .create(EurekaMod .MOD_ID , Registry . BLOCK_REGISTRY )
24
+ internal val BLOCKS = DeferredRegister .create(EurekaMod .MOD_ID , Registries . BLOCK )
20
25
21
26
val ANCHOR = BLOCKS .register(" anchor" , ::AnchorBlock )
22
27
val ENGINE = BLOCKS .register(" engine" , ::EngineBlock )
@@ -26,49 +31,49 @@ object EurekaBlocks {
26
31
// region Ship Helms
27
32
val OAK_SHIP_HELM = BLOCKS .register(" oak_ship_helm" ) {
28
33
ShipHelmBlock (
29
- BlockBehaviour .Properties .of(Material .WOOD ).strength(2.5F ).sound(SoundType .WOOD ),
34
+ BlockBehaviour .Properties .of().mapColor( MapColor .WOOD ).strength(2.5F ).sound(SoundType .WOOD ),
30
35
WoodType .OAK
31
36
)
32
37
}
33
38
val SPRUCE_SHIP_HELM = BLOCKS .register(" spruce_ship_helm" ) {
34
39
ShipHelmBlock (
35
- BlockBehaviour .Properties .of(Material .WOOD ).strength(2.5F ).sound(SoundType .WOOD ),
40
+ BlockBehaviour .Properties .of().mapColor( MapColor .WOOD ).strength(2.5F ).sound(SoundType .WOOD ),
36
41
WoodType .SPRUCE
37
42
)
38
43
}
39
44
val BIRCH_SHIP_HELM = BLOCKS .register(" birch_ship_helm" ) {
40
45
ShipHelmBlock (
41
- BlockBehaviour .Properties .of(Material .WOOD ).strength(2.5F ).sound(SoundType .WOOD ),
46
+ BlockBehaviour .Properties .of().mapColor( MapColor .WOOD ).strength(2.5F ).sound(SoundType .WOOD ),
42
47
WoodType .BIRCH
43
48
)
44
49
}
45
50
val JUNGLE_SHIP_HELM = BLOCKS .register(" jungle_ship_helm" ) {
46
51
ShipHelmBlock (
47
- BlockBehaviour .Properties .of(Material .WOOD ).strength(2.5F ).sound(SoundType .WOOD ),
52
+ BlockBehaviour .Properties .of().mapColor( MapColor .WOOD ).strength(2.5F ).sound(SoundType .WOOD ),
48
53
WoodType .JUNGLE
49
54
)
50
55
}
51
56
val ACACIA_SHIP_HELM = BLOCKS .register(" acacia_ship_helm" ) {
52
57
ShipHelmBlock (
53
- BlockBehaviour .Properties .of(Material .WOOD ).strength(2.5F ).sound(SoundType .WOOD ),
58
+ BlockBehaviour .Properties .of().mapColor( MapColor .WOOD ).strength(2.5F ).sound(SoundType .WOOD ),
54
59
WoodType .ACACIA
55
60
)
56
61
}
57
62
val DARK_OAK_SHIP_HELM = BLOCKS .register(" dark_oak_ship_helm" ) {
58
63
ShipHelmBlock (
59
- BlockBehaviour .Properties .of(Material .WOOD ).strength(2.5F ).sound(SoundType .WOOD ),
64
+ BlockBehaviour .Properties .of().mapColor( MapColor .WOOD ).strength(2.5F ).sound(SoundType .WOOD ),
60
65
WoodType .DARK_OAK
61
66
)
62
67
}
63
68
val CRIMSON_SHIP_HELM = BLOCKS .register(" crimson_ship_helm" ) {
64
69
ShipHelmBlock (
65
- BlockBehaviour .Properties .of(Material . NETHER_WOOD ).strength(2.5F ).sound(SoundType .STEM ),
70
+ BlockBehaviour .Properties .of().mapColor( MapColor . NETHER ).strength(2.5F ).sound(SoundType .STEM ),
66
71
WoodType .CRIMSON
67
72
)
68
73
}
69
74
val WARPED_SHIP_HELM = BLOCKS .register(" warped_ship_helm" ) {
70
75
ShipHelmBlock (
71
- BlockBehaviour .Properties .of(Material . NETHER_WOOD ).strength(2.5F ).sound(SoundType .STEM ),
76
+ BlockBehaviour .Properties .of().mapColor( MapColor . NETHER ).strength(2.5F ).sound(SoundType .STEM ),
72
77
WoodType .WARPED
73
78
)
74
79
}
@@ -77,87 +82,87 @@ object EurekaBlocks {
77
82
// region Balloons
78
83
val BALLOON = BLOCKS .register(" balloon" ) {
79
84
BalloonBlock (
80
- BlockBehaviour .Properties .of(Material . WOOL , MaterialColor .WOOL ).strength(0.8F ).sound(SoundType .WOOL )
85
+ BlockBehaviour .Properties .of().mapColor( MapColor .WOOL ).strength(0.8F ).sound(SoundType .WOOL )
81
86
)
82
87
}
83
88
val WHITE_BALLOON = BLOCKS .register(" white_balloon" ) {
84
89
BalloonBlock (
85
- BlockBehaviour .Properties .of(Material . WOOL , MaterialColor .SNOW ).strength(0.8F ).sound(SoundType .WOOL )
90
+ BlockBehaviour .Properties .of().mapColor( MapColor .SNOW ).strength(0.8F ).sound(SoundType .WOOL )
86
91
)
87
92
}
88
93
val LIGHT_GRAY_BALLOON = BLOCKS .register(" light_gray_balloon" ) {
89
94
BalloonBlock (
90
- BlockBehaviour .Properties .of(Material . WOOL , MaterialColor .COLOR_LIGHT_GRAY ).strength(0.8F ).sound(SoundType .WOOL )
95
+ BlockBehaviour .Properties .of().mapColor( MapColor .COLOR_LIGHT_GRAY ).strength(0.8F ).sound(SoundType .WOOL )
91
96
)
92
97
}
93
98
val GRAY_BALLOON = BLOCKS .register(" gray_balloon" ) {
94
99
BalloonBlock (
95
- BlockBehaviour .Properties .of(Material . WOOL , MaterialColor .COLOR_GRAY ).strength(0.8F ).sound(SoundType .WOOL )
100
+ BlockBehaviour .Properties .of().mapColor( MapColor .COLOR_GRAY ).strength(0.8F ).sound(SoundType .WOOL )
96
101
)
97
102
}
98
103
val BLACK_BALLOON = BLOCKS .register(" black_balloon" ) {
99
104
BalloonBlock (
100
- BlockBehaviour .Properties .of(Material . WOOL , MaterialColor .COLOR_BLACK ).strength(0.8F ).sound(SoundType .WOOL )
105
+ BlockBehaviour .Properties .of().mapColor( MapColor .COLOR_BLACK ).strength(0.8F ).sound(SoundType .WOOL )
101
106
)
102
107
}
103
108
val RED_BALLOON = BLOCKS .register(" red_balloon" ) {
104
109
BalloonBlock (
105
- BlockBehaviour .Properties .of(Material . WOOL , MaterialColor .COLOR_RED ).strength(0.8F ).sound(SoundType .WOOL )
110
+ BlockBehaviour .Properties .of().mapColor( MapColor .COLOR_RED ).strength(0.8F ).sound(SoundType .WOOL )
106
111
)
107
112
}
108
113
val ORANGE_BALLOON = BLOCKS .register(" orange_balloon" ) {
109
114
BalloonBlock (
110
- BlockBehaviour .Properties .of(Material . WOOL , MaterialColor .COLOR_ORANGE ).strength(0.8F ).sound(SoundType .WOOL )
115
+ BlockBehaviour .Properties .of().mapColor( MapColor .COLOR_ORANGE ).strength(0.8F ).sound(SoundType .WOOL )
111
116
)
112
117
}
113
118
val YELLOW_BALLOON = BLOCKS .register(" yellow_balloon" ) {
114
119
BalloonBlock (
115
- BlockBehaviour .Properties .of(Material . WOOL , MaterialColor .COLOR_YELLOW ).strength(0.8F ).sound(SoundType .WOOL )
120
+ BlockBehaviour .Properties .of().mapColor( MapColor .COLOR_YELLOW ).strength(0.8F ).sound(SoundType .WOOL )
116
121
)
117
122
}
118
123
val LIME_BALLOON = BLOCKS .register(" lime_balloon" ) {
119
124
BalloonBlock (
120
- BlockBehaviour .Properties .of(Material . WOOL , MaterialColor .COLOR_LIGHT_GREEN ).strength(0.8F ).sound(SoundType .WOOL )
125
+ BlockBehaviour .Properties .of().mapColor( MapColor .COLOR_LIGHT_GREEN ).strength(0.8F ).sound(SoundType .WOOL )
121
126
)
122
127
}
123
128
val GREEN_BALLOON = BLOCKS .register(" green_balloon" ) {
124
129
BalloonBlock (
125
- BlockBehaviour .Properties .of(Material . WOOL , MaterialColor .COLOR_GREEN ).strength(0.8F ).sound(SoundType .WOOL )
130
+ BlockBehaviour .Properties .of().mapColor( MapColor .COLOR_GREEN ).strength(0.8F ).sound(SoundType .WOOL )
126
131
)
127
132
}
128
133
val LIGHT_BLUE_BALLOON = BLOCKS .register(" light_blue_balloon" ) {
129
134
BalloonBlock (
130
- BlockBehaviour .Properties .of(Material . WOOL , MaterialColor .COLOR_LIGHT_BLUE ).strength(0.8F ).sound(SoundType .WOOL )
135
+ BlockBehaviour .Properties .of().mapColor( MapColor .COLOR_LIGHT_BLUE ).strength(0.8F ).sound(SoundType .WOOL )
131
136
)
132
137
}
133
138
val CYAN_BALLOON = BLOCKS .register(" cyan_balloon" ) {
134
139
BalloonBlock (
135
- BlockBehaviour .Properties .of(Material . WOOL , MaterialColor .COLOR_CYAN ).strength(0.8F ).sound(SoundType .WOOL )
140
+ BlockBehaviour .Properties .of().mapColor( MapColor .COLOR_CYAN ).strength(0.8F ).sound(SoundType .WOOL )
136
141
)
137
142
}
138
143
val BLUE_BALLOON = BLOCKS .register(" blue_balloon" ) {
139
144
BalloonBlock (
140
- BlockBehaviour .Properties .of(Material . WOOL , MaterialColor .COLOR_BLUE ).strength(0.8F ).sound(SoundType .WOOL )
145
+ BlockBehaviour .Properties .of().mapColor( MapColor .COLOR_BLUE ).strength(0.8F ).sound(SoundType .WOOL )
141
146
)
142
147
}
143
148
val PURPLE_BALLOON = BLOCKS .register(" purple_balloon" ) {
144
149
BalloonBlock (
145
- BlockBehaviour .Properties .of(Material . WOOL , MaterialColor .COLOR_PURPLE ).strength(0.8F ).sound(SoundType .WOOL )
150
+ BlockBehaviour .Properties .of().mapColor( MapColor .COLOR_PURPLE ).strength(0.8F ).sound(SoundType .WOOL )
146
151
)
147
152
}
148
153
val MAGENTA_BALLOON = BLOCKS .register(" magenta_balloon" ) {
149
154
BalloonBlock (
150
- BlockBehaviour .Properties .of(Material . WOOL , MaterialColor .COLOR_MAGENTA ).strength(0.8F ).sound(SoundType .WOOL )
155
+ BlockBehaviour .Properties .of().mapColor( MapColor .COLOR_MAGENTA ).strength(0.8F ).sound(SoundType .WOOL )
151
156
)
152
157
}
153
158
val PINK_BALLOON = BLOCKS .register(" pink_balloon" ) {
154
159
BalloonBlock (
155
- BlockBehaviour .Properties .of(Material . WOOL , MaterialColor .COLOR_PINK ).strength(0.8F ).sound(SoundType .WOOL )
160
+ BlockBehaviour .Properties .of().mapColor( MapColor .COLOR_PINK ).strength(0.8F ).sound(SoundType .WOOL )
156
161
)
157
162
}
158
163
val BROWN_BALLOON = BLOCKS .register(" brown_balloon" ) {
159
164
BalloonBlock (
160
- BlockBehaviour .Properties .of(Material . WOOL , MaterialColor .COLOR_BROWN ).strength(0.8F ).sound(SoundType .WOOL )
165
+ BlockBehaviour .Properties .of().mapColor( MapColor .COLOR_BROWN ).strength(0.8F ).sound(SoundType .WOOL )
161
166
)
162
167
}
163
168
// endregion
@@ -209,7 +214,7 @@ object EurekaBlocks {
209
214
// aka all blocks
210
215
fun registerItems (items : DeferredRegister <Item >) {
211
216
BLOCKS .forEach {
212
- items.register(it.name) { BlockItem (it.get(), Item .Properties ().tab( EurekaItems . TAB ) ) }
217
+ items.register(it.name) { BlockItem (it.get(), Item .Properties ()) }
213
218
}
214
219
}
215
220
}
0 commit comments