diff --git a/src/main/java/ru/betterend/blocks/BlockCharnia.java b/src/main/java/ru/betterend/blocks/BlockCharnia.java new file mode 100644 index 00000000..044a506e --- /dev/null +++ b/src/main/java/ru/betterend/blocks/BlockCharnia.java @@ -0,0 +1,15 @@ +package ru.betterend.blocks; + +import net.minecraft.block.BlockState; +import net.minecraft.fluid.Fluids; +import net.minecraft.util.math.BlockPos; +import net.minecraft.util.math.Direction; +import net.minecraft.world.WorldView; +import ru.betterend.blocks.basis.BlockUnderwaterPlant; + +public class BlockCharnia extends BlockUnderwaterPlant { + @Override + public boolean canPlaceAt(BlockState state, WorldView world, BlockPos pos) { + return sideCoversSmallSquare(world, pos.down(), Direction.UP) && world.getFluidState(pos).getFluid() == Fluids.WATER; + } +} diff --git a/src/main/java/ru/betterend/registry/EndBlocks.java b/src/main/java/ru/betterend/registry/EndBlocks.java index 45628c96..4e650a54 100644 --- a/src/main/java/ru/betterend/registry/EndBlocks.java +++ b/src/main/java/ru/betterend/registry/EndBlocks.java @@ -17,6 +17,7 @@ import ru.betterend.blocks.BlockBrimstone; import ru.betterend.blocks.BlockBubbleCoral; import ru.betterend.blocks.BlockBulbVine; import ru.betterend.blocks.BlockBulbVineSeed; +import ru.betterend.blocks.BlockCharnia; import ru.betterend.blocks.BlockChorusGrass; import ru.betterend.blocks.BlockDragonTreeSapling; import ru.betterend.blocks.BlockEndLily; @@ -168,6 +169,9 @@ public class EndBlocks { public static final Block BUBBLE_CORAL = registerBlock("bubble_coral", new BlockBubbleCoral()); public static final Block MENGER_SPONGE = registerBlock("menger_sponge", new BlockMengerSponge()); public static final Block MENGER_SPONGE_WET = registerBlock("menger_sponge_wet", new BlockMengerSpongeWet()); + public static final Block CHARNIA_RED = registerBlock("charnia_red", new BlockCharnia()); + public static final Block CHARNIA_PURPLE = registerBlock("charnia_purple", new BlockCharnia()); + public static final Block CHARNIA_ORANGE = registerBlock("charnia_orange", new BlockCharnia()); public static final Block END_LILY = registerBlockNI("end_lily", new BlockEndLily()); public static final Block END_LILY_SEED = registerBlock("end_lily_seed", new BlockEndLilySeed()); diff --git a/src/main/java/ru/betterend/world/biome/BiomeSulphurSprings.java b/src/main/java/ru/betterend/world/biome/BiomeSulphurSprings.java index f483282d..962faf86 100644 --- a/src/main/java/ru/betterend/world/biome/BiomeSulphurSprings.java +++ b/src/main/java/ru/betterend/world/biome/BiomeSulphurSprings.java @@ -7,7 +7,7 @@ import ru.betterend.world.surface.SurfaceBuilders; public class BiomeSulphurSprings extends EndBiome { public BiomeSulphurSprings() { - super(new BiomeDefinition("sulfur_springs") + super(new BiomeDefinition("sulphur_springs") .setSurface(SurfaceBuilders.SULPHURIC_SURFACE) .setWaterColor(25, 90, 157) .setWaterFogColor(30, 65, 61) diff --git a/src/main/resources/assets/betterend/blockstates/charnia_orange.json b/src/main/resources/assets/betterend/blockstates/charnia_orange.json new file mode 100644 index 00000000..6beb7fef --- /dev/null +++ b/src/main/resources/assets/betterend/blockstates/charnia_orange.json @@ -0,0 +1,10 @@ +{ + "variants": { + "": [ + { "model": "betterend:block/charnia_orange" }, + { "model": "betterend:block/charnia_orange", "y": 90 }, + { "model": "betterend:block/charnia_orange", "y": 180 }, + { "model": "betterend:block/charnia_orange", "y": 270 } + ] + } +} diff --git a/src/main/resources/assets/betterend/blockstates/charnia_purple.json b/src/main/resources/assets/betterend/blockstates/charnia_purple.json new file mode 100644 index 00000000..d3962d74 --- /dev/null +++ b/src/main/resources/assets/betterend/blockstates/charnia_purple.json @@ -0,0 +1,10 @@ +{ + "variants": { + "": [ + { "model": "betterend:block/charnia_purple" }, + { "model": "betterend:block/charnia_purple", "y": 90 }, + { "model": "betterend:block/charnia_purple", "y": 180 }, + { "model": "betterend:block/charnia_purple", "y": 270 } + ] + } +} diff --git a/src/main/resources/assets/betterend/blockstates/charnia_red.json b/src/main/resources/assets/betterend/blockstates/charnia_red.json new file mode 100644 index 00000000..13e9d0d9 --- /dev/null +++ b/src/main/resources/assets/betterend/blockstates/charnia_red.json @@ -0,0 +1,10 @@ +{ + "variants": { + "": [ + { "model": "betterend:block/charnia_red" }, + { "model": "betterend:block/charnia_red", "y": 90 }, + { "model": "betterend:block/charnia_red", "y": 180 }, + { "model": "betterend:block/charnia_red", "y": 270 } + ] + } +} diff --git a/src/main/resources/assets/betterend/materialmaps/block/charnia_orange.json b/src/main/resources/assets/betterend/materialmaps/block/charnia_orange.json new file mode 100644 index 00000000..352de84b --- /dev/null +++ b/src/main/resources/assets/betterend/materialmaps/block/charnia_orange.json @@ -0,0 +1,3 @@ +{ + "defaultMaterial": "betterend:waving_floor" +} diff --git a/src/main/resources/assets/betterend/materialmaps/block/charnia_purple.json b/src/main/resources/assets/betterend/materialmaps/block/charnia_purple.json new file mode 100644 index 00000000..352de84b --- /dev/null +++ b/src/main/resources/assets/betterend/materialmaps/block/charnia_purple.json @@ -0,0 +1,3 @@ +{ + "defaultMaterial": "betterend:waving_floor" +} diff --git a/src/main/resources/assets/betterend/materialmaps/block/charnia_red.json b/src/main/resources/assets/betterend/materialmaps/block/charnia_red.json new file mode 100644 index 00000000..352de84b --- /dev/null +++ b/src/main/resources/assets/betterend/materialmaps/block/charnia_red.json @@ -0,0 +1,3 @@ +{ + "defaultMaterial": "betterend:waving_floor" +} diff --git a/src/main/resources/assets/betterend/models/block/charnia.json b/src/main/resources/assets/betterend/models/block/charnia.json new file mode 100644 index 00000000..1409556a --- /dev/null +++ b/src/main/resources/assets/betterend/models/block/charnia.json @@ -0,0 +1,87 @@ +{ + "__comment": "Designed by Paulevs with Cubik Studio - https://cubik.studio", + "textures": { + "particle": "#texture" + }, + "elements": [ + { + "__comment": "PlaneX1", + "from": [ 2.5, 0, 2.5 ], + "to": [ 2.501, 16, 7.5 ], + "rotation": { "origin": [ 2.5, 0, 2.5 ], "axis": "y", "angle": 22.5 }, + "faces": { + "west": { "uv": [ 0, 0, 5, 16 ], "texture": "#texture" }, + "east": { "uv": [ 0, 0, 5, 16 ], "texture": "#texture" } + } + }, + { + "__comment": "PlaneX1", + "from": [ 13, 0, 1 ], + "to": [ 13.001, 16, 6 ], + "rotation": { "origin": [ 13, 0, 1 ], "axis": "y", "angle": -45 }, + "faces": { + "west": { "uv": [ 0, 0, 5, 16 ], "texture": "#texture" }, + "east": { "uv": [ 0, 0, 5, 16 ], "texture": "#texture" } + } + }, + { + "__comment": "PlaneX1", + "from": [ 14, 0, 11 ], + "to": [ 14.001, 16, 16 ], + "rotation": { "origin": [ 14, 0, 11 ], "axis": "y", "angle": -45 }, + "faces": { + "west": { "uv": [ 0, 0, 5, 16 ], "texture": "#texture" }, + "east": { "uv": [ 0, 0, 5, 16 ], "texture": "#texture" } + } + }, + { + "__comment": "PlaneX1", + "from": [ 4.5, 0, 8 ], + "to": [ 4.501, 16, 13 ], + "rotation": { "origin": [ 4.5, 0, 8 ], "axis": "y", "angle": 45 }, + "faces": { + "west": { "uv": [ 5, 0, 10, 16 ], "texture": "#texture" }, + "east": { "uv": [ 5, 0, 10, 16 ], "texture": "#texture" } + } + }, + { + "__comment": "PlaneX1", + "from": [ 9, 0, 4.5 ], + "to": [ 9.001, 16, 9.5 ], + "faces": { + "west": { "uv": [ 5, 0, 10, 16 ], "texture": "#texture" }, + "east": { "uv": [ 5, 0, 10, 16 ], "texture": "#texture" } + } + }, + { + "__comment": "PlaneX1", + "from": [ 3.5, 0, 1 ], + "to": [ 8.5, 16, 1.001 ], + "rotation": { "origin": [ 8.5, 0, 1 ], "axis": "y", "angle": 22.5 }, + "faces": { + "north": { "uv": [ 10, 0, 15, 16 ], "texture": "#texture" }, + "south": { "uv": [ 10, 0, 15, 16 ], "texture": "#texture" } + } + }, + { + "__comment": "PlaneX1", + "from": [ 14.999, 0, 2.5 ], + "to": [ 15, 16, 7.5 ], + "rotation": { "origin": [ 15, 0, 7.5 ], "axis": "y", "angle": 22.5 }, + "faces": { + "west": { "uv": [ 10, 0, 15, 16 ], "texture": "#texture" }, + "east": { "uv": [ 10, 0, 15, 16 ], "texture": "#texture" } + } + }, + { + "__comment": "PlaneX1", + "from": [ 4.999, 0, 9.5 ], + "to": [ 5, 16, 14.5 ], + "rotation": { "origin": [ 5, 0, 14.5 ], "axis": "y", "angle": 45 }, + "faces": { + "west": { "uv": [ 10, 0, 15, 16 ], "texture": "#texture" }, + "east": { "uv": [ 10, 0, 15, 16 ], "texture": "#texture" } + } + } + ] +} \ No newline at end of file diff --git a/src/main/resources/assets/betterend/models/block/charnia_orange.json b/src/main/resources/assets/betterend/models/block/charnia_orange.json new file mode 100644 index 00000000..7656bee2 --- /dev/null +++ b/src/main/resources/assets/betterend/models/block/charnia_orange.json @@ -0,0 +1,6 @@ +{ + "parent": "betterend:block/charnia", + "textures": { + "texture": "betterend:block/charnia_orange" + } +} \ No newline at end of file diff --git a/src/main/resources/assets/betterend/models/block/charnia_purple.json b/src/main/resources/assets/betterend/models/block/charnia_purple.json new file mode 100644 index 00000000..b8f39e8b --- /dev/null +++ b/src/main/resources/assets/betterend/models/block/charnia_purple.json @@ -0,0 +1,6 @@ +{ + "parent": "betterend:block/charnia", + "textures": { + "texture": "betterend:block/charnia_purple" + } +} \ No newline at end of file diff --git a/src/main/resources/assets/betterend/models/block/charnia_red.json b/src/main/resources/assets/betterend/models/block/charnia_red.json new file mode 100644 index 00000000..c775cfba --- /dev/null +++ b/src/main/resources/assets/betterend/models/block/charnia_red.json @@ -0,0 +1,6 @@ +{ + "parent": "betterend:block/charnia", + "textures": { + "texture": "betterend:block/charnia_red" + } +} \ No newline at end of file diff --git a/src/main/resources/assets/betterend/textures/block/charnia_orange.png b/src/main/resources/assets/betterend/textures/block/charnia_orange.png new file mode 100644 index 00000000..f4729206 Binary files /dev/null and b/src/main/resources/assets/betterend/textures/block/charnia_orange.png differ diff --git a/src/main/resources/assets/betterend/textures/block/charnia_purple.png b/src/main/resources/assets/betterend/textures/block/charnia_purple.png new file mode 100644 index 00000000..c24d149c Binary files /dev/null and b/src/main/resources/assets/betterend/textures/block/charnia_purple.png differ diff --git a/src/main/resources/assets/betterend/textures/block/charnia_red.png b/src/main/resources/assets/betterend/textures/block/charnia_red.png new file mode 100644 index 00000000..70f40cc6 Binary files /dev/null and b/src/main/resources/assets/betterend/textures/block/charnia_red.png differ