Update mappings to 09/21 snapshots.

Conflict with getMatrix in ITransformation, so renamed to getMatrixVec.
This commit is contained in:
LexManos committed 2018-09-22 03:40:22 -07:00
1 parent 5ed03945a0
commit 94e1a8e0a4
210 files changed
+1052 -978

No files matched your search

@@ -67,8 +67,8 @@ public class DispenseFluidContainer extends BehaviorDefaultDispenseItem
@Nonnull
private ItemStack fillContainer(@Nonnull IBlockSource source, @Nonnull ItemStack stack)
{
World world = source.func_197524_h();
EnumFacing dispenserFacing = source.getBlockState().getValue(BlockDispenser.FACING);
World world = source.getWorld();
EnumFacing dispenserFacing = source.getBlockState().get(BlockDispenser.FACING);
BlockPos blockpos = source.getBlockPos().offset(dispenserFacing);
FluidActionResult actionResult = FluidUtil.tryPickUpFluid(stack, null, world, blockpos, dispenserFacing.getOpposite());
@@ -108,9 +108,9 @@ public class DispenseFluidContainer extends BehaviorDefaultDispenseItem
}
FluidStack fluidStack = fluidHandler.drain(Fluid.BUCKET_VOLUME, false);
EnumFacing dispenserFacing = source.getBlockState().getValue(BlockDispenser.FACING);
EnumFacing dispenserFacing = source.getBlockState().get(BlockDispenser.FACING);
BlockPos blockpos = source.getBlockPos().offset(dispenserFacing);
FluidActionResult result = fluidStack != null ? FluidUtil.tryPlaceFluid(null, source.func_197524_h(), blockpos, stack, fluidStack) : FluidActionResult.FAILURE;
FluidActionResult result = fluidStack != null ? FluidUtil.tryPlaceFluid(null, source.getWorld(), blockpos, stack, fluidStack) : FluidActionResult.FAILURE;
if (result.isSuccess())
{
@@ -310,7 +310,7 @@ public class Fluid
for (int l = 0; l < 8; ++l)
{
worldIn.func_195589_b(Particles.field_197594_E, (double) pos.getX() + Math.random(), (double) pos.getY() + Math.random(), (double) pos.getZ() + Math.random(), 0.0D, 0.0D, 0.0D);
worldIn.addOptionalParticle(Particles.LARGE_SMOKE, (double) pos.getX() + Math.random(), (double) pos.getY() + Math.random(), (double) pos.getZ() + Math.random(), 0.0D, 0.0D, 0.0D);
}
}
@@ -87,7 +87,7 @@ public class FluidStack
{
return null;
}
if (!nbt.hasKey("FluidName", Constants.NBT.TAG_STRING))
if (!nbt.contains("FluidName", Constants.NBT.TAG_STRING))
{
return null;
}
@@ -109,7 +109,7 @@ public class FluidStack
public NBTTagCompound writeToNBT(NBTTagCompound nbt)
{
// TODO fluids bt.setString("FluidName", FluidRegistry.getFluidName(getFluid()));
nbt.setInteger("Amount", amount);
nbt.setInt("Amount", amount);
if (tag != null)
{
@@ -258,7 +258,7 @@ public class FluidUtil
return FluidActionResult.FAILURE;
}
if (player != null && player.capabilities.isCreativeMode)
if (player != null && player.abilities.isCreativeMode)
{
FluidActionResult filledReal = tryFillContainer(container, fluidSource, maxAmount, player, doFill);
if (filledReal.isSuccess())
@@ -349,7 +349,7 @@ public class FluidUtil
return FluidActionResult.FAILURE;
}
if (player != null && player.capabilities.isCreativeMode)
if (player != null && player.abilities.isCreativeMode)
{
FluidActionResult emptiedReal = tryEmptyContainer(container, fluidDestination, maxAmount, player, doDrain);
if (emptiedReal.isSuccess())
@@ -622,13 +622,13 @@ public class FluidUtil
IBlockState destBlockState = world.getBlockState(pos);
Material destMaterial = destBlockState.getMaterial();
boolean isDestNonSolid = !destMaterial.isSolid();
boolean isDestReplaceable = destBlockState.func_196953_a(context);
boolean isDestReplaceable = destBlockState.isReplaceable(context);
if (!world.isAirBlock(pos) && !isDestNonSolid && !isDestReplaceable)
{
return false; // Non-air, solid, unreplacable block. We can't put fluid here.
}
if (world.provider.doesWaterVaporize() && fluid.doesVaporize(resource))
if (world.dimension.doesWaterVaporize() && fluid.doesVaporize(resource))
{
FluidStack result = fluidSource.drain(resource, true);
if (result != null)
@@ -50,6 +50,8 @@ import net.minecraftforge.items.ItemHandlerHelper;
import javax.annotation.Nonnull;
import javax.annotation.Nullable;
import net.minecraft.item.Item.Builder;
/**
* A universal bucket that can hold any liquid
*/
@@ -83,7 +85,7 @@ public class UniversalBucket extends Item
this.setCreativeTab(CreativeTabs.MISC);
*/
BlockDispenser.func_199774_a(this, DispenseFluidContainer.getInstance());
BlockDispenser.registerDispenseBehavior(this, DispenseFluidContainer.getInstance());
}
@Override
@@ -105,9 +107,9 @@ public class UniversalBucket extends Item
}
@Override
public void getSubItems(@Nullable ItemGroup tab, @Nonnull NonNullList<ItemStack> subItems)
public void fillItemGroup(@Nullable ItemGroup tab, @Nonnull NonNullList<ItemStack> subItems)
{
if (!this.isInCreativeTab(tab))
if (!this.isInGroup(tab))
return;/* TODO fluids
for (Fluid fluid : FluidRegistry.getRegisteredFluids().values())
{
@@ -128,22 +130,22 @@ public class UniversalBucket extends Item
@Override
@Nonnull
public ITextComponent func_200295_i(@Nonnull ItemStack stack)
public ITextComponent getDisplayName(@Nonnull ItemStack stack)
{
FluidStack fluidStack = getFluid(stack);
if (fluidStack == null)
{
if(!getEmpty().isEmpty())
{
return getEmpty().func_200301_q();
return getEmpty().getDisplayName();
}
return super.func_200295_i(stack);
return super.getDisplayName(stack);
}
String unloc = this.getTranslationKey();
// TODO this is not reliable on the server
if (LanguageMap.getInstance().func_210813_b(unloc + "." + fluidStack.getFluid().getName()))
if (LanguageMap.getInstance().exists(unloc + "." + fluidStack.getFluid().getName()))
{
return new TextComponentTranslation(unloc + "." + fluidStack.getFluid().getName());
}
@@ -169,7 +171,7 @@ public class UniversalBucket extends Item
ActionResult<ItemStack> ret = ForgeEventFactory.onBucketUse(player, world, itemstack, mop);
if (ret != null) return ret;
if(mop == null || mop.typeOfHit != RayTraceResult.Type.BLOCK)
if(mop == null || mop.type != RayTraceResult.Type.BLOCK)
{
return new ActionResult<ItemStack>(EnumActionResult.PASS, itemstack);
}
@@ -186,10 +188,10 @@ public class UniversalBucket extends Item
{
// try placing liquid
FluidActionResult result = FluidUtil.tryPlaceFluid(player, world, targetPos, itemstack, fluidStack);
if (result.isSuccess() && !player.capabilities.isCreativeMode)
if (result.isSuccess() && !player.abilities.isCreativeMode)
{
// success!
player.addStat(StatList.OBJECT_USE_STATS.func_199076_b(this));
player.addStat(StatList.ITEM_USED.get(this));
itemstack.shrink(1);
ItemStack drained = result.getResult();
@@ -234,7 +236,7 @@ public class UniversalBucket extends Item
// needs to target a block
RayTraceResult target = event.getTarget();
if (target == null || target.typeOfHit != RayTraceResult.Type.BLOCK)
if (target == null || target.type != RayTraceResult.Type.BLOCK)
{
return;
}
@@ -272,7 +274,7 @@ public class UniversalBucket extends Item
@Nullable
public FluidStack getFluid(@Nonnull ItemStack container)
{
return FluidStack.loadFluidStackFromNBT(container.getTagCompound());
return FluidStack.loadFluidStackFromNBT(container.getTag());
}
public int getCapacity()
@@ -64,7 +64,7 @@ public class CapabilityFluidHandler
{
nbt.setString("Empty", "");
}
nbt.setInteger("Capacity", tank.getCapacity());
nbt.setInt("Capacity", tank.getCapacity());
return nbt;
}
@@ -75,7 +75,7 @@ public class CapabilityFluidHandler
throw new RuntimeException("IFluidHandler instance is not instance of FluidTank");
NBTTagCompound tags = (NBTTagCompound) nbt;
FluidTank tank = (FluidTank) instance;
tank.setCapacity(tags.getInteger("Capacity"));
tank.setCapacity(tags.getInt("Capacity"));
tank.readFromNBT(tags);
}
}
@@ -37,22 +37,22 @@ public class TileFluidHandler extends TileEntity
private final OptionalCapabilityInstance<IFluidHandler> holder = OptionalCapabilityInstance.of(() -> tank);
public TileFluidHandler(@Nonnull TileEntityType<?> p_i48289_1_)
public TileFluidHandler(@Nonnull TileEntityType<?> tileEntityTypeIn)
{
super(p_i48289_1_);
super(tileEntityTypeIn);
}
@Override
public void readFromNBT(NBTTagCompound tag)
public void read(NBTTagCompound tag)
{
super.readFromNBT(tag);
super.read(tag);
tank.readFromNBT(tag);
}
@Override
public NBTTagCompound writeToNBT(NBTTagCompound tag)
public NBTTagCompound write(NBTTagCompound tag)
{
tag = super.writeToNBT(tag);
tag = super.write(tag);
tank.writeToNBT(tag);
return tag;
}
@@ -73,24 +73,24 @@ public class FluidHandlerItemStack implements IFluidHandlerItem, ICapabilityProv
@Nullable
public FluidStack getFluid()
{
NBTTagCompound tagCompound = container.getTagCompound();
NBTTagCompound tagCompound = container.getTag();
if (tagCompound == null || !tagCompound.hasKey(FLUID_NBT_KEY))
{
return null;
}
return FluidStack.loadFluidStackFromNBT(tagCompound.getCompoundTag(FLUID_NBT_KEY));
return FluidStack.loadFluidStackFromNBT(tagCompound.getCompound(FLUID_NBT_KEY));
}
protected void setFluid(FluidStack fluid)
{
if (!container.hasTagCompound())
if (!container.hasTag())
{
container.setTagCompound(new NBTTagCompound());
container.setTag(new NBTTagCompound());
}
NBTTagCompound fluidTag = new NBTTagCompound();
fluid.writeToNBT(fluidTag);
container.getTagCompound().setTag(FLUID_NBT_KEY, fluidTag);
container.getTag().setTag(FLUID_NBT_KEY, fluidTag);
}
@Override
@@ -200,7 +200,7 @@ public class FluidHandlerItemStack implements IFluidHandlerItem, ICapabilityProv
*/
protected void setContainerToEmpty()
{
container.getTagCompound().removeTag(FLUID_NBT_KEY);
container.getTag().removeTag(FLUID_NBT_KEY);
}
@Override
@@ -70,24 +70,24 @@ public class FluidHandlerItemStackSimple implements IFluidHandlerItem, ICapabili
@Nullable
public FluidStack getFluid()
{
NBTTagCompound tagCompound = container.getTagCompound();
NBTTagCompound tagCompound = container.getTag();
if (tagCompound == null || !tagCompound.hasKey(FLUID_NBT_KEY))
{
return null;
}
return FluidStack.loadFluidStackFromNBT(tagCompound.getCompoundTag(FLUID_NBT_KEY));
return FluidStack.loadFluidStackFromNBT(tagCompound.getCompound(FLUID_NBT_KEY));
}
protected void setFluid(FluidStack fluid)
{
if (!container.hasTagCompound())
if (!container.hasTag())
{
container.setTagCompound(new NBTTagCompound());
container.setTag(new NBTTagCompound());
}
NBTTagCompound fluidTag = new NBTTagCompound();
fluid.writeToNBT(fluidTag);
container.getTagCompound().setTag(FLUID_NBT_KEY, fluidTag);
container.getTag().setTag(FLUID_NBT_KEY, fluidTag);
}
@Override
@@ -177,7 +177,7 @@ public class FluidHandlerItemStackSimple implements IFluidHandlerItem, ICapabili
*/
protected void setContainerToEmpty()
{
container.getTagCompound().removeTag(FLUID_NBT_KEY);
container.getTag().removeTag(FLUID_NBT_KEY);
}
@Override
@@ -155,4 +155,4 @@ public class BlockLiquidWrapper implements IFluidHandler
}
}
}
*/
*/
@@ -60,4 +60,4 @@ public class BlockWrapper extends VoidFluidHandler
}
return Fluid.BUCKET_VOLUME;
}
}
}