-
Notifications
You must be signed in to change notification settings - Fork 55
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Added the first decorative blocks * Fix model rendering issue. * New structural blocks * Even more variants for the structural blocks * Added localization to structural blocks --------- Co-authored-by: Loxo <loxo.Minecraft@gmail.com>
- Loading branch information
Showing
38 changed files
with
384 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
62 changes: 62 additions & 0 deletions
62
src/main/java/supersymmetry/common/blocks/BlockStructural.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
package supersymmetry.common.blocks; | ||
|
||
import gregtech.api.block.IStateHarvestLevel; | ||
import gregtech.api.block.VariantBlock; | ||
import net.minecraft.block.SoundType; | ||
import net.minecraft.block.state.IBlockState; | ||
import net.minecraft.util.IStringSerializable; | ||
|
||
import javax.annotation.Nonnull; | ||
|
||
public class BlockStructural extends VariantBlock<BlockStructural.StructuralBlockType> { | ||
|
||
public BlockStructural() { | ||
super(net.minecraft.block.material.Material.IRON); | ||
setTranslationKey("structural_block"); | ||
setHardness(5.0f); | ||
setResistance(10.0f); | ||
setSoundType(SoundType.METAL); | ||
setHarvestLevel("wrench", 2); | ||
setDefaultState(getState(StructuralBlockType.BASE_STRUCTURAL_BLOCK)); | ||
} | ||
|
||
public static enum StructuralBlockType implements IStringSerializable, IStateHarvestLevel { | ||
BASE_STRUCTURAL_BLOCK("base_structural_block", 1), | ||
STRUCTURAL_BLOCK_LOW("structural_block_low", 1), | ||
STRUCTURAL_BLOCK_LOWLIGHT("structural_block_lowlight", 1), | ||
STRUCTURAL_BLOCK_DANGER_A("structural_block_danger_a", 1), | ||
STRUCTURAL_BLOCK_DANGER_B("structural_block_danger_b", 1), | ||
STRUCTURAL_BLOCK_DANGER_C("structural_block_danger_c", 1), | ||
STRUCTURAL_BLOCK_DANGER_D("structural_block_danger_d", 1), | ||
STRUCTURAL_BLOCK_COLUMN("structural_block_column", 1), | ||
STRUCTURAL_BLOCK_COLUMN_OLD("structural_block_column_old", 1), | ||
STRUCTURAL_BLOCK_LIGHT("structural_block_light", 1), | ||
STRUCTURAL_BLOCK_LIGHT_BROKEN("structural_block_light_broken", 1), | ||
STRUCTURAL_BLOCK_LIGHT_CABLE("structural_block_light_cable", 1), | ||
STRUCTURAL_BLOCK_INSTRUMENTS("structural_block_instruments", 1), | ||
STRUCTURAL_BLOCK_SIGN_0("structural_block_sign_0", 1), | ||
STRUCTURAL_BLOCK_SIGN_1("structural_block_sign_1", 1), | ||
STRUCTURAL_BLOCK_SIGN_2("structural_block_sign_2", 1); | ||
|
||
private final String name; | ||
private final int harvestLevel; | ||
|
||
private StructuralBlockType(String name, int harvestLevel) { | ||
this.name = name; | ||
this.harvestLevel = harvestLevel; | ||
} | ||
|
||
@Nonnull | ||
public String getName() { | ||
return this.name; | ||
} | ||
|
||
public int getHarvestLevel(IBlockState state) { | ||
return this.harvestLevel; | ||
} | ||
|
||
public String getHarvestTool(IBlockState state) { | ||
return "wrench"; | ||
} | ||
} | ||
} |
54 changes: 54 additions & 0 deletions
54
src/main/java/supersymmetry/common/blocks/BlockStructural1.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
package supersymmetry.common.blocks; | ||
|
||
import gregtech.api.block.IStateHarvestLevel; | ||
import gregtech.api.block.VariantBlock; | ||
import net.minecraft.block.SoundType; | ||
import net.minecraft.block.state.IBlockState; | ||
import net.minecraft.util.IStringSerializable; | ||
|
||
import javax.annotation.Nonnull; | ||
|
||
public class BlockStructural1 extends VariantBlock<BlockStructural1.StructuralBlock1Type> { | ||
|
||
public BlockStructural1() { | ||
super(net.minecraft.block.material.Material.IRON); | ||
setTranslationKey("structural_block_1"); | ||
setHardness(5.0f); | ||
setResistance(10.0f); | ||
setSoundType(SoundType.METAL); | ||
setHarvestLevel("wrench", 2); | ||
setDefaultState(getState(StructuralBlock1Type.STRUCTURAL_BLOCK_1_EXPOSED)); | ||
} | ||
|
||
public static enum StructuralBlock1Type implements IStringSerializable, IStateHarvestLevel { | ||
|
||
STRUCTURAL_BLOCK_1_EXPOSED("structural_block_exposed", 1), | ||
STRUCTURAL_BLOCK_1_EXPOSED_1("structural_block_exposed_1", 1), | ||
STRUCTURAL_BLOCK_1_EXPOSED_2("structural_block_exposed_2", 1), | ||
STRUCTURAL_BLOCK_1_DANGER_SIGN("structural_block_danger_sign", 1), | ||
STRUCTURAL_BLOCK_1_CABLE("structural_block_cable", 1), | ||
STRUCTURAL_BLOCK_1_CABLE_HORIZONTAL("structural_block_cable_horizontal", 1), | ||
STRUCTURAL_BLOCK_1_CABLE_JUNCTION("structural_block_cable_junction", 1); | ||
|
||
private final String name; | ||
private final int harvestLevel; | ||
|
||
private StructuralBlock1Type(String name, int harvestLevel) { | ||
this.name = name; | ||
this.harvestLevel = harvestLevel; | ||
} | ||
|
||
@Nonnull | ||
public String getName() { | ||
return this.name; | ||
} | ||
|
||
public int getHarvestLevel(IBlockState state) { | ||
return this.harvestLevel; | ||
} | ||
|
||
public String getHarvestTool(IBlockState state) { | ||
return "wrench"; | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file added
BIN
+332 Bytes
...gregtech/textures/blocks/decorative/structural_blocks/base_structural_block.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+469 Bytes
...regtech/textures/blocks/decorative/structural_blocks/structural_block_cable.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+475 Bytes
...tures/blocks/decorative/structural_blocks/structural_block_cable_horizontal.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+474 Bytes
...extures/blocks/decorative/structural_blocks/structural_block_cable_junction.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+456 Bytes
...egtech/textures/blocks/decorative/structural_blocks/structural_block_column.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+498 Bytes
...ch/textures/blocks/decorative/structural_blocks/structural_block_column_old.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+335 Bytes
...tech/textures/blocks/decorative/structural_blocks/structural_block_danger_a.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+340 Bytes
...tech/textures/blocks/decorative/structural_blocks/structural_block_danger_b.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+339 Bytes
...tech/textures/blocks/decorative/structural_blocks/structural_block_danger_c.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+328 Bytes
...tech/textures/blocks/decorative/structural_blocks/structural_block_danger_d.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+378 Bytes
...h/textures/blocks/decorative/structural_blocks/structural_block_danger_sign.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+523 Bytes
...gtech/textures/blocks/decorative/structural_blocks/structural_block_exposed.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+574 Bytes
...ech/textures/blocks/decorative/structural_blocks/structural_block_exposed_1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+584 Bytes
...ech/textures/blocks/decorative/structural_blocks/structural_block_exposed_2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+379 Bytes
...h/textures/blocks/decorative/structural_blocks/structural_block_instruments.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+136 Bytes
...ures/blocks/decorative/structural_blocks/structural_block_instruments_bloom.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
10 changes: 10 additions & 0 deletions
10
...extures/blocks/decorative/structural_blocks/structural_block_instruments_bloom.png.mcmeta
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
{ | ||
"ctm": { | ||
"ctm_version": 1, | ||
"layer": "BLOOM", | ||
"gregtech": true, | ||
"extra": { | ||
"light": 4 | ||
} | ||
} | ||
} |
Binary file added
BIN
+552 Bytes
...regtech/textures/blocks/decorative/structural_blocks/structural_block_light.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+99 Bytes
...h/textures/blocks/decorative/structural_blocks/structural_block_light_bloom.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
10 changes: 10 additions & 0 deletions
10
...tech/textures/blocks/decorative/structural_blocks/structural_block_light_bloom.png.mcmeta
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
{ | ||
"ctm": { | ||
"ctm_version": 1, | ||
"layer": "BLOOM", | ||
"gregtech": true, | ||
"extra": { | ||
"light": 4 | ||
} | ||
} | ||
} |
Binary file added
BIN
+558 Bytes
.../textures/blocks/decorative/structural_blocks/structural_block_light_broken.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+422 Bytes
...h/textures/blocks/decorative/structural_blocks/structural_block_light_cable.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+378 Bytes
.../gregtech/textures/blocks/decorative/structural_blocks/structural_block_low.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+382 Bytes
...tech/textures/blocks/decorative/structural_blocks/structural_block_lowlight.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+146 Bytes
...extures/blocks/decorative/structural_blocks/structural_block_lowlight_bloom.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
10 changes: 10 additions & 0 deletions
10
...h/textures/blocks/decorative/structural_blocks/structural_block_lowlight_bloom.png.mcmeta
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
{ | ||
"ctm": { | ||
"ctm_version": 1, | ||
"layer": "BLOOM", | ||
"gregtech": true, | ||
"extra": { | ||
"light": 4 | ||
} | ||
} | ||
} |
Binary file added
BIN
+126 Bytes
...res/blocks/decorative/structural_blocks/structural_block_lowlight_top_bloom.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
10 changes: 10 additions & 0 deletions
10
...xtures/blocks/decorative/structural_blocks/structural_block_lowlight_top_bloom.png.mcmeta
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
{ | ||
"ctm": { | ||
"ctm_version": 1, | ||
"layer": "BLOOM", | ||
"gregtech": true, | ||
"extra": { | ||
"light": 4 | ||
} | ||
} | ||
} |
Binary file added
BIN
+659 Bytes
...egtech/textures/blocks/decorative/structural_blocks/structural_block_sign_0.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+588 Bytes
...egtech/textures/blocks/decorative/structural_blocks/structural_block_sign_1.png
Oops, something went wrong.
Binary file added
BIN
+606 Bytes
...egtech/textures/blocks/decorative/structural_blocks/structural_block_sign_2.png
Oops, something went wrong.
134 changes: 134 additions & 0 deletions
134
src/main/resources/assets/susy/blockstates/structural_block.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,134 @@ | ||
{ | ||
"forge_marker" : 1, | ||
"defaults": { | ||
"model": "minecraft:cube_bottom_top", | ||
"textures": { | ||
"bottom": "gregtech:blocks/decorative/structural_blocks/base_structural_block", | ||
"top": "gregtech:blocks/decorative/structural_blocks/base_structural_block", | ||
"side": "gregtech:blocks/decorative/structural_blocks/base_structural_block" | ||
} | ||
}, | ||
"variants" : { | ||
"variant=base_structural_block" : { | ||
"model" : "minecraft:cube_all", | ||
"textures" : { | ||
"all" : "gregtech:blocks/decorative/structural_blocks/base_structural_block" | ||
} | ||
}, | ||
"variant=structural_block_low" : { | ||
"model": "minecraft:cube_bottom_top", | ||
"textures" : { | ||
"side" : "gregtech:blocks/decorative/structural_blocks/structural_block_low" | ||
} | ||
}, | ||
"variant=structural_block_lowlight" : { | ||
"model" : "gregtech:cube_2_layer_bottom_top", | ||
"textures" : { | ||
"bot_side" : "gregtech:blocks/decorative/structural_blocks/structural_block_lowlight", | ||
"bot_top" : "gregtech:blocks/decorative/structural_blocks/base_structural_block", | ||
"bot_bottom" : "gregtech:blocks/decorative/structural_blocks/base_structural_block", | ||
"top_side" : "gregtech:blocks/decorative/structural_blocks/structural_block_lowlight_bloom", | ||
"top_top" : "gregtech:blocks/decorative/structural_blocks/structural_block_lowlight_top_bloom", | ||
"top_bottom" : "gregtech:blocks/decorative/structural_blocks/structural_block_lowlight_top_bloom" | ||
} | ||
}, | ||
"variant=structural_block_danger_a" : { | ||
"model" : "minecraft:cube_all", | ||
"textures" : { | ||
"all" : "gregtech:blocks/decorative/structural_blocks/structural_block_danger_a" | ||
} | ||
}, | ||
"variant=structural_block_danger_b" : { | ||
"model" : "minecraft:cube_all", | ||
"textures" : { | ||
"all" : "gregtech:blocks/decorative/structural_blocks/structural_block_danger_b" | ||
} | ||
}, | ||
"variant=structural_block_danger_c" : { | ||
"model" : "minecraft:cube_all", | ||
"textures" : { | ||
"all" : "gregtech:blocks/decorative/structural_blocks/structural_block_danger_c" | ||
} | ||
}, | ||
"variant=structural_block_danger_d" : { | ||
"model" : "minecraft:cube_all", | ||
"textures" : { | ||
"all" : "gregtech:blocks/decorative/structural_blocks/structural_block_danger_d" | ||
} | ||
}, | ||
"variant=structural_block_column" : { | ||
"model" : "minecraft:cube_all", | ||
"textures" : { | ||
"all" : "gregtech:blocks/decorative/structural_blocks/structural_block_column" | ||
} | ||
}, | ||
"variant=structural_block_column_old" : { | ||
"model" : "minecraft:cube_all", | ||
"textures" : { | ||
"all" : "gregtech:blocks/decorative/structural_blocks/structural_block_column_old" | ||
} | ||
}, | ||
"variant=structural_block_light" : { | ||
"model" : "gregtech:cube_2_layer_bottom_top", | ||
"textures" : { | ||
"bot_side" : "gregtech:blocks/decorative/structural_blocks/structural_block_light", | ||
"bot_top" : "gregtech:blocks/decorative/structural_blocks/base_structural_block", | ||
"bot_bottom" : "gregtech:blocks/decorative/structural_blocks/base_structural_block", | ||
"top_side" : "gregtech:blocks/decorative/structural_blocks/structural_block_light_bloom", | ||
"top_top" : "gregtech:blocks/decorative/structural_blocks/structural_block_lowlight_top_bloom", | ||
"top_bottom" : "gregtech:blocks/decorative/structural_blocks/structural_block_lowlight_top_bloom" | ||
} | ||
}, | ||
"variant=structural_block_light_broken" : { | ||
"model": "minecraft:cube_bottom_top", | ||
"textures": { | ||
"bottom": "gregtech:blocks/decorative/structural_blocks/base_structural_block", | ||
"top": "gregtech:blocks/decorative/structural_blocks/base_structural_block", | ||
"side": "gregtech:blocks/decorative/structural_blocks/structural_block_light_broken" | ||
} | ||
}, | ||
"variant=structural_block_light_cable" : { | ||
"model": "minecraft:cube_bottom_top", | ||
"textures": { | ||
"bottom": "gregtech:blocks/decorative/structural_blocks/base_structural_block", | ||
"top": "gregtech:blocks/decorative/structural_blocks/base_structural_block", | ||
"side": "gregtech:blocks/decorative/structural_blocks/structural_block_light_cable" | ||
} | ||
}, | ||
"variant=structural_block_instruments" : { | ||
"model" : "gregtech:cube_2_layer_bottom_top", | ||
"textures" : { | ||
"bot_side" : "gregtech:blocks/decorative/structural_blocks/structural_block_instruments", | ||
"bot_top" : "gregtech:blocks/decorative/structural_blocks/base_structural_block", | ||
"bot_bottom" : "gregtech:blocks/decorative/structural_blocks/base_structural_block", | ||
"top_side" : "gregtech:blocks/decorative/structural_blocks/structural_block_instruments_bloom", | ||
"top_top" : "gregtech:blocks/decorative/structural_blocks/structural_block_lowlight_top_bloom", | ||
"top_bottom" : "gregtech:blocks/decorative/structural_blocks/structural_block_lowlight_top_bloom" | ||
} | ||
}, | ||
"variant=structural_block_sign_0" : { | ||
"model": "minecraft:cube_bottom_top", | ||
"textures": { | ||
"bottom": "gregtech:blocks/decorative/structural_blocks/base_structural_block", | ||
"top": "gregtech:blocks/decorative/structural_blocks/base_structural_block", | ||
"side": "gregtech:blocks/decorative/structural_blocks/structural_block_sign_0" | ||
} | ||
}, | ||
"variant=structural_block_sign_1" : { | ||
"model": "minecraft:cube_bottom_top", | ||
"textures": { | ||
"bottom": "gregtech:blocks/decorative/structural_blocks/base_structural_block", | ||
"top": "gregtech:blocks/decorative/structural_blocks/base_structural_block", | ||
"side": "gregtech:blocks/decorative/structural_blocks/structural_block_sign_1" | ||
} | ||
}, | ||
"variant=structural_block_sign_2" : { | ||
"model": "minecraft:cube_bottom_top", | ||
"textures": { | ||
"bottom": "gregtech:blocks/decorative/structural_blocks/base_structural_block", | ||
"top": "gregtech:blocks/decorative/structural_blocks/base_structural_block", | ||
"side": "gregtech:blocks/decorative/structural_blocks/structural_block_sign_2" | ||
} | ||
} | ||
} | ||
} |
Oops, something went wrong.