Skip to content

Commit

Permalink
shimmer sand and sheets (wip)
Browse files Browse the repository at this point in the history
  • Loading branch information
Lyof429 committed Aug 19, 2024
1 parent 908df5a commit 5779e64
Show file tree
Hide file tree
Showing 28 changed files with 636 additions and 4 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"variants": {
"": {
"model": "infernalexp:block/luminous_fungus"
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"variants": {
"": {
"model": "infernalexp:block/shimmer_sand"
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"parent": "minecraft:block/cross",
"textures": {
"cross": "infernalexp:block/luminous_fungus"
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"parent": "minecraft:block/cube_all",
"textures": {
"all": "infernalexp:block/shimmer_sand"
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"parent": "minecraft:item/generated",
"textures": {
"layer0": "infernalexp:block/luminous_fungus"
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"parent": "infernalexp:block/shimmer_sand"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
{
"type": "minecraft:block",
"pools": [
{
"bonus_rolls": 0.0,
"conditions": [
{
"condition": "minecraft:survives_explosion"
}
],
"entries": [
{
"type": "minecraft:item",
"name": "infernalexp:luminous_fungus"
}
],
"rolls": 1.0
}
]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
{
"type": "minecraft:block",
"pools": [
{
"bonus_rolls": 0.0,
"conditions": [
{
"condition": "minecraft:survives_explosion"
}
],
"entries": [
{
"type": "minecraft:item",
"name": "infernalexp:shimmer_sand"
}
],
"rolls": 1.0
}
]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"replace": false,
"values": [
"infernalexp:shimmer_sand",
"infernalexp:shimmer_sheet"
]
}
19 changes: 19 additions & 0 deletions src/main/java/org/infernalstudios/infernalexp/block/ModBlocks.java
Original file line number Diff line number Diff line change
@@ -1,9 +1,28 @@
package org.infernalstudios.infernalexp.block;

import net.fabricmc.fabric.api.object.builder.v1.block.FabricBlockSettings;
import net.minecraft.block.*;
import net.minecraft.client.model.Model;
import net.minecraft.data.client.Models;
import org.infernalstudios.infernalexp.InfernalExpansion;
import org.infernalstudios.infernalexp.setup.ModRegistry;

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


public static final Block SHIMMER_SAND = ModRegistry.ofBlock("shimmer_sand",
new SandBlock(0xffffaa, FabricBlockSettings.copyOf(Blocks.SAND)))
.model().drop().tool("wood_shovel").build();

public static final Block SHIMMER_SHEET = ModRegistry.ofBlock("shimmer_sheet",
new SnowBlock(FabricBlockSettings.copyOf(Blocks.SAND)))
.tool("wood_shovel").build();


public static final Block LUMINOUS_FUNGUS = ModRegistry.ofBlock("luminous_fungus",
new PlantBlock(FabricBlockSettings.copyOf(Blocks.WARPED_FUNGUS).luminance(10)))
.drop().model(ModRegistry.Models.CROSS).cutout().build();
}
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,19 @@
import net.minecraft.registry.Registry;
import net.minecraft.text.Text;
import org.infernalstudios.infernalexp.InfernalExpansion;
import org.infernalstudios.infernalexp.block.ModBlocks;

public class ModItemGroups {
public static final ItemGroup INFERNALEXP = register(InfernalExpansion.MOD_ID,
FabricItemGroup.builder().displayName(Text.translatable("itemgroup.infernalexp"))
.icon(() -> new ItemStack(Blocks.NETHERRACK)) // TODO: change the tab's icon
.icon(() -> new ItemStack(ModBlocks.SHIMMER_SAND)) // TODO: change the tab's icon
.entries((displayContext, entries) -> {
//entries.add(ModItems.OBJECT);

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

entries.add(ModBlocks.LUMINOUS_FUNGUS);

})
.build());

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
import net.minecraft.item.ItemConvertible;
import org.infernalstudios.infernalexp.setup.ModRegistry;

import java.util.List;
import java.util.Map;

public class ModLootTableProvider extends FabricBlockLootTableProvider {
Expand All @@ -16,9 +17,9 @@ public ModLootTableProvider(FabricDataOutput dataOutput) {
@Override
public void generate() {
for (Map.Entry<Block, ItemConvertible> entry : ModRegistry.BLOCK_DROPS.entrySet()) {
if (ModRegistry.BLOCK_MODELS.get(ModRegistry.Models.SLAB).contains(entry.getKey()))
if (ModRegistry.BLOCK_MODELS.getOrDefault(ModRegistry.Models.SLAB, List.of()).contains(entry.getKey()))
addDrop(entry.getKey(), slabDrops(entry.getKey()));
else if (ModRegistry.BLOCK_MODELS.get(ModRegistry.Models.DOOR).contains(entry.getKey()))
else if (ModRegistry.BLOCK_MODELS.getOrDefault(ModRegistry.Models.DOOR, List.of()).contains(entry.getKey()))
addDrop(entry.getKey(), doorDrops(entry.getKey()));
else
addDrop(entry.getKey(), entry.getValue());
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
{
"variants": {
"layers=1": {
"model": "infernalexp:block/shimmer_sheet2"
},
"layers=2": {
"model": "infernalexp:block/shimmer_sheet4"
},
"layers=3": {
"model": "infernalexp:block/shimmer_sheet6"
},
"layers=4": {
"model": "infernalexp:block/shimmer_sheet8"
},
"layers=5": {
"model": "infernalexp:block/shimmer_sheet10"
},
"layers=6": {
"model": "infernalexp:block/shimmer_sheet12"
},
"layers=7": {
"model": "infernalexp:block/shimmer_sheet14"
},
"layers=8": {
"model": "infernalexp:block/shimmer_sand"
}
}
}
3 changes: 3 additions & 0 deletions src/main/resources/assets/infernalexp/lang/en_us.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
{
"itemgroup.infernalexp": "Infernal Expansion",

"block.infernalexp.shimmer_sand": "Shimmer Sand",
"block.infernalexp.shimmer_sheet": "Shimmer Sheet"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
{
"textures": {
"particle": "infernalexp:block/shimmer_sand",
"texture": "infernalexp:block/shimmer_sand"
},
"elements": [
{ "from": [ 0, 0, 0 ],
"to": [ 16, 10, 16 ],
"faces": {
"down": { "uv": [ 0, 0, 16, 16 ], "texture": "#texture", "cullface": "down" },
"up": { "uv": [ 0, 0, 16, 16 ], "texture": "#texture" },
"north": { "uv": [ 0, 6, 16, 16 ], "texture": "#texture", "cullface": "north" },
"south": { "uv": [ 0, 6, 16, 16 ], "texture": "#texture", "cullface": "south" },
"west": { "uv": [ 0, 6, 16, 16 ], "texture": "#texture", "cullface": "west" },
"east": { "uv": [ 0, 6, 16, 16 ], "texture": "#texture", "cullface": "east" }
}
}
]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
{
"textures": {
"particle": "infernalexp:block/shimmer_sand",
"texture": "infernalexp:block/shimmer_sand"
},
"elements": [
{ "from": [ 0, 0, 0 ],
"to": [ 16, 12, 16 ],
"faces": {
"down": { "uv": [ 0, 0, 16, 16 ], "texture": "#texture", "cullface": "down" },
"up": { "uv": [ 0, 0, 16, 16 ], "texture": "#texture" },
"north": { "uv": [ 0, 4, 16, 16 ], "texture": "#texture", "cullface": "north" },
"south": { "uv": [ 0, 4, 16, 16 ], "texture": "#texture", "cullface": "south" },
"west": { "uv": [ 0, 4, 16, 16 ], "texture": "#texture", "cullface": "west" },
"east": { "uv": [ 0, 4, 16, 16 ], "texture": "#texture", "cullface": "east" }
}
}
]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
{
"textures": {
"particle": "infernalexp:block/shimmer_sand",
"texture": "infernalexp:block/shimmer_sand"
},
"elements": [
{ "from": [ 0, 0, 0 ],
"to": [ 16, 14, 16 ],
"faces": {
"down": { "uv": [ 0, 0, 16, 16 ], "texture": "#texture", "cullface": "down" },
"up": { "uv": [ 0, 0, 16, 16 ], "texture": "#texture" },
"north": { "uv": [ 0, 2, 16, 16 ], "texture": "#texture", "cullface": "north" },
"south": { "uv": [ 0, 2, 16, 16 ], "texture": "#texture", "cullface": "south" },
"west": { "uv": [ 0, 2, 16, 16 ], "texture": "#texture", "cullface": "west" },
"east": { "uv": [ 0, 2, 16, 16 ], "texture": "#texture", "cullface": "east" }
}
}
]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
{
"parent": "block/thin_block",
"textures": {
"particle": "infernalexp:block/shimmer_sand",
"texture": "infernalexp:block/shimmer_sand"
},
"elements": [
{ "from": [ 0, 0, 0 ],
"to": [ 16, 2, 16 ],
"faces": {
"down": { "uv": [ 0, 0, 16, 16 ], "texture": "#texture", "cullface": "down" },
"up": { "uv": [ 0, 0, 16, 16 ], "texture": "#texture" },
"north": { "uv": [ 0, 14, 16, 16 ], "texture": "#texture", "cullface": "north" },
"south": { "uv": [ 0, 14, 16, 16 ], "texture": "#texture", "cullface": "south" },
"west": { "uv": [ 0, 14, 16, 16 ], "texture": "#texture", "cullface": "west" },
"east": { "uv": [ 0, 14, 16, 16 ], "texture": "#texture", "cullface": "east" }
}
}
]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
{
"textures": {
"particle": "infernalexp:block/shimmer_sand",
"texture": "infernalexp:block/shimmer_sand"
},
"elements": [
{ "from": [ 0, 0, 0 ],
"to": [ 16, 4, 16 ],
"faces": {
"down": { "uv": [ 0, 0, 16, 16 ], "texture": "#texture", "cullface": "down" },
"up": { "uv": [ 0, 0, 16, 16 ], "texture": "#texture" },
"north": { "uv": [ 0, 12, 16, 16 ], "texture": "#texture", "cullface": "north" },
"south": { "uv": [ 0, 12, 16, 16 ], "texture": "#texture", "cullface": "south" },
"west": { "uv": [ 0, 12, 16, 16 ], "texture": "#texture", "cullface": "west" },
"east": { "uv": [ 0, 12, 16, 16 ], "texture": "#texture", "cullface": "east" }
}
}
]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
{
"textures": {
"particle": "infernalexp:block/shimmer_sand",
"texture": "infernalexp:block/shimmer_sand"
},
"elements": [
{ "from": [ 0, 0, 0 ],
"to": [ 16, 6, 16 ],
"faces": {
"down": { "uv": [ 0, 0, 16, 16 ], "texture": "#texture", "cullface": "down" },
"up": { "uv": [ 0, 0, 16, 16 ], "texture": "#texture" },
"north": { "uv": [ 0, 10, 16, 16 ], "texture": "#texture", "cullface": "north" },
"south": { "uv": [ 0, 10, 16, 16 ], "texture": "#texture", "cullface": "south" },
"west": { "uv": [ 0, 10, 16, 16 ], "texture": "#texture", "cullface": "west" },
"east": { "uv": [ 0, 10, 16, 16 ], "texture": "#texture", "cullface": "east" }
}
}
]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
{
"textures": {
"particle": "infernalexp:block/shimmer_sand",
"texture": "infernalexp:block/shimmer_sand"
},
"elements": [
{ "from": [ 0, 0, 0 ],
"to": [ 16, 8, 16 ],
"faces": {
"down": { "uv": [ 0, 0, 16, 16 ], "texture": "#texture", "cullface": "down" },
"up": { "uv": [ 0, 0, 16, 16 ], "texture": "#texture" },
"north": { "uv": [ 0, 8, 16, 16 ], "texture": "#texture", "cullface": "north" },
"south": { "uv": [ 0, 8, 16, 16 ], "texture": "#texture", "cullface": "south" },
"west": { "uv": [ 0, 8, 16, 16 ], "texture": "#texture", "cullface": "west" },
"east": { "uv": [ 0, 8, 16, 16 ], "texture": "#texture", "cullface": "east" }
}
}
]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"parent": "infernalexp:block/shimmer_sheet2"
}
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit 5779e64

Please sign in to comment.