7
7
8
8
package micdoodle8 .mods .galacticraft .core ;
9
9
10
- import com .google .common .collect .Lists ;
11
- import com .google .common .collect .Maps ;
12
- import com .google .common .collect .ObjectArrays ;
13
- import com .google .common .collect .Ordering ;
14
10
import java .lang .reflect .Constructor ;
15
11
import java .util .ArrayList ;
16
12
import java .util .Comparator ;
17
13
import java .util .HashMap ;
18
14
import java .util .List ;
19
15
import java .util .Map ;
16
+
17
+ import net .minecraft .block .Block ;
18
+ import net .minecraft .block .material .MapColor ;
19
+ import net .minecraft .block .material .Material ;
20
+ import net .minecraft .init .Blocks ;
21
+ import net .minecraft .init .Items ;
22
+ import net .minecraft .item .Item ;
23
+ import net .minecraft .item .ItemBlock ;
24
+ import net .minecraft .item .ItemStack ;
25
+ import net .minecraft .util .NonNullList ;
26
+ import net .minecraft .util .ResourceLocation ;
27
+
28
+ import net .minecraftforge .oredict .OreDictionary ;
29
+ import net .minecraftforge .registries .IForgeRegistry ;
30
+
20
31
import micdoodle8 .mods .galacticraft .annotations .ForRemoval ;
21
32
import micdoodle8 .mods .galacticraft .annotations .ReplaceWith ;
22
33
import micdoodle8 .mods .galacticraft .core .blocks .BlockAirLockFrame ;
107
118
import micdoodle8 .mods .galacticraft .core .util .EnumSortCategoryBlock ;
108
119
import micdoodle8 .mods .galacticraft .core .util .GCCoreUtil ;
109
120
import micdoodle8 .mods .galacticraft .core .util .StackSorted ;
110
- import net .minecraft .block .Block ;
111
- import net .minecraft .block .material .MapColor ;
112
- import net .minecraft .block .material .Material ;
113
- import net .minecraft .init .Blocks ;
114
- import net .minecraft .init .Items ;
115
- import net .minecraft .item .Item ;
116
- import net .minecraft .item .ItemBlock ;
117
- import net .minecraft .item .ItemStack ;
118
- import net .minecraft .util .NonNullList ;
119
- import net .minecraft .util .ResourceLocation ;
120
- import net .minecraftforge .oredict .OreDictionary ;
121
- import net .minecraftforge .registries .IForgeRegistry ;
121
+
122
+ import com .google .common .collect .Lists ;
123
+ import com .google .common .collect .Maps ;
124
+ import com .google .common .collect .ObjectArrays ;
125
+ import com .google .common .collect .Ordering ;
122
126
123
127
public class GCBlocks
124
128
{
125
-
129
+ //@noformat
126
130
public static Block breatheableAir ;
127
131
public static Block brightAir ;
128
132
public static Block brightBreatheableAir ;
@@ -194,15 +198,16 @@ public class GCBlocks
194
198
public static Block grating ;
195
199
public static Block gratingWater ;
196
200
public static Block gratingLava ;
201
+ // @format
197
202
198
- public static final Material machine = new Material (MapColor .IRON );
203
+ public static final Material machine = new Material (MapColor .IRON );
199
204
200
- public static ArrayList <Block > hiddenBlocks = new ArrayList <>();
201
- public static ArrayList <Block > otherModTorchesLit = new ArrayList <>();
202
- public static ArrayList <Block > otherModTorchesUnlit = new ArrayList <>();
205
+ public static ArrayList <Block > hiddenBlocks = new ArrayList <>();
206
+ public static ArrayList <Block > otherModTorchesLit = new ArrayList <>();
207
+ public static ArrayList <Block > otherModTorchesUnlit = new ArrayList <>();
203
208
204
- public static Map <EnumSortCategoryBlock , List <StackSorted >> sortMapBlocks = Maps .newHashMap ();
205
- public static HashMap <Block , Block > itemChanges = new HashMap <>(4 , 1.0F );
209
+ public static Map <EnumSortCategoryBlock , List <StackSorted >> sortMapBlocks = Maps .newHashMap ();
210
+ public static HashMap <Block , Block > itemChanges = new HashMap <>(4 , 1.0F );
206
211
207
212
public static void initBlocks ()
208
213
{
@@ -225,19 +230,16 @@ public static void initBlocks()
225
230
GCBlocks .basicBlock = new BlockBasic ("basic_block_core" );
226
231
GCBlocks .airLockFrame = new BlockAirLockFrame ("air_lock_frame" );
227
232
GCBlocks .airLockSeal = new BlockAirLockWall ("air_lock_seal" );
228
- // These glass types have to be registered as 6 separate blocks, (a) to
229
- // allow different coloring of each one and (b) because the Forge
230
- // MultiLayer custom model does not allow for different textures to be
231
- // set for different variants
233
+ // These glass types have to be registered as 6 separate blocks,
234
+ // - (a) to allow different coloring of each one and
235
+ // - (b) because the Forge
236
+ // MultiLayer custom model does not allow for different textures to be set for different variants
232
237
GCBlocks .spaceGlassVanilla = (BlockSpaceGlass ) new BlockSpaceGlass ("space_glass_vanilla" , GlassType .VANILLA , GlassFrame .PLAIN , null ).setHardness (0.3F ).setResistance (3F );
233
238
GCBlocks .spaceGlassClear = (BlockSpaceGlass ) new BlockSpaceGlass ("space_glass_clear" , GlassType .CLEAR , GlassFrame .PLAIN , null ).setHardness (0.3F ).setResistance (3F );
234
239
GCBlocks .spaceGlassStrong = (BlockSpaceGlass ) new BlockSpaceGlass ("space_glass_strong" , GlassType .STRONG , GlassFrame .PLAIN , null ).setHardness (4F ).setResistance (35F );
235
- GCBlocks .spaceGlassTinVanilla =
236
- (BlockSpaceGlass ) new BlockSpaceGlass ("space_glass_vanilla_tin" , GlassType .VANILLA , GlassFrame .TIN_DECO , GCBlocks .spaceGlassVanilla ).setHardness (0.3F ).setResistance (4F );
237
- GCBlocks .spaceGlassTinClear =
238
- (BlockSpaceGlass ) new BlockSpaceGlass ("space_glass_clear_tin" , GlassType .CLEAR , GlassFrame .TIN_DECO , GCBlocks .spaceGlassClear ).setHardness (0.3F ).setResistance (4F );
239
- GCBlocks .spaceGlassTinStrong =
240
- (BlockSpaceGlass ) new BlockSpaceGlass ("space_glass_strong_tin" , GlassType .STRONG , GlassFrame .TIN_DECO , GCBlocks .spaceGlassStrong ).setHardness (4F ).setResistance (35F );
240
+ GCBlocks .spaceGlassTinVanilla = (BlockSpaceGlass ) new BlockSpaceGlass ("space_glass_vanilla_tin" , GlassType .VANILLA , GlassFrame .TIN_DECO , GCBlocks .spaceGlassVanilla ).setHardness (0.3F ).setResistance (4F );
241
+ GCBlocks .spaceGlassTinClear = (BlockSpaceGlass ) new BlockSpaceGlass ("space_glass_clear_tin" , GlassType .CLEAR , GlassFrame .TIN_DECO , GCBlocks .spaceGlassClear ).setHardness (0.3F ).setResistance (4F );
242
+ GCBlocks .spaceGlassTinStrong = (BlockSpaceGlass ) new BlockSpaceGlass ("space_glass_strong_tin" , GlassType .STRONG , GlassFrame .TIN_DECO , GCBlocks .spaceGlassStrong ).setHardness (4F ).setResistance (35F );
241
243
GCBlocks .crafting = new BlockCrafting ("magnetic_table" );
242
244
GCBlocks .refinery = new BlockRefinery ("refinery" );
243
245
GCBlocks .oxygenCompressor = new BlockOxygenCompressor (false , "oxygen_compressor" );
@@ -268,14 +270,10 @@ public static void initBlocks()
268
270
GCBlocks .bossSpawner = new BlockBossSpawner ("boss_spawner" );
269
271
GCBlocks .slabGCHalf = new BlockSlabGC ("slab_gc_half" , Material .ROCK );
270
272
GCBlocks .slabGCDouble = new BlockDoubleSlabGC ("slab_gc_double" , Material .ROCK );
271
- GCBlocks .tinStairs1 =
272
- new BlockStairsGC ("tin_stairs_1" , basicBlock .getDefaultState ().withProperty (BlockBasic .BASIC_TYPE , BlockBasic .EnumBlockBasic .ALUMINUM_DECORATION_BLOCK_0 )).setHardness (2.0F );
273
- GCBlocks .tinStairs2 =
274
- new BlockStairsGC ("tin_stairs_2" , basicBlock .getDefaultState ().withProperty (BlockBasic .BASIC_TYPE , BlockBasic .EnumBlockBasic .ALUMINUM_DECORATION_BLOCK_1 )).setHardness (2.0F );
275
- GCBlocks .moonStoneStairs =
276
- new BlockStairsGC ("moon_stairs_stone" , blockMoon .getDefaultState ().withProperty (BlockBasicMoon .BASIC_TYPE_MOON , BlockBasicMoon .EnumBlockBasicMoon .MOON_STONE )).setHardness (1.5F );
277
- GCBlocks .moonBricksStairs =
278
- new BlockStairsGC ("moon_stairs_brick" , blockMoon .getDefaultState ().withProperty (BlockBasicMoon .BASIC_TYPE_MOON , BlockBasicMoon .EnumBlockBasicMoon .MOON_DUNGEON_BRICK )).setHardness (4.0F );
273
+ GCBlocks .tinStairs1 = new BlockStairsGC ("tin_stairs_1" , basicBlock .getDefaultState ().withProperty (BlockBasic .BASIC_TYPE , BlockBasic .EnumBlockBasic .ALUMINUM_DECORATION_BLOCK_0 )).setHardness (2.0F );
274
+ GCBlocks .tinStairs2 = new BlockStairsGC ("tin_stairs_2" , basicBlock .getDefaultState ().withProperty (BlockBasic .BASIC_TYPE , BlockBasic .EnumBlockBasic .ALUMINUM_DECORATION_BLOCK_1 )).setHardness (2.0F );
275
+ GCBlocks .moonStoneStairs = new BlockStairsGC ("moon_stairs_stone" , blockMoon .getDefaultState ().withProperty (BlockBasicMoon .BASIC_TYPE_MOON , BlockBasicMoon .EnumBlockBasicMoon .MOON_STONE )).setHardness (1.5F );
276
+ GCBlocks .moonBricksStairs = new BlockStairsGC ("moon_stairs_brick" , blockMoon .getDefaultState ().withProperty (BlockBasicMoon .BASIC_TYPE_MOON , BlockBasicMoon .EnumBlockBasicMoon .MOON_DUNGEON_BRICK )).setHardness (4.0F );
279
277
GCBlocks .wallGC = new BlockWallGC ("wall_gc" );
280
278
GCBlocks .concealedRedstone = new BlockConcealedRedstone ("concealed_redstone" );
281
279
GCBlocks .concealedRepeater_Powered = new BlockConcealedRepeater ("concealed_repeater_pow" , true );
@@ -330,13 +328,14 @@ public static void finalizeSort()
330
328
List <StackSorted > itemOrderListBlocks = Lists .newArrayList ();
331
329
for (EnumSortCategoryBlock type : EnumSortCategoryBlock .values ())
332
330
{
333
- if (! GalacticraftCore . isPlanetsLoaded && type == EnumSortCategoryBlock .EGG )
331
+ if (type == EnumSortCategoryBlock .EGG )
334
332
continue ;
335
333
List <StackSorted > stackSorteds = sortMapBlocks .get (type );
336
334
if (stackSorteds != null )
337
335
{
338
336
itemOrderListBlocks .addAll (stackSorteds );
339
- } else
337
+ }
338
+ else
340
339
{
341
340
System .out .println ("ERROR: null sort stack: " + type .toString ());
342
341
}
@@ -446,10 +445,8 @@ public static void setHarvestLevels()
446
445
447
446
setHarvestLevel (GCBlocks .wallGC , "shovel" , 0 , 5 );
448
447
449
- setHarvestLevel (GCBlocks .blockMoon , "pickaxe" , 3 , 14 ); // Moon dungeon
450
- // brick
451
- // (actually
452
- // unharvestable)
448
+ // Moon dungeon brick (actually unharvestable)
449
+ setHarvestLevel (GCBlocks .blockMoon , "pickaxe" , 3 , 14 );
453
450
}
454
451
455
452
public static void register (String modid , Block block , Class <? extends ItemBlock > itemClass , Object ... itemCtorArgs )
@@ -578,7 +575,8 @@ public static void registerSorted(Block block)
578
575
}
579
576
sortMapBlocks .get (categoryBlock ).add (new StackSorted (stack .getItem (), stack .getItemDamage ()));
580
577
}
581
- } else if (block .getCreativeTab () == GalacticraftCore .galacticraftBlocksTab )
578
+ }
579
+ else if (block .getCreativeTab () == GalacticraftCore .galacticraftBlocksTab )
582
580
{
583
581
throw new RuntimeException (block .getClass () + " must inherit " + ISortableBlock .class .getSimpleName () + "!" );
584
582
}
0 commit comments