From 48198dbcb3f5c9451677df32344dbd38c56a2463 Mon Sep 17 00:00:00 2001 From: drcrazy Date: Thu, 2 May 2019 11:31:07 +0300 Subject: [PATCH] Models for lamps --- .../java/techreborn/blocks/BlockAlarm.java | 15 +-- .../techreborn/blocks/lighting/BlockLamp.java | 31 ++++-- src/main/java/techreborn/init/TRContent.java | 4 +- .../blockstates/lamp_incandescent.json | 16 +++ .../techreborn/blockstates/lamp_led.json | 16 +++ .../machines/lighting/lamp_incandescent.json | 38 ------- .../machines/lighting/lamp_led.json | 38 ------- .../lighting}/lamp_incandescent.json | 100 +++++++++--------- .../lighting/lamp_incandescent_on.json | 51 +++++++++ .../{ => machines/lighting}/lamp_led.json | 74 ++++++------- .../block/machines/lighting/lamp_led_on.json | 38 +++++++ .../models/item/lamp_incandescent.json | 3 + .../techreborn/models/item/lamp_led.json | 3 + 13 files changed, 244 insertions(+), 183 deletions(-) create mode 100644 src/main/resources/assets/techreborn/blockstates/lamp_incandescent.json create mode 100644 src/main/resources/assets/techreborn/blockstates/lamp_led.json delete mode 100644 src/main/resources/assets/techreborn/blockstates/machines/lighting/lamp_incandescent.json delete mode 100644 src/main/resources/assets/techreborn/blockstates/machines/lighting/lamp_led.json rename src/main/resources/assets/techreborn/models/block/{ => machines/lighting}/lamp_incandescent.json (93%) create mode 100644 src/main/resources/assets/techreborn/models/block/machines/lighting/lamp_incandescent_on.json rename src/main/resources/assets/techreborn/models/block/{ => machines/lighting}/lamp_led.json (92%) create mode 100644 src/main/resources/assets/techreborn/models/block/machines/lighting/lamp_led_on.json create mode 100644 src/main/resources/assets/techreborn/models/item/lamp_incandescent.json create mode 100644 src/main/resources/assets/techreborn/models/item/lamp_led.json diff --git a/src/main/java/techreborn/blocks/BlockAlarm.java b/src/main/java/techreborn/blocks/BlockAlarm.java index 41cf41491..dd508f244 100644 --- a/src/main/java/techreborn/blocks/BlockAlarm.java +++ b/src/main/java/techreborn/blocks/BlockAlarm.java @@ -79,7 +79,7 @@ public class BlockAlarm extends BaseTileBlock { Block.makeCuboidShape(culling, culling, 16.0 - depth, 16.0 - culling, 16.0 - culling, 16.0D), Block.makeCuboidShape(culling, culling, 0.0D, 16.0 - culling, 16.0 - culling, depth), Block.makeCuboidShape(16.0 - depth, culling, culling, 16.0D, 16.0 - culling, 16.0 - culling), - Block.makeCuboidShape(0.0D, culling, culling, depth, 16.0 - culling, 16.0 - culling), + Block.makeCuboidShape(0.0D, culling, culling, depth, 16.0 - culling, 16.0 - culling) }; return shapes; } @@ -102,6 +102,13 @@ public class BlockAlarm extends BaseTileBlock { world.setBlockState(pos, state, 3); } + // BaseTileBlock + @Nullable + @Override + public TileEntity createNewTileEntity(IBlockReader worldIn) { + return new TileAlarm(); + } + // Block @Override protected void fillStateContainer(StateContainer.Builder builder) { @@ -147,12 +154,6 @@ public class BlockAlarm extends BaseTileBlock { return super.onBlockActivated(state, worldIn, pos, playerIn, hand, side, hitX, hitY, hitZ); } - @Nullable - @Override - public TileEntity createNewTileEntity(IBlockReader worldIn) { - return new TileAlarm(); - } - @Override public EnumBlockRenderType getRenderType(IBlockState state) { return EnumBlockRenderType.MODEL; diff --git a/src/main/java/techreborn/blocks/lighting/BlockLamp.java b/src/main/java/techreborn/blocks/lighting/BlockLamp.java index b58607983..678b66395 100644 --- a/src/main/java/techreborn/blocks/lighting/BlockLamp.java +++ b/src/main/java/techreborn/blocks/lighting/BlockLamp.java @@ -24,12 +24,14 @@ package techreborn.blocks.lighting; +import javax.annotation.Nullable; + import net.minecraft.block.Block; import net.minecraft.block.material.Material; import net.minecraft.block.state.BlockFaceShape; import net.minecraft.block.state.IBlockState; -import net.minecraft.entity.EntityLivingBase; import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.item.BlockItemUseContext; import net.minecraft.item.ItemStack; import net.minecraft.state.BooleanProperty; import net.minecraft.state.DirectionProperty; @@ -72,13 +74,14 @@ public class BlockLamp extends BaseTileBlock { } private VoxelShape[] GenCuboidShapes(double depth, double width) { + double culling = (16.0D - width) / 2 ; VoxelShape[] shapes = { - Block.makeCuboidShape(width, 1.0 - depth, width, 1.0 - width, 1.0D, 1.0 - width), - Block.makeCuboidShape(width, 0.0D, width, 1.0 - width, depth, 1.0 - width), - Block.makeCuboidShape(width, width, 1.0 - depth, 1.0 - width, 1.0 - width, 1.0D), - Block.makeCuboidShape(width, width, 0.0D, 1.0 - width, 1.0 - width, depth), - Block.makeCuboidShape(1.0 - depth, width, width, 1.0D, 1.0 - width, 1.0 - width), - Block.makeCuboidShape(0.0D, width, width, depth, 1.0 - width, 1.0 - width), + Block.makeCuboidShape(culling, 16.0 - depth, culling, 16.0 - culling, 16.0D, 16.0 - culling), + Block.makeCuboidShape(culling, 0.0D, culling, 16.0D - culling, depth, 16.0 - culling), + Block.makeCuboidShape(culling, culling, 16.0 - depth, 16.0 - culling, 16.0 - culling, 16.0D), + Block.makeCuboidShape(culling, culling, 0.0D, 16.0 - culling, 16.0 - culling, depth), + Block.makeCuboidShape(16.0 - depth, culling, culling, 16.0D, 16.0 - culling, 16.0 - culling), + Block.makeCuboidShape(0.0D, culling, culling, depth, 16.0 - culling, 16.0 - culling) }; return shapes; } @@ -117,11 +120,17 @@ public class BlockLamp extends BaseTileBlock { ACTIVE = BooleanProperty.create("active"); builder.add(FACING, ACTIVE); } - + + @Nullable @Override - public void onBlockPlacedBy(World worldIn, BlockPos pos, IBlockState state, EntityLivingBase placer, ItemStack stack) { - super.onBlockPlacedBy(worldIn, pos, state, placer, stack); - setFacing(placer.getHorizontalFacing().getOpposite(), worldIn, pos); + public IBlockState getStateForPlacement(BlockItemUseContext context) { + for (EnumFacing enumfacing : context.getNearestLookingDirections()) { + IBlockState iblockstate = this.getDefaultState().with(FACING, enumfacing.getOpposite()); + if (iblockstate.isValidPosition(context.getWorld(), context.getPos())) { + return iblockstate; + } + } + return null; } @Override diff --git a/src/main/java/techreborn/init/TRContent.java b/src/main/java/techreborn/init/TRContent.java index 99048eb04..03435cc09 100644 --- a/src/main/java/techreborn/init/TRContent.java +++ b/src/main/java/techreborn/init/TRContent.java @@ -388,8 +388,8 @@ public class TRContent { ALARM(new BlockAlarm()), CHUNK_LOADER(new BlockChunkLoader()), - LAMP_INCANDESCENT(new BlockLamp(14, 4, 0.625, 0.25)), - LAMP_LED(new BlockLamp(15, 1, 0.0625, 0.125)), + LAMP_INCANDESCENT(new BlockLamp(14, 4, 10, 8)), + LAMP_LED(new BlockLamp(15, 1, 1, 12)), PLAYER_DETECTOR(new BlockPlayerDetector()); public final String name; diff --git a/src/main/resources/assets/techreborn/blockstates/lamp_incandescent.json b/src/main/resources/assets/techreborn/blockstates/lamp_incandescent.json new file mode 100644 index 000000000..80b554f0f --- /dev/null +++ b/src/main/resources/assets/techreborn/blockstates/lamp_incandescent.json @@ -0,0 +1,16 @@ +{ + "variants": { + "facing=north,active=false": { "model": "techreborn:block/machines/lighting/lamp_incandescent", "x": 90 }, + "facing=south,active=false": { "model": "techreborn:block/machines/lighting/lamp_incandescent", "x": 270 }, + "facing=west,active=false": { "model": "techreborn:block/machines/lighting/lamp_incandescent", "x": 90, "y": 270 }, + "facing=east,active=false": { "model": "techreborn:block/machines/lighting/lamp_incandescent", "x": 90, "y": 90 }, + "facing=down,active=false": { "model": "techreborn:block/machines/lighting/lamp_incandescent", "x": 180 }, + "facing=up,active=false": { "model": "techreborn:block/machines/lighting/lamp_incandescent" }, + "facing=north,active=true": { "model": "techreborn:block/machines/lighting/lamp_incandescent_on", "x": 90 }, + "facing=south,active=true": { "model": "techreborn:block/machines/lighting/lamp_incandescent_on", "x": 270 }, + "facing=west,active=true": { "model": "techreborn:block/machines/lighting/lamp_incandescent_on", "x": 90, "y": 270 }, + "facing=east,active=true": { "model": "techreborn:block/machines/lighting/lamp_incandescent_on", "x": 90, "y": 90 }, + "facing=down,active=true": { "model": "techreborn:block/machines/lighting/lamp_incandescent_on", "x": 180 }, + "facing=up,active=true": { "model": "techreborn:block/machines/lighting/lamp_incandescent_on"} + } +} diff --git a/src/main/resources/assets/techreborn/blockstates/lamp_led.json b/src/main/resources/assets/techreborn/blockstates/lamp_led.json new file mode 100644 index 000000000..a151388b1 --- /dev/null +++ b/src/main/resources/assets/techreborn/blockstates/lamp_led.json @@ -0,0 +1,16 @@ +{ + "variants": { + "facing=north,active=false": { "model": "techreborn:block/machines/lighting/lamp_led", "x": 90 }, + "facing=south,active=false": { "model": "techreborn:block/machines/lighting/lamp_led", "x": 270 }, + "facing=west,active=false": { "model": "techreborn:block/machines/lighting/lamp_led", "x": 90, "y": 270 }, + "facing=east,active=false": { "model": "techreborn:block/machines/lighting/lamp_led", "x": 90, "y": 90 }, + "facing=down,active=false": { "model": "techreborn:block/machines/lighting/lamp_led", "x": 180 }, + "facing=up,active=false": { "model": "techreborn:block/machines/lighting/lamp_led" }, + "facing=north,active=true": { "model": "techreborn:block/machines/lighting/lamp_led_on", "x": 90 }, + "facing=south,active=true": { "model": "techreborn:block/machines/lighting/lamp_led_on", "x": 270 }, + "facing=west,active=true": { "model": "techreborn:block/machines/lighting/lamp_led_on", "x": 90, "y": 270 }, + "facing=east,active=true": { "model": "techreborn:block/machines/lighting/lamp_led_on", "x": 90, "y": 90 }, + "facing=down,active=true": { "model": "techreborn:block/machines/lighting/lamp_led_on", "x": 180 }, + "facing=up,active=true": { "model": "techreborn:block/machines/lighting/lamp_led_on"} + } +} diff --git a/src/main/resources/assets/techreborn/blockstates/machines/lighting/lamp_incandescent.json b/src/main/resources/assets/techreborn/blockstates/machines/lighting/lamp_incandescent.json deleted file mode 100644 index 0e327cbc0..000000000 --- a/src/main/resources/assets/techreborn/blockstates/machines/lighting/lamp_incandescent.json +++ /dev/null @@ -1,38 +0,0 @@ -{ - "forge_marker": 1, - "defaults": { - "transform": "forge:default-block", - "model": "techreborn:lamp_incandescent", - "textures": { - "particle": "#lamp" - } - }, - "variants": { - "inventory": { - "model": "techreborn:lamp_incandescent", - "textures": { - "lamp": "techreborn:blocks/machines/lighting/lamp" - } - }, - "facing": { - "down": { "x": 180 }, - "up": { "transform": "forge:default-block" }, - "north": { "x": 90 }, - "south": { "x": 270 }, - "west": { "x": 90, "y": 270 }, - "east": { "x": 90, "y": 90 } - }, - "active": { - "true": { - "textures": { - "lamp": "techreborn:blocks/machines/lighting/lamp_lit" - } - }, - "false": { - "textures": { - "lamp": "techreborn:blocks/machines/lighting/lamp" - } - } - } - } -} \ No newline at end of file diff --git a/src/main/resources/assets/techreborn/blockstates/machines/lighting/lamp_led.json b/src/main/resources/assets/techreborn/blockstates/machines/lighting/lamp_led.json deleted file mode 100644 index 1fcba0392..000000000 --- a/src/main/resources/assets/techreborn/blockstates/machines/lighting/lamp_led.json +++ /dev/null @@ -1,38 +0,0 @@ -{ - "forge_marker": 1, - "defaults": { - "transform": "forge:default-block", - "model": "techreborn:lamp_led", - "textures": { - "particle": "#lamp" - } - }, - "variants": { - "inventory": { - "model": "techreborn:lamp_led", - "textures": { - "lamp": "techreborn:blocks/machines/lighting/lamp" - } - }, - "facing": { - "down": { "x": 180 }, - "up": { "transform": "forge:default-block" }, - "north": { "x": 90 }, - "south": { "x": 270 }, - "west": { "x": 90, "y": 270 }, - "east": { "x": 90, "y": 90 } - }, - "active": { - "true": { - "textures": { - "lamp": "techreborn:blocks/machines/lighting/lamp_lit" - } - }, - "false": { - "textures": { - "lamp": "techreborn:blocks/machines/lighting/lamp" - } - } - } - } -} \ No newline at end of file diff --git a/src/main/resources/assets/techreborn/models/block/lamp_incandescent.json b/src/main/resources/assets/techreborn/models/block/machines/lighting/lamp_incandescent.json similarity index 93% rename from src/main/resources/assets/techreborn/models/block/lamp_incandescent.json rename to src/main/resources/assets/techreborn/models/block/machines/lighting/lamp_incandescent.json index 633021fbf..d5d2d1cf6 100644 --- a/src/main/resources/assets/techreborn/models/block/lamp_incandescent.json +++ b/src/main/resources/assets/techreborn/models/block/machines/lighting/lamp_incandescent.json @@ -1,51 +1,51 @@ -{ - "parent": "block/block", - "display": { - "thirdperson_righthand": { - "rotation": [ 75, 45, 0 ], - "translation": [ 0, 2.5, 2], - "scale": [ 0.375, 0.375, 0.375 ] - }, - "firstperson_righthand": { - "rotation": [ 0, 35, 0 ], - "translation": [ 0, 4.3, 0 ], - "scale": [ 0.60, 0.60, 0.60 ] - }, - "firstperson_lefthand": { - "rotation": [ 0, 225, 0 ], - "translation": [ 0, 4.2, 0 ], - "scale": [ 0.40, 0.40, 0.40 ] - } - }, - "textures": { - "0": "#lamp" - }, - "elements": [ - { - "name": "Lamp", - "from": [ 5, 0, 5 ], - "to": [ 11, 2, 11 ], - "faces": { - "down": { "texture": "#0", "uv": [0.0, 0.0, 1.0, 1.0] }, - "up": { "texture": "#0", "uv": [0.0, 0.0, 1.0, 1.0] }, - "north": { "texture": "#0", "uv": [0.0, 0.0, 1.0, 1.0] }, - "south": { "texture": "#0", "uv": [0.0, 0.0, 1.0, 1.0] }, - "west": { "texture": "#0", "uv": [0.0, 0.0, 1.0, 1.0] }, - "east": { "texture": "#0", "uv": [0.0, 0.0, 1.0, 1.0] } - } - }, - { - "name": "Lamp", - "from": [ 4, 2, 4 ], - "to": [ 12, 10, 12 ], - "faces": { - "down": { "texture": "#0", "uv": [1.0,1.0,15.0,15.0] }, - "up": { "texture": "#0", "uv": [1.0,1.0,15.0,15.0] }, - "north": { "texture": "#0", "uv": [1.0,1.0,15.0,15.0] }, - "south": { "texture": "#0", "uv": [1.0,1.0,15.0,15.0] }, - "west": { "texture": "#0", "uv": [1.0,1.0,15.0,15.0] }, - "east": { "texture": "#0", "uv": [1.0,1.0,15.0,15.0] } - } - } - ] +{ + "parent": "block/block", + "display": { + "thirdperson_righthand": { + "rotation": [ 75, 45, 0 ], + "translation": [ 0, 2.5, 2], + "scale": [ 0.375, 0.375, 0.375 ] + }, + "firstperson_righthand": { + "rotation": [ 0, 35, 0 ], + "translation": [ 0, 4.3, 0 ], + "scale": [ 0.60, 0.60, 0.60 ] + }, + "firstperson_lefthand": { + "rotation": [ 0, 225, 0 ], + "translation": [ 0, 4.2, 0 ], + "scale": [ 0.40, 0.40, 0.40 ] + } + }, + "textures": { + "0": "techreborn:block/machines/lighting/lamp" + }, + "elements": [ + { + "name": "Lamp", + "from": [ 5, 0, 5 ], + "to": [ 11, 2, 11 ], + "faces": { + "down": { "texture": "#0", "uv": [0.0, 0.0, 1.0, 1.0] }, + "up": { "texture": "#0", "uv": [0.0, 0.0, 1.0, 1.0] }, + "north": { "texture": "#0", "uv": [0.0, 0.0, 1.0, 1.0] }, + "south": { "texture": "#0", "uv": [0.0, 0.0, 1.0, 1.0] }, + "west": { "texture": "#0", "uv": [0.0, 0.0, 1.0, 1.0] }, + "east": { "texture": "#0", "uv": [0.0, 0.0, 1.0, 1.0] } + } + }, + { + "name": "Lamp", + "from": [ 4, 2, 4 ], + "to": [ 12, 10, 12 ], + "faces": { + "down": { "texture": "#0", "uv": [1.0,1.0,15.0,15.0] }, + "up": { "texture": "#0", "uv": [1.0,1.0,15.0,15.0] }, + "north": { "texture": "#0", "uv": [1.0,1.0,15.0,15.0] }, + "south": { "texture": "#0", "uv": [1.0,1.0,15.0,15.0] }, + "west": { "texture": "#0", "uv": [1.0,1.0,15.0,15.0] }, + "east": { "texture": "#0", "uv": [1.0,1.0,15.0,15.0] } + } + } + ] } \ No newline at end of file diff --git a/src/main/resources/assets/techreborn/models/block/machines/lighting/lamp_incandescent_on.json b/src/main/resources/assets/techreborn/models/block/machines/lighting/lamp_incandescent_on.json new file mode 100644 index 000000000..c5178bc97 --- /dev/null +++ b/src/main/resources/assets/techreborn/models/block/machines/lighting/lamp_incandescent_on.json @@ -0,0 +1,51 @@ +{ + "parent": "block/block", + "display": { + "thirdperson_righthand": { + "rotation": [ 75, 45, 0 ], + "translation": [ 0, 2.5, 2], + "scale": [ 0.375, 0.375, 0.375 ] + }, + "firstperson_righthand": { + "rotation": [ 0, 35, 0 ], + "translation": [ 0, 4.3, 0 ], + "scale": [ 0.60, 0.60, 0.60 ] + }, + "firstperson_lefthand": { + "rotation": [ 0, 225, 0 ], + "translation": [ 0, 4.2, 0 ], + "scale": [ 0.40, 0.40, 0.40 ] + } + }, + "textures": { + "0": "techreborn:block/machines/lighting/lamp_lit" + }, + "elements": [ + { + "name": "Lamp", + "from": [ 5, 0, 5 ], + "to": [ 11, 2, 11 ], + "faces": { + "down": { "texture": "#0", "uv": [0.0, 0.0, 1.0, 1.0] }, + "up": { "texture": "#0", "uv": [0.0, 0.0, 1.0, 1.0] }, + "north": { "texture": "#0", "uv": [0.0, 0.0, 1.0, 1.0] }, + "south": { "texture": "#0", "uv": [0.0, 0.0, 1.0, 1.0] }, + "west": { "texture": "#0", "uv": [0.0, 0.0, 1.0, 1.0] }, + "east": { "texture": "#0", "uv": [0.0, 0.0, 1.0, 1.0] } + } + }, + { + "name": "Lamp", + "from": [ 4, 2, 4 ], + "to": [ 12, 10, 12 ], + "faces": { + "down": { "texture": "#0", "uv": [1.0,1.0,15.0,15.0] }, + "up": { "texture": "#0", "uv": [1.0,1.0,15.0,15.0] }, + "north": { "texture": "#0", "uv": [1.0,1.0,15.0,15.0] }, + "south": { "texture": "#0", "uv": [1.0,1.0,15.0,15.0] }, + "west": { "texture": "#0", "uv": [1.0,1.0,15.0,15.0] }, + "east": { "texture": "#0", "uv": [1.0,1.0,15.0,15.0] } + } + } + ] +} \ No newline at end of file diff --git a/src/main/resources/assets/techreborn/models/block/lamp_led.json b/src/main/resources/assets/techreborn/models/block/machines/lighting/lamp_led.json similarity index 92% rename from src/main/resources/assets/techreborn/models/block/lamp_led.json rename to src/main/resources/assets/techreborn/models/block/machines/lighting/lamp_led.json index a5c0c66bf..2484a7f41 100644 --- a/src/main/resources/assets/techreborn/models/block/lamp_led.json +++ b/src/main/resources/assets/techreborn/models/block/machines/lighting/lamp_led.json @@ -1,38 +1,38 @@ -{ - "parent": "block/block", - "display": { - "thirdperson_righthand": { - "rotation": [ 75, 45, 0 ], - "translation": [ 0, 2.5, 2], - "scale": [ 0.375, 0.375, 0.375 ] - }, - "firstperson_righthand": { - "rotation": [ 0, 35, 0 ], - "translation": [ 0, 5.5, 0 ], - "scale": [ 0.60, 0.60, 0.60 ] - }, - "firstperson_lefthand": { - "rotation": [ 0, 225, 0 ], - "translation": [ 0, 4.2, 0 ], - "scale": [ 0.40, 0.40, 0.40 ] - } - }, - "textures": { - "0": "#lamp" - }, - "elements": [ - { - "name": "Lamp", - "from": [ 2, 0, 2 ], - "to": [ 14, 1, 14 ], - "faces": { - "down": { "texture": "#0", "uv": [0.0, 0.0, 1.0, 1.0] }, - "up": { "texture": "#0", "uv": [1.0,1.0,15.0,15.0] }, - "north": { "texture": "#0", "uv": [1.0,2.0,15.0,0.0] }, - "south": { "texture": "#0", "uv": [1.0,2.0,15.0,0.0] }, - "west": { "texture": "#0", "uv": [1.0,2.0,15.0,0.0] }, - "east": { "texture": "#0", "uv": [1.0,2.0,15.0,0.0] } - } - } - ] +{ + "parent": "block/block", + "display": { + "thirdperson_righthand": { + "rotation": [ 75, 45, 0 ], + "translation": [ 0, 2.5, 2], + "scale": [ 0.375, 0.375, 0.375 ] + }, + "firstperson_righthand": { + "rotation": [ 0, 35, 0 ], + "translation": [ 0, 5.5, 0 ], + "scale": [ 0.60, 0.60, 0.60 ] + }, + "firstperson_lefthand": { + "rotation": [ 0, 225, 0 ], + "translation": [ 0, 4.2, 0 ], + "scale": [ 0.40, 0.40, 0.40 ] + } + }, + "textures": { + "0": "techreborn:block/machines/lighting/lamp" + }, + "elements": [ + { + "name": "Lamp", + "from": [ 2, 0, 2 ], + "to": [ 14, 1, 14 ], + "faces": { + "down": { "texture": "#0", "uv": [0.0, 0.0, 1.0, 1.0] }, + "up": { "texture": "#0", "uv": [1.0,1.0,15.0,15.0] }, + "north": { "texture": "#0", "uv": [1.0,2.0,15.0,0.0] }, + "south": { "texture": "#0", "uv": [1.0,2.0,15.0,0.0] }, + "west": { "texture": "#0", "uv": [1.0,2.0,15.0,0.0] }, + "east": { "texture": "#0", "uv": [1.0,2.0,15.0,0.0] } + } + } + ] } \ No newline at end of file diff --git a/src/main/resources/assets/techreborn/models/block/machines/lighting/lamp_led_on.json b/src/main/resources/assets/techreborn/models/block/machines/lighting/lamp_led_on.json new file mode 100644 index 000000000..e33818778 --- /dev/null +++ b/src/main/resources/assets/techreborn/models/block/machines/lighting/lamp_led_on.json @@ -0,0 +1,38 @@ +{ + "parent": "block/block", + "display": { + "thirdperson_righthand": { + "rotation": [ 75, 45, 0 ], + "translation": [ 0, 2.5, 2], + "scale": [ 0.375, 0.375, 0.375 ] + }, + "firstperson_righthand": { + "rotation": [ 0, 35, 0 ], + "translation": [ 0, 5.5, 0 ], + "scale": [ 0.60, 0.60, 0.60 ] + }, + "firstperson_lefthand": { + "rotation": [ 0, 225, 0 ], + "translation": [ 0, 4.2, 0 ], + "scale": [ 0.40, 0.40, 0.40 ] + } + }, + "textures": { + "0": "techreborn:block/machines/lighting/lamp_lit" + }, + "elements": [ + { + "name": "Lamp", + "from": [ 2, 0, 2 ], + "to": [ 14, 1, 14 ], + "faces": { + "down": { "texture": "#0", "uv": [0.0, 0.0, 1.0, 1.0] }, + "up": { "texture": "#0", "uv": [1.0,1.0,15.0,15.0] }, + "north": { "texture": "#0", "uv": [1.0,2.0,15.0,0.0] }, + "south": { "texture": "#0", "uv": [1.0,2.0,15.0,0.0] }, + "west": { "texture": "#0", "uv": [1.0,2.0,15.0,0.0] }, + "east": { "texture": "#0", "uv": [1.0,2.0,15.0,0.0] } + } + } + ] +} \ No newline at end of file diff --git a/src/main/resources/assets/techreborn/models/item/lamp_incandescent.json b/src/main/resources/assets/techreborn/models/item/lamp_incandescent.json new file mode 100644 index 000000000..70c2d3227 --- /dev/null +++ b/src/main/resources/assets/techreborn/models/item/lamp_incandescent.json @@ -0,0 +1,3 @@ +{ + "parent": "techreborn:block/machines/lighting/lamp_incandescent" +} \ No newline at end of file diff --git a/src/main/resources/assets/techreborn/models/item/lamp_led.json b/src/main/resources/assets/techreborn/models/item/lamp_led.json new file mode 100644 index 000000000..53e30f2f7 --- /dev/null +++ b/src/main/resources/assets/techreborn/models/item/lamp_led.json @@ -0,0 +1,3 @@ +{ + "parent": "techreborn:block/machines/lighting/lamp_led" +} \ No newline at end of file