mirror of
https://github.com/GTNewHorizons/Botania.git
synced 2026-11-23 13:40:11 +00:00
update gradle, apply migration mappings, start fixing stuff
This commit is contained in:
1 parent
2f3a1935cf
commit
7ef12b61d8
650 files changed
+7307
-6234
No files matched your search
@@ -10,16 +10,19 @@
|
||||
*/
|
||||
package vazkii.botania.common.block;
|
||||
|
||||
import net.minecraft.block.BlockState;
|
||||
import net.minecraft.block.state.BlockFaceShape;
|
||||
import net.minecraft.block.state.IBlockState;
|
||||
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.player.PlayerEntity;
|
||||
import net.minecraft.entity.player.PlayerEntity;
|
||||
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.Hand;
|
||||
import net.minecraft.util.Hand;
|
||||
import net.minecraft.util.math.AxisAlignedBB;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.util.math.shapes.VoxelShape;
|
||||
@@ -49,8 +52,8 @@ public class BlockAnimatedTorch extends BlockMod implements IWandable, IManaTrig
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onBlockActivated(IBlockState state, World worldIn, BlockPos pos, EntityPlayer playerIn, EnumHand hand, EnumFacing side, float hitX, float hitY, float hitZ) {
|
||||
if(hand == EnumHand.MAIN_HAND && playerIn.isSneaking() && playerIn.getHeldItem(hand).isEmpty()) {
|
||||
public boolean onBlockActivated(BlockState state, World worldIn, BlockPos pos, PlayerEntity playerIn, Hand hand, Direction side, float hitX, float hitY, float hitZ) {
|
||||
if(hand == Hand.MAIN_HAND && playerIn.isSneaking() && playerIn.getHeldItem(hand).isEmpty()) {
|
||||
((TileAnimatedTorch) worldIn.getTileEntity(pos)).handRotate();
|
||||
return true;
|
||||
}
|
||||
@@ -59,7 +62,7 @@ public class BlockAnimatedTorch extends BlockMod implements IWandable, IManaTrig
|
||||
}
|
||||
|
||||
@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) {
|
||||
((TileAnimatedTorch) world.getTileEntity(pos)).onPlace(entity);
|
||||
}
|
||||
|
||||
@@ -75,7 +78,7 @@ public class BlockAnimatedTorch extends BlockMod implements IWandable, IManaTrig
|
||||
}
|
||||
|
||||
@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) {
|
||||
((TileAnimatedTorch) world.getTileEntity(pos)).onWanded();
|
||||
return true;
|
||||
}
|
||||
@@ -87,17 +90,17 @@ public class BlockAnimatedTorch extends BlockMod implements IWandable, IManaTrig
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canProvidePower(IBlockState state) {
|
||||
public boolean canProvidePower(BlockState state) {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getStrongPower(IBlockState blockState, IBlockReader blockAccess, BlockPos pos, EnumFacing side) {
|
||||
public int getStrongPower(BlockState blockState, IBlockReader blockAccess, BlockPos pos, Direction side) {
|
||||
return getWeakPower(blockState, blockAccess, pos, side);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getWeakPower(IBlockState blockState, IBlockReader blockAccess, BlockPos pos, EnumFacing side) {
|
||||
public int getWeakPower(BlockState blockState, IBlockReader blockAccess, BlockPos pos, Direction side) {
|
||||
TileAnimatedTorch tile = (TileAnimatedTorch) blockAccess.getTileEntity(pos);
|
||||
|
||||
if(tile.rotating)
|
||||
@@ -111,46 +114,46 @@ public class BlockAnimatedTorch extends BlockMod implements IWandable, IManaTrig
|
||||
|
||||
@Nonnull
|
||||
@Override
|
||||
public EnumBlockRenderType getRenderType(IBlockState state) {
|
||||
return EnumBlockRenderType.ENTITYBLOCK_ANIMATED;
|
||||
public BlockRenderType getRenderType(BlockState state) {
|
||||
return BlockRenderType.ENTITYBLOCK_ANIMATED;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isFullCube(IBlockState state) {
|
||||
public boolean isFullCube(BlockState state) {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Nonnull
|
||||
@Override
|
||||
public VoxelShape getShape(IBlockState state, IBlockReader world, BlockPos pos) {
|
||||
public VoxelShape getShape(BlockState state, IBlockReader world, BlockPos pos) {
|
||||
return SHAPE;
|
||||
}
|
||||
|
||||
@Override
|
||||
public TileEntity createTileEntity(@Nonnull IBlockState state, @Nonnull IBlockReader world) {
|
||||
public TileEntity createTileEntity(@Nonnull BlockState state, @Nonnull IBlockReader world) {
|
||||
return new TileAnimatedTorch();
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean hasTileEntity(IBlockState state) {
|
||||
public boolean hasTileEntity(BlockState state) {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Nonnull
|
||||
@Override
|
||||
public BlockFaceShape getBlockFaceShape(IBlockReader world, IBlockState state, BlockPos pos, EnumFacing side) {
|
||||
public BlockFaceShape getBlockFaceShape(IBlockReader world, BlockState state, BlockPos pos, Direction side) {
|
||||
return BlockFaceShape.UNDEFINED;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onPlayerDestroy(IWorld world, BlockPos pos, IBlockState state) {
|
||||
public void onPlayerDestroy(IWorld world, BlockPos pos, BlockState state) {
|
||||
// TE is already gone so best we can do is just notify everyone
|
||||
world.notifyNeighbors(pos, this);
|
||||
super.onPlayerDestroy(world, pos, state);
|
||||
}
|
||||
|
||||
@Override
|
||||
public LexiconEntry getEntry(World world, BlockPos pos, EntityPlayer player, ItemStack lexicon) {
|
||||
public LexiconEntry getEntry(World world, BlockPos pos, PlayerEntity player, ItemStack lexicon) {
|
||||
return LexiconData.animatedTorch;
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user