diff --git a/src/main/java/ru/betterend/blocks/BlockEndLotusFlower.java b/src/main/java/ru/betterend/blocks/BlockEndLotusFlower.java index 77808b96..fa894d06 100644 --- a/src/main/java/ru/betterend/blocks/BlockEndLotusFlower.java +++ b/src/main/java/ru/betterend/blocks/BlockEndLotusFlower.java @@ -10,7 +10,7 @@ import net.minecraft.util.math.BlockPos; import net.minecraft.util.shape.VoxelShape; import net.minecraft.world.BlockView; import ru.betterend.blocks.basis.BlockPlant; -import ru.betterend.registry.BlockTagRegistry; +import ru.betterend.registry.BlockRegistry; public class BlockEndLotusFlower extends BlockPlant { private static final VoxelShape SHAPE_OUTLINE = Block.createCuboidShape(2, 0, 2, 14, 14, 14); @@ -22,7 +22,7 @@ public class BlockEndLotusFlower extends BlockPlant { @Override protected boolean isTerrain(BlockState state) { - return state.isIn(BlockTagRegistry.END_GROUND); + return state.isOf(BlockRegistry.END_LOTUS_FLOWER); } @Override diff --git a/src/main/java/ru/betterend/blocks/BlockEndLotusStem.java b/src/main/java/ru/betterend/blocks/BlockEndLotusStem.java index 45c0a53c..901d6666 100644 --- a/src/main/java/ru/betterend/blocks/BlockEndLotusStem.java +++ b/src/main/java/ru/betterend/blocks/BlockEndLotusStem.java @@ -11,31 +11,34 @@ import net.minecraft.fluid.Fluids; import net.minecraft.item.ItemPlacementContext; import net.minecraft.state.StateManager; import net.minecraft.state.property.BooleanProperty; +import net.minecraft.state.property.EnumProperty; import net.minecraft.state.property.Properties; import net.minecraft.util.math.BlockPos; import net.minecraft.util.math.Direction; import net.minecraft.util.shape.VoxelShape; import net.minecraft.world.BlockView; import net.minecraft.world.WorldAccess; +import ru.betterend.blocks.BlockProperties.TripleShape; import ru.betterend.blocks.basis.BlockBase; public class BlockEndLotusStem extends BlockBase implements Waterloggable { - private static final VoxelShape SHAPE = Block.createCuboidShape(5, 0, 5, 11, 16, 11); public static final BooleanProperty WATERLOGGED = Properties.WATERLOGGED; + public static final EnumProperty SHAPE = BlockProperties.TRIPLE_SHAPE; + private static final VoxelShape VSHAPE = Block.createCuboidShape(6, 0, 6, 10, 16, 10); public BlockEndLotusStem() { super(FabricBlockSettings.copyOf(Blocks.OAK_PLANKS)); - this.setDefaultState(getDefaultState().with(WATERLOGGED, false)); + this.setDefaultState(getDefaultState().with(WATERLOGGED, false).with(SHAPE, TripleShape.MIDDLE)); } @Override public VoxelShape getOutlineShape(BlockState state, BlockView view, BlockPos pos, ShapeContext ePos) { - return SHAPE; + return VSHAPE; } @Override protected void appendProperties(StateManager.Builder builder) { - builder.add(WATERLOGGED); + builder.add(WATERLOGGED, SHAPE); } @Override diff --git a/src/main/java/ru/betterend/blocks/EndPortalBlock.java b/src/main/java/ru/betterend/blocks/EndPortalBlock.java index 18a3fd56..e92c3503 100644 --- a/src/main/java/ru/betterend/blocks/EndPortalBlock.java +++ b/src/main/java/ru/betterend/blocks/EndPortalBlock.java @@ -5,7 +5,6 @@ import java.util.Random; import net.fabricmc.api.EnvType; import net.fabricmc.api.Environment; import net.fabricmc.fabric.api.object.builder.v1.block.FabricBlockSettings; - import net.minecraft.block.BlockState; import net.minecraft.block.Blocks; import net.minecraft.block.NetherPortalBlock; @@ -17,7 +16,6 @@ import net.minecraft.util.math.BlockPos; import net.minecraft.util.math.Direction; import net.minecraft.world.World; import net.minecraft.world.WorldAccess; - import ru.betterend.client.ERenderLayer; import ru.betterend.client.IRenderTypeable; import ru.betterend.registry.ParticleRegistry; diff --git a/src/main/java/ru/betterend/client/BetterEndClient.java b/src/main/java/ru/betterend/client/BetterEndClient.java index 59ba9792..c7c4dfdf 100644 --- a/src/main/java/ru/betterend/client/BetterEndClient.java +++ b/src/main/java/ru/betterend/client/BetterEndClient.java @@ -2,10 +2,8 @@ package ru.betterend.client; import net.fabricmc.api.ClientModInitializer; import net.fabricmc.fabric.api.blockrenderlayer.v1.BlockRenderLayerMap; - import net.minecraft.client.render.RenderLayer; import net.minecraft.util.registry.Registry; - import ru.betterend.registry.BlockEntityRenderRegistry; import ru.betterend.registry.EntityRenderRegistry; import ru.betterend.registry.ParticleRegistry; diff --git a/src/main/java/ru/betterend/item/EndHammer.java b/src/main/java/ru/betterend/item/EndHammer.java index f6a6deb2..6e1217ef 100644 --- a/src/main/java/ru/betterend/item/EndHammer.java +++ b/src/main/java/ru/betterend/item/EndHammer.java @@ -8,9 +8,7 @@ import com.google.common.collect.Multimap; import com.google.common.collect.Sets; import io.netty.util.internal.ThreadLocalRandom; - import net.fabricmc.fabric.api.tool.attribute.v1.DynamicAttributeTool; - import net.minecraft.block.BlockState; import net.minecraft.block.Blocks; import net.minecraft.block.Material; @@ -28,7 +26,6 @@ import net.minecraft.tag.Tag; import net.minecraft.util.math.BlockPos; import net.minecraft.util.math.MathHelper; import net.minecraft.world.World; - import ru.betterend.registry.ItemTagRegistry; public class EndHammer extends MiningToolItem implements DynamicAttributeTool { diff --git a/src/main/java/ru/betterend/registry/BlockRegistry.java b/src/main/java/ru/betterend/registry/BlockRegistry.java index afa5d69c..aebe8667 100644 --- a/src/main/java/ru/betterend/registry/BlockRegistry.java +++ b/src/main/java/ru/betterend/registry/BlockRegistry.java @@ -5,7 +5,6 @@ import net.minecraft.block.MaterialColor; import net.minecraft.item.BlockItem; import net.minecraft.item.Item; import net.minecraft.util.registry.Registry; - import ru.betterend.BetterEnd; import ru.betterend.blocks.AeterniumBlock; import ru.betterend.blocks.AuroraCrystalBlock; diff --git a/src/main/resources/assets/betterend/blockstates/end_lotus_stem.json b/src/main/resources/assets/betterend/blockstates/end_lotus_stem.json index 88620981..5ef30a1a 100644 --- a/src/main/resources/assets/betterend/blockstates/end_lotus_stem.json +++ b/src/main/resources/assets/betterend/blockstates/end_lotus_stem.json @@ -1,5 +1,7 @@ { "variants": { - "": { "model": "betterend:block/end_lotus_stem" } + "shape=top": { "model": "betterend:block/end_lotus_stem_top" }, + "shape=middle": { "model": "betterend:block/end_lotus_stem" }, + "shape=bottom": { "model": "betterend:block/end_lotus_roots" } } } diff --git a/src/main/resources/assets/betterend/models/block/end_lotus_flower.json b/src/main/resources/assets/betterend/models/block/end_lotus_flower.json index 72a5e8fc..22ab1d75 100644 --- a/src/main/resources/assets/betterend/models/block/end_lotus_flower.json +++ b/src/main/resources/assets/betterend/models/block/end_lotus_flower.json @@ -24,6 +24,7 @@ "from": [ -0.5, 2, 12 ], "to": [ 15.5, 2.001, 20 ], "rotation": { "origin": [ -0.5, 2, 12 ], "axis": "x", "angle": -45 }, + "shade": false, "faces": { "down": { "uv": [ 16, 8, 0, 16 ], "texture": "#petal" }, "up": { "uv": [ 0, 8, 16, 16 ], "texture": "#petal", "rotation": 180 } @@ -33,6 +34,7 @@ "__comment": "PlaneY2", "from": [ -0.5, 7.5, 17.5 ], "to": [ 15.5, 7.501, 25.5 ], + "shade": false, "faces": { "down": { "uv": [ 16, 0, 0, 8 ], "texture": "#petal" }, "up": { "uv": [ 0, 0, 16, 8 ], "texture": "#petal", "rotation": 180 } @@ -43,6 +45,7 @@ "from": [ 0.5, 1.999, -4 ], "to": [ 16.5, 2, 4 ], "rotation": { "origin": [ 0.5, 2, 4 ], "axis": "x", "angle": 45 }, + "shade": false, "faces": { "down": { "uv": [ 16, 8, 0, 16 ], "texture": "#petal", "rotation": 180 }, "up": { "uv": [ 0, 8, 16, 16 ], "texture": "#petal" } @@ -52,6 +55,7 @@ "__comment": "PlaneY2", "from": [ 0.5, 7.5, -9.5 ], "to": [ 16.5, 7.501, -1.5 ], + "shade": false, "faces": { "down": { "uv": [ 16, 0, 0, 8 ], "texture": "#petal", "rotation": 180 }, "up": { "uv": [ 0, 0, 16, 8 ], "texture": "#petal" } @@ -62,6 +66,7 @@ "from": [ 12, 2, 0.5 ], "to": [ 20, 2.001, 16.5 ], "rotation": { "origin": [ 12, 2, 0.5 ], "axis": "z", "angle": 45 }, + "shade": false, "faces": { "down": { "uv": [ 16, 8, 0, 16 ], "texture": "#petal", "rotation": 90 }, "up": { "uv": [ 0, 8, 16, 16 ], "texture": "#petal", "rotation": 90 } @@ -71,7 +76,7 @@ "__comment": "PlaneY12", "from": [ 17.5, 7.5, 0.5 ], "to": [ 25.5, 7.501, 16.5 ], - "rotation": { "origin": [ 17.5, 7.5, 0.5 ], "axis": "z", "angle": 0 }, + "shade": false, "faces": { "down": { "uv": [ 16, 0, 0, 8 ], "texture": "#petal", "rotation": 90 }, "up": { "uv": [ 0, 0, 16, 8 ], "texture": "#petal", "rotation": 90 } @@ -82,6 +87,7 @@ "from": [ -4, 1.999, -0.5 ], "to": [ 4, 2, 15.5 ], "rotation": { "origin": [ 4, 2, -0.5 ], "axis": "z", "angle": -45 }, + "shade": false, "faces": { "down": { "uv": [ 16, 8, 0, 16 ], "texture": "#petal", "rotation": 270 }, "up": { "uv": [ 0, 8, 16, 16 ], "texture": "#petal", "rotation": 270 } @@ -91,6 +97,7 @@ "__comment": "PlaneY12", "from": [ -9.5, 7.5, -0.5 ], "to": [ -1.5, 7.501, 15.5 ], + "shade": false, "faces": { "down": { "uv": [ 16, 0, 0, 8 ], "texture": "#petal", "rotation": 270 }, "up": { "uv": [ 0, 0, 16, 8 ], "texture": "#petal", "rotation": 270 } @@ -101,6 +108,7 @@ "from": [ 15.5, 2, -10.5 ], "to": [ 31.5, 2.001, 5.5 ], "rotation": { "origin": [ 15.5, 2, -10.5 ], "axis": "y", "angle": -45 }, + "shade": false, "faces": { "down": { "uv": [ 16, 0, 0, 16 ], "texture": "#petal", "rotation": 180 }, "up": { "uv": [ 0, 0, 16, 16 ], "texture": "#petal" } @@ -111,6 +119,7 @@ "from": [ 10.5, 2, -0.5 ], "to": [ 26.5, 2.001, 15.5 ], "rotation": { "origin": [ 26.5, 2, 15.5 ], "axis": "y", "angle": 45 }, + "shade": false, "faces": { "down": { "uv": [ 16, 0, 0, 16 ], "texture": "#petal" }, "up": { "uv": [ 0, 0, 16, 16 ], "texture": "#petal", "rotation": 180 } @@ -121,6 +130,7 @@ "from": [ -15.5, 2, 10.5 ], "to": [ 0.5, 2.001, 26.5 ], "rotation": { "origin": [ 0.5, 2, 26.5 ], "axis": "y", "angle": -45 }, + "shade": false, "faces": { "down": { "uv": [ 16, 0, 0, 16 ], "texture": "#petal" }, "up": { "uv": [ 0, 0, 16, 16 ], "texture": "#petal", "rotation": 180 } @@ -131,6 +141,7 @@ "from": [ -10.4999, 2, 0.4999 ], "to": [ 5.5001, 2.001, 16.4999 ], "rotation": { "origin": [ -10.5, 2, 0.5 ], "axis": "y", "angle": 45 }, + "shade": false, "faces": { "down": { "uv": [ 16, 0, 0, 16 ], "texture": "#petal", "rotation": 180 }, "up": { "uv": [ 0, 0, 16, 16 ], "texture": "#petal" } diff --git a/src/main/resources/assets/betterend/models/block/end_lotus_roots.json b/src/main/resources/assets/betterend/models/block/end_lotus_roots.json new file mode 100644 index 00000000..3e9ea343 --- /dev/null +++ b/src/main/resources/assets/betterend/models/block/end_lotus_roots.json @@ -0,0 +1,68 @@ +{ + "__comment": "Designed by Paulevs with Cubik Studio - https://cubik.studio", + "parent": "block/block", + "textures": { + "particle": "betterend:block/end_lotus_stem", + "texture": "betterend:block/end_lotus_stem", + "roots": "betterend:block/end_lotus_roots" + }, + "elements": [ + { + "__comment": "Box1", + "from": [ 6, 0, 6 ], + "to": [ 10, 16, 10 ], + "faces": { + "down": { "uv": [ 4, 0, 8, 4 ], "texture": "#texture", "cullface": "down" }, + "up": { "uv": [ 4, 0, 8, 4 ], "texture": "#texture", "cullface": "up" }, + "north": { "uv": [ 0, 0, 4, 16 ], "texture": "#texture" }, + "south": { "uv": [ 0, 0, 4, 16 ], "texture": "#texture" }, + "west": { "uv": [ 0, 0, 4, 16 ], "texture": "#texture" }, + "east": { "uv": [ 0, 0, 4, 16 ], "texture": "#texture" } + } + }, + { + "__comment": "PlaneX2", + "from": [ 5, 0, 1 ], + "to": [ 5.001, 16, 17 ], + "rotation": { "origin": [ 5, 0, 1 ], "axis": "y", "angle": 22.5 }, + "shade": false, + "faces": { + "west": { "uv": [ 0, 0, 16, 16 ], "texture": "#roots" }, + "east": { "uv": [ 0, 0, 16, 16 ], "texture": "#roots" } + } + }, + { + "__comment": "PlaneX2", + "from": [ 11, 0, 1 ], + "to": [ 11.001, 16, 17 ], + "rotation": { "origin": [ 11, 0, 1 ], "axis": "y", "angle": -22.5 }, + "shade": false, + "faces": { + "west": { "uv": [ 0, 0, 16, 16 ], "texture": "#roots" }, + "east": { "uv": [ 0, 0, 16, 16 ], "texture": "#roots" } + } + }, + { + "__comment": "PlaneX2", + "from": [ 0.5, 0, 4.999 ], + "to": [ 16.5, 16, 5 ], + "rotation": { "origin": [ 0.5, 0, 5 ], "axis": "y", "angle": -22.5 }, + "shade": false, + "faces": { + "north": { "uv": [ 0, 0, 16, 16 ], "texture": "#roots" }, + "south": { "uv": [ 0, 0, 16, 16 ], "texture": "#roots" } + } + }, + { + "__comment": "PlaneX2", + "from": [ 0.5, 0, 10.999 ], + "to": [ 16.5, 16, 11 ], + "rotation": { "origin": [ 0.5, 0, 11 ], "axis": "y", "angle": 22.5 }, + "shade": false, + "faces": { + "north": { "uv": [ 0, 0, 16, 16 ], "texture": "#roots" }, + "south": { "uv": [ 0, 0, 16, 16 ], "texture": "#roots" } + } + } + ] +} \ No newline at end of file diff --git a/src/main/resources/assets/betterend/models/block/end_lotus_stem.json b/src/main/resources/assets/betterend/models/block/end_lotus_stem.json index a0f09a71..0ff07e34 100644 --- a/src/main/resources/assets/betterend/models/block/end_lotus_stem.json +++ b/src/main/resources/assets/betterend/models/block/end_lotus_stem.json @@ -8,15 +8,15 @@ "elements": [ { "__comment": "Box1", - "from": [ 5, 0, 5 ], - "to": [ 11, 16, 11 ], + "from": [ 6, 0, 6 ], + "to": [ 10, 16, 10 ], "faces": { - "down": { "uv": [ 6, 0, 12, 6 ], "texture": "#texture", "cullface": "down" }, - "up": { "uv": [ 6, 0, 12, 6 ], "texture": "#texture", "cullface": "up" }, - "north": { "uv": [ 0, 0, 6, 16 ], "texture": "#texture" }, - "south": { "uv": [ 0, 0, 6, 16 ], "texture": "#texture" }, - "west": { "uv": [ 0, 0, 6, 16 ], "texture": "#texture" }, - "east": { "uv": [ 0, 0, 6, 16 ], "texture": "#texture" } + "down": { "uv": [ 4, 0, 8, 4 ], "texture": "#texture", "cullface": "down" }, + "up": { "uv": [ 4, 0, 8, 4 ], "texture": "#texture", "cullface": "up" }, + "north": { "uv": [ 0, 0, 4, 16 ], "texture": "#texture" }, + "south": { "uv": [ 0, 0, 4, 16 ], "texture": "#texture" }, + "west": { "uv": [ 0, 0, 4, 16 ], "texture": "#texture" }, + "east": { "uv": [ 0, 0, 4, 16 ], "texture": "#texture" } } } ] diff --git a/src/main/resources/assets/betterend/models/block/end_lotus_stem_top.json b/src/main/resources/assets/betterend/models/block/end_lotus_stem_top.json new file mode 100644 index 00000000..6590a0ae --- /dev/null +++ b/src/main/resources/assets/betterend/models/block/end_lotus_stem_top.json @@ -0,0 +1,35 @@ +{ + "__comment": "Designed by Paulevs with Cubik Studio - https://cubik.studio", + "parent": "block/block", + "textures": { + "particle": "betterend:block/end_lotus_stem", + "texture": "betterend:block/end_lotus_stem" + }, + "elements": [ + { + "__comment": "Box1", + "from": [ 6, 0, 6 ], + "to": [ 10, 12, 10 ], + "faces": { + "down": { "uv": [ 4, 0, 8, 4 ], "texture": "#texture", "cullface": "down" }, + "north": { "uv": [ 0, 4, 4, 16 ], "texture": "#texture" }, + "south": { "uv": [ 0, 4, 4, 16 ], "texture": "#texture" }, + "west": { "uv": [ 0, 4, 4, 16 ], "texture": "#texture" }, + "east": { "uv": [ 0, 4, 4, 16 ], "texture": "#texture" } + } + }, + { + "__comment": "Box2", + "from": [ 5, 12, 5 ], + "to": [ 11, 16, 11 ], + "faces": { + "down": { "uv": [ 4, 8, 10, 14 ], "texture": "#texture" }, + "up": { "uv": [ 4, 8, 10, 14 ], "texture": "#texture", "cullface": "up" }, + "north": { "uv": [ 4, 4, 10, 8 ], "texture": "#texture" }, + "south": { "uv": [ 4, 4, 10, 8 ], "texture": "#texture" }, + "west": { "uv": [ 4, 4, 10, 8 ], "texture": "#texture" }, + "east": { "uv": [ 4, 4, 10, 8 ], "texture": "#texture" } + } + } + ] +} \ No newline at end of file diff --git a/src/main/resources/assets/betterend/textures/block/end_lotus_roots.png b/src/main/resources/assets/betterend/textures/block/end_lotus_roots.png new file mode 100644 index 00000000..84c8abd2 Binary files /dev/null and b/src/main/resources/assets/betterend/textures/block/end_lotus_roots.png differ diff --git a/src/main/resources/assets/betterend/textures/block/end_lotus_stem.png b/src/main/resources/assets/betterend/textures/block/end_lotus_stem.png index 930af799..c0395d9c 100644 Binary files a/src/main/resources/assets/betterend/textures/block/end_lotus_stem.png and b/src/main/resources/assets/betterend/textures/block/end_lotus_stem.png differ