Merge branch '1.9.4'

This commit is contained in:
cpw committed 2016-05-31 00:34:03 -04:00
commit caa61e1be9
332 files changed
+3806 -3131

No files matched your search

@@ -41,47 +41,47 @@ public abstract class BlockFluidBase extends Block implements IFluidBlock
static
{
defaultDisplacements.put(Blocks.oak_door, false);
defaultDisplacements.put(Blocks.spruce_door, false);
defaultDisplacements.put(Blocks.birch_door, false);
defaultDisplacements.put(Blocks.jungle_door, false);
defaultDisplacements.put(Blocks.acacia_door, false);
defaultDisplacements.put(Blocks.dark_oak_door, false);
defaultDisplacements.put(Blocks.trapdoor, false);
defaultDisplacements.put(Blocks.iron_trapdoor, false);
defaultDisplacements.put(Blocks.oak_fence, false);
defaultDisplacements.put(Blocks.spruce_fence, false);
defaultDisplacements.put(Blocks.birch_fence, false);
defaultDisplacements.put(Blocks.jungle_fence, false);
defaultDisplacements.put(Blocks.dark_oak_fence, false);
defaultDisplacements.put(Blocks.acacia_fence, false);
defaultDisplacements.put(Blocks.nether_brick_fence, false);
defaultDisplacements.put(Blocks.oak_fence_gate, false);
defaultDisplacements.put(Blocks.spruce_fence_gate, false);
defaultDisplacements.put(Blocks.birch_fence_gate, false);
defaultDisplacements.put(Blocks.jungle_fence_gate, false);
defaultDisplacements.put(Blocks.dark_oak_fence_gate, false);
defaultDisplacements.put(Blocks.acacia_fence_gate, false);
defaultDisplacements.put(Blocks.wooden_pressure_plate, false);
defaultDisplacements.put(Blocks.stone_pressure_plate, false);
defaultDisplacements.put(Blocks.light_weighted_pressure_plate, false);
defaultDisplacements.put(Blocks.heavy_weighted_pressure_plate, false);
defaultDisplacements.put(Blocks.ladder, false);
defaultDisplacements.put(Blocks.iron_bars, false);
defaultDisplacements.put(Blocks.glass_pane, false);
defaultDisplacements.put(Blocks.stained_glass_pane, false);
defaultDisplacements.put(Blocks.portal, false);
defaultDisplacements.put(Blocks.end_portal, false);
defaultDisplacements.put(Blocks.cobblestone_wall, false);
defaultDisplacements.put(Blocks.barrier, false);
defaultDisplacements.put(Blocks.standing_banner, false);
defaultDisplacements.put(Blocks.wall_banner, false);
defaultDisplacements.put(Blocks.cake, false);
defaultDisplacements.put(Blocks.OAK_DOOR, false);
defaultDisplacements.put(Blocks.SPRUCE_DOOR, false);
defaultDisplacements.put(Blocks.BIRCH_DOOR, false);
defaultDisplacements.put(Blocks.JUNGLE_DOOR, false);
defaultDisplacements.put(Blocks.ACACIA_DOOR, false);
defaultDisplacements.put(Blocks.DARK_OAK_DOOR, false);
defaultDisplacements.put(Blocks.TRAPDOOR, false);
defaultDisplacements.put(Blocks.IRON_TRAPDOOR, false);
defaultDisplacements.put(Blocks.OAK_FENCE, false);
defaultDisplacements.put(Blocks.SPRUCE_FENCE, false);
defaultDisplacements.put(Blocks.BIRCH_FENCE, false);
defaultDisplacements.put(Blocks.JUNGLE_FENCE, false);
defaultDisplacements.put(Blocks.DARK_OAK_FENCE, false);
defaultDisplacements.put(Blocks.ACACIA_FENCE, false);
defaultDisplacements.put(Blocks.NETHER_BRICK_FENCE, false);
defaultDisplacements.put(Blocks.OAK_FENCE_GATE, false);
defaultDisplacements.put(Blocks.SPRUCE_FENCE_GATE, false);
defaultDisplacements.put(Blocks.BIRCH_FENCE_GATE, false);
defaultDisplacements.put(Blocks.JUNGLE_FENCE_GATE, false);
defaultDisplacements.put(Blocks.DARK_OAK_FENCE_GATE, false);
defaultDisplacements.put(Blocks.ACACIA_FENCE_GATE, false);
defaultDisplacements.put(Blocks.WOODEN_PRESSURE_PLATE, false);
defaultDisplacements.put(Blocks.STONE_PRESSURE_PLATE, false);
defaultDisplacements.put(Blocks.LIGHT_WEIGHTED_PRESSURE_PLATE, false);
defaultDisplacements.put(Blocks.HEAVY_WEIGHTED_PRESSURE_PLATE, false);
defaultDisplacements.put(Blocks.LADDER, false);
defaultDisplacements.put(Blocks.IRON_BARS, false);
defaultDisplacements.put(Blocks.GLASS_PANE, false);
defaultDisplacements.put(Blocks.STAINED_GLASS_PANE, false);
defaultDisplacements.put(Blocks.PORTAL, false);
defaultDisplacements.put(Blocks.END_PORTAL, false);
defaultDisplacements.put(Blocks.COBBLESTONE_WALL, false);
defaultDisplacements.put(Blocks.BARRIER, false);
defaultDisplacements.put(Blocks.STANDING_BANNER, false);
defaultDisplacements.put(Blocks.WALL_BANNER, false);
defaultDisplacements.put(Blocks.CAKE, false);
defaultDisplacements.put(Blocks.iron_door, false);
defaultDisplacements.put(Blocks.standing_sign, false);
defaultDisplacements.put(Blocks.wall_sign, false);
defaultDisplacements.put(Blocks.reeds, false);
defaultDisplacements.put(Blocks.IRON_DOOR, false);
defaultDisplacements.put(Blocks.STANDING_SIGN, false);
defaultDisplacements.put(Blocks.WALL_SIGN, false);
defaultDisplacements.put(Blocks.REEDS, false);
}
protected Map<Block, Boolean> displacements = Maps.newHashMap();
@@ -212,7 +212,7 @@ public abstract class BlockFluidBase extends Block implements IFluidBlock
}
Material material = state.getMaterial();
if (material.blocksMovement() || material == Material.portal)
if (material.blocksMovement() || material == Material.PORTAL)
{
return false;
}
@@ -261,7 +261,7 @@ public abstract class BlockFluidBase extends Block implements IFluidBlock
}
Material material = state.getMaterial();
if (material.blocksMovement() || material == Material.portal)
if (material.blocksMovement() || material == Material.PORTAL)
{
return false;
}
@@ -298,7 +298,7 @@ public abstract class BlockFluidBase extends Block implements IFluidBlock
}
@Override
public void onNeighborBlockChange(World world, BlockPos pos, IBlockState state, Block neighborBlock)
public void neighborChanged(IBlockState state, World world, BlockPos pos, Block neighborBlock)
{
world.scheduleUpdate(pos, this, tickRate);
}
@@ -43,7 +43,7 @@ public class BlockFluidClassic extends BlockFluidBase
public int getQuantaValue(IBlockAccess world, BlockPos pos)
{
IBlockState state = world.getBlockState(pos);
if (state.getBlock() == Blocks.air)
if (state.getBlock() == Blocks.AIR)
{
return 0;
}
@@ -291,9 +291,9 @@ public class BlockFluidClassic extends BlockFluidBase
Material material = state.getMaterial();
if (material.blocksMovement() ||
material == Material.water ||
material == Material.lava ||
material == Material.portal)
material == Material.WATER ||
material == Material.LAVA ||
material == Material.PORTAL)
{
return false;
}
@@ -266,13 +266,13 @@ public class Fluid
{
if(fillSound == null)
{
if(getBlock() != null && getBlock().getDefaultState().getMaterial() == Material.lava)
if(getBlock() != null && getBlock().getDefaultState().getMaterial() == Material.LAVA)
{
fillSound = SoundEvents.item_bucket_fill_lava;
fillSound = SoundEvents.ITEM_BUCKET_FILL_LAVA;
}
else
{
fillSound = SoundEvents.item_bucket_fill;
fillSound = SoundEvents.ITEM_BUCKET_FILL;
}
}
@@ -283,13 +283,13 @@ public class Fluid
{
if(emptySound == null)
{
if(getBlock() != null && getBlock().getDefaultState().getMaterial() == Material.lava)
if(getBlock() != null && getBlock().getDefaultState().getMaterial() == Material.LAVA)
{
emptySound = SoundEvents.item_bucket_empty_lava;
emptySound = SoundEvents.ITEM_BUCKET_EMPTY_LAVA;
}
else
{
emptySound = SoundEvents.item_bucket_empty;
emptySound = SoundEvents.ITEM_BUCKET_EMPTY;
}
}
@@ -71,15 +71,15 @@ public abstract class FluidContainerRegistry
private static Set<ContainerKey> emptyContainers = Sets.newHashSet();
public static final int BUCKET_VOLUME = 1000;
public static final ItemStack EMPTY_BUCKET = new ItemStack(Items.bucket);
public static final ItemStack EMPTY_BOTTLE = new ItemStack(Items.glass_bottle);
private static final ItemStack NULL_EMPTYCONTAINER = new ItemStack(Items.bucket);
public static final ItemStack EMPTY_BUCKET = new ItemStack(Items.BUCKET);
public static final ItemStack EMPTY_BOTTLE = new ItemStack(Items.GLASS_BOTTLE);
private static final ItemStack NULL_EMPTYCONTAINER = new ItemStack(Items.BUCKET);
static
{
registerFluidContainer(FluidRegistry.WATER, new ItemStack(Items.water_bucket), EMPTY_BUCKET);
registerFluidContainer(FluidRegistry.LAVA, new ItemStack(Items.lava_bucket), EMPTY_BUCKET);
registerFluidContainer(FluidRegistry.WATER, new ItemStack(Items.potionitem), EMPTY_BOTTLE);
registerFluidContainer(FluidRegistry.WATER, new ItemStack(Items.WATER_BUCKET), EMPTY_BUCKET);
registerFluidContainer(FluidRegistry.LAVA, new ItemStack(Items.LAVA_BUCKET), EMPTY_BUCKET);
registerFluidContainer(FluidRegistry.WATER, new ItemStack(Items.POTIONITEM), EMPTY_BOTTLE);
}
private FluidContainerRegistry(){}
@@ -55,14 +55,14 @@ public abstract class FluidRegistry
public String getLocalizedName(FluidStack fs) {
return I18n.translateToLocal("tile.water.name");
}
}.setBlock(Blocks.water).setUnlocalizedName(Blocks.water.getUnlocalizedName());
}.setBlock(Blocks.WATER).setUnlocalizedName(Blocks.WATER.getUnlocalizedName());
public static final Fluid LAVA = new Fluid("lava", new ResourceLocation("blocks/lava_still"), new ResourceLocation("blocks/lava_flow")) {
@Override
public String getLocalizedName(FluidStack fs) {
return I18n.translateToLocal("tile.lava.name");
}
}.setBlock(Blocks.lava).setLuminosity(15).setDensity(3000).setViscosity(6000).setTemperature(1300).setUnlocalizedName(Blocks.lava.getUnlocalizedName());
}.setBlock(Blocks.LAVA).setLuminosity(15).setDensity(3000).setViscosity(6000).setTemperature(1300).setUnlocalizedName(Blocks.LAVA.getUnlocalizedName());
static
{
@@ -367,7 +367,7 @@ public class FluidUtil
max = fluidContainer.getCapacity(container);
}
FluidStack drained = fluidContainer.drain(container, max, false);
if (drained != null)
if (drained != null && tank.canFill(side, drained.getFluid()))
{
// check how much we can fill into the tank
int filled = tank.fill(side, drained, false);
@@ -20,10 +20,11 @@ public class TileFluidHandler extends TileEntity implements IFluidHandler
}
@Override
public void writeToNBT(NBTTagCompound tag)
public NBTTagCompound writeToNBT(NBTTagCompound tag)
{
super.writeToNBT(tag);
tag = super.writeToNBT(tag);
tank.writeToNBT(tag);
return tag;
}
/* IFluidHandler */
@@ -54,7 +54,7 @@ public class UniversalBucket extends Item implements IFluidContainerItem
this.setMaxStackSize(1);
this.setCreativeTab(CreativeTabs.tabMisc);
this.setCreativeTab(CreativeTabs.MISC);
}
@SideOnly(Side.CLIENT)
@@ -107,7 +107,7 @@ public class UniversalBucket extends Item implements IFluidContainerItem
}
// clicked on a block?
RayTraceResult mop = this.getMovingObjectPositionFromPlayer(world, player, false);
RayTraceResult mop = this.rayTrace(world, player, false);
if(mop == null || mop.typeOfHit != RayTraceResult.Type.BLOCK)
{
@@ -129,7 +129,7 @@ public class UniversalBucket extends Item implements IFluidContainerItem
&& !player.capabilities.isCreativeMode)
{
// success!
player.addStat(StatList.func_188057_b(this));
player.addStat(StatList.getObjectUseStats(this));
itemstack.stackSize--;
ItemStack emptyStack = getEmpty() != null ? getEmpty().copy() : new ItemStack(this);
@@ -181,12 +181,12 @@ public class UniversalBucket extends Item implements IFluidContainerItem
}
// water goes poof?
if (worldIn.provider.doesWaterVaporize() && (block == Blocks.flowing_water || block == Blocks.water))
if (worldIn.provider.doesWaterVaporize() && (block == Blocks.FLOWING_WATER || block == Blocks.WATER))
{
int i = pos.getX();
int j = pos.getY();
int k = pos.getZ();
worldIn.playSound(null, pos, SoundEvents.block_fire_extinguish, SoundCategory.BLOCKS, 0.5F,
worldIn.playSound(null, pos, SoundEvents.BLOCK_FIRE_EXTINGUISH, SoundCategory.BLOCKS, 0.5F,
2.6F + (worldIn.rand.nextFloat() - worldIn.rand.nextFloat()) * 0.8F);
for (int l = 0; l < 8; ++l)