update gradle, apply migration mappings, start fixing stuff

This commit is contained in:
Vincent Lee committed 2019-06-08 01:07:26 -07:00
1 parent 2f3a1935cf
commit 7ef12b61d8
650 files changed
+7307 -6234

No files matched your search

@@ -10,17 +10,22 @@
*/
package vazkii.botania.common.block;
import net.minecraft.block.state.IBlockState;
import net.minecraft.block.BlockState;
import net.minecraft.block.BlockState;
import net.minecraft.client.Minecraft;
import net.minecraft.entity.EntityLivingBase;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.entity.LivingEntity;
import net.minecraft.entity.LivingEntity;
import net.minecraft.entity.player.PlayerEntity;
import net.minecraft.entity.player.PlayerEntity;
import net.minecraft.fluid.IFluidState;
import net.minecraft.item.EnumDyeColor;
import net.minecraft.item.DyeColor;
import net.minecraft.item.DyeColor;
import net.minecraft.item.ItemStack;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.EnumBlockRenderType;
import net.minecraft.util.EnumFacing;
import net.minecraft.util.EnumHand;
import net.minecraft.block.BlockRenderType;
import net.minecraft.util.Direction;
import net.minecraft.util.Direction;
import net.minecraft.util.Hand;
import net.minecraft.util.NonNullList;
import net.minecraft.util.math.BlockPos;
import net.minecraft.world.IBlockReader;
@@ -45,12 +50,12 @@ public class BlockFloatingSpecialFlower extends BlockFloatingFlower implements I
private final Supplier<? extends TileEntitySpecialFlower> teProvider;
public BlockFloatingSpecialFlower(Properties props, Supplier<? extends TileEntitySpecialFlower> teProvider) {
super(EnumDyeColor.WHITE, props);
super(DyeColor.WHITE, props);
this.teProvider = teProvider;
}
@Override
public int getLightValue(@Nonnull IBlockState state, IWorldReader world, @Nonnull BlockPos pos) {
public int getLightValue(@Nonnull BlockState state, IWorldReader world, @Nonnull BlockPos pos) {
if(world.getBlockState(pos).getBlock() != this)
return world.getBlockState(pos).getLightValue(world, pos);
@@ -59,41 +64,41 @@ public class BlockFloatingSpecialFlower extends BlockFloatingFlower implements I
}
@Override
public boolean hasComparatorInputOverride(IBlockState state) {
public boolean hasComparatorInputOverride(BlockState state) {
return true;
}
@Override
public int getComparatorInputOverride(IBlockState state, World world, BlockPos pos) {
public int getComparatorInputOverride(BlockState state, World world, BlockPos pos) {
return ((TileEntitySpecialFlower) world.getTileEntity(pos)).getComparatorInputOverride();
}
@Override
public int getWeakPower(IBlockState state, IBlockReader world, BlockPos pos, EnumFacing side) {
public int getWeakPower(BlockState state, IBlockReader world, BlockPos pos, Direction side) {
return ((TileEntitySpecialFlower) world.getTileEntity(pos)).getPowerLevel(side);
}
@Override
public int getStrongPower(IBlockState state, IBlockReader world, BlockPos pos, EnumFacing side) {
public int getStrongPower(BlockState state, IBlockReader world, BlockPos pos, Direction side) {
return getWeakPower(state, world, pos, side);
}
@Override
public boolean canProvidePower(IBlockState state) {
public boolean canProvidePower(BlockState state) {
return true;
}
@OnlyIn(Dist.CLIENT)
@Override
public void animateTick(IBlockState state, World world, BlockPos pos, Random rand) {}
public void animateTick(BlockState state, World world, BlockPos pos, Random rand) {}
@Override
public void onBlockHarvested(World world, BlockPos pos, IBlockState state, EntityPlayer player) {
public void onBlockHarvested(World world, BlockPos pos, BlockState state, PlayerEntity player) {
((TileEntitySpecialFlower) world.getTileEntity(pos)).onBlockHarvested(world, pos, state, player);
}
@Override
public boolean removedByPlayer(@Nonnull IBlockState state, World world, @Nonnull BlockPos pos, @Nonnull EntityPlayer player, boolean willHarvest, IFluidState fluid) {
public boolean removedByPlayer(@Nonnull BlockState state, World world, @Nonnull BlockPos pos, @Nonnull PlayerEntity player, boolean willHarvest, IFluidState fluid) {
if (willHarvest) {
// Copy of super.removedByPlayer but don't set to air yet
// This is so getDrops below will have a TE to work with
@@ -105,14 +110,14 @@ public class BlockFloatingSpecialFlower extends BlockFloatingFlower implements I
}
@Override
public void harvestBlock(@Nonnull World world, EntityPlayer player, @Nonnull BlockPos pos, @Nonnull IBlockState state, TileEntity te, ItemStack stack) {
public void harvestBlock(@Nonnull World world, PlayerEntity player, @Nonnull BlockPos pos, @Nonnull BlockState state, TileEntity te, ItemStack stack) {
super.harvestBlock(world, player, pos, state, te, stack);
// Now delete the block and TE
world.removeBlock(pos);
}
@Override
public void getDrops(@Nonnull IBlockState state, NonNullList<ItemStack> list, World world, BlockPos pos, int fortune) {
public void getDrops(@Nonnull BlockState state, NonNullList<ItemStack> list, World world, BlockPos pos, int fortune) {
super.getDrops(state, list, world, pos, fortune);
TileEntity tile = world.getTileEntity(pos);
@@ -122,22 +127,22 @@ public class BlockFloatingSpecialFlower extends BlockFloatingFlower implements I
}
@Override
public boolean onUsedByWand(EntityPlayer player, ItemStack stack, World world, BlockPos pos, EnumFacing side) {
public boolean onUsedByWand(PlayerEntity player, ItemStack stack, World world, BlockPos pos, Direction side) {
return ((TileEntitySpecialFlower) world.getTileEntity(pos)).onWanded(player, stack);
}
@Override
public void onBlockPlacedBy(World world, BlockPos pos, IBlockState state, EntityLivingBase entity, ItemStack stack) {
public void onBlockPlacedBy(World world, BlockPos pos, BlockState state, LivingEntity entity, ItemStack stack) {
((TileEntitySpecialFlower) world.getTileEntity(pos)).onBlockPlacedBy(world, pos, state, entity, stack);
}
@Override
public boolean onBlockActivated(IBlockState state, World world, BlockPos pos, EntityPlayer player, EnumHand hand, EnumFacing side, float hitX, float hitY, float hitZ) {
public boolean onBlockActivated(BlockState state, World world, BlockPos pos, PlayerEntity player, Hand hand, Direction side, float hitX, float hitY, float hitZ) {
return ((TileEntitySpecialFlower) world.getTileEntity(pos)).onBlockActivated(world, pos, state, player, hand, side, hitX, hitY, hitZ) || super.onBlockActivated(state, world, pos, player, hand, side, hitX, hitY, hitZ);
}
@Override
public void onBlockAdded(IBlockState state, World world, BlockPos pos, IBlockState oldState) {
public void onBlockAdded(BlockState state, World world, BlockPos pos, BlockState oldState) {
((TileEntitySpecialFlower) world.getTileEntity(pos)).onBlockAdded(world, pos, state);
}
@@ -149,12 +154,12 @@ public class BlockFloatingSpecialFlower extends BlockFloatingFlower implements I
@Nonnull
@Override
public TileEntity createTileEntity(@Nonnull IBlockState state, @Nonnull IBlockReader world) {
public TileEntity createTileEntity(@Nonnull BlockState state, @Nonnull IBlockReader world) {
return teProvider.get();
}
@Override
public LexiconEntry getEntry(World world, BlockPos pos, EntityPlayer player, ItemStack lexicon) {
public LexiconEntry getEntry(World world, BlockPos pos, PlayerEntity player, ItemStack lexicon) {
return ((TileEntitySpecialFlower) world.getTileEntity(pos)).getEntry();
}
}