Finished the pillar but rearranged the .json for testing

This commit is contained in:
WayofTime 2016-09-04 21:25:32 -04:00
parent 1286efbca7
commit f1b3d6f4bc
4 changed files with 43 additions and 22 deletions

View file

@ -17,7 +17,7 @@ import WayofTime.bloodmagic.client.IVariantProvider;
public class BlockDemonPillar extends BlockStringPillar implements IVariantProvider
{
public static final String[] names = new String[] { "raw", "corrosive" };
public static final String[] names = new String[] { "raw", "corrosive", "destructive", "vengeful", "steadfast" };
public BlockDemonPillar(String baseName, Material materialIn)
{
@ -43,7 +43,7 @@ public class BlockDemonPillar extends BlockStringPillar implements IVariantProvi
{
for (int j = 0; j < names.length; j++)
{
ret.add(new ImmutablePair<Integer, String>(i * 4 + j, "axis=" + axis[i] + ",type=" + names[j]));
ret.add(new ImmutablePair<Integer, String>(i * 5 + j, "axis=" + axis[i] + ",type=" + names[j]));
}
}

View file

@ -30,17 +30,17 @@ public class BlockStringPillar extends BlockString
@Override
public IBlockState getStateFromMeta(int meta)
{
IBlockState iblockstate = this.getDefaultState().withProperty(this.getStringProp(), this.getValues().get((meta & 3) % 4));
IBlockState iblockstate = this.getDefaultState().withProperty(this.getStringProp(), this.getValues().get(meta % 5));
switch (meta & 12)
switch (meta / 5)
{
case 0:
iblockstate = iblockstate.withProperty(BlockRotatedPillar.AXIS, EnumFacing.Axis.Y);
break;
case 4:
case 1:
iblockstate = iblockstate.withProperty(BlockRotatedPillar.AXIS, EnumFacing.Axis.X);
break;
case 8:
case 2:
iblockstate = iblockstate.withProperty(BlockRotatedPillar.AXIS, EnumFacing.Axis.Z);
break;
default:
@ -61,10 +61,10 @@ public class BlockStringPillar extends BlockString
switch ((EnumFacing.Axis) state.getValue(BlockRotatedPillar.AXIS))
{
case X:
i = i + 4;
i = i + 5;
break;
case Z:
i = i + 8;
i = i + 10;
break;
}
@ -123,7 +123,7 @@ public class BlockStringPillar extends BlockString
@Override
protected BlockStateContainer createRealBlockState()
{
return new ExtendedBlockState(this, new IProperty[] { BlockRotatedPillar.AXIS, this.getStringProp() }, new IUnlistedProperty[] { this.getUnlistedStringProp() });
return new ExtendedBlockState(this, new IProperty[] { this.getStringProp(), BlockRotatedPillar.AXIS }, new IUnlistedProperty[] { this.getUnlistedStringProp() });
}
@Override

View file

@ -9,6 +9,39 @@
}
},
"variants": {
"type": {
"raw": {
},
"corrosive": {
"textures": {
"bottom": "bloodmagic:blocks/dungeon/dungeon_pillarheart_c",
"top": "bloodmagic:blocks/dungeon/dungeon_pillarheart_c",
"side": "bloodmagic:blocks/dungeon/dungeon_pillar_c"
}
},
"destructive": {
"textures": {
"bottom": "bloodmagic:blocks/dungeon/dungeon_pillarheart_d",
"top": "bloodmagic:blocks/dungeon/dungeon_pillarheart_d",
"side": "bloodmagic:blocks/dungeon/dungeon_pillar_d"
}
},
"vengeful": {
"textures": {
"bottom": "bloodmagic:blocks/dungeon/dungeon_pillarheart_v",
"top": "bloodmagic:blocks/dungeon/dungeon_pillarheart_v",
"side": "bloodmagic:blocks/dungeon/dungeon_pillar_v"
}
},
"steadfast": {
"textures": {
"bottom": "bloodmagic:blocks/dungeon/dungeon_pillarheart_s",
"top": "bloodmagic:blocks/dungeon/dungeon_pillarheart_s",
"side": "bloodmagic:blocks/dungeon/dungeon_pillar_s"
}
}
},
"axis": {
"x": {
"transform": {
@ -24,18 +57,6 @@
}
}
},
"type": {
"raw": {
},
"corrosive": {
"textures": {
"bottom": "bloodmagic:blocks/dungeon/dungeon_pillarheart_c",
"top": "bloodmagic:blocks/dungeon/dungeon_pillarheart_c",
"side": "bloodmagic:blocks/dungeon/dungeon_pillar_c"
}
}
},
"inventory": [{
"variants": {
"raw": {

View file

@ -316,7 +316,7 @@ tile.BloodMagic.pillar1.raw.name=Raw Stone Pillar
tile.BloodMagic.pillar1.corrosive.name=Corrosive Stone Pillar
tile.BloodMagic.pillar1.destructive.name=Destructive Stone Pillar
tile.BloodMagic.pillar1.vengeful.name=Vengeful Stone Pillar
tile.BloodMagic.pillar2.steadfast.name=Steadfast Stone Pillar
tile.BloodMagic.pillar1.steadfast.name=Steadfast Stone Pillar
# Fluids
fluid.lifeEssence=Life Essence