diff --git a/TODO.md b/TODO.md index 9ce80ee..9c8fd49 100644 --- a/TODO.md +++ b/TODO.md @@ -11,7 +11,7 @@ * PO2 wall (fix) * What's switch type 2? * All the lamps (lamp posts too!) -* Look into cigarette and handrail for code cleanup +* Cigarette and handrail are BROKEN and the code is a MESS sorry, but it needs CLEANUP === ACHIEVEMENTS === Kolkhoz warrior - kill a zombie, skeleton, creeper and spider with a sickle \ No newline at end of file diff --git a/src/client/java/su/a71/new_soviet/NewSovietClient.java b/src/client/java/su/a71/new_soviet/NewSovietClient.java index 1524f32..e92a9b6 100644 --- a/src/client/java/su/a71/new_soviet/NewSovietClient.java +++ b/src/client/java/su/a71/new_soviet/NewSovietClient.java @@ -18,6 +18,7 @@ public class NewSovietClient implements ClientModInitializer { BlockRenderLayerMap.INSTANCE.putBlock(NSE_Blocks.CRATE, RenderLayer.getCutout()); BlockRenderLayerMap.INSTANCE.putBlock(NSE_Blocks.HANDRAIL, RenderLayer.getCutout()); BlockRenderLayerMap.INSTANCE.putBlock(NSE_Custom.TABLE_LAMP, RenderLayer.getCutout()); + BlockRenderLayerMap.INSTANCE.putBlock(NSE_Custom.GOLDEN_LAMP, RenderLayer.getCutout()); BlockRenderLayerMap.INSTANCE.putBlock(NSE_Custom.VINTAGE_LAMP, RenderLayer.getCutout()); BlockRenderLayerMap.INSTANCE.putBlock(NSE_Custom.CEILING_FAN, RenderLayer.getCutout()); BlockRenderLayerMap.INSTANCE.putBlock(NSE_Custom.SIREN, RenderLayer.getCutout()); diff --git a/src/main/java/su/a71/new_soviet/blocks/lamps/DevTableLampBlock.java b/src/main/java/su/a71/new_soviet/blocks/lamps/DevTableLampBlock.java new file mode 100644 index 0000000..cf47de9 --- /dev/null +++ b/src/main/java/su/a71/new_soviet/blocks/lamps/DevTableLampBlock.java @@ -0,0 +1,26 @@ +package su.a71.new_soviet.blocks.lamps; + +import net.minecraft.block.Block; +import net.minecraft.block.BlockState; +import net.minecraft.block.ShapeContext; +import net.minecraft.util.math.BlockPos; +import net.minecraft.util.math.Direction; +import net.minecraft.util.shape.VoxelShape; +import net.minecraft.util.shape.VoxelShapes; +import net.minecraft.world.BlockView; +import net.minecraft.world.WorldView; +import su.a71.new_soviet.util.Shapes; + +import java.util.List; + +public class DevTableLampBlock extends GoldenTableLampBlock { + + public DevTableLampBlock(Settings settings) { + super(settings); + SHAPE = new Shapes.HorizontalShape(List.of( + List.of(5.0, 0.0, 5.0, 11.0, 2.0, 11.0), + List.of(7.0, 2.0, 7.0, 9.0, 4.0, 9.0), + List.of(6.0, 4.0, 6.0, 10.0, 5.0, 10.0), + List.of(3.0, 9.0, 3.0, 13.0, 13.0, 7.0))); + } +} \ No newline at end of file diff --git a/src/main/java/su/a71/new_soviet/blocks/lamps/GoldenTableLampBlock.java b/src/main/java/su/a71/new_soviet/blocks/lamps/GoldenTableLampBlock.java new file mode 100644 index 0000000..b607968 --- /dev/null +++ b/src/main/java/su/a71/new_soviet/blocks/lamps/GoldenTableLampBlock.java @@ -0,0 +1,88 @@ +package su.a71.new_soviet.blocks.lamps; + +import net.minecraft.block.Block; +import net.minecraft.block.BlockState; +import net.minecraft.block.ShapeContext; +import net.minecraft.item.ItemPlacementContext; +import net.minecraft.state.StateManager; +import net.minecraft.state.property.DirectionProperty; +import net.minecraft.state.property.Properties; +import net.minecraft.util.BlockMirror; +import net.minecraft.util.BlockRotation; +import net.minecraft.util.math.BlockPos; +import net.minecraft.util.math.Direction; +import net.minecraft.util.shape.VoxelShape; +import net.minecraft.util.shape.VoxelShapes; +import net.minecraft.world.BlockView; +import net.minecraft.world.WorldView; + +import su.a71.new_soviet.util.Shapes; +import java.util.List; + +public class GoldenTableLampBlock extends LampBlock { + public static final DirectionProperty FACING; + public Shapes.HorizontalShape SHAPE = new Shapes.HorizontalShape(List.of( + List.of(5.0, 0.0, 5.0, 11.0, 2.0, 11.0), + List.of(7.0, 2.0, 7.0, 9.0, 4.0, 9.0), + List.of(6.0, 4.0, 6.0, 10.0, 5.0, 10.0), + List.of(3.0, 9.0, 3.0, 13.0, 13.0, 7.0))); + + public GoldenTableLampBlock(Settings settings) { + super(settings, true, null); + this.setDefaultState(this.stateManager.getDefaultState() + .with(INVERTED, defaultLightState) + .with(WATERLOGGED, false) + .with(ON, false) + .with(Properties.HORIZONTAL_FACING, Direction.NORTH)); + } + + @Override + protected void appendProperties(StateManager.Builder builder) { + builder.add(Properties.HORIZONTAL_FACING); + super.appendProperties(builder); + } + + public VoxelShape getOutlineShape(BlockState state, BlockView world, BlockPos pos, ShapeContext context) { + Direction dir = state.get(FACING); + return switch (dir) { + case NORTH -> SHAPE.north(); + case SOUTH -> SHAPE.south(); + case EAST -> SHAPE.east(); + case WEST -> SHAPE.west(); + default -> VoxelShapes.fullCube(); + }; + } + + + public boolean canPlaceAt(BlockState state, WorldView world, BlockPos pos) { + Direction direction = Direction.DOWN; + return Block.sideCoversSmallSquare(world, pos.offset(direction), direction.getOpposite()); + } + + public VoxelShape getStandingShape(){ + VoxelShape shape = VoxelShapes.empty(); + shape = VoxelShapes.union(shape, VoxelShapes.cuboid(0.4375, 0.25, 0.4375, 0.5625, 0.875, 0.5625)); + shape = VoxelShapes.union(shape, VoxelShapes.cuboid(0.375, 0, 0.375, 0.625, 0.25, 0.625)); + shape = VoxelShapes.union(shape, VoxelShapes.cuboid(0.25, 0.6875, 0.25, 0.75, 0.9375, 0.75)); + shape = VoxelShapes.union(shape, VoxelShapes.cuboid(0.125, 0.3125, 0.125, 0.875, 0.6875, 0.875)); + shape.simplify(); + return shape; + } + + @Override + public BlockState getPlacementState(ItemPlacementContext ctx) { + return super.getPlacementState(ctx).with(Properties.HORIZONTAL_FACING, ctx.getHorizontalPlayerFacing().getOpposite()); + } + + public BlockState rotate(BlockState state, BlockRotation rotation) { + return (BlockState)state.with(FACING, rotation.rotate((Direction)state.get(FACING))); + } + + public BlockState mirror(BlockState state, BlockMirror mirror) { + return state.rotate(mirror.getRotation((Direction)state.get(FACING))); + } + + static { + FACING = Properties.HORIZONTAL_FACING; + } +} \ No newline at end of file diff --git a/src/main/java/su/a71/new_soviet/blocks/lamps/LightBulbLampBlock.java b/src/main/java/su/a71/new_soviet/blocks/lamps/LightBulbLampBlock.java index a286962..3cb3338 100644 --- a/src/main/java/su/a71/new_soviet/blocks/lamps/LightBulbLampBlock.java +++ b/src/main/java/su/a71/new_soviet/blocks/lamps/LightBulbLampBlock.java @@ -60,7 +60,7 @@ public class LightBulbLampBlock extends LampBlock { return ActionResult.SUCCESS; } else { player.getItemCooldownManager().set(NSE_Items.LIGHT_BULB, 10); - player.sendMessage(Text.translatable("block.new_soviet.light_bulb_block.energized")); + player.sendMessage(Text.translatable("block.new_soviet.light_bulb_block.energized"), true); world.playSound((PlayerEntity)null, pos.getX(), pos.getY(), pos.getZ(), NSE_Sounds.ELECTRIC_HIT, SoundCategory.AMBIENT, 0.8f, 1f); if (!player.isCreative()) { player.damage(world.getDamageSources().lightningBolt(), NewSoviet.RANDOM.nextBetween(1, 4)); diff --git a/src/main/java/su/a71/new_soviet/blocks/lamps/lamp_post/LampPostBaseBlock.java b/src/main/java/su/a71/new_soviet/blocks/lamps/lamp_post/LampPostBaseBlock.java new file mode 100644 index 0000000..61a03e7 --- /dev/null +++ b/src/main/java/su/a71/new_soviet/blocks/lamps/lamp_post/LampPostBaseBlock.java @@ -0,0 +1,72 @@ +package su.a71.new_soviet.blocks.lamps.lamp_post; + +import net.minecraft.block.Block; +import net.minecraft.block.BlockState; +import net.minecraft.block.Blocks; +import net.minecraft.block.ShapeContext; +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.Properties; +import net.minecraft.util.math.BlockPos; +import net.minecraft.util.math.Direction; +import net.minecraft.util.shape.VoxelShape; +import net.minecraft.util.shape.VoxelShapes; +import net.minecraft.world.BlockView; +import net.minecraft.world.WorldAccess; + +public class LampPostBaseBlock extends Block { +// public BooleanProperty is_extension = Properties.ATTACHED; + protected static final VoxelShape SHAPE_BASE; + protected static final VoxelShape SHAPE_ATTACHED; + + public LampPostBaseBlock(Settings settings) { + super(settings); + this.setDefaultState(this.stateManager.getDefaultState().with(Properties.ATTACHED, false)); + } + + @Override + protected void appendProperties(StateManager.Builder builder) { + builder.add(Properties.ATTACHED); + } + + @Override + public VoxelShape getOutlineShape(BlockState state, BlockView world, BlockPos pos, ShapeContext ctx) { + if (state.get(Properties.ATTACHED)) { + return SHAPE_ATTACHED; + }; + return SHAPE_BASE; +// Direction dir = state.get(FACING); +// return switch (dir) { +// case NORTH -> SHAPE.north(); +// case SOUTH -> SHAPE.south(); +// case EAST -> SHAPE.east(); +// case WEST -> SHAPE.west(); +// default -> VoxelShapes.fullCube(); +// }; + } + + public BlockState getStateForNeighborUpdate(BlockState state, Direction direction, BlockState neighborState, WorldAccess world, BlockPos pos, BlockPos neighborPos) { + return !state.canPlaceAt(world, pos) ? Blocks.AIR.getDefaultState() : super.getStateForNeighborUpdate(state.with(Properties.ATTACHED, world.getBlockState(pos.down()).getBlock() instanceof LampPostBaseBlock), direction, neighborState, world, pos, neighborPos); + } + + @Override + public BlockState getPlacementState(ItemPlacementContext ctx) { + return super.getPlacementState(ctx).with(Properties.ATTACHED, ctx.getWorld().getBlockState(ctx.getBlockPos().down()).getBlock() instanceof LampPostBaseBlock); + } + + public static VoxelShape getBaseShape(){ + VoxelShape shape = VoxelShapes.empty(); + shape = VoxelShapes.union(shape, VoxelShapes.cuboid(0.4375, 0.3125, 0.4375, 0.5625, 1, 0.5625)); + shape = VoxelShapes.union(shape, VoxelShapes.cuboid(0.375, 0, 0.375, 0.625, 0.3125, 0.625)); + shape = VoxelShapes.union(shape, VoxelShapes.cuboid(0.40625, 0.5625, 0.40625, 0.59375, 0.6875, 0.59375)); + shape.simplify(); + return shape; + } + + static { + SHAPE_ATTACHED = VoxelShapes.cuboid(0.4375, 0, 0.4375, 0.5625, 1, 0.5625); + SHAPE_BASE = getBaseShape(); + } +} diff --git a/src/main/java/su/a71/new_soviet/registration/NSE_Custom.java b/src/main/java/su/a71/new_soviet/registration/NSE_Custom.java index 0297d87..6266f8a 100644 --- a/src/main/java/su/a71/new_soviet/registration/NSE_Custom.java +++ b/src/main/java/su/a71/new_soviet/registration/NSE_Custom.java @@ -19,9 +19,11 @@ import net.minecraft.util.Identifier; import net.minecraft.util.shape.VoxelShapes; import su.a71.new_soviet.NewSoviet; import su.a71.new_soviet.blocks.*; +import su.a71.new_soviet.blocks.lamps.GoldenTableLampBlock; import su.a71.new_soviet.blocks.lamps.LightBulbLampBlock; import su.a71.new_soviet.blocks.lamps.TableLampBlock; import su.a71.new_soviet.blocks.lamps.VintageLampBlock; +import su.a71.new_soviet.blocks.lamps.lamp_post.LampPostBaseBlock; import su.a71.new_soviet.entity.TVBlockEntity; public class NSE_Custom extends NSE_BaseRegistration { @@ -34,9 +36,12 @@ public class NSE_Custom extends NSE_BaseRegistration { public static final SwitchBlock SWITCH = new SwitchBlock(FabricBlockSettings.create().sounds(BlockSoundGroup.METAL).notSolid().pistonBehavior(PistonBehavior.DESTROY).strength(1f, 2f).mapColor(MapColor.TERRACOTTA_WHITE)); public static final TableLampBlock TABLE_LAMP = new TableLampBlock(FabricBlockSettings.create().sounds(BlockSoundGroup.WOOD).strength(0.9f, 1.5f).mapColor(MapColor.WHITE)); - public static final TableLampBlock VINTAGE_LAMP = new VintageLampBlock(FabricBlockSettings.create().sounds(BlockSoundGroup.METAL).strength(0.9f, 1.5f).mapColor(MapColor.WHITE)); + public static final GoldenTableLampBlock GOLDEN_LAMP = new GoldenTableLampBlock(FabricBlockSettings.create().sounds(BlockSoundGroup.METAL).strength(0.9f, 1.5f).mapColor(MapColor.GOLD)); + public static final TableLampBlock VINTAGE_LAMP = new VintageLampBlock(FabricBlockSettings.create().sounds(BlockSoundGroup.METAL).strength(0.9f, 1.5f).mapColor(MapColor.TERRACOTTA_BROWN)); public static final LightBulbLampBlock LIGHT_BULB_LAMP = new LightBulbLampBlock(FabricBlockSettings.create().sounds(BlockSoundGroup.GLASS).strength(0.9f, 1.5f).mapColor(MapColor.WHITE).requiresTool()); + public static final LampPostBaseBlock LAMP_POST_BASE = new LampPostBaseBlock(FabricBlockSettings.create().sounds(BlockSoundGroup.METAL).strength(1f, 1.5f).mapColor(MapColor.IRON_GRAY)); + public static final CeilingFanBlock CEILING_FAN = new CeilingFanBlock(FabricBlockSettings.create().sounds(BlockSoundGroup.METAL).strength(1f, 1.5f).mapColor(MapColor.WHITE)); public static final SirenBlock SIREN = new SirenBlock(); @@ -72,8 +77,10 @@ public class NSE_Custom extends NSE_BaseRegistration { registerBlock("brown_tv", () -> BROWN_TV, NSE_CUSTOM_TAB); registerBlock("radio_receiver", () -> RADIO_RECEIVER, NSE_CUSTOM_TAB); registerBlock("table_lamp", () -> TABLE_LAMP, NSE_CUSTOM_TAB); + registerBlock("golden_table_lamp", () -> GOLDEN_LAMP, NSE_CUSTOM_TAB); registerBlock("vintage_lamp", () -> VINTAGE_LAMP, NSE_CUSTOM_TAB); registerBlock("light_bulb_lamp", () -> LIGHT_BULB_LAMP, NSE_CUSTOM_TAB); + registerBlock("lamp_post_base", () -> LAMP_POST_BASE, NSE_CUSTOM_TAB); registerBlock("ceiling_fan", () -> CEILING_FAN, NSE_CUSTOM_TAB); registerBlock("siren", () -> SIREN, NSE_CUSTOM_TAB); registerBlock("landmine", () -> LANDMINE, NSE_CUSTOM_TAB); diff --git a/src/main/resources/assets/new_soviet/blockstates/golden_table_lamp.json b/src/main/resources/assets/new_soviet/blockstates/golden_table_lamp.json new file mode 100644 index 0000000..7c0965b --- /dev/null +++ b/src/main/resources/assets/new_soviet/blockstates/golden_table_lamp.json @@ -0,0 +1,8 @@ +{ + "variants": { + "facing=north": { "model": "new_soviet:block/golden_table_lamp", "uvlock": true }, + "facing=east": { "model": "new_soviet:block/golden_table_lamp", "y": 90, "uvlock": false }, + "facing=south": { "model": "new_soviet:block/golden_table_lamp", "y": 180, "uvlock": false }, + "facing=west": { "model": "new_soviet:block/golden_table_lamp", "y": 270, "uvlock": false } + } +} \ No newline at end of file diff --git a/src/main/resources/assets/new_soviet/blockstates/lamp_post_base.json b/src/main/resources/assets/new_soviet/blockstates/lamp_post_base.json new file mode 100644 index 0000000..6b5d615 --- /dev/null +++ b/src/main/resources/assets/new_soviet/blockstates/lamp_post_base.json @@ -0,0 +1,10 @@ +{ + "variants": { + "attached=false": { + "model": "new_soviet:block/lamp_post_base" + }, + "attached=true": { + "model": "new_soviet:block/lamp_post_base_attached" + } + } +} \ No newline at end of file diff --git a/src/main/resources/assets/new_soviet/lang/en_us.json b/src/main/resources/assets/new_soviet/lang/en_us.json index b7eb4aa..e6a6b3d 100644 --- a/src/main/resources/assets/new_soviet/lang/en_us.json +++ b/src/main/resources/assets/new_soviet/lang/en_us.json @@ -433,5 +433,7 @@ "block.new_soviet.metal_plating_slab": "Metal Plating Slab", "block.new_soviet.metal_plating_stairs": "Metal Plating Stairs", "subtitles.new_soviet.electric_hit": "Electric shock", - "block.new_soviet.vintage_lamp": "Vintage Lamp" + "block.new_soviet.vintage_lamp": "Vintage Lamp", + "block.new_soviet.golden_table_lamp": "Golden Lamp", + "block.new_soviet.lamp_post_base": "Lamp Post Base" } \ No newline at end of file diff --git a/src/main/resources/assets/new_soviet/models/block/golden_table_lamp.json b/src/main/resources/assets/new_soviet/models/block/golden_table_lamp.json new file mode 100644 index 0000000..2567518 --- /dev/null +++ b/src/main/resources/assets/new_soviet/models/block/golden_table_lamp.json @@ -0,0 +1,270 @@ +{ + "credit": "Made with Blockbench", + "texture_size": [32, 32], + "textures": { + "0": "new_soviet:block/custom/furniture/golden_table_lamp", + "particle": "new_soviet:block/custom/furniture/golden_table_lamp" + }, + "elements": [ + { + "from": [5, 0, 5], + "to": [11, 2, 11], + "rotation": {"angle": 0, "axis": "y", "origin": [8, 0, 8]}, + "faces": { + "north": {"uv": [3, 5, 6, 6], "texture": "#0"}, + "east": {"uv": [0, 5, 3, 6], "texture": "#0"}, + "south": {"uv": [9, 5, 12, 6], "texture": "#0"}, + "west": {"uv": [6, 5, 9, 6], "texture": "#0"}, + "up": {"uv": [6, 5, 3, 2], "texture": "#0"}, + "down": {"uv": [9, 2, 6, 5], "texture": "#0"} + } + }, + { + "from": [7, 2, 7], + "to": [9, 4, 9], + "rotation": {"angle": 0, "axis": "y", "origin": [8, 0, 8]}, + "faces": { + "north": {"uv": [10, 12, 11, 13], "texture": "#0"}, + "east": {"uv": [9, 12, 10, 13], "texture": "#0"}, + "south": {"uv": [12, 12, 13, 13], "texture": "#0"}, + "west": {"uv": [11, 12, 12, 13], "texture": "#0"}, + "up": {"uv": [11, 12, 10, 11], "texture": "#0"}, + "down": {"uv": [12, 11, 11, 12], "texture": "#0"} + } + }, + { + "from": [6, 4, 6], + "to": [10, 5, 10], + "rotation": {"angle": 0, "axis": "y", "origin": [8, 0, 8]}, + "faces": { + "north": {"uv": [10, 8.5, 12, 9], "texture": "#0"}, + "east": {"uv": [8, 8.5, 10, 9], "texture": "#0"}, + "south": {"uv": [14, 8.5, 16, 9], "texture": "#0"}, + "west": {"uv": [12, 8.5, 14, 9], "texture": "#0"}, + "up": {"uv": [12, 8.5, 10, 6.5], "texture": "#0"}, + "down": {"uv": [14, 6.5, 12, 8.5], "texture": "#0"} + } + }, + { + "from": [8, 5, 7], + "to": [8, 11, 11], + "rotation": {"angle": 0, "axis": "y", "origin": [8, 0, 8]}, + "faces": { + "north": {"uv": [8, 9, 8, 12], "texture": "#0"}, + "east": {"uv": [6, 9, 8, 12], "texture": "#0"}, + "south": {"uv": [10, 9, 10, 12], "texture": "#0"}, + "west": {"uv": [8, 9, 10, 12], "texture": "#0"}, + "up": {"uv": [8, 9, 8, 7], "texture": "#0"}, + "down": {"uv": [8, 7, 8, 9], "texture": "#0"} + } + }, + { + "from": [2, 10, 8], + "to": [14, 11, 8], + "rotation": {"angle": 0, "axis": "y", "origin": [8, 0, 8]}, + "faces": { + "north": {"uv": [0, 6, 6, 6.5], "texture": "#0"}, + "east": {"uv": [0, 6, 0, 6.5], "texture": "#0"}, + "south": {"uv": [6, 6, 12, 6.5], "texture": "#0"}, + "west": {"uv": [6, 6, 6, 6.5], "texture": "#0"}, + "up": {"uv": [6, 6, 0, 6], "texture": "#0"}, + "down": {"uv": [12, 6, 6, 6], "texture": "#0"} + } + }, + { + "from": [14, 10, 5], + "to": [14, 11, 8], + "rotation": {"angle": 0, "axis": "y", "origin": [8, 0, 8]}, + "faces": { + "north": {"uv": [1.5, 4.5, 1.5, 5], "texture": "#0"}, + "east": {"uv": [0, 4.5, 1.5, 5], "texture": "#0"}, + "south": {"uv": [3, 4.5, 3, 5], "texture": "#0"}, + "west": {"uv": [1.5, 4.5, 3, 5], "texture": "#0"}, + "up": {"uv": [1.5, 4.5, 1.5, 3], "texture": "#0"}, + "down": {"uv": [1.5, 3, 1.5, 4.5], "texture": "#0"} + } + }, + { + "from": [2, 10, 5], + "to": [2, 11, 8], + "rotation": {"angle": 0, "axis": "y", "origin": [8, 0, 8]}, + "faces": { + "north": {"uv": [1.5, 4.5, 1.5, 5], "texture": "#0"}, + "east": {"uv": [3, 4.5, 1.5, 5], "texture": "#0"}, + "south": {"uv": [3, 4.5, 3, 5], "texture": "#0"}, + "west": {"uv": [1.5, 4.5, 0, 5], "texture": "#0"}, + "up": {"uv": [1.5, 4.5, 1.5, 3], "texture": "#0"}, + "down": {"uv": [1.5, 3, 1.5, 4.5], "texture": "#0"} + } + }, + { + "from": [13, 10, 5], + "to": [14, 11, 5], + "rotation": {"angle": 0, "axis": "y", "origin": [8, 0, 8]}, + "faces": { + "north": {"uv": [1, 0, 1.5, 0.5], "texture": "#0"}, + "east": {"uv": [1, 0, 1, 0.5], "texture": "#0"}, + "south": {"uv": [1.5, 0, 2, 0.5], "texture": "#0"}, + "west": {"uv": [1.5, 0, 1.5, 0.5], "texture": "#0"}, + "up": {"uv": [1.5, 0, 1, 0], "texture": "#0"}, + "down": {"uv": [2, 0, 1.5, 0], "texture": "#0"} + } + }, + { + "from": [2, 10, 5], + "to": [3, 11, 5], + "rotation": {"angle": 0, "axis": "y", "origin": [8, 0, 8]}, + "faces": { + "north": {"uv": [1.5, 0, 1, 0.5], "texture": "#0"}, + "east": {"uv": [1.5, 0, 1.5, 0.5], "texture": "#0"}, + "south": {"uv": [2, 0, 1.5, 0.5], "texture": "#0"}, + "west": {"uv": [1, 0, 1, 0.5], "texture": "#0"}, + "up": {"uv": [1, 0, 1.5, 0], "texture": "#0"}, + "down": {"uv": [1.5, 0, 2, 0], "texture": "#0"} + } + }, + { + "from": [13, 9, 3], + "to": [13, 13, 7], + "rotation": {"angle": 0, "axis": "y", "origin": [8, 0, 8]}, + "faces": { + "north": {"uv": [11, 2, 11, 4], "texture": "#0"}, + "east": {"uv": [9, 2, 11, 4], "texture": "#0"}, + "south": {"uv": [13, 2, 13, 4], "texture": "#0"}, + "west": {"uv": [11, 2, 13, 4], "texture": "#0"}, + "up": {"uv": [11, 2, 11, 0], "texture": "#0"}, + "down": {"uv": [11, 0, 11, 2], "texture": "#0"} + } + }, + { + "from": [3, 9, 3], + "to": [3, 13, 7], + "rotation": {"angle": 0, "axis": "y", "origin": [8, 0, 8]}, + "faces": { + "north": {"uv": [11, 2, 11, 4], "texture": "#0"}, + "east": {"uv": [9, 2, 11, 4], "texture": "#0"}, + "south": {"uv": [13, 2, 13, 4], "texture": "#0"}, + "west": {"uv": [11, 2, 13, 4], "texture": "#0"}, + "up": {"uv": [11, 2, 11, 0], "texture": "#0"}, + "down": {"uv": [11, 0, 11, 2], "texture": "#0"} + } + }, + { + "from": [3, 13, 3], + "to": [13, 13, 7], + "rotation": {"angle": 0, "axis": "y", "origin": [8, 0, 8]}, + "faces": { + "north": {"uv": [2, 2, 7, 2], "texture": "#0"}, + "east": {"uv": [0, 2, 2, 2], "texture": "#0"}, + "south": {"uv": [9, 2, 14, 2], "texture": "#0"}, + "west": {"uv": [7, 2, 9, 2], "texture": "#0"}, + "up": {"uv": [7, 2, 2, 0], "texture": "#0"}, + "down": {"uv": [12, 0, 7, 2], "texture": "#0"} + } + }, + { + "from": [3, 9, 7], + "to": [13, 13, 7], + "rotation": {"angle": 0, "axis": "y", "origin": [8, 0, 8]}, + "faces": { + "north": {"uv": [0, 6.5, 5, 8.5], "texture": "#0"}, + "east": {"uv": [0, 6.5, 0, 8.5], "texture": "#0"}, + "south": {"uv": [5, 6.5, 10, 8.5], "texture": "#0"}, + "west": {"uv": [5, 6.5, 5, 8.5], "texture": "#0"}, + "up": {"uv": [5, 6.5, 0, 6.5], "texture": "#0"}, + "down": {"uv": [10, 6.5, 5, 6.5], "texture": "#0"} + } + }, + { + "from": [3, 9, 3], + "to": [13, 13, 3], + "rotation": {"angle": 0, "axis": "y", "origin": [8, 0, 8]}, + "faces": { + "north": {"uv": [0, 6.5, 5, 8.5], "texture": "#0"}, + "east": {"uv": [0, 6.5, 0, 8.5], "texture": "#0"}, + "south": {"uv": [5, 6.5, 10, 8.5], "texture": "#0"}, + "west": {"uv": [5, 6.5, 5, 8.5], "texture": "#0"}, + "up": {"uv": [5, 6.5, 0, 6.5], "texture": "#0"}, + "down": {"uv": [10, 6.5, 5, 6.5], "texture": "#0"} + } + }, + { + "from": [4, 4, 3.2], + "to": [5, 13, 3.2], + "rotation": {"angle": 0, "axis": "y", "origin": [8, 0, 8]}, + "faces": { + "north": {"uv": [0, 0, 0.5, 4.5], "texture": "#0"}, + "east": {"uv": [0, 0, 0, 4.5], "texture": "#0"}, + "south": {"uv": [0.5, 0, 1, 4.5], "texture": "#0"}, + "west": {"uv": [0.5, 0, 0.5, 4.5], "texture": "#0"}, + "up": {"uv": [0.5, 0, 0, 0], "texture": "#0"}, + "down": {"uv": [1, 0, 0.5, 0], "texture": "#0"} + } + }, + { + "from": [9, 10, 4], + "to": [11, 12, 6], + "rotation": {"angle": 0, "axis": "y", "origin": [6, 0, 6]}, + "faces": { + "north": {"uv": [11, 10, 12, 11], "texture": "#0"}, + "east": {"uv": [10, 10, 11, 11], "texture": "#0"}, + "south": {"uv": [13, 10, 14, 11], "texture": "#0"}, + "west": {"uv": [12, 10, 13, 11], "texture": "#0"}, + "up": {"uv": [12, 10, 11, 9], "texture": "#0"}, + "down": {"uv": [13, 9, 12, 10], "texture": "#0"} + } + }, + { + "from": [6, 9.5, 3.5], + "to": [9, 12.5, 6.5], + "rotation": {"angle": 0, "axis": "y", "origin": [6, 0, 6]}, + "faces": { + "north": {"uv": [1.5, 10, 3, 11.5], "texture": "#0"}, + "east": {"uv": [0, 10, 1.5, 11.5], "texture": "#0"}, + "south": {"uv": [4.5, 10, 6, 11.5], "texture": "#0"}, + "west": {"uv": [3, 10, 4.5, 11.5], "texture": "#0"}, + "up": {"uv": [3, 10, 1.5, 8.5], "texture": "#0"}, + "down": {"uv": [4.5, 8.5, 3, 10], "texture": "#0"} + } + }, + { + "from": [11, 12, 4.5], + "to": [11, 13, 5.5], + "rotation": {"angle": 0, "axis": "y", "origin": [6, 0, 6]}, + "faces": { + "north": {"uv": [1.5, 0.5, 1.5, 1], "texture": "#0"}, + "east": {"uv": [1, 0.5, 1.5, 1], "texture": "#0"}, + "south": {"uv": [2, 0.5, 2, 1], "texture": "#0"}, + "west": {"uv": [1.5, 0.5, 2, 1], "texture": "#0"}, + "up": {"uv": [1.5, 0.5, 1.5, 0], "texture": "#0"}, + "down": {"uv": [1.5, 0, 1.5, 0.5], "texture": "#0"} + } + } + ], + "groups": [ + { + "name": "group", + "origin": [8, 0, 8], + "color": 0, + "nbt": "{}", + "children": [ + 0, + 1, + 2, + 3, + 4, + 5, + 6, + 7, + 8, + { + "name": "group", + "origin": [8, 8, 8], + "color": 0, + "nbt": "{}", + "children": [9, 10, 11, 12, 13, 14, 15, 16, 17] + } + ] + } + ] +} \ No newline at end of file diff --git a/src/main/resources/assets/new_soviet/models/block/lamp_post_base.json b/src/main/resources/assets/new_soviet/models/block/lamp_post_base.json new file mode 100644 index 0000000..20d9aca --- /dev/null +++ b/src/main/resources/assets/new_soviet/models/block/lamp_post_base.json @@ -0,0 +1,80 @@ +{ + "credit": "Made with Blockbench", + "texture_size": [48, 48], + "textures": { + "0": "new_soviet:block/custom/lamp_post", + "particle": "new_soviet:block/custom/lamp_post" + }, + "elements": [ + { + "from": [7, 5, 7], + "to": [9, 16, 9], + "faces": { + "north": {"uv": [0.66667, 10.01066, 1.33334, 13.67733], "texture": "#0"}, + "east": {"uv": [0, 10.01066, 0.66667, 13.67733], "texture": "#0"}, + "south": {"uv": [2, 10.01066, 2.66667, 13.67733], "texture": "#0"}, + "west": {"uv": [1.33333, 10.01066, 2, 13.67733], "texture": "#0"}, + "up": {"uv": [1.32267, 0.656, 0.67733, 0.01067], "texture": "#0"} + } + }, + { + "from": [6, 0, 6], + "to": [10, 5, 10], + "faces": { + "north": {"uv": [9.344, 7.01067, 10.656, 8.656], "texture": "#0"}, + "east": {"uv": [8.01067, 7.01067, 9.32267, 8.656], "texture": "#0"}, + "south": {"uv": [12.01067, 7.01067, 13.32267, 8.656], "texture": "#0"}, + "west": {"uv": [10.67733, 7.01067, 11.98933, 8.656], "texture": "#0"}, + "up": {"uv": [10.656, 6.98933, 9.344, 5.67733], "texture": "#0"}, + "down": {"uv": [11.98933, 5.67733, 10.67733, 6.98933], "texture": "#0"} + } + }, + { + "from": [6.5, 9, 6.5], + "to": [9.5, 11, 9.5], + "faces": { + "north": {"uv": [3.67733, 11.67733, 4.656, 12.32267], "texture": "#0"}, + "east": {"uv": [2.67733, 11.67733, 3.656, 12.32267], "texture": "#0"}, + "south": {"uv": [5.67733, 11.67733, 6.656, 12.32267], "texture": "#0"}, + "west": {"uv": [4.67733, 11.67733, 5.656, 12.32267], "texture": "#0"}, + "up": {"uv": [4.656, 11.656, 3.67733, 10.67733], "texture": "#0"}, + "down": {"uv": [5.656, 10.67733, 4.67733, 11.656], "texture": "#0"} + } + } + ], + "display": { + "thirdperson_righthand": { + "rotation": [75, 45, 0], + "translation": [0, -0.5, 0], + "scale": [0.375, 0.375, 0.375] + }, + "thirdperson_lefthand": { + "rotation": [75, 45, 0], + "translation": [0, -0.5, 0], + "scale": [0.375, 0.375, 0.375] + }, + "firstperson_righthand": { + "rotation": [0, 45, 0], + "translation": [1.75, 2, 0], + "scale": [0.4, 0.4, 0.4] + }, + "firstperson_lefthand": { + "rotation": [0, 45, 0], + "translation": [1.75, 2, 0], + "scale": [0.4, 0.4, 0.4] + }, + "ground": { + "translation": [0, -1, 0], + "scale": [0.25, 0.25, 0.25] + }, + "gui": { + "rotation": [30, 225, 0], + "scale": [0.625, 0.625, 0.625] + }, + "fixed": { + "rotation": [-90, 0, 0], + "translation": [0, 0, -16], + "scale": [2, 2, 2] + } + } +} \ No newline at end of file diff --git a/src/main/resources/assets/new_soviet/models/block/lamp_post_base_attached.json b/src/main/resources/assets/new_soviet/models/block/lamp_post_base_attached.json new file mode 100644 index 0000000..8ef3bed --- /dev/null +++ b/src/main/resources/assets/new_soviet/models/block/lamp_post_base_attached.json @@ -0,0 +1,57 @@ +{ + "credit": "Made with Blockbench", + "texture_size": [48, 48], + "textures": { + "0": "new_soviet:block/custom/lamp_post", + "particle": "new_soviet:block/custom/lamp_post" + }, + "elements": [ + { + "from": [7, 0, 7], + "to": [9, 16, 9], + "faces": { + "north": {"uv": [0.66667, 4.67733, 1.33334, 10.01066], "texture": "#0"}, + "east": {"uv": [0, 4.67733, 0.66667, 10.01066], "texture": "#0"}, + "south": {"uv": [2, 4.67733, 2.66667, 10.01066], "texture": "#0"}, + "west": {"uv": [1.33333, 4.67733, 2, 10.01066], "texture": "#0"}, + "up": {"uv": [1.32267, 0.656, 0.67733, 0.01067], "texture": "#0"}, + "down": {"uv": [1.98933, 0.01067, 1.344, 0.656], "texture": "#0"} + } + } + ], + "display": { + "thirdperson_righthand": { + "rotation": [75, 45, 0], + "translation": [0, -0.5, 0], + "scale": [0.375, 0.375, 0.375] + }, + "thirdperson_lefthand": { + "rotation": [75, 45, 0], + "translation": [0, -0.5, 0], + "scale": [0.375, 0.375, 0.375] + }, + "firstperson_righthand": { + "rotation": [0, 45, 0], + "translation": [1.75, 2, 0], + "scale": [0.4, 0.4, 0.4] + }, + "firstperson_lefthand": { + "rotation": [0, 45, 0], + "translation": [1.75, 2, 0], + "scale": [0.4, 0.4, 0.4] + }, + "ground": { + "translation": [0, -1, 0], + "scale": [0.25, 0.25, 0.25] + }, + "gui": { + "rotation": [30, 225, 0], + "scale": [0.625, 0.625, 0.625] + }, + "fixed": { + "rotation": [-90, 0, 0], + "translation": [0, 0, -16], + "scale": [2, 2, 2] + } + } +} \ No newline at end of file diff --git a/src/main/resources/assets/new_soviet/models/item/golden_table_lamp.json b/src/main/resources/assets/new_soviet/models/item/golden_table_lamp.json new file mode 100644 index 0000000..64e5d80 --- /dev/null +++ b/src/main/resources/assets/new_soviet/models/item/golden_table_lamp.json @@ -0,0 +1,3 @@ +{ + "parent": "new_soviet:block/golden_table_lamp" +} \ No newline at end of file diff --git a/src/main/resources/assets/new_soviet/models/item/lamp_post_base.json b/src/main/resources/assets/new_soviet/models/item/lamp_post_base.json new file mode 100644 index 0000000..c117c19 --- /dev/null +++ b/src/main/resources/assets/new_soviet/models/item/lamp_post_base.json @@ -0,0 +1,3 @@ +{ + "parent": "new_soviet:block/lamp_post_base" +} \ No newline at end of file diff --git a/src/main/resources/assets/new_soviet/textures/block/custom/furniture/golden_table_lamp.png b/src/main/resources/assets/new_soviet/textures/block/custom/furniture/golden_table_lamp.png new file mode 100644 index 0000000..62cc33b Binary files /dev/null and b/src/main/resources/assets/new_soviet/textures/block/custom/furniture/golden_table_lamp.png differ diff --git a/src/main/resources/assets/new_soviet/textures/block/custom/lamp_post.png b/src/main/resources/assets/new_soviet/textures/block/custom/lamp_post.png new file mode 100644 index 0000000..1917146 Binary files /dev/null and b/src/main/resources/assets/new_soviet/textures/block/custom/lamp_post.png differ diff --git a/src/main/resources/assets/new_soviet/textures/block/custom/lamp_post_v2.png b/src/main/resources/assets/new_soviet/textures/block/custom/lamp_post_v2.png new file mode 100644 index 0000000..1dac602 Binary files /dev/null and b/src/main/resources/assets/new_soviet/textures/block/custom/lamp_post_v2.png differ diff --git a/src/main/resources/assets/new_soviet/textures/block/custom/lamp_post_v3.png b/src/main/resources/assets/new_soviet/textures/block/custom/lamp_post_v3.png new file mode 100644 index 0000000..760f9cc Binary files /dev/null and b/src/main/resources/assets/new_soviet/textures/block/custom/lamp_post_v3.png differ diff --git a/src/main/resources/assets/new_soviet/textures/block/custom/lamp_post_v4.png b/src/main/resources/assets/new_soviet/textures/block/custom/lamp_post_v4.png new file mode 100644 index 0000000..2c1bfa9 Binary files /dev/null and b/src/main/resources/assets/new_soviet/textures/block/custom/lamp_post_v4.png differ