Woop woop - Alarm work (#1380)
* Alarm makeover Model, boundrybox, textures, name localization for the alarm * Actual translations for Alarm * Texture resize As requested (Didn't notice dimensions when I was grabbing off Prospector)
This commit is contained in:
parent
7594b55fb5
commit
e93451b595
10 changed files with 121 additions and 1 deletions
|
@ -2,19 +2,30 @@ package techreborn.blocks;
|
|||
|
||||
import net.minecraft.block.BlockContainer;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.block.state.IBlockState;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.EnumBlockRenderType;
|
||||
import net.minecraft.util.math.AxisAlignedBB;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.world.IBlockAccess;
|
||||
import net.minecraft.world.World;
|
||||
import prospector.shootingstar.ShootingStar;
|
||||
import prospector.shootingstar.model.ModelCompound;
|
||||
import techreborn.client.TechRebornCreativeTab;
|
||||
import techreborn.lib.ModInfo;
|
||||
import techreborn.tiles.TileAlarm;
|
||||
|
||||
import javax.annotation.Nullable;
|
||||
|
||||
//TODO: On/off variants, Placeable on walls/roofs(faces), Visible when holding in hand, and recipe.
|
||||
|
||||
public class BlockAlarm extends BlockContainer {
|
||||
|
||||
public BlockAlarm() {
|
||||
super(Material.ROCK);
|
||||
setUnlocalizedName("techreborn.alarm");
|
||||
setCreativeTab(TechRebornCreativeTab.instance);
|
||||
|
||||
ShootingStar.registerModel(new ModelCompound(ModInfo.MOD_ID, this, "machines/lighting"));
|
||||
}
|
||||
|
||||
@Nullable
|
||||
|
@ -22,4 +33,30 @@ public class BlockAlarm extends BlockContainer {
|
|||
public TileEntity createNewTileEntity(World worldIn, int meta) {
|
||||
return new TileAlarm();
|
||||
}
|
||||
|
||||
@Override
|
||||
public EnumBlockRenderType getRenderType(IBlockState state) {
|
||||
return EnumBlockRenderType.MODEL;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isOpaqueCube(IBlockState state) {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isFullBlock(IBlockState state) {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isFullCube(IBlockState state) {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public AxisAlignedBB getBoundingBox(IBlockState blockState, IBlockAccess worldIn, BlockPos pos) {
|
||||
return new AxisAlignedBB(0.19, 0.0, 0.19, 0.81, 0.18, 0.81);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -0,0 +1,22 @@
|
|||
{
|
||||
"forge_marker": 1,
|
||||
"defaults": {
|
||||
"transform": "forge:default-block",
|
||||
"model": "techreborn:alarm"
|
||||
},
|
||||
"variants": {
|
||||
"inventory": {
|
||||
"transform": "forge:default-block",
|
||||
"model": "techreborn:alarm",
|
||||
"textures": {}
|
||||
},
|
||||
"normal": {
|
||||
"transform": "forge:default-block",
|
||||
"model": "techreborn:alarm",
|
||||
"textures": {
|
||||
"alarm": "techreborn:blocks/machines/lighting/alarm_off"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
|
@ -93,6 +93,8 @@ tile.techreborn:refined_iron_fence.name=Iron Fence
|
|||
tile.techreborn:lamp_incandescent.name=Incandescent Lamp
|
||||
tile.techreborn:lamp_led.name=LED Lamp
|
||||
|
||||
tile.techreborn:alarm.name=Alarm
|
||||
|
||||
#Ores
|
||||
tile.techreborn:ore.galena.name=Galena Ore
|
||||
tile.techreborn:ore.iridium.name=Iridium Ore
|
||||
|
|
|
@ -898,3 +898,6 @@ achievement.TechReborn:ore_Pickup=Nouveau minerai !
|
|||
achievement.TechReborn:ore_Pickup.desc=Minez un minerai techreborn
|
||||
achievement.TechReborn:centrifuge_Craft=Il est temps de tourner
|
||||
achievement.TechReborn:thermalgen_Craft=Il est temps de chauffer
|
||||
|
||||
#Blocks
|
||||
tile.techreborn:alarm.name=Alarme
|
|
@ -87,6 +87,7 @@ tile.techreborn:rubber_leaves.name=Листва гевеи
|
|||
tile.techreborn:rubber_sapling.name=Саженец гевеи
|
||||
|
||||
tile.techreborn:refined_iron_fence.name=Железный забор
|
||||
tile.techreborn:alarm.name=аварийная сигнализация
|
||||
|
||||
#Ores
|
||||
tile.techreborn:ore.galena.name=Галенитовая руда
|
||||
|
|
|
@ -92,6 +92,7 @@ tile.techreborn:rubber_sapling.name=橡胶树苗
|
|||
tile.techreborn:refined_iron_fence.name=铁栅栏
|
||||
tile.techreborn:lamp_incandescent.name=白炽灯
|
||||
tile.techreborn:lamp_led.name=LED灯
|
||||
tile.techreborn:alarm.name=报警
|
||||
|
||||
#Ores
|
||||
tile.techreborn:ore.galena.name=方铅矿石
|
||||
|
|
54
src/main/resources/assets/techreborn/models/block/alarm.json
Normal file
54
src/main/resources/assets/techreborn/models/block/alarm.json
Normal file
|
@ -0,0 +1,54 @@
|
|||
{
|
||||
"textures": {
|
||||
"0": "techreborn:blocks/machines/lighting/alarm_off",
|
||||
"particle": "techreborn:blocks/machines/lighting/alarm_off"
|
||||
},
|
||||
"elements": [
|
||||
{
|
||||
"name": "cube",
|
||||
"from": [3, 0, 3],
|
||||
"to": [13, 3, 13],
|
||||
"faces": {
|
||||
"north": {
|
||||
"uv": [
|
||||
0.37890625,
|
||||
0.5171875,
|
||||
15.240625,
|
||||
3.3093749999999997
|
||||
],
|
||||
"texture": "#0"
|
||||
},
|
||||
"east": {
|
||||
"uv": [
|
||||
0.37890625,
|
||||
0.5171875,
|
||||
15.240625,
|
||||
3.3093749999999997
|
||||
],
|
||||
"texture": "#0"
|
||||
},
|
||||
"south": {
|
||||
"uv": [
|
||||
0.37890625,
|
||||
0.5171875,
|
||||
15.240625,
|
||||
3.3093749999999997
|
||||
],
|
||||
"texture": "#0"
|
||||
},
|
||||
"west": {
|
||||
"uv": [
|
||||
0.37890625,
|
||||
0.5171875,
|
||||
15.240625,
|
||||
3.3093749999999997
|
||||
],
|
||||
"texture": "#0"
|
||||
},
|
||||
"up": {"uv": [0, 0, 16, 16], "texture": "#0"},
|
||||
"down": {"uv": [5, 2, 6, 3], "texture": "#0"}
|
||||
},
|
||||
"type": "cube"
|
||||
}
|
||||
]
|
||||
}
|
Binary file not shown.
Before Width: | Height: | Size: 1.9 KiB |
Binary file not shown.
After Width: | Height: | Size: 15 KiB |
Binary file not shown.
After Width: | Height: | Size: 16 KiB |
Loading…
Add table
Reference in a new issue