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:
Dimmerworld 2017-12-26 12:30:36 +11:00 committed by Modmuss50
parent 7594b55fb5
commit e93451b595
10 changed files with 121 additions and 1 deletions

View file

@ -2,19 +2,30 @@ package techreborn.blocks;
import net.minecraft.block.BlockContainer; import net.minecraft.block.BlockContainer;
import net.minecraft.block.material.Material; import net.minecraft.block.material.Material;
import net.minecraft.block.state.IBlockState;
import net.minecraft.tileentity.TileEntity; 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 net.minecraft.world.World;
import prospector.shootingstar.ShootingStar;
import prospector.shootingstar.model.ModelCompound;
import techreborn.client.TechRebornCreativeTab; import techreborn.client.TechRebornCreativeTab;
import techreborn.lib.ModInfo;
import techreborn.tiles.TileAlarm; import techreborn.tiles.TileAlarm;
import javax.annotation.Nullable; 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 class BlockAlarm extends BlockContainer {
public BlockAlarm() { public BlockAlarm() {
super(Material.ROCK); super(Material.ROCK);
setUnlocalizedName("techreborn.alarm"); setUnlocalizedName("techreborn.alarm");
setCreativeTab(TechRebornCreativeTab.instance); setCreativeTab(TechRebornCreativeTab.instance);
ShootingStar.registerModel(new ModelCompound(ModInfo.MOD_ID, this, "machines/lighting"));
} }
@Nullable @Nullable
@ -22,4 +33,30 @@ public class BlockAlarm extends BlockContainer {
public TileEntity createNewTileEntity(World worldIn, int meta) { public TileEntity createNewTileEntity(World worldIn, int meta) {
return new TileAlarm(); 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);
}
} }

View file

@ -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"
}
}
}
}

View file

@ -93,6 +93,8 @@ tile.techreborn:refined_iron_fence.name=Iron Fence
tile.techreborn:lamp_incandescent.name=Incandescent Lamp tile.techreborn:lamp_incandescent.name=Incandescent Lamp
tile.techreborn:lamp_led.name=LED Lamp tile.techreborn:lamp_led.name=LED Lamp
tile.techreborn:alarm.name=Alarm
#Ores #Ores
tile.techreborn:ore.galena.name=Galena Ore tile.techreborn:ore.galena.name=Galena Ore
tile.techreborn:ore.iridium.name=Iridium Ore tile.techreborn:ore.iridium.name=Iridium Ore

View file

@ -898,3 +898,6 @@ achievement.TechReborn:ore_Pickup=Nouveau minerai !
achievement.TechReborn:ore_Pickup.desc=Minez un minerai techreborn achievement.TechReborn:ore_Pickup.desc=Minez un minerai techreborn
achievement.TechReborn:centrifuge_Craft=Il est temps de tourner achievement.TechReborn:centrifuge_Craft=Il est temps de tourner
achievement.TechReborn:thermalgen_Craft=Il est temps de chauffer achievement.TechReborn:thermalgen_Craft=Il est temps de chauffer
#Blocks
tile.techreborn:alarm.name=Alarme

View file

@ -87,6 +87,7 @@ tile.techreborn:rubber_leaves.name=Листва гевеи
tile.techreborn:rubber_sapling.name=Саженец гевеи tile.techreborn:rubber_sapling.name=Саженец гевеи
tile.techreborn:refined_iron_fence.name=Железный забор tile.techreborn:refined_iron_fence.name=Железный забор
tile.techreborn:alarm.name=аварийная сигнализация
#Ores #Ores
tile.techreborn:ore.galena.name=Галенитовая руда tile.techreborn:ore.galena.name=Галенитовая руда

View file

@ -92,6 +92,7 @@ tile.techreborn:rubber_sapling.name=橡胶树苗
tile.techreborn:refined_iron_fence.name=铁栅栏 tile.techreborn:refined_iron_fence.name=铁栅栏
tile.techreborn:lamp_incandescent.name=白炽灯 tile.techreborn:lamp_incandescent.name=白炽灯
tile.techreborn:lamp_led.name=LED灯 tile.techreborn:lamp_led.name=LED灯
tile.techreborn:alarm.name=报警
#Ores #Ores
tile.techreborn:ore.galena.name=方铅矿石 tile.techreborn:ore.galena.name=方铅矿石

View 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