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

85 lines
3.7 KiB
Diff

--- ../src-base/minecraft/net/minecraft/block/BlockPrismarine.java
+++ ../src-work/minecraft/net/minecraft/block/BlockPrismarine.java
@@ -16,36 +16,36 @@
public class BlockPrismarine extends Block
{
- public static final PropertyEnum<BlockPrismarine.EnumType> VARIANT = PropertyEnum.<BlockPrismarine.EnumType>create("variant", BlockPrismarine.EnumType.class);
- public static final int ROUGH_META = BlockPrismarine.EnumType.ROUGH.getMetadata();
- public static final int BRICKS_META = BlockPrismarine.EnumType.BRICKS.getMetadata();
- public static final int DARK_META = BlockPrismarine.EnumType.DARK.getMetadata();
+ public static final PropertyEnum<EnumType> VARIANT = PropertyEnum.<EnumType>create("variant", EnumType.class);
+ public static final int ROUGH_META = EnumType.ROUGH.getMetadata();
+ public static final int BRICKS_META = EnumType.BRICKS.getMetadata();
+ public static final int DARK_META = EnumType.DARK.getMetadata();
public BlockPrismarine()
{
super(Material.ROCK);
- this.setDefaultState(this.blockState.getBaseState().withProperty(VARIANT, BlockPrismarine.EnumType.ROUGH));
+ this.setDefaultState(this.blockState.getBaseState().withProperty(VARIANT, EnumType.ROUGH));
this.setCreativeTab(CreativeTabs.BUILDING_BLOCKS);
}
public String getLocalizedName()
{
- return I18n.translateToLocal(this.getUnlocalizedName() + "." + BlockPrismarine.EnumType.ROUGH.getUnlocalizedName() + ".name");
+ return I18n.translateToLocal(this.getUnlocalizedName() + "." + EnumType.ROUGH.getUnlocalizedName() + ".name");
}
public MapColor getMapColor(IBlockState state, IBlockAccess worldIn, BlockPos pos)
{
- return state.getValue(VARIANT) == BlockPrismarine.EnumType.ROUGH ? MapColor.CYAN : MapColor.DIAMOND;
+ return state.getValue(VARIANT) == EnumType.ROUGH ? MapColor.CYAN : MapColor.DIAMOND;
}
public int damageDropped(IBlockState state)
{
- return ((BlockPrismarine.EnumType)state.getValue(VARIANT)).getMetadata();
+ return ((EnumType)state.getValue(VARIANT)).getMetadata();
}
public int getMetaFromState(IBlockState state)
{
- return ((BlockPrismarine.EnumType)state.getValue(VARIANT)).getMetadata();
+ return ((EnumType)state.getValue(VARIANT)).getMetadata();
}
protected BlockStateContainer createBlockState()
@@ -55,7 +55,7 @@
public IBlockState getStateFromMeta(int meta)
{
- return this.getDefaultState().withProperty(VARIANT, BlockPrismarine.EnumType.byMetadata(meta));
+ return this.getDefaultState().withProperty(VARIANT, EnumType.byMetadata(meta));
}
public void getSubBlocks(CreativeTabs itemIn, NonNullList<ItemStack> items)
@@ -71,7 +71,7 @@
BRICKS(1, "prismarine_bricks", "bricks"),
DARK(2, "dark_prismarine", "dark");
- private static final BlockPrismarine.EnumType[] META_LOOKUP = new BlockPrismarine.EnumType[values().length];
+ private static final EnumType[] META_LOOKUP = new EnumType[values().length];
private final int meta;
private final String name;
private final String unlocalizedName;
@@ -93,7 +93,7 @@
return this.name;
}
- public static BlockPrismarine.EnumType byMetadata(int meta)
+ public static EnumType byMetadata(int meta)
{
if (meta < 0 || meta >= META_LOOKUP.length)
{
@@ -115,7 +115,7 @@
static
{
- for (BlockPrismarine.EnumType blockprismarine$enumtype : values())
+ for (EnumType blockprismarine$enumtype : values())
{
META_LOOKUP[blockprismarine$enumtype.getMetadata()] = blockprismarine$enumtype;
}