Files
CatServer/patches/net/minecraft/block/BlockStoneSlabNew.java.patch
2019-02-24 22:29:41 +08:00

132 lines
5.1 KiB
Diff

--- ../src-base/minecraft/net/minecraft/block/BlockStoneSlabNew.java
+++ ../src-work/minecraft/net/minecraft/block/BlockStoneSlabNew.java
@@ -22,7 +22,7 @@
public abstract class BlockStoneSlabNew extends BlockSlab
{
public static final PropertyBool SEAMLESS = PropertyBool.create("seamless");
- public static final PropertyEnum<BlockStoneSlabNew.EnumType> VARIANT = PropertyEnum.<BlockStoneSlabNew.EnumType>create("variant", BlockStoneSlabNew.EnumType.class);
+ public static final PropertyEnum<EnumType> VARIANT = PropertyEnum.<EnumType>create("variant", EnumType.class);
public BlockStoneSlabNew()
{
@@ -35,10 +35,10 @@
}
else
{
- iblockstate = iblockstate.withProperty(HALF, BlockSlab.EnumBlockHalf.BOTTOM);
+ iblockstate = iblockstate.withProperty(HALF, EnumBlockHalf.BOTTOM);
}
- this.setDefaultState(iblockstate.withProperty(VARIANT, BlockStoneSlabNew.EnumType.RED_SANDSTONE));
+ this.setDefaultState(iblockstate.withProperty(VARIANT, EnumType.RED_SANDSTONE));
this.setCreativeTab(CreativeTabs.BUILDING_BLOCKS);
}
@@ -54,12 +54,12 @@
public ItemStack getItem(World worldIn, BlockPos pos, IBlockState state)
{
- return new ItemStack(Blocks.STONE_SLAB2, 1, ((BlockStoneSlabNew.EnumType)state.getValue(VARIANT)).getMetadata());
+ return new ItemStack(Blocks.STONE_SLAB2, 1, ((EnumType)state.getValue(VARIANT)).getMetadata());
}
public String getUnlocalizedName(int meta)
{
- return super.getUnlocalizedName() + "." + BlockStoneSlabNew.EnumType.byMetadata(meta).getUnlocalizedName();
+ return super.getUnlocalizedName() + "." + EnumType.byMetadata(meta).getUnlocalizedName();
}
public IProperty<?> getVariantProperty()
@@ -69,12 +69,12 @@
public Comparable<?> getTypeForItem(ItemStack stack)
{
- return BlockStoneSlabNew.EnumType.byMetadata(stack.getMetadata() & 7);
+ return EnumType.byMetadata(stack.getMetadata() & 7);
}
public void getSubBlocks(CreativeTabs itemIn, NonNullList<ItemStack> items)
{
- for (BlockStoneSlabNew.EnumType blockstoneslabnew$enumtype : BlockStoneSlabNew.EnumType.values())
+ for (EnumType blockstoneslabnew$enumtype : EnumType.values())
{
items.add(new ItemStack(this, 1, blockstoneslabnew$enumtype.getMetadata()));
}
@@ -82,7 +82,7 @@
public IBlockState getStateFromMeta(int meta)
{
- IBlockState iblockstate = this.getDefaultState().withProperty(VARIANT, BlockStoneSlabNew.EnumType.byMetadata(meta & 7));
+ IBlockState iblockstate = this.getDefaultState().withProperty(VARIANT, EnumType.byMetadata(meta & 7));
if (this.isDouble())
{
@@ -90,7 +90,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;
@@ -99,7 +99,7 @@
public int getMetaFromState(IBlockState state)
{
int i = 0;
- i = i | ((BlockStoneSlabNew.EnumType)state.getValue(VARIANT)).getMetadata();
+ i = i | ((EnumType)state.getValue(VARIANT)).getMetadata();
if (this.isDouble())
{
@@ -108,7 +108,7 @@
i |= 8;
}
}
- else if (state.getValue(HALF) == BlockSlab.EnumBlockHalf.TOP)
+ else if (state.getValue(HALF) == EnumBlockHalf.TOP)
{
i |= 8;
}
@@ -123,19 +123,19 @@
public MapColor getMapColor(IBlockState state, IBlockAccess worldIn, BlockPos pos)
{
- return ((BlockStoneSlabNew.EnumType)state.getValue(VARIANT)).getMapColor();
+ return ((EnumType)state.getValue(VARIANT)).getMapColor();
}
public int damageDropped(IBlockState state)
{
- return ((BlockStoneSlabNew.EnumType)state.getValue(VARIANT)).getMetadata();
+ return ((EnumType)state.getValue(VARIANT)).getMetadata();
}
public static enum EnumType implements IStringSerializable
{
RED_SANDSTONE(0, "red_sandstone", BlockSand.EnumType.RED_SAND.getMapColor());
- private static final BlockStoneSlabNew.EnumType[] META_LOOKUP = new BlockStoneSlabNew.EnumType[values().length];
+ private static final EnumType[] META_LOOKUP = new EnumType[values().length];
private final int meta;
private final String name;
private final MapColor mapColor;
@@ -162,7 +162,7 @@
return this.name;
}
- public static BlockStoneSlabNew.EnumType byMetadata(int meta)
+ public static EnumType byMetadata(int meta)
{
if (meta < 0 || meta >= META_LOOKUP.length)
{
@@ -184,7 +184,7 @@
static
{
- for (BlockStoneSlabNew.EnumType blockstoneslabnew$enumtype : values())
+ for (EnumType blockstoneslabnew$enumtype : values())
{
META_LOOKUP[blockstoneslabnew$enumtype.getMetadata()] = blockstoneslabnew$enumtype;
}