diff --git a/src/main/generated/assets/infernalexp/blockstates/dimstone.json b/src/main/generated/assets/infernalexp/blockstates/dimstone.json deleted file mode 100644 index b287fba35..000000000 --- a/src/main/generated/assets/infernalexp/blockstates/dimstone.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "variants": { - "": { - "model": "infernalexp:block/dimstone" - } - } -} \ No newline at end of file diff --git a/src/main/generated/assets/infernalexp/blockstates/shimmer_sand.json b/src/main/generated/assets/infernalexp/blockstates/shimmer_sand.json index 10be256dd..04236592f 100644 --- a/src/main/generated/assets/infernalexp/blockstates/shimmer_sand.json +++ b/src/main/generated/assets/infernalexp/blockstates/shimmer_sand.json @@ -1,7 +1,21 @@ { "variants": { - "": { - "model": "infernalexp:block/shimmer_sand" - } + "": [ + { + "model": "infernalexp:block/shimmer_sand" + }, + { + "model": "infernalexp:block/shimmer_sand", + "y": 90 + }, + { + "model": "infernalexp:block/shimmer_sand", + "y": 180 + }, + { + "model": "infernalexp:block/shimmer_sand", + "y": 270 + } + ] } } \ No newline at end of file diff --git a/src/main/generated/assets/infernalexp/models/item/dimstone.json b/src/main/generated/assets/infernalexp/models/item/dimstone.json deleted file mode 100644 index 42b09bde9..000000000 --- a/src/main/generated/assets/infernalexp/models/item/dimstone.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "infernalexp:block/dimstone" -} \ No newline at end of file diff --git a/src/main/generated/data/infernalexp/loot_tables/blocks/dullstone_button.json b/src/main/generated/data/infernalexp/loot_tables/blocks/dullstone_button.json new file mode 100644 index 000000000..49b6d8562 --- /dev/null +++ b/src/main/generated/data/infernalexp/loot_tables/blocks/dullstone_button.json @@ -0,0 +1,20 @@ +{ + "type": "minecraft:block", + "pools": [ + { + "bonus_rolls": 0.0, + "conditions": [ + { + "condition": "minecraft:survives_explosion" + } + ], + "entries": [ + { + "type": "minecraft:item", + "name": "infernalexp:dullstone_button" + } + ], + "rolls": 1.0 + } + ] +} \ No newline at end of file diff --git a/src/main/generated/data/infernalexp/loot_tables/blocks/dullstone_pressure_plate.json b/src/main/generated/data/infernalexp/loot_tables/blocks/dullstone_pressure_plate.json new file mode 100644 index 000000000..b20868a5a --- /dev/null +++ b/src/main/generated/data/infernalexp/loot_tables/blocks/dullstone_pressure_plate.json @@ -0,0 +1,20 @@ +{ + "type": "minecraft:block", + "pools": [ + { + "bonus_rolls": 0.0, + "conditions": [ + { + "condition": "minecraft:survives_explosion" + } + ], + "entries": [ + { + "type": "minecraft:item", + "name": "infernalexp:dullstone_pressure_plate" + } + ], + "rolls": 1.0 + } + ] +} \ No newline at end of file diff --git a/src/main/generated/data/minecraft/tags/blocks/mineable/pickaxe.json b/src/main/generated/data/minecraft/tags/blocks/mineable/pickaxe.json index 5b656ef9c..9b53a1df4 100644 --- a/src/main/generated/data/minecraft/tags/blocks/mineable/pickaxe.json +++ b/src/main/generated/data/minecraft/tags/blocks/mineable/pickaxe.json @@ -7,6 +7,8 @@ "infernalexp:dimstone", "infernalexp:polished_dimstone", "infernalexp:dullstone", - "infernalexp:polished_dullstone" + "infernalexp:polished_dullstone", + "infernalexp:dullstone_pressure_plate", + "infernalexp:dullstone_button" ] } \ No newline at end of file diff --git a/src/main/java/org/infernalstudios/infernalexp/block/ModBlocks.java b/src/main/java/org/infernalstudios/infernalexp/block/ModBlocks.java index 086d1cb1e..0cc96e061 100644 --- a/src/main/java/org/infernalstudios/infernalexp/block/ModBlocks.java +++ b/src/main/java/org/infernalstudios/infernalexp/block/ModBlocks.java @@ -1,14 +1,14 @@ package org.infernalstudios.infernalexp.block; import net.fabricmc.fabric.api.object.builder.v1.block.FabricBlockSettings; +import net.fabricmc.fabric.api.object.builder.v1.block.type.BlockSetTypeBuilder; import net.minecraft.block.*; -import net.minecraft.client.model.Model; -import net.minecraft.data.client.Models; -import net.minecraft.registry.tag.BlockTags; import org.infernalstudios.infernalexp.InfernalExpansion; 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); @@ -22,11 +22,13 @@ public static void register() { private static final FabricBlockSettings dullStone = FabricBlockSettings.copyOf(Blocks.GLOWSTONE).strength(1.7f).luminance(0).mapColor(MapColor.TERRACOTTA_GRAY).requiresTool(); + private static final BlockSetType dullStoneSet = + new BlockSetTypeBuilder().register(InfernalExpansion.makeID("dullstone")); public static final Block SHIMMER_SAND = ModRegistry.ofBlock("shimmer_sand", new SandBlock(0xffffaa, FabricBlockSettings.copyOf(Blocks.SAND))) - .model().drop().tool("wood_shovel").build(); + .model(ModRegistry.Models.ROTATABLE).drop().tool("wood_shovel").build(); public static final Block SHIMMER_SHEET = ModRegistry.ofBlock("shimmer_sheet", new SnowBlock(FabricBlockSettings.copyOf(Blocks.SAND))) @@ -48,7 +50,7 @@ public static void register() { public static final Block DIMSTONE = ModRegistry.ofBlock("dimstone", new Block(dimStone)) - .model().drop().tool("wood_pickaxe").build(); + .drop().tool("wood_pickaxe").build(); public static final Block POLISHED_DIMSTONE = ModRegistry.ofBlock("polished_dimstone", new Block(dimStone)) @@ -62,6 +64,17 @@ public static void register() { new Block(dullStone)) .model().drop().tool("wood_pickaxe").build(); + public static final Block DULLSTONE_BUTTON = ModRegistry.ofBlock("dullstone_button", + new ButtonBlock(FabricBlockSettings.copyOf(dullStone).collidable(false) + .luminance(a -> a.get(ButtonBlock.POWERED) ? 15 : 0), dullStoneSet, 20, false)) + .drop().tool("wood_pickaxe").build(); + + public static final Block DULLSTONE_PRESSURE_PLATE = ModRegistry.ofBlock("dullstone_pressure_plate", + new PressurePlateBlock(PressurePlateBlock.ActivationRule.MOBS, + FabricBlockSettings.copyOf(dullStone).collidable(false) + .luminance(a -> a.get(PressurePlateBlock.POWERED) ? 15 : 0), dullStoneSet)) + .drop().tool("wood_pickaxe").build(); + public static final Block GLOWSILK_COCOON = ModRegistry.ofBlock("glowsilk_cocoon", new Block(FabricBlockSettings.copyOf(Blocks.MOSS_BLOCK).strength(2f).luminance(15).mapColor(MapColor.YELLOW))) diff --git a/src/main/java/org/infernalstudios/infernalexp/item/ModItemGroups.java b/src/main/java/org/infernalstudios/infernalexp/item/ModItemGroups.java index d3687fd53..4e83cd68c 100644 --- a/src/main/java/org/infernalstudios/infernalexp/item/ModItemGroups.java +++ b/src/main/java/org/infernalstudios/infernalexp/item/ModItemGroups.java @@ -29,6 +29,8 @@ public class ModItemGroups { entries.add(ModBlocks.POLISHED_DIMSTONE); entries.add(ModBlocks.DULLSTONE); entries.add(ModBlocks.POLISHED_DULLSTONE); + entries.add(ModBlocks.DULLSTONE_BUTTON); + entries.add(ModBlocks.DULLSTONE_PRESSURE_PLATE); entries.add(ModItems.DULLROCKS); entries.add(ModBlocks.GLOWSILK_COCOON); diff --git a/src/main/java/org/infernalstudios/infernalexp/setup/ModRegistry.java b/src/main/java/org/infernalstudios/infernalexp/setup/ModRegistry.java index 76f4bd606..ed320f8d6 100644 --- a/src/main/java/org/infernalstudios/infernalexp/setup/ModRegistry.java +++ b/src/main/java/org/infernalstudios/infernalexp/setup/ModRegistry.java @@ -227,6 +227,7 @@ public ItemBuilder fuel(int duration) { public enum Models { CUBE, + ROTATABLE, CROSS, PILLAR, STAIRS, diff --git a/src/main/java/org/infernalstudios/infernalexp/setup/datagen/ModModelProvider.java b/src/main/java/org/infernalstudios/infernalexp/setup/datagen/ModModelProvider.java index 93b3d9601..10a7301ab 100644 --- a/src/main/java/org/infernalstudios/infernalexp/setup/datagen/ModModelProvider.java +++ b/src/main/java/org/infernalstudios/infernalexp/setup/datagen/ModModelProvider.java @@ -22,6 +22,8 @@ public void generateBlockStateModels(BlockStateModelGenerator generator) { for (Block block : ModRegistry.getModelList(ModRegistry.Models.CUBE)) generator.registerSimpleCubeAll(block); + for (Block block : ModRegistry.getModelList(ModRegistry.Models.ROTATABLE)) + generator.registerRotatable(block); for (Block block : ModRegistry.getModelList(ModRegistry.Models.PILLAR)) generator.registerLog(block).log(block); for (Block block : ModRegistry.getModelList(ModRegistry.Models.CROSS)) diff --git a/src/main/resources/assets/infernalexp/blockstates/dimstone.json b/src/main/resources/assets/infernalexp/blockstates/dimstone.json new file mode 100644 index 000000000..ede07525c --- /dev/null +++ b/src/main/resources/assets/infernalexp/blockstates/dimstone.json @@ -0,0 +1,18 @@ +{ + "variants": { + "": [ + { + "model": "infernalexp:block/dimstone1" + }, + { + "model": "infernalexp:block/dimstone2" + }, + { + "model": "infernalexp:block/dimstone3" + }, + { + "model": "infernalexp:block/dimstone4" + } + ] + } +} \ No newline at end of file diff --git a/src/main/resources/assets/infernalexp/blockstates/dullstone_button.json b/src/main/resources/assets/infernalexp/blockstates/dullstone_button.json new file mode 100644 index 000000000..ba83d8aa9 --- /dev/null +++ b/src/main/resources/assets/infernalexp/blockstates/dullstone_button.json @@ -0,0 +1,118 @@ +{ + "variants": { + "face=ceiling,facing=east,powered=false": { + "model": "infernalexp:block/dullstone_button", + "x": 180, + "y": 270 + }, + "face=ceiling,facing=east,powered=true": { + "model": "infernalexp:block/dullstone_button_pressed", + "x": 180, + "y": 270 + }, + "face=ceiling,facing=north,powered=false": { + "model": "infernalexp:block/dullstone_button", + "x": 180, + "y": 180 + }, + "face=ceiling,facing=north,powered=true": { + "model": "infernalexp:block/dullstone_button_pressed", + "x": 180, + "y": 180 + }, + "face=ceiling,facing=south,powered=false": { + "model": "infernalexp:block/dullstone_button", + "x": 180 + }, + "face=ceiling,facing=south,powered=true": { + "model": "infernalexp:block/dullstone_button_pressed", + "x": 180 + }, + "face=ceiling,facing=west,powered=false": { + "model": "infernalexp:block/dullstone_button", + "x": 180, + "y": 90 + }, + "face=ceiling,facing=west,powered=true": { + "model": "infernalexp:block/dullstone_button_pressed", + "x": 180, + "y": 90 + }, + "face=floor,facing=east,powered=false": { + "model": "infernalexp:block/dullstone_button", + "y": 90 + }, + "face=floor,facing=east,powered=true": { + "model": "infernalexp:block/dullstone_button_pressed", + "y": 90 + }, + "face=floor,facing=north,powered=false": { + "model": "infernalexp:block/dullstone_button" + }, + "face=floor,facing=north,powered=true": { + "model": "infernalexp:block/dullstone_button_pressed" + }, + "face=floor,facing=south,powered=false": { + "model": "infernalexp:block/dullstone_button", + "y": 180 + }, + "face=floor,facing=south,powered=true": { + "model": "infernalexp:block/dullstone_button_pressed", + "y": 180 + }, + "face=floor,facing=west,powered=false": { + "model": "infernalexp:block/dullstone_button", + "y": 270 + }, + "face=floor,facing=west,powered=true": { + "model": "infernalexp:block/dullstone_button_pressed", + "y": 270 + }, + "face=wall,facing=east,powered=false": { + "model": "infernalexp:block/dullstone_button", + "uvlock": true, + "x": 90, + "y": 90 + }, + "face=wall,facing=east,powered=true": { + "model": "infernalexp:block/dullstone_button_pressed", + "uvlock": true, + "x": 90, + "y": 90 + }, + "face=wall,facing=north,powered=false": { + "model": "infernalexp:block/dullstone_button", + "uvlock": true, + "x": 90 + }, + "face=wall,facing=north,powered=true": { + "model": "infernalexp:block/dullstone_button_pressed", + "uvlock": true, + "x": 90 + }, + "face=wall,facing=south,powered=false": { + "model": "infernalexp:block/dullstone_button", + "uvlock": true, + "x": 90, + "y": 180 + }, + "face=wall,facing=south,powered=true": { + "model": "infernalexp:block/dullstone_button_pressed", + "uvlock": true, + "x": 90, + "y": 180 + }, + "face=wall,facing=west,powered=false": { + "model": "infernalexp:block/dullstone_button", + "uvlock": true, + "x": 90, + "y": 270 + }, + "face=wall,facing=west,powered=true": { + "model": "infernalexp:block/dullstone_button_pressed", + "uvlock": true, + "x": 90, + "y": 270 + } + } +} \ No newline at end of file diff --git a/src/main/resources/assets/infernalexp/blockstates/dullstone_pressure_plate.json b/src/main/resources/assets/infernalexp/blockstates/dullstone_pressure_plate.json new file mode 100644 index 000000000..7e50bf566 --- /dev/null +++ b/src/main/resources/assets/infernalexp/blockstates/dullstone_pressure_plate.json @@ -0,0 +1,10 @@ +{ + "variants": { + "powered=false": { + "model": "infernalexp:block/dullstone_pressure_plate" + }, + "powered=true": { + "model": "infernalexp:block/dullstone_pressure_plate_down" + } + } +} \ No newline at end of file diff --git a/src/main/resources/assets/infernalexp/lang/en_us.json b/src/main/resources/assets/infernalexp/lang/en_us.json index 7b4ead0ef..7e623ca76 100644 --- a/src/main/resources/assets/infernalexp/lang/en_us.json +++ b/src/main/resources/assets/infernalexp/lang/en_us.json @@ -11,6 +11,8 @@ "block.infernalexp.polished_dimstone": "Polished Dimstone", "block.infernalexp.dullstone": "Dullstone", "block.infernalexp.polished_dullstone": "Polished Dullstone", + "block.infernalexp.dullstone_button": "Dullstone Button", + "block.infernalexp.dullstone_pressure_plate": "Dullstone Pressure Plate", "block.infernalexp.glowsilk_cocoon": "Glowsilk Cocoon", "block.infernalexp.luminous_fungus": "Luminous Fungus", diff --git a/src/main/generated/assets/infernalexp/models/block/dimstone.json b/src/main/resources/assets/infernalexp/models/block/dimstone1.json similarity index 60% rename from src/main/generated/assets/infernalexp/models/block/dimstone.json rename to src/main/resources/assets/infernalexp/models/block/dimstone1.json index 52862b491..ba4679168 100644 --- a/src/main/generated/assets/infernalexp/models/block/dimstone.json +++ b/src/main/resources/assets/infernalexp/models/block/dimstone1.json @@ -1,6 +1,6 @@ { "parent": "minecraft:block/cube_all", "textures": { - "all": "infernalexp:block/dimstone" + "all": "infernalexp:block/dimstone1" } } \ No newline at end of file diff --git a/src/main/resources/assets/infernalexp/models/block/dimstone2.json b/src/main/resources/assets/infernalexp/models/block/dimstone2.json new file mode 100644 index 000000000..179e9351f --- /dev/null +++ b/src/main/resources/assets/infernalexp/models/block/dimstone2.json @@ -0,0 +1,6 @@ +{ + "parent": "minecraft:block/cube_all", + "textures": { + "all": "infernalexp:block/dimstone2" + } +} \ No newline at end of file diff --git a/src/main/resources/assets/infernalexp/models/block/dimstone3.json b/src/main/resources/assets/infernalexp/models/block/dimstone3.json new file mode 100644 index 000000000..54e5764cc --- /dev/null +++ b/src/main/resources/assets/infernalexp/models/block/dimstone3.json @@ -0,0 +1,6 @@ +{ + "parent": "minecraft:block/cube_all", + "textures": { + "all": "infernalexp:block/dimstone3" + } +} \ No newline at end of file diff --git a/src/main/resources/assets/infernalexp/models/block/dimstone4.json b/src/main/resources/assets/infernalexp/models/block/dimstone4.json new file mode 100644 index 000000000..2202b8cab --- /dev/null +++ b/src/main/resources/assets/infernalexp/models/block/dimstone4.json @@ -0,0 +1,6 @@ +{ + "parent": "minecraft:block/cube_all", + "textures": { + "all": "infernalexp:block/dimstone4" + } +} \ No newline at end of file diff --git a/src/main/resources/assets/infernalexp/models/block/dullstone_button.json b/src/main/resources/assets/infernalexp/models/block/dullstone_button.json new file mode 100644 index 000000000..4e37153a5 --- /dev/null +++ b/src/main/resources/assets/infernalexp/models/block/dullstone_button.json @@ -0,0 +1,6 @@ +{ + "parent": "minecraft:block/button", + "textures": { + "texture": "infernalexp:block/polished_dullstone" + } +} \ No newline at end of file diff --git a/src/main/resources/assets/infernalexp/models/block/dullstone_button_inventory.json b/src/main/resources/assets/infernalexp/models/block/dullstone_button_inventory.json new file mode 100644 index 000000000..f8ea07190 --- /dev/null +++ b/src/main/resources/assets/infernalexp/models/block/dullstone_button_inventory.json @@ -0,0 +1,6 @@ +{ + "parent": "minecraft:block/button_inventory", + "textures": { + "texture": "infernalexp:block/polished_dullstone" + } +} \ No newline at end of file diff --git a/src/main/resources/assets/infernalexp/models/block/dullstone_button_pressed.json b/src/main/resources/assets/infernalexp/models/block/dullstone_button_pressed.json new file mode 100644 index 000000000..3b7c65753 --- /dev/null +++ b/src/main/resources/assets/infernalexp/models/block/dullstone_button_pressed.json @@ -0,0 +1,6 @@ +{ + "parent": "minecraft:block/button_pressed", + "textures": { + "texture": "infernalexp:block/polished_glowstone" + } +} \ No newline at end of file diff --git a/src/main/resources/assets/infernalexp/models/block/dullstone_pressure_plate.json b/src/main/resources/assets/infernalexp/models/block/dullstone_pressure_plate.json new file mode 100644 index 000000000..f2c47e0da --- /dev/null +++ b/src/main/resources/assets/infernalexp/models/block/dullstone_pressure_plate.json @@ -0,0 +1,6 @@ +{ + "parent": "minecraft:block/pressure_plate_up", + "textures": { + "texture": "infernalexp:block/polished_dullstone" + } +} \ No newline at end of file diff --git a/src/main/resources/assets/infernalexp/models/block/dullstone_pressure_plate_down.json b/src/main/resources/assets/infernalexp/models/block/dullstone_pressure_plate_down.json new file mode 100644 index 000000000..9ae45a95e --- /dev/null +++ b/src/main/resources/assets/infernalexp/models/block/dullstone_pressure_plate_down.json @@ -0,0 +1,6 @@ +{ + "parent": "minecraft:block/pressure_plate_down", + "textures": { + "texture": "infernalexp:block/polished_glowstone" + } +} \ No newline at end of file diff --git a/src/main/resources/assets/infernalexp/models/item/dimstone.json b/src/main/resources/assets/infernalexp/models/item/dimstone.json new file mode 100644 index 000000000..ee8edce47 --- /dev/null +++ b/src/main/resources/assets/infernalexp/models/item/dimstone.json @@ -0,0 +1,3 @@ +{ + "parent": "infernalexp:block/dimstone2" +} \ No newline at end of file diff --git a/src/main/resources/assets/infernalexp/models/item/dullstone_button.json b/src/main/resources/assets/infernalexp/models/item/dullstone_button.json new file mode 100644 index 000000000..76389e5d2 --- /dev/null +++ b/src/main/resources/assets/infernalexp/models/item/dullstone_button.json @@ -0,0 +1,3 @@ +{ + "parent": "infernalexp:block/dullstone_button_inventory" +} \ No newline at end of file diff --git a/src/main/resources/assets/infernalexp/models/item/dullstone_pressure_plate.json b/src/main/resources/assets/infernalexp/models/item/dullstone_pressure_plate.json new file mode 100644 index 000000000..40eb66437 --- /dev/null +++ b/src/main/resources/assets/infernalexp/models/item/dullstone_pressure_plate.json @@ -0,0 +1,3 @@ +{ + "parent": "infernalexp:block/dullstone_pressure_plate" +} \ No newline at end of file diff --git a/src/main/resources/assets/infernalexp/textures/block/dimstone1.png b/src/main/resources/assets/infernalexp/textures/block/dimstone1.png new file mode 100644 index 000000000..c009032d5 Binary files /dev/null and b/src/main/resources/assets/infernalexp/textures/block/dimstone1.png differ diff --git a/src/main/resources/assets/infernalexp/textures/block/dimstone2.png b/src/main/resources/assets/infernalexp/textures/block/dimstone2.png new file mode 100644 index 000000000..676ce195f Binary files /dev/null and b/src/main/resources/assets/infernalexp/textures/block/dimstone2.png differ diff --git a/src/main/resources/assets/infernalexp/textures/block/dimstone3.png b/src/main/resources/assets/infernalexp/textures/block/dimstone3.png new file mode 100644 index 000000000..9e792cab2 Binary files /dev/null and b/src/main/resources/assets/infernalexp/textures/block/dimstone3.png differ diff --git a/src/main/resources/assets/infernalexp/textures/block/dimstone4.png b/src/main/resources/assets/infernalexp/textures/block/dimstone4.png new file mode 100644 index 000000000..74af0b7dd Binary files /dev/null and b/src/main/resources/assets/infernalexp/textures/block/dimstone4.png differ