@@ -1,6 +1,6 @@
|
||||
--- a/net/minecraft/server/ItemBucket.java
|
||||
+++ b/net/minecraft/server/ItemBucket.java
|
||||
@@ -1,10 +1,17 @@
|
||||
@@ -1,6 +1,13 @@
|
||||
package net.minecraft.server;
|
||||
|
||||
import javax.annotation.Nullable;
|
||||
@@ -14,13 +14,8 @@
|
||||
|
||||
public class ItemBucket extends Item {
|
||||
|
||||
- private final FluidType a;
|
||||
+ public final FluidType a; // PAIL: private->public
|
||||
|
||||
public ItemBucket(FluidType fluidtype, Item.Info item_info) {
|
||||
super(item_info);
|
||||
@@ -28,12 +35,20 @@
|
||||
if (this.a == FluidTypes.a) {
|
||||
@@ -26,12 +33,20 @@
|
||||
if (this.fluidType == FluidTypes.a) {
|
||||
iblockdata = world.getType(blockposition);
|
||||
if (iblockdata.getBlock() instanceof IFluidSource) {
|
||||
+ // CraftBukkit start
|
||||
@@ -35,13 +30,13 @@
|
||||
|
||||
if (fluidtype != FluidTypes.a) {
|
||||
entityhuman.b(StatisticList.ITEM_USED.b(this));
|
||||
entityhuman.a(fluidtype.a(TagsFluid.b) ? SoundEffects.ITEM_BUCKET_FILL_LAVA : SoundEffects.ITEM_BUCKET_FILL, 1.0F, 1.0F);
|
||||
entityhuman.a(fluidtype.a(TagsFluid.LAVA) ? SoundEffects.ITEM_BUCKET_FILL_LAVA : SoundEffects.ITEM_BUCKET_FILL, 1.0F, 1.0F);
|
||||
- ItemStack itemstack1 = this.a(itemstack, entityhuman, fluidtype.b());
|
||||
+ ItemStack itemstack1 = this.a(itemstack, entityhuman, fluidtype.b(), event.getItemStack()); // CraftBukkit
|
||||
|
||||
if (!world.isClientSide) {
|
||||
CriterionTriggers.j.a((EntityPlayer) entityhuman, new ItemStack(fluidtype.b()));
|
||||
@@ -48,7 +63,7 @@
|
||||
@@ -46,7 +61,7 @@
|
||||
iblockdata = world.getType(blockposition);
|
||||
BlockPosition blockposition1 = this.a(iblockdata, blockposition, movingobjectposition);
|
||||
|
||||
@@ -85,13 +80,13 @@
|
||||
+
|
||||
+ public boolean a(EntityHuman entityhuman, World world, BlockPosition blockposition, @Nullable MovingObjectPosition movingobjectposition, EnumDirection enumdirection, BlockPosition clicked, ItemStack itemstack) {
|
||||
+ // CraftBukkit end
|
||||
if (!(this.a instanceof FluidTypeFlowing)) {
|
||||
if (!(this.fluidType instanceof FluidTypeFlowing)) {
|
||||
return false;
|
||||
} else {
|
||||
@@ -103,8 +127,18 @@
|
||||
boolean flag1 = material.isReplaceable();
|
||||
|
||||
if (!world.isEmpty(blockposition) && !flag && !flag1 && (!(iblockdata.getBlock() instanceof IFluidContainer) || !((IFluidContainer) iblockdata.getBlock()).a((IBlockAccess) world, blockposition, iblockdata, this.a))) {
|
||||
if (!world.isEmpty(blockposition) && !flag && !flag1 && (!(iblockdata.getBlock() instanceof IFluidContainer) || !((IFluidContainer) iblockdata.getBlock()).canPlace(world, blockposition, iblockdata, this.fluidType))) {
|
||||
- return movingobjectposition == null ? false : this.a(entityhuman, world, movingobjectposition.a().shift(movingobjectposition.direction), (MovingObjectPosition) null);
|
||||
+ return movingobjectposition == null ? false : this.a(entityhuman, world, movingobjectposition.a().shift(movingobjectposition.direction), (MovingObjectPosition) null, enumdirection, clicked, itemstack); // CraftBukkit
|
||||
} else {
|
||||
@@ -105,6 +100,6 @@
|
||||
+ }
|
||||
+ }
|
||||
+ // CraftBukkit end
|
||||
if (world.worldProvider.isNether() && this.a.a(TagsFluid.a)) {
|
||||
if (world.worldProvider.isNether() && this.fluidType.a(TagsFluid.WATER)) {
|
||||
int i = blockposition.getX();
|
||||
int j = blockposition.getY();
|
||||
|
||||
Reference in New Issue
Block a user