Files
2019-02-24 22:29:41 +08:00

168 lines
8.1 KiB
Diff

--- ../src-base/minecraft/net/minecraft/block/BlockFlower.java
+++ ../src-work/minecraft/net/minecraft/block/BlockFlower.java
@@ -20,11 +20,11 @@
public abstract class BlockFlower extends BlockBush
{
- protected PropertyEnum<BlockFlower.EnumFlowerType> type;
+ protected PropertyEnum<EnumFlowerType> type;
protected BlockFlower()
{
- this.setDefaultState(this.blockState.getBaseState().withProperty(this.getTypeProperty(), this.getBlockType() == BlockFlower.EnumFlowerColor.RED ? BlockFlower.EnumFlowerType.POPPY : BlockFlower.EnumFlowerType.DANDELION));
+ this.setDefaultState(this.blockState.getBaseState().withProperty(this.getTypeProperty(), this.getBlockType() == EnumFlowerColor.RED ? EnumFlowerType.POPPY : EnumFlowerType.DANDELION));
}
public AxisAlignedBB getBoundingBox(IBlockState state, IBlockAccess source, BlockPos pos)
@@ -34,12 +34,12 @@
public int damageDropped(IBlockState state)
{
- return ((BlockFlower.EnumFlowerType)state.getValue(this.getTypeProperty())).getMeta();
+ return ((EnumFlowerType)state.getValue(this.getTypeProperty())).getMeta();
}
public void getSubBlocks(CreativeTabs itemIn, NonNullList<ItemStack> items)
{
- for (BlockFlower.EnumFlowerType blockflower$enumflowertype : BlockFlower.EnumFlowerType.getTypes(this.getBlockType()))
+ for (EnumFlowerType blockflower$enumflowertype : EnumFlowerType.getTypes(this.getBlockType()))
{
items.add(new ItemStack(this, 1, blockflower$enumflowertype.getMeta()));
}
@@ -47,16 +47,16 @@
public IBlockState getStateFromMeta(int meta)
{
- return this.getDefaultState().withProperty(this.getTypeProperty(), BlockFlower.EnumFlowerType.getType(this.getBlockType(), meta));
+ return this.getDefaultState().withProperty(this.getTypeProperty(), EnumFlowerType.getType(this.getBlockType(), meta));
}
- public abstract BlockFlower.EnumFlowerColor getBlockType();
+ public abstract EnumFlowerColor getBlockType();
- public IProperty<BlockFlower.EnumFlowerType> getTypeProperty()
+ public IProperty<EnumFlowerType> getTypeProperty()
{
if (this.type == null)
{
- this.type = PropertyEnum.<BlockFlower.EnumFlowerType>create("type", BlockFlower.EnumFlowerType.class, new Predicate<BlockFlower.EnumFlowerType>()
+ this.type = PropertyEnum.<EnumFlowerType>create("type", EnumFlowerType.class, new Predicate<EnumFlowerType>()
{
public boolean apply(@Nullable BlockFlower.EnumFlowerType p_apply_1_)
{
@@ -70,7 +70,7 @@
public int getMetaFromState(IBlockState state)
{
- return ((BlockFlower.EnumFlowerType)state.getValue(this.getTypeProperty())).getMeta();
+ return ((EnumFlowerType)state.getValue(this.getTypeProperty())).getMeta();
}
protected BlockStateContainer createBlockState()
@@ -78,9 +78,9 @@
return new BlockStateContainer(this, new IProperty[] {this.getTypeProperty()});
}
- public Block.EnumOffsetType getOffsetType()
+ public EnumOffsetType getOffsetType()
{
- return Block.EnumOffsetType.XZ;
+ return EnumOffsetType.XZ;
}
public static enum EnumFlowerColor
@@ -96,29 +96,29 @@
public static enum EnumFlowerType implements IStringSerializable
{
- DANDELION(BlockFlower.EnumFlowerColor.YELLOW, 0, "dandelion"),
- POPPY(BlockFlower.EnumFlowerColor.RED, 0, "poppy"),
- BLUE_ORCHID(BlockFlower.EnumFlowerColor.RED, 1, "blue_orchid", "blueOrchid"),
- ALLIUM(BlockFlower.EnumFlowerColor.RED, 2, "allium"),
- HOUSTONIA(BlockFlower.EnumFlowerColor.RED, 3, "houstonia"),
- RED_TULIP(BlockFlower.EnumFlowerColor.RED, 4, "red_tulip", "tulipRed"),
- ORANGE_TULIP(BlockFlower.EnumFlowerColor.RED, 5, "orange_tulip", "tulipOrange"),
- WHITE_TULIP(BlockFlower.EnumFlowerColor.RED, 6, "white_tulip", "tulipWhite"),
- PINK_TULIP(BlockFlower.EnumFlowerColor.RED, 7, "pink_tulip", "tulipPink"),
- OXEYE_DAISY(BlockFlower.EnumFlowerColor.RED, 8, "oxeye_daisy", "oxeyeDaisy");
+ DANDELION(EnumFlowerColor.YELLOW, 0, "dandelion"),
+ POPPY(EnumFlowerColor.RED, 0, "poppy"),
+ BLUE_ORCHID(EnumFlowerColor.RED, 1, "blue_orchid", "blueOrchid"),
+ ALLIUM(EnumFlowerColor.RED, 2, "allium"),
+ HOUSTONIA(EnumFlowerColor.RED, 3, "houstonia"),
+ RED_TULIP(EnumFlowerColor.RED, 4, "red_tulip", "tulipRed"),
+ ORANGE_TULIP(EnumFlowerColor.RED, 5, "orange_tulip", "tulipOrange"),
+ WHITE_TULIP(EnumFlowerColor.RED, 6, "white_tulip", "tulipWhite"),
+ PINK_TULIP(EnumFlowerColor.RED, 7, "pink_tulip", "tulipPink"),
+ OXEYE_DAISY(EnumFlowerColor.RED, 8, "oxeye_daisy", "oxeyeDaisy");
- private static final BlockFlower.EnumFlowerType[][] TYPES_FOR_BLOCK = new BlockFlower.EnumFlowerType[BlockFlower.EnumFlowerColor.values().length][];
- private final BlockFlower.EnumFlowerColor blockType;
+ private static final EnumFlowerType[][] TYPES_FOR_BLOCK = new EnumFlowerType[EnumFlowerColor.values().length][];
+ private final EnumFlowerColor blockType;
private final int meta;
private final String name;
private final String unlocalizedName;
- private EnumFlowerType(BlockFlower.EnumFlowerColor blockType, int meta, String name)
+ private EnumFlowerType(EnumFlowerColor blockType, int meta, String name)
{
this(blockType, meta, name, name);
}
- private EnumFlowerType(BlockFlower.EnumFlowerColor blockType, int meta, String name, String unlocalizedName)
+ private EnumFlowerType(EnumFlowerColor blockType, int meta, String name, String unlocalizedName)
{
this.blockType = blockType;
this.meta = meta;
@@ -126,7 +126,7 @@
this.unlocalizedName = unlocalizedName;
}
- public BlockFlower.EnumFlowerColor getBlockType()
+ public EnumFlowerColor getBlockType()
{
return this.blockType;
}
@@ -136,9 +136,9 @@
return this.meta;
}
- public static BlockFlower.EnumFlowerType getType(BlockFlower.EnumFlowerColor blockType, int meta)
+ public static EnumFlowerType getType(EnumFlowerColor blockType, int meta)
{
- BlockFlower.EnumFlowerType[] ablockflower$enumflowertype = TYPES_FOR_BLOCK[blockType.ordinal()];
+ EnumFlowerType[] ablockflower$enumflowertype = TYPES_FOR_BLOCK[blockType.ordinal()];
if (meta < 0 || meta >= ablockflower$enumflowertype.length)
{
@@ -148,7 +148,7 @@
return ablockflower$enumflowertype[meta];
}
- public static BlockFlower.EnumFlowerType[] getTypes(BlockFlower.EnumFlowerColor flowerColor)
+ public static EnumFlowerType[] getTypes(EnumFlowerColor flowerColor)
{
return TYPES_FOR_BLOCK[flowerColor.ordinal()];
}
@@ -170,16 +170,16 @@
static
{
- for (final BlockFlower.EnumFlowerColor blockflower$enumflowercolor : BlockFlower.EnumFlowerColor.values())
+ for (final EnumFlowerColor blockflower$enumflowercolor : EnumFlowerColor.values())
{
- Collection<BlockFlower.EnumFlowerType> collection = Collections2.<BlockFlower.EnumFlowerType>filter(Lists.newArrayList(values()), new Predicate<BlockFlower.EnumFlowerType>()
+ Collection<EnumFlowerType> collection = Collections2.<EnumFlowerType>filter(Lists.newArrayList(values()), new Predicate<EnumFlowerType>()
{
public boolean apply(@Nullable BlockFlower.EnumFlowerType p_apply_1_)
{
return p_apply_1_.getBlockType() == blockflower$enumflowercolor;
}
});
- TYPES_FOR_BLOCK[blockflower$enumflowercolor.ordinal()] = (BlockFlower.EnumFlowerType[])collection.toArray(new BlockFlower.EnumFlowerType[collection.size()]);
+ TYPES_FOR_BLOCK[blockflower$enumflowercolor.ordinal()] = (EnumFlowerType[])collection.toArray(new EnumFlowerType[collection.size()]);
}
}
}