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

@@ -11,24 +11,31 @@
package vazkii.botania.api.subtile;
import net.minecraft.block.Block;
import net.minecraft.block.state.IBlockState;
import net.minecraft.block.BlockState;
import net.minecraft.block.BlockState;
import net.minecraft.block.Blocks;
import net.minecraft.client.Minecraft;
import net.minecraft.client.renderer.model.ModelResourceLocation;
import net.minecraft.entity.EntityLivingBase;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.init.Blocks;
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.block.Blocks;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.nbt.CompoundNBT;
import net.minecraft.nbt.CompoundNBT;
import net.minecraft.network.NetworkManager;
import net.minecraft.network.play.server.SPacketUpdateTileEntity;
import net.minecraft.network.play.server.SUpdateTileEntityPacket;
import net.minecraft.tags.BlockTags;
import net.minecraft.tags.Tag;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.tileentity.TileEntityType;
import net.minecraft.util.EnumFacing;
import net.minecraft.util.EnumHand;
import net.minecraft.util.ITickable;
import net.minecraft.util.Direction;
import net.minecraft.util.Direction;
import net.minecraft.util.Hand;
import net.minecraft.util.Hand;
import net.minecraft.tileentity.ITickableTileEntity;
import net.minecraft.util.ResourceLocation;
import net.minecraft.util.math.BlockPos;
import net.minecraft.world.World;
@@ -57,7 +64,7 @@ import java.util.List;
/**
* Common superclass of all magical flower TE's
*/
public class TileEntitySpecialFlower extends TileEntity implements ITickable, IWandBindable {
public class TileEntitySpecialFlower extends TileEntity implements ITickableTileEntity, IWandBindable {
public static final ResourceLocation DING_SOUND_EVENT = new ResourceLocation("botania", "ding");
public static final int SLOWDOWN_FACTOR_PODZOL = 5;
public static final int SLOWDOWN_FACTOR_MYCEL = 10;
@@ -121,7 +128,7 @@ public class TileEntitySpecialFlower extends TileEntity implements ITickable, IW
@Nonnull
@Override
public <T> LazyOptional<T> getCapability(@Nonnull Capability<T> cap, @Nullable EnumFacing side) {
public <T> LazyOptional<T> getCapability(@Nonnull Capability<T> cap, @Nullable Direction side) {
if(cap == BotaniaAPI.FLOATING_FLOWER_CAP) {
if(hasWorld() && getWorld().getBlockState(getPos()).isIn(FLOATING_TAG)) {
return floatingDataCap.cast();
@@ -147,7 +154,7 @@ public class TileEntitySpecialFlower extends TileEntity implements ITickable, IW
}
@Override
public final void read(NBTTagCompound cmp) {
public final void read(CompoundNBT cmp) {
super.read(cmp);
if(cmp.contains(TAG_TICKS_EXISTED))
ticksExisted = cmp.getInt(TAG_TICKS_EXISTED);
@@ -158,7 +165,7 @@ public class TileEntitySpecialFlower extends TileEntity implements ITickable, IW
@Nonnull
@Override
public final NBTTagCompound write(NBTTagCompound cmp) {
public final CompoundNBT write(CompoundNBT cmp) {
cmp.putInt(TAG_TICKS_EXISTED, ticksExisted);
cmp.put(TAG_FLOATING_DATA, BotaniaAPI.FLOATING_FLOWER_CAP.writeNBT(floatingData, null));
writeToPacketNBT(cmp);
@@ -166,14 +173,14 @@ public class TileEntitySpecialFlower extends TileEntity implements ITickable, IW
}
@Override
public SPacketUpdateTileEntity getUpdatePacket() {
NBTTagCompound cmp = new NBTTagCompound();
public SUpdateTileEntityPacket getUpdatePacket() {
CompoundNBT cmp = new CompoundNBT();
writeToPacketNBT(cmp);
return new SPacketUpdateTileEntity(getPos(), -1, cmp);
return new SUpdateTileEntityPacket(getPos(), -1, cmp);
}
@Override
public void onDataPacket(NetworkManager net, SPacketUpdateTileEntity packet) {
public void onDataPacket(NetworkManager net, SUpdateTileEntityPacket packet) {
IFloatingFlower.IslandType oldType = floatingData.getIslandType();
super.onDataPacket(net, packet);
if(oldType != floatingData.getIslandType() && isFloating()) {
@@ -183,8 +190,8 @@ public class TileEntitySpecialFlower extends TileEntity implements ITickable, IW
@Nonnull
@Override
public NBTTagCompound getUpdateTag() {
return write(new NBTTagCompound());
public CompoundNBT getUpdateTag() {
return write(new CompoundNBT());
}
/**
@@ -192,14 +199,14 @@ public class TileEntitySpecialFlower extends TileEntity implements ITickable, IW
* by readFromPacketNBT on the client that receives the packet.
* Note: This method is also used to write to the world NBT.
*/
public void writeToPacketNBT(NBTTagCompound cmp) { }
public void writeToPacketNBT(CompoundNBT cmp) { }
/**
* Reads data from a network packet. This data is written by
* writeToPacketNBT in the server. Note: This method is also used
* to read from the world NBT.
*/
public void readFromPacketNBT(NBTTagCompound cmp) { }
public void readFromPacketNBT(CompoundNBT cmp) { }
public void sync() {
VanillaPacketDispatcher.dispatchTEToNearbyPlayers(this);
@@ -213,29 +220,29 @@ public class TileEntitySpecialFlower extends TileEntity implements ITickable, IW
* Called when a Wand of the Forest is used on this sub tile. Note that the
* player parameter can be null if this is called from a dispenser.
*/
public boolean onWanded(EntityPlayer player, ItemStack wand) {
public boolean onWanded(PlayerEntity player, ItemStack wand) {
return false;
}
/**
* Called when this sub tile is placed in the world (by an entity).
*/
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) {}
/**
* Called when a player right clicks this sub tile.
*/
public boolean onBlockActivated(World world, BlockPos pos, IBlockState state, EntityPlayer player, EnumHand hand, EnumFacing side, float hitX, float hitY, float hitZ) { return false; }
public boolean onBlockActivated(World world, BlockPos pos, BlockState state, PlayerEntity player, Hand hand, Direction side, float hitX, float hitY, float hitZ) { return false; }
/**
* Called when this sub tile is added to the world.
*/
public void onBlockAdded(World world, BlockPos pos, IBlockState state) {}
public void onBlockAdded(World world, BlockPos pos, BlockState state) {}
/**
* Called when this sub tile is harvested
*/
public void onBlockHarvested(World world, BlockPos pos, IBlockState state, EntityPlayer player) {}
public void onBlockHarvested(World world, BlockPos pos, BlockState state, PlayerEntity player) {}
/**
* Allows additional processing of sub tile drops
@@ -278,18 +285,18 @@ public class TileEntitySpecialFlower extends TileEntity implements ITickable, IW
}
/**
* @see IWandBindable#canSelect(EntityPlayer, ItemStack, net.minecraft.util.math.BlockPos, net.minecraft.util.EnumFacing)
* @see IWandBindable#canSelect(PlayerEntity, ItemStack, net.minecraft.util.math.BlockPos, Direction)
*/
@Override
public boolean canSelect(EntityPlayer player, ItemStack wand, BlockPos pos, EnumFacing side) {
public boolean canSelect(PlayerEntity player, ItemStack wand, BlockPos pos, Direction side) {
return false;
}
/**
* @see IWandBindable#bindTo(EntityPlayer, ItemStack, net.minecraft.util.math.BlockPos, net.minecraft.util.EnumFacing)
* @see IWandBindable#bindTo(PlayerEntity, ItemStack, net.minecraft.util.math.BlockPos, Direction)
*/
@Override
public boolean bindTo(EntityPlayer player, ItemStack wand, BlockPos pos, EnumFacing side) {
public boolean bindTo(PlayerEntity player, ItemStack wand, BlockPos pos, Direction side) {
return false;
}
@@ -317,7 +324,7 @@ public class TileEntitySpecialFlower extends TileEntity implements ITickable, IW
/**
* Gets the redstone power level for this SubTileEntity
*/
public int getPowerLevel(EnumFacing side) {
public int getPowerLevel(Direction side) {
return 0;
}