mirror of
https://github.com/barkeser2002/CatServer.git
synced 2026-09-25 01:39:52 +03:00
105 lines
4.5 KiB
Diff
105 lines
4.5 KiB
Diff
--- ../src-base/minecraft/net/minecraft/block/BlockDirt.java
|
|
+++ ../src-work/minecraft/net/minecraft/block/BlockDirt.java
|
|
@@ -18,24 +18,24 @@
|
|
|
|
public class BlockDirt extends Block
|
|
{
|
|
- public static final PropertyEnum<BlockDirt.DirtType> VARIANT = PropertyEnum.<BlockDirt.DirtType>create("variant", BlockDirt.DirtType.class);
|
|
+ public static final PropertyEnum<DirtType> VARIANT = PropertyEnum.<DirtType>create("variant", DirtType.class);
|
|
public static final PropertyBool SNOWY = PropertyBool.create("snowy");
|
|
|
|
protected BlockDirt()
|
|
{
|
|
super(Material.GROUND);
|
|
- this.setDefaultState(this.blockState.getBaseState().withProperty(VARIANT, BlockDirt.DirtType.DIRT).withProperty(SNOWY, Boolean.valueOf(false)));
|
|
+ this.setDefaultState(this.blockState.getBaseState().withProperty(VARIANT, DirtType.DIRT).withProperty(SNOWY, Boolean.valueOf(false)));
|
|
this.setCreativeTab(CreativeTabs.BUILDING_BLOCKS);
|
|
}
|
|
|
|
public MapColor getMapColor(IBlockState state, IBlockAccess worldIn, BlockPos pos)
|
|
{
|
|
- return ((BlockDirt.DirtType)state.getValue(VARIANT)).getColor();
|
|
+ return ((DirtType)state.getValue(VARIANT)).getColor();
|
|
}
|
|
|
|
public IBlockState getActualState(IBlockState state, IBlockAccess worldIn, BlockPos pos)
|
|
{
|
|
- if (state.getValue(VARIANT) == BlockDirt.DirtType.PODZOL)
|
|
+ if (state.getValue(VARIANT) == DirtType.PODZOL)
|
|
{
|
|
Block block = worldIn.getBlockState(pos.up()).getBlock();
|
|
state = state.withProperty(SNOWY, Boolean.valueOf(block == Blocks.SNOW || block == Blocks.SNOW_LAYER));
|
|
@@ -46,24 +46,24 @@
|
|
|
|
public void getSubBlocks(CreativeTabs itemIn, NonNullList<ItemStack> items)
|
|
{
|
|
- items.add(new ItemStack(this, 1, BlockDirt.DirtType.DIRT.getMetadata()));
|
|
- items.add(new ItemStack(this, 1, BlockDirt.DirtType.COARSE_DIRT.getMetadata()));
|
|
- items.add(new ItemStack(this, 1, BlockDirt.DirtType.PODZOL.getMetadata()));
|
|
+ items.add(new ItemStack(this, 1, DirtType.DIRT.getMetadata()));
|
|
+ items.add(new ItemStack(this, 1, DirtType.COARSE_DIRT.getMetadata()));
|
|
+ items.add(new ItemStack(this, 1, DirtType.PODZOL.getMetadata()));
|
|
}
|
|
|
|
public ItemStack getItem(World worldIn, BlockPos pos, IBlockState state)
|
|
{
|
|
- return new ItemStack(this, 1, ((BlockDirt.DirtType)state.getValue(VARIANT)).getMetadata());
|
|
+ return new ItemStack(this, 1, ((DirtType)state.getValue(VARIANT)).getMetadata());
|
|
}
|
|
|
|
public IBlockState getStateFromMeta(int meta)
|
|
{
|
|
- return this.getDefaultState().withProperty(VARIANT, BlockDirt.DirtType.byMetadata(meta));
|
|
+ return this.getDefaultState().withProperty(VARIANT, DirtType.byMetadata(meta));
|
|
}
|
|
|
|
public int getMetaFromState(IBlockState state)
|
|
{
|
|
- return ((BlockDirt.DirtType)state.getValue(VARIANT)).getMetadata();
|
|
+ return ((DirtType)state.getValue(VARIANT)).getMetadata();
|
|
}
|
|
|
|
protected BlockStateContainer createBlockState()
|
|
@@ -73,11 +73,11 @@
|
|
|
|
public int damageDropped(IBlockState state)
|
|
{
|
|
- BlockDirt.DirtType blockdirt$dirttype = (BlockDirt.DirtType)state.getValue(VARIANT);
|
|
+ DirtType blockdirt$dirttype = (DirtType)state.getValue(VARIANT);
|
|
|
|
- if (blockdirt$dirttype == BlockDirt.DirtType.PODZOL)
|
|
+ if (blockdirt$dirttype == DirtType.PODZOL)
|
|
{
|
|
- blockdirt$dirttype = BlockDirt.DirtType.DIRT;
|
|
+ blockdirt$dirttype = DirtType.DIRT;
|
|
}
|
|
|
|
return blockdirt$dirttype.getMetadata();
|
|
@@ -89,7 +89,7 @@
|
|
COARSE_DIRT(1, "coarse_dirt", "coarse", MapColor.DIRT),
|
|
PODZOL(2, "podzol", MapColor.OBSIDIAN);
|
|
|
|
- private static final BlockDirt.DirtType[] METADATA_LOOKUP = new BlockDirt.DirtType[values().length];
|
|
+ private static final DirtType[] METADATA_LOOKUP = new DirtType[values().length];
|
|
private final int metadata;
|
|
private final String name;
|
|
private final String unlocalizedName;
|
|
@@ -128,7 +128,7 @@
|
|
return this.name;
|
|
}
|
|
|
|
- public static BlockDirt.DirtType byMetadata(int metadata)
|
|
+ public static DirtType byMetadata(int metadata)
|
|
{
|
|
if (metadata < 0 || metadata >= METADATA_LOOKUP.length)
|
|
{
|
|
@@ -145,7 +145,7 @@
|
|
|
|
static
|
|
{
|
|
- for (BlockDirt.DirtType blockdirt$dirttype : values())
|
|
+ for (DirtType blockdirt$dirttype : values())
|
|
{
|
|
METADATA_LOOKUP[blockdirt$dirttype.getMetadata()] = blockdirt$dirttype;
|
|
}
|