@@ -11,6 +11,7 @@ Block.createBlock("oreCopper",[
11
11
{ name :"Copper Ore" , texture :[ [ "copper_ore" , 0 ] ] , inCreative :true }
12
12
] , "ore" ) ;
13
13
ToolAPI . registerBlockMaterial ( BlockID . oreCopper , "stone" , 2 , true ) ;
14
+ ToolLib . addBlockDropOnExplosion ( "oreCopper" ) ;
14
15
Block . setDestroyLevel ( "oreCopper" , 2 ) ;
15
16
16
17
// 黝铜矿石
@@ -19,6 +20,7 @@ Block.createBlock("oreTetrahedrite",[
19
20
{ name :"Tetrahedrite Ore" , texture :[ [ "tetrahedrite_ore" , 0 ] ] , inCreative :true }
20
21
] , "ore" ) ;
21
22
ToolAPI . registerBlockMaterial ( BlockID . oreTetrahedrite , "stone" , 2 , true ) ;
23
+ ToolLib . addBlockDropOnExplosion ( "oreTetrahedrite" ) ;
22
24
Block . setDestroyLevel ( "oreTetrahedrite" , 2 ) ;
23
25
24
26
// 锡石矿石
@@ -27,6 +29,7 @@ Block.createBlock("oreCassiterite",[
27
29
{ name :"Cassiterite Ore" , texture :[ [ "cassiterite_ore" , 0 ] ] , inCreative :true }
28
30
] , "ore" ) ;
29
31
ToolAPI . registerBlockMaterial ( BlockID . oreCassiterite , "stone" , 2 , true ) ;
32
+ ToolLib . addBlockDropOnExplosion ( "oreCassiterite" ) ;
30
33
Block . setDestroyLevel ( "oreCassiterite" , 2 ) ;
31
34
32
35
// 方铅矿石
@@ -43,6 +46,7 @@ Block.createBlock("oreSpodumene",[
43
46
{ name :"Spodumene Ore" , texture :[ [ "spodumene_ore" , 0 ] ] , inCreative :true }
44
47
] , "ore" ) ;
45
48
ToolAPI . registerBlockMaterial ( BlockID . oreSpodumene , "stone" , 2 , true ) ;
49
+ ToolLib . addBlockDropOnExplosion ( "oreSpodumene" ) ;
46
50
Block . setDestroyLevel ( "oreSpodumene" , 2 ) ;
47
51
48
52
// 石墨矿石
@@ -51,6 +55,7 @@ Block.createBlock("oreGraphite",[
51
55
{ name :"Graphite Ore" , texture :[ [ "graphite_ore" , 0 ] ] , inCreative :true }
52
56
] , "ore" ) ;
53
57
ToolAPI . registerBlockMaterial ( BlockID . oreGraphite , "stone" , 2 , true ) ;
58
+ ToolLib . addBlockDropOnExplosion ( "oreGraphite" ) ;
54
59
Block . setDestroyLevel ( "oreGraphite" , 2 ) ;
55
60
56
61
Block . registerDropFunction ( "oreGraphite" , function ( coords , id , data , level , enchant ) {
@@ -67,6 +72,7 @@ Block.createBlock("oreTungsten",[
67
72
{ name :"Tungsten Ore" , texture :[ [ "tungsten_ore" , 0 ] ] , inCreative :true }
68
73
] , "ore" ) ;
69
74
ToolAPI . registerBlockMaterial ( BlockID . oreTungsten , "stone" , 3 , true ) ;
75
+ ToolLib . addBlockDropOnExplosion ( "oreTungsten" ) ;
70
76
Block . setDestroyLevel ( "oreTungsten" , 3 ) ;
71
77
72
78
// 铀矿石
@@ -75,6 +81,7 @@ Block.createBlock("oreUranium",[
75
81
{ name :"Uranium Ore" , texture :[ [ "uranium_ore" , 0 ] ] , inCreative :true }
76
82
] , "ore" ) ;
77
83
ToolAPI . registerBlockMaterial ( BlockID . oreUranium , "stone" , 3 , true ) ;
84
+ ToolLib . addBlockDropOnExplosion ( "oreUranium" ) ;
78
85
Block . setDestroyLevel ( "oreUranium" , 3 ) ;
79
86
80
87
// 银矿石
@@ -83,6 +90,7 @@ Block.createBlock("oreSilver",[
83
90
{ name :"Silver Ore" , texture :[ [ "silver_ore" , 0 ] ] , inCreative :true }
84
91
] , "ore" ) ;
85
92
ToolAPI . registerBlockMaterial ( BlockID . oreSilver , "stone" , 2 , true ) ;
93
+ ToolLib . addBlockDropOnExplosion ( "oreSilver" ) ;
86
94
Block . setDestroyLevel ( "oreSilver" , 2 ) ;
87
95
88
96
// 铝土矿石
@@ -91,6 +99,7 @@ Block.createBlock("oreBauxite",[
91
99
{ name :"Bauxite Ore" , texture :[ [ "bauxite_ore" , 0 ] ] , inCreative :true }
92
100
] , "ore" ) ;
93
101
ToolAPI . registerBlockMaterial ( BlockID . oreBauxite , "stone" , 2 , true ) ;
102
+ ToolLib . addBlockDropOnExplosion ( "oreBauxite" ) ;
94
103
Block . setDestroyLevel ( "oreBauxite" , 2 ) ;
95
104
96
105
// 盐矿石
@@ -99,6 +108,7 @@ Block.createBlock("oreSalt",[
99
108
{ name :"Salt Ore" , texture :[ [ "salt_ore" , 0 ] ] , inCreative :true }
100
109
] , "ore" ) ;
101
110
ToolAPI . registerBlockMaterial ( BlockID . oreSalt , "stone" , 1 , true ) ;
111
+ ToolLib . addBlockDropOnExplosion ( "oreSalt" ) ;
102
112
Block . setDestroyLevel ( "oreSalt" , 1 ) ;
103
113
104
114
Block . registerDropFunction ( "oreSalt" , function ( coords , id , data , level , enchant ) {
@@ -115,6 +125,7 @@ Block.createBlock("oreRuby",[
115
125
{ name :"Ruby Ore" , texture :[ [ "ruby_ore" , 0 ] ] , inCreative :true }
116
126
] , "ore" ) ;
117
127
ToolAPI . registerBlockMaterial ( BlockID . oreRuby , "stone" , 3 , true ) ;
128
+ ToolLib . addBlockDropOnExplosion ( "oreRuby" ) ;
118
129
Block . setDestroyLevel ( "oreRuby" , 3 ) ;
119
130
120
131
Block . registerDropFunction ( "oreRuby" , function ( coords , id , data , level , enchant ) {
@@ -160,10 +171,10 @@ var OreVein = {
160
171
var ore = [ ] ;
161
172
for ( let i in ores ) {
162
173
var item = ores [ i ] ;
163
- for ( let n = 0 ; n < Math . min ( item . count , 100 ) ; n ++ ) ore . push ( { id :item . id , data :item . data } ) ;
174
+ for ( let n = 0 ; n < item . count ; n ++ ) ore . push ( { id :item . id , data :item . data } ) ;
164
175
}
165
176
166
- for ( let i = 0 ; i < Math . min ( random , 100 ) ; i ++ ) this . OVERWORLD_VEIN . push ( { name :name , ore :ore , minHeight :min , maxHeight :max , size :size } ) ;
177
+ for ( let i = 0 ; i < random ; i ++ ) this . OVERWORLD_VEIN . push ( { name :name , ore :ore , minHeight :min , maxHeight :max , size :size } ) ;
167
178
168
179
if ( stone ) this . SMALL_STONE [ name ] = stone ;
169
180
@@ -174,10 +185,10 @@ var OreVein = {
174
185
var ore = [ ] ;
175
186
for ( let i in ores ) {
176
187
var item = ores [ i ] ;
177
- for ( let n = 0 ; n < Math . min ( item . count , 100 ) ; n ++ ) ore . push ( { id :item . id , data :item . data } ) ;
188
+ for ( let n = 0 ; n < item . count ; n ++ ) ore . push ( { id :item . id , data :item . data } ) ;
178
189
}
179
190
180
- for ( let i = 0 ; i < Math . min ( random , 100 ) ; i ++ ) this . NETHER_VEIN . push ( { name :name , ore :ore , minHeight :min , maxHeight :max , size :size } ) ;
191
+ for ( let i = 0 ; i < random ; i ++ ) this . NETHER_VEIN . push ( { name :name , ore :ore , minHeight :min , maxHeight :max , size :size } ) ;
181
192
182
193
if ( stone ) this . SMALL_STONE [ name ] = stone ;
183
194
@@ -188,48 +199,48 @@ var OreVein = {
188
199
var ore = [ ] ;
189
200
for ( let i in ores ) {
190
201
var item = ores [ i ] ;
191
- for ( let n = 0 ; n < Math . min ( item . count , 100 ) ; n ++ ) ore . push ( { id :item . id , data :item . data } ) ;
202
+ for ( let n = 0 ; n < item . count ; n ++ ) ore . push ( { id :item . id , data :item . data } ) ;
192
203
}
193
204
194
- for ( let i = 0 ; i < Math . min ( random , 100 ) ; i ++ ) this . ENDER_VEIN . push ( { name :name , ore :ore , minHeight :min , maxHeight :max , size :size } ) ;
205
+ for ( let i = 0 ; i < random ; i ++ ) this . ENDER_VEIN . push ( { name :name , ore :ore , minHeight :min , maxHeight :max , size :size } ) ;
195
206
196
207
if ( stone ) this . SMALL_STONE [ name ] = stone ;
197
208
198
209
this . VEIN . ENDER_VEIN . push ( { name :name , ore :ores , minHeight :min , maxHeight :max , size :size } ) ;
199
210
}
200
211
}
201
212
202
- // 煤炭矿脉
203
- OreVein . registerOreVein ( "Coal" , 80 , [ { id :16 , count :64 , data :0 } ] , 48 , 80 , 16 , { id :ItemID . tinyCoal , count :1 , data :0 } ) ;
204
-
205
- // 铝土矿脉
206
- OreVein . registerOreVein ( "Bauxite" , 80 , [ { id :BlockID . oreBauxite , count :64 , data :0 } ] , 48 , 96 , 16 , { id :ItemID . oreChunkBauxite , count :1 , data :0 } ) ;
207
-
208
- // 黝铜矿脉
209
- OreVein . registerOreVein ( "Tetrahedrite" , 150 , [ { id :BlockID . oreTetrahedrite , count :48 , data :0 } , { id :BlockID . oreCopper , count :24 , data :0 } ] , 64 , 128 , 30 , { id :ItemID . oreChunkTetrahedrite , count :1 , data :0 } ) ;
210
-
211
- // 钻石矿脉
212
- OreVein . registerOreVein ( "Diamonds" , 60 , [ { id :56 , count :6 , data :0 } , { id :16 , count :64 , data :0 } , { id :BlockID . oreGraphite , count :48 , data :0 } ] , 0 , 16 , 12 , { id :ItemID . dustSmallDiamond , count :1 , data :0 } ) ;
213
-
214
- // 沥青铀矿脉
215
- OreVein . registerOreVein ( "Pitchblende" , 40 , [ { id :BlockID . oreUranium , count :12 , data :0 } ] , 8 , 32 , 8 , { id :ItemID . oreChunkUranium , count :1 , data :0 } ) ;
216
-
217
- // 锡石矿脉
218
- OreVein . registerOreVein ( "Cassiterite" , 170 , [ { id :BlockID . oreCassiterite , count :24 , data :0 } , { id :BlockID . oreTungsten , count :6 , data :0 } ] , 32 , 96 , 35 , { id :ItemID . oreChunkUranium , count :1 , data :0 } ) ;
219
-
220
- // 铁矿脉
221
- OreVein . registerOreVein ( "Iron" , 120 , [ { id :15 , count :48 , data :0 } ] , 16 , 32 , 24 , { id :ItemID . oreChunkIron , count :1 , data :0 } ) ;
222
-
223
- // 方铅矿脉
224
- OreVein . registerOreVein ( "Galena" , 40 , [ { id :BlockID . oreGalena , count :48 , data :0 } , { id :BlockID . oreSilver , count :12 , data :0 } ] , 32 , 64 , 8 , { id :ItemID . oreChunkGalena , count :1 , data :0 } ) ;
225
-
226
- // 岩盐矿脉
227
- OreVein . registerOreVein ( "Salt" , 30 , [ { id :BlockID . oreSalt , count :48 , data :0 } , { id :BlockID . oreSpodumene , count :64 , data :0 } ] , 48 , 64 , 8 , { id :ItemID . dustSmallSalt , count :1 , data :0 } ) ;
228
-
229
- // 红石矿脉
230
- OreVein . registerOreVein ( "Redstone" , 60 , [ { id :73 , count :48 , data :0 } , { id :BlockID . oreRuby , count :6 , data :0 } ] , 16 , 48 , 12 , { id :ItemID . dustSmallRedstone , count :1 , data :0 } ) ;
231
-
232
213
Callback . addCallback ( "PreLoaded" , function ( ) {
214
+ // 煤炭矿脉
215
+ OreVein . registerOreVein ( "Coal" , 80 , [ { id :16 , count :64 , data :0 } ] , 48 , 80 , 16 , { id :ItemID . tinyCoal , count :1 , data :0 } ) ;
216
+
217
+ // 铝土矿脉
218
+ OreVein . registerOreVein ( "Bauxite" , 80 , [ { id :BlockID . oreBauxite , count :64 , data :0 } ] , 48 , 96 , 16 , { id :ItemID . oreChunkBauxite , count :1 , data :0 } ) ;
219
+
220
+ // 黝铜矿脉
221
+ OreVein . registerOreVein ( "Tetrahedrite" , 150 , [ { id :BlockID . oreTetrahedrite , count :48 , data :0 } , { id :BlockID . oreCopper , count :24 , data :0 } ] , 64 , 128 , 30 , { id :ItemID . oreChunkTetrahedrite , count :1 , data :0 } ) ;
222
+
223
+ // 钻石矿脉
224
+ OreVein . registerOreVein ( "Diamonds" , 60 , [ { id :56 , count :6 , data :0 } , { id :16 , count :64 , data :0 } , { id :BlockID . oreGraphite , count :48 , data :0 } ] , 0 , 16 , 12 , { id :ItemID . dustSmallDiamond , count :1 , data :0 } ) ;
225
+
226
+ // 沥青铀矿脉
227
+ OreVein . registerOreVein ( "Pitchblende" , 40 , [ { id :BlockID . oreUranium , count :12 , data :0 } ] , 8 , 32 , 8 , { id :ItemID . oreChunkUranium , count :1 , data :0 } ) ;
228
+
229
+ // 锡石矿脉
230
+ OreVein . registerOreVein ( "Cassiterite" , 170 , [ { id :BlockID . oreCassiterite , count :24 , data :0 } , { id :BlockID . oreTungsten , count :6 , data :0 } ] , 32 , 96 , 35 , { id :ItemID . oreChunkUranium , count :1 , data :0 } ) ;
231
+
232
+ // 铁矿脉
233
+ OreVein . registerOreVein ( "Iron" , 120 , [ { id :15 , count :48 , data :0 } ] , 16 , 32 , 24 , { id :ItemID . oreChunkIron , count :1 , data :0 } ) ;
234
+
235
+ // 方铅矿脉
236
+ OreVein . registerOreVein ( "Galena" , 40 , [ { id :BlockID . oreGalena , count :48 , data :0 } , { id :BlockID . oreSilver , count :12 , data :0 } ] , 32 , 64 , 8 , { id :ItemID . oreChunkGalena , count :1 , data :0 } ) ;
237
+
238
+ // 岩盐矿脉
239
+ OreVein . registerOreVein ( "Salt" , 30 , [ { id :BlockID . oreSalt , count :48 , data :0 } , { id :BlockID . oreSpodumene , count :64 , data :0 } ] , 48 , 64 , 8 , { id :ItemID . dustSmallSalt , count :1 , data :0 } ) ;
240
+
241
+ // 红石矿脉
242
+ OreVein . registerOreVein ( "Redstone" , 60 , [ { id :73 , count :48 , data :0 } , { id :BlockID . oreRuby , count :6 , data :0 } ] , 16 , 48 , 12 , { id :ItemID . dustSmallRedstone , count :1 , data :0 } ) ;
243
+
233
244
Callback . addCallback ( "GenerateChunkUnderground" , function ( chunkX , chunkZ ) {
234
245
var vein = OreVein . OVERWORLD_VEIN [ Math . floor ( Math . random ( ) * OreVein . OVERWORLD_VEIN . length ) ] ;
235
246
if ( vein ) {
0 commit comments