Fixed missing nuke textures
This commit is contained in:
parent
7a55995546
commit
bc390fa0e0
2 changed files with 30 additions and 1 deletions
|
@ -38,9 +38,12 @@ import net.minecraft.util.EnumHand;
|
||||||
import net.minecraft.util.math.BlockPos;
|
import net.minecraft.util.math.BlockPos;
|
||||||
import net.minecraft.world.Explosion;
|
import net.minecraft.world.Explosion;
|
||||||
import net.minecraft.world.World;
|
import net.minecraft.world.World;
|
||||||
|
import prospector.shootingstar.ShootingStar;
|
||||||
|
import prospector.shootingstar.model.ModelCompound;
|
||||||
import reborncore.common.BaseBlock;
|
import reborncore.common.BaseBlock;
|
||||||
import techreborn.client.TechRebornCreativeTabMisc;
|
import techreborn.client.TechRebornCreativeTabMisc;
|
||||||
import techreborn.entities.EntityNukePrimed;
|
import techreborn.entities.EntityNukePrimed;
|
||||||
|
import techreborn.lib.ModInfo;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Created by Mark on 13/03/2016.
|
* Created by Mark on 13/03/2016.
|
||||||
|
@ -53,6 +56,7 @@ public class BlockNuke extends BaseBlock {
|
||||||
setUnlocalizedName("techreborn.nuke");
|
setUnlocalizedName("techreborn.nuke");
|
||||||
setCreativeTab(TechRebornCreativeTabMisc.instance);
|
setCreativeTab(TechRebornCreativeTabMisc.instance);
|
||||||
this.setDefaultState(this.blockState.getBaseState().withProperty(OVERLAY, false));
|
this.setDefaultState(this.blockState.getBaseState().withProperty(OVERLAY, false));
|
||||||
|
ShootingStar.registerModel(new ModelCompound(ModInfo.MOD_ID, this));
|
||||||
}
|
}
|
||||||
|
|
||||||
public void explode(World worldIn, BlockPos pos, IBlockState state, EntityLivingBase igniter) {
|
public void explode(World worldIn, BlockPos pos, IBlockState state, EntityLivingBase igniter) {
|
||||||
|
@ -75,6 +79,7 @@ public class BlockNuke extends BaseBlock {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public void onEntityCollidedWithBlock(World worldIn, BlockPos pos, IBlockState state, Entity entityIn) {
|
public void onEntityCollidedWithBlock(World worldIn, BlockPos pos, IBlockState state, Entity entityIn) {
|
||||||
if (!worldIn.isRemote && entityIn instanceof EntityArrow) {
|
if (!worldIn.isRemote && entityIn instanceof EntityArrow) {
|
||||||
EntityArrow entityarrow = (EntityArrow) entityIn;
|
EntityArrow entityarrow = (EntityArrow) entityIn;
|
||||||
|
@ -87,6 +92,7 @@ public class BlockNuke extends BaseBlock {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public void onBlockAdded(World worldIn, BlockPos pos, IBlockState state) {
|
public void onBlockAdded(World worldIn, BlockPos pos, IBlockState state) {
|
||||||
super.onBlockAdded(worldIn, pos, state);
|
super.onBlockAdded(worldIn, pos, state);
|
||||||
if (worldIn.isBlockPowered(pos)) {
|
if (worldIn.isBlockPowered(pos)) {
|
||||||
|
@ -112,14 +118,17 @@ public class BlockNuke extends BaseBlock {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public int getMetaFromState(IBlockState state) {
|
public int getMetaFromState(IBlockState state) {
|
||||||
return state.getValue(OVERLAY) ? 1 : 0;
|
return state.getValue(OVERLAY) ? 1 : 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public IBlockState getStateFromMeta(int meta) {
|
public IBlockState getStateFromMeta(int meta) {
|
||||||
return this.getDefaultState().withProperty(OVERLAY, (meta & 1) > 0);
|
return this.getDefaultState().withProperty(OVERLAY, (meta & 1) > 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
protected BlockStateContainer createBlockState() {
|
protected BlockStateContainer createBlockState() {
|
||||||
return new BlockStateContainer(this, OVERLAY);
|
return new BlockStateContainer(this, OVERLAY);
|
||||||
}
|
}
|
||||||
|
|
|
@ -5,10 +5,30 @@
|
||||||
"model": "orientable",
|
"model": "orientable",
|
||||||
"textures": {
|
"textures": {
|
||||||
"particle": "techreborn:blocks/nuke_side",
|
"particle": "techreborn:blocks/nuke_side",
|
||||||
"bottom": "techreborn:blocks/nuke_bottom",
|
"bottom": "techreborn:blocks/nuke_top",
|
||||||
"top": "techreborn:blocks/nuke_top",
|
"top": "techreborn:blocks/nuke_top",
|
||||||
"front": "techreborn:blocks/nuke_front",
|
"front": "techreborn:blocks/nuke_front",
|
||||||
"side": "techreborn:blocks/nuke_side"
|
"side": "techreborn:blocks/nuke_side"
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
"variants": {
|
||||||
|
"inventory": {
|
||||||
|
"transform": "forge:default-block",
|
||||||
|
"textures": {
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"normal": [
|
||||||
|
{}
|
||||||
|
],
|
||||||
|
"overlay": {
|
||||||
|
"true": {
|
||||||
|
"textures": {
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"false": {
|
||||||
|
"textures": {
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
Loading…
Add table
Reference in a new issue