mirror of
https://github.com/barkeser2002/CatServer.git
synced 2026-09-25 01:39:52 +03:00
136 lines
5.2 KiB
Diff
136 lines
5.2 KiB
Diff
--- ../src-base/minecraft/net/minecraft/block/BlockStoneSlab.java
|
|
+++ ../src-work/minecraft/net/minecraft/block/BlockStoneSlab.java
|
|
@@ -21,7 +21,7 @@
|
|
public abstract class BlockStoneSlab extends BlockSlab
|
|
{
|
|
public static final PropertyBool SEAMLESS = PropertyBool.create("seamless");
|
|
- public static final PropertyEnum<BlockStoneSlab.EnumType> VARIANT = PropertyEnum.<BlockStoneSlab.EnumType>create("variant", BlockStoneSlab.EnumType.class);
|
|
+ public static final PropertyEnum<EnumType> VARIANT = PropertyEnum.<EnumType>create("variant", EnumType.class);
|
|
|
|
public BlockStoneSlab()
|
|
{
|
|
@@ -34,10 +34,10 @@
|
|
}
|
|
else
|
|
{
|
|
- iblockstate = iblockstate.withProperty(HALF, BlockSlab.EnumBlockHalf.BOTTOM);
|
|
+ iblockstate = iblockstate.withProperty(HALF, EnumBlockHalf.BOTTOM);
|
|
}
|
|
|
|
- this.setDefaultState(iblockstate.withProperty(VARIANT, BlockStoneSlab.EnumType.STONE));
|
|
+ this.setDefaultState(iblockstate.withProperty(VARIANT, EnumType.STONE));
|
|
this.setCreativeTab(CreativeTabs.BUILDING_BLOCKS);
|
|
}
|
|
|
|
@@ -48,12 +48,12 @@
|
|
|
|
public ItemStack getItem(World worldIn, BlockPos pos, IBlockState state)
|
|
{
|
|
- return new ItemStack(Blocks.STONE_SLAB, 1, ((BlockStoneSlab.EnumType)state.getValue(VARIANT)).getMetadata());
|
|
+ return new ItemStack(Blocks.STONE_SLAB, 1, ((EnumType)state.getValue(VARIANT)).getMetadata());
|
|
}
|
|
|
|
public String getUnlocalizedName(int meta)
|
|
{
|
|
- return super.getUnlocalizedName() + "." + BlockStoneSlab.EnumType.byMetadata(meta).getUnlocalizedName();
|
|
+ return super.getUnlocalizedName() + "." + EnumType.byMetadata(meta).getUnlocalizedName();
|
|
}
|
|
|
|
public IProperty<?> getVariantProperty()
|
|
@@ -63,14 +63,14 @@
|
|
|
|
public Comparable<?> getTypeForItem(ItemStack stack)
|
|
{
|
|
- return BlockStoneSlab.EnumType.byMetadata(stack.getMetadata() & 7);
|
|
+ return EnumType.byMetadata(stack.getMetadata() & 7);
|
|
}
|
|
|
|
public void getSubBlocks(CreativeTabs itemIn, NonNullList<ItemStack> items)
|
|
{
|
|
- for (BlockStoneSlab.EnumType blockstoneslab$enumtype : BlockStoneSlab.EnumType.values())
|
|
+ for (EnumType blockstoneslab$enumtype : EnumType.values())
|
|
{
|
|
- if (blockstoneslab$enumtype != BlockStoneSlab.EnumType.WOOD)
|
|
+ if (blockstoneslab$enumtype != EnumType.WOOD)
|
|
{
|
|
items.add(new ItemStack(this, 1, blockstoneslab$enumtype.getMetadata()));
|
|
}
|
|
@@ -79,7 +79,7 @@
|
|
|
|
public IBlockState getStateFromMeta(int meta)
|
|
{
|
|
- IBlockState iblockstate = this.getDefaultState().withProperty(VARIANT, BlockStoneSlab.EnumType.byMetadata(meta & 7));
|
|
+ IBlockState iblockstate = this.getDefaultState().withProperty(VARIANT, EnumType.byMetadata(meta & 7));
|
|
|
|
if (this.isDouble())
|
|
{
|
|
@@ -87,7 +87,7 @@
|
|
}
|
|
else
|
|
{
|
|
- iblockstate = iblockstate.withProperty(HALF, (meta & 8) == 0 ? BlockSlab.EnumBlockHalf.BOTTOM : BlockSlab.EnumBlockHalf.TOP);
|
|
+ iblockstate = iblockstate.withProperty(HALF, (meta & 8) == 0 ? EnumBlockHalf.BOTTOM : EnumBlockHalf.TOP);
|
|
}
|
|
|
|
return iblockstate;
|
|
@@ -96,7 +96,7 @@
|
|
public int getMetaFromState(IBlockState state)
|
|
{
|
|
int i = 0;
|
|
- i = i | ((BlockStoneSlab.EnumType)state.getValue(VARIANT)).getMetadata();
|
|
+ i = i | ((EnumType)state.getValue(VARIANT)).getMetadata();
|
|
|
|
if (this.isDouble())
|
|
{
|
|
@@ -105,7 +105,7 @@
|
|
i |= 8;
|
|
}
|
|
}
|
|
- else if (state.getValue(HALF) == BlockSlab.EnumBlockHalf.TOP)
|
|
+ else if (state.getValue(HALF) == EnumBlockHalf.TOP)
|
|
{
|
|
i |= 8;
|
|
}
|
|
@@ -120,12 +120,12 @@
|
|
|
|
public int damageDropped(IBlockState state)
|
|
{
|
|
- return ((BlockStoneSlab.EnumType)state.getValue(VARIANT)).getMetadata();
|
|
+ return ((EnumType)state.getValue(VARIANT)).getMetadata();
|
|
}
|
|
|
|
public MapColor getMapColor(IBlockState state, IBlockAccess worldIn, BlockPos pos)
|
|
{
|
|
- return ((BlockStoneSlab.EnumType)state.getValue(VARIANT)).getMapColor();
|
|
+ return ((EnumType)state.getValue(VARIANT)).getMapColor();
|
|
}
|
|
|
|
public static enum EnumType implements IStringSerializable
|
|
@@ -139,7 +139,7 @@
|
|
NETHERBRICK(6, MapColor.NETHERRACK, "nether_brick", "netherBrick"),
|
|
QUARTZ(7, MapColor.QUARTZ, "quartz");
|
|
|
|
- private static final BlockStoneSlab.EnumType[] META_LOOKUP = new BlockStoneSlab.EnumType[values().length];
|
|
+ private static final EnumType[] META_LOOKUP = new EnumType[values().length];
|
|
private final int meta;
|
|
private final MapColor mapColor;
|
|
private final String name;
|
|
@@ -173,7 +173,7 @@
|
|
return this.name;
|
|
}
|
|
|
|
- public static BlockStoneSlab.EnumType byMetadata(int meta)
|
|
+ public static EnumType byMetadata(int meta)
|
|
{
|
|
if (meta < 0 || meta >= META_LOOKUP.length)
|
|
{
|
|
@@ -195,7 +195,7 @@
|
|
|
|
static
|
|
{
|
|
- for (BlockStoneSlab.EnumType blockstoneslab$enumtype : values())
|
|
+ for (EnumType blockstoneslab$enumtype : values())
|
|
{
|
|
META_LOOKUP[blockstoneslab$enumtype.getMetadata()] = blockstoneslab$enumtype;
|
|
}
|