Fixed metadata values for double dropped blocks
This commit is contained in:
parent
9230d6df2d
commit
c9a68f0574
|
@ -111,7 +111,7 @@ public class BlockRendering
|
|||
register(BlocksAether.holiday_leaves, meta, EnumHolidayType.getType(meta).getName());
|
||||
}
|
||||
|
||||
for (int meta = 0; meta < EnumLogType.values().length; ++meta)
|
||||
for (int meta = 0; meta < EnumLogType.values().length + 2; ++meta)
|
||||
{
|
||||
register(BlocksAether.aether_log, meta, EnumLogType.getType(meta).getName());
|
||||
}
|
||||
|
|
|
@ -55,7 +55,7 @@ public class BlockAetherDirt extends Block
|
|||
@Override
|
||||
public IBlockState getStateFromMeta(int meta)
|
||||
{
|
||||
return this.getDefaultState().withProperty(double_drop, Boolean.valueOf(meta % 1 == 0));
|
||||
return this.getDefaultState().withProperty(double_drop, Boolean.valueOf(meta == 0));
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -84,7 +84,7 @@ public class BlockAetherGrass extends Block
|
|||
@Override
|
||||
public IBlockState getStateFromMeta(int meta)
|
||||
{
|
||||
return this.getDefaultState().withProperty(double_drop, Boolean.valueOf(meta % 1 == 0));
|
||||
return this.getDefaultState().withProperty(double_drop, Boolean.valueOf(meta == 0));
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -70,7 +70,7 @@ public class BlockAetherLog extends BlockLog implements IAetherMeta
|
|||
|
||||
ItemStack stack = player.inventory.getCurrentItem();
|
||||
|
||||
IBlockState defaults = BlocksAether.aether_log.getDefaultState().withProperty(wood_type, EnumLogType.Skyroot).withProperty(double_drop, Boolean.FALSE);
|
||||
IBlockState defaults = BlocksAether.aether_log.getDefaultState();
|
||||
|
||||
if (stack != null && stack.getItem() instanceof ItemAetherTool && ((ItemAetherTool)stack.getItem()).toolType == EnumAetherToolType.AXE)
|
||||
{
|
||||
|
@ -108,7 +108,7 @@ public class BlockAetherLog extends BlockLog implements IAetherMeta
|
|||
@Override
|
||||
public int damageDropped(IBlockState state)
|
||||
{
|
||||
return ((EnumLogType)state.getValue(wood_type)).getMeta();
|
||||
return 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -116,16 +116,14 @@ public class BlockAetherLog extends BlockLog implements IAetherMeta
|
|||
@SuppressWarnings({ "unchecked", "rawtypes" })
|
||||
public void getSubBlocks(Item itemIn, CreativeTabs tab, List list)
|
||||
{
|
||||
for (int meta = 0; meta < EnumLogType.values().length; ++meta)
|
||||
{
|
||||
list.add(new ItemStack(this, 1, meta));
|
||||
}
|
||||
list.add(new ItemStack(this, 1, 0));
|
||||
list.add(new ItemStack(this, 1, 2));
|
||||
}
|
||||
|
||||
@Override
|
||||
public IBlockState getStateFromMeta(int meta)
|
||||
{
|
||||
return this.getDefaultState().withProperty(wood_type, EnumLogType.getType(meta % 2)).withProperty(double_drop, Boolean.valueOf((meta % 4) == 0));
|
||||
return this.getDefaultState().withProperty(wood_type, EnumLogType.getType(meta)).withProperty(double_drop, Boolean.valueOf((meta % 2) == 0));
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -136,7 +134,7 @@ public class BlockAetherLog extends BlockLog implements IAetherMeta
|
|||
|
||||
if (!((Boolean)state.getValue(double_drop)).booleanValue())
|
||||
{
|
||||
meta |= 4;
|
||||
meta |= 2;
|
||||
}
|
||||
|
||||
return meta;
|
||||
|
|
|
@ -42,7 +42,7 @@ public class BlockHolystone extends Block
|
|||
@Override
|
||||
public IBlockState getStateFromMeta(int meta)
|
||||
{
|
||||
return this.getDefaultState().withProperty(double_drop, Boolean.valueOf((meta % 1) == 0));
|
||||
return this.getDefaultState().withProperty(double_drop, Boolean.valueOf(meta == 0));
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -43,7 +43,7 @@ public class BlockQuicksoil extends Block
|
|||
@Override
|
||||
public IBlockState getStateFromMeta(int meta)
|
||||
{
|
||||
return this.getDefaultState().withProperty(double_drop, Boolean.valueOf((meta % 1) == 0));
|
||||
return this.getDefaultState().withProperty(double_drop, Boolean.valueOf(meta == 0));
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -47,7 +47,7 @@ public class BlockAmbrosiumOre extends Block
|
|||
@Override
|
||||
public IBlockState getStateFromMeta(int meta)
|
||||
{
|
||||
return this.getDefaultState().withProperty(double_drop, Boolean.valueOf((meta % 1) == 0));
|
||||
return this.getDefaultState().withProperty(double_drop, Boolean.valueOf(meta == 0));
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -19,7 +19,7 @@ public enum EnumLogType implements IStringSerializable
|
|||
|
||||
public static EnumLogType getType(int meta)
|
||||
{
|
||||
return meta == 0 || meta == 2 ? Skyroot : Oak;
|
||||
return meta == 0 || meta == 1 ? Skyroot : Oak;
|
||||
}
|
||||
|
||||
public int getMeta()
|
||||
|
|
|
@ -41,7 +41,7 @@ public class AetherGenOakTree extends WorldGenAbstractTree
|
|||
|
||||
if(world.getBlockState(mutablePos) == BlocksAether.aether_leaves.getDefaultState().withProperty(BlockAetherLeaves.leaf_type, EnumLeafType.Golden))
|
||||
{
|
||||
IBlockState state = BlocksAether.aether_log.getDefaultState().withProperty(BlockAetherLog.wood_type, EnumLogType.Oak).withProperty(BlockAetherLog.double_drop, Boolean.valueOf(true));
|
||||
IBlockState state = BlocksAether.aether_log.getDefaultState().withProperty(BlockAetherLog.wood_type, EnumLogType.Oak).withProperty(BlockAetherLog.double_drop, Boolean.TRUE);
|
||||
world.setBlockState(mutablePos, state);
|
||||
world.setBlockState(new BlockPos(i, y, k), state);
|
||||
}
|
||||
|
@ -87,7 +87,7 @@ public class AetherGenOakTree extends WorldGenAbstractTree
|
|||
}
|
||||
}
|
||||
|
||||
IBlockState state = BlocksAether.aether_log.getDefaultState().withProperty(BlockAetherLog.wood_type, EnumLogType.Oak).withProperty(BlockAetherLog.double_drop, Boolean.valueOf(true));
|
||||
IBlockState state = BlocksAether.aether_log.getDefaultState().withProperty(BlockAetherLog.wood_type, EnumLogType.Oak).withProperty(BlockAetherLog.double_drop, Boolean.TRUE);
|
||||
world.setBlockState(pos.add(0, n, 0), state);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue