Skip to content

Commit

Permalink
glowlight glass
Browse files Browse the repository at this point in the history
  • Loading branch information
Lyof429 committed Aug 20, 2024
1 parent 2e541f1 commit cf2db08
Show file tree
Hide file tree
Showing 15 changed files with 157 additions and 2 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"variants": {
"": {
"model": "infernalexp:block/glowlight_glass"
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
{
"multipart": [
{
"apply": {
"model": "infernalexp:block/glowlight_glass_pane_post"
}
},
{
"apply": {
"model": "infernalexp:block/glowlight_glass_pane_side"
},
"when": {
"north": "true"
}
},
{
"apply": {
"model": "infernalexp:block/glowlight_glass_pane_side",
"y": 90
},
"when": {
"east": "true"
}
},
{
"apply": {
"model": "infernalexp:block/glowlight_glass_pane_side_alt"
},
"when": {
"south": "true"
}
},
{
"apply": {
"model": "infernalexp:block/glowlight_glass_pane_side_alt",
"y": 90
},
"when": {
"west": "true"
}
},
{
"apply": {
"model": "infernalexp:block/glowlight_glass_pane_noside"
},
"when": {
"north": "false"
}
},
{
"apply": {
"model": "infernalexp:block/glowlight_glass_pane_noside_alt"
},
"when": {
"east": "false"
}
},
{
"apply": {
"model": "infernalexp:block/glowlight_glass_pane_noside_alt",
"y": 90
},
"when": {
"south": "false"
}
},
{
"apply": {
"model": "infernalexp:block/glowlight_glass_pane_noside",
"y": 270
},
"when": {
"west": "false"
}
}
]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"parent": "minecraft:block/cube_all",
"textures": {
"all": "infernalexp:block/glowlight_glass"
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"parent": "minecraft:block/template_glass_pane_noside",
"textures": {
"pane": "infernalexp:block/glowlight_glass"
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"parent": "minecraft:block/template_glass_pane_noside_alt",
"textures": {
"pane": "infernalexp:block/glowlight_glass"
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"parent": "minecraft:block/template_glass_pane_post",
"textures": {
"edge": "infernalexp:block/glowlight_glass_pane_top",
"pane": "infernalexp:block/glowlight_glass"
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"parent": "minecraft:block/template_glass_pane_side",
"textures": {
"edge": "infernalexp:block/glowlight_glass_pane_top",
"pane": "infernalexp:block/glowlight_glass"
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"parent": "minecraft:block/template_glass_pane_side_alt",
"textures": {
"edge": "infernalexp:block/glowlight_glass_pane_top",
"pane": "infernalexp:block/glowlight_glass"
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"parent": "infernalexp:block/glowlight_glass"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"parent": "minecraft:item/generated",
"textures": {
"layer0": "infernalexp:block/glowlight_glass"
}
}
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
{
"replace": false,
"values": [
"infernalexp:glowlight_glass",
"infernalexp:glowlight_glass_pane",
"infernalexp:shimmer_stone",
"infernalexp:shimmer_stone_bricks",
"infernalexp:shimmer_stone_brick_stairs",
Expand Down
12 changes: 10 additions & 2 deletions src/main/java/org/infernalstudios/infernalexp/block/ModBlocks.java
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,13 @@
import org.infernalstudios.infernalexp.block.custom.LuminousFungusBlock;
import org.infernalstudios.infernalexp.setup.ModRegistry;

import java.util.Map;

public class ModBlocks {
public static void register() {
InfernalExpansion.log("Registering Blocks for " + InfernalExpansion.MOD_ID);


ModRegistry.registerGlass(GLOWLIGHT_GLASS, GLOWLIGHT_GLASS_PANE);

ModRegistry.registerStairsAndSlab(SHIMMER_STONE_BRICKS, SHIMMER_STONE_BRICK_STAIRS, SHIMMER_STONE_BRICK_SLAB);
}

Expand All @@ -37,6 +37,14 @@ public static void register() {
new SnowBlock(FabricBlockSettings.copyOf(Blocks.SAND)))
.tool("wood_shovel").build();

public static final Block GLOWLIGHT_GLASS = ModRegistry.ofBlock("glowlight_glass",
new GlassBlock(FabricBlockSettings.copyOf(Blocks.GLOWSTONE).nonOpaque()))
.tool("wood_pickaxe").cutout().build();

public static final Block GLOWLIGHT_GLASS_PANE = ModRegistry.ofBlock("glowlight_glass_pane",
new PaneBlock(FabricBlockSettings.copyOf(Blocks.GLOWSTONE).nonOpaque()))
.model(ModRegistry.Models.PANE).tool("wood_pickaxe").cutout().build();


public static final Block SHIMMER_STONE = ModRegistry.ofBlock("shimmer_stone",
new Block(shimmerStone))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@ public class ModItemGroups {

entries.add(ModBlocks.SHIMMER_SAND);
entries.add(ModBlocks.SHIMMER_SHEET);
entries.add(ModBlocks.GLOWLIGHT_GLASS);
entries.add(ModBlocks.GLOWLIGHT_GLASS_PANE);

entries.add(ModBlocks.SHIMMER_STONE);
entries.add(ModBlocks.SHIMMER_STONE_BRICKS);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,16 @@ public void generateBlockStateModels(BlockStateModelGenerator generator) {
for (Block block : ModRegistry.getModelList(ModRegistry.Models.TRAPDOOR))
generator.registerTrapdoor(block);


for (Block block : ModRegistry.BLOCK_SETS.keySet()) {
if (ModRegistry.BLOCK_SETS.get(block).containsKey(ModRegistry.Models.PANE)) {
for (Map.Entry<ModRegistry.Models, Block> entry : ModRegistry.BLOCK_SETS.get(block).entrySet()) {
if (entry.getKey() == ModRegistry.Models.PANE)
generator.registerGlassPane(block, entry.getValue());
}
continue;
}

pool = generator.registerCubeAllModelTexturePool(block);
for (Map.Entry<ModRegistry.Models, Block> entry : ModRegistry.BLOCK_SETS.get(block).entrySet()) {
if (entry.getKey() == ModRegistry.Models.STAIRS)
Expand Down
2 changes: 2 additions & 0 deletions src/main/resources/assets/infernalexp/lang/en_us.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@

"block.infernalexp.shimmer_sand": "Shimmer Sand",
"block.infernalexp.shimmer_sheet": "Shimmer Sheet",
"block.infernalexp.glowlight_glass": "Glowlight Glass",
"block.infernalexp.glowlight_glass_pane": "Glowlight Glass Pane",
"block.infernalexp.glimmer_gravel": "Glimmer Gravel",
"block.infernalexp.shimmer_stone": "Shimmer Stone",
"block.infernalexp.shimmer_stone_bricks": "Shimmer Stone Bricks",
Expand Down

0 comments on commit cf2db08

Please sign in to comment.