mirror of
https://github.com/GTNewHorizons/Botania.git
synced 2026-11-20 20:22:33 +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
@@ -11,20 +11,22 @@
|
||||
package vazkii.botania.common.block;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.BlockState;
|
||||
import net.minecraft.block.state.BlockFaceShape;
|
||||
import net.minecraft.block.state.IBlockState;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.block.BlockState;
|
||||
import net.minecraft.entity.player.PlayerEntity;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.state.StateContainer;
|
||||
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.math.AxisAlignedBB;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.util.math.shapes.VoxelShape;
|
||||
import net.minecraft.world.IBlockReader;
|
||||
import net.minecraft.world.IWorldReaderBase;
|
||||
import net.minecraft.world.IWorldReader;
|
||||
import net.minecraft.world.IWorldReader;
|
||||
import net.minecraft.world.World;
|
||||
import vazkii.botania.api.lexicon.ILexiconable;
|
||||
import vazkii.botania.api.lexicon.LexiconEntry;
|
||||
@@ -50,28 +52,28 @@ public class BlockLightRelay extends BlockMod implements IWandable, ILexiconable
|
||||
|
||||
@Nonnull
|
||||
@Override
|
||||
public VoxelShape getShape(IBlockState state, IBlockReader world, BlockPos pos) {
|
||||
public VoxelShape getShape(BlockState state, IBlockReader world, BlockPos pos) {
|
||||
return SHAPE;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void fillStateContainer(StateContainer.Builder<Block, IBlockState> builder) {
|
||||
protected void fillStateContainer(StateContainer.Builder<Block, BlockState> builder) {
|
||||
builder.add(BotaniaStateProps.POWERED);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onBlockActivated(IBlockState state, World world, BlockPos pos, EntityPlayer player, EnumHand hand, EnumFacing s, float xs, float ys, float zs) {
|
||||
public boolean onBlockActivated(BlockState state, World world, BlockPos pos, PlayerEntity player, Hand hand, Direction s, float xs, float ys, float zs) {
|
||||
((TileLightRelay) world.getTileEntity(pos)).mountEntity(player);
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int tickRate(IWorldReaderBase world) {
|
||||
public int tickRate(IWorldReader world) {
|
||||
return 2;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void neighborChanged(IBlockState state, World worldIn, BlockPos pos, Block blockIn, BlockPos fromPos) {
|
||||
public void neighborChanged(BlockState state, World worldIn, BlockPos pos, Block blockIn, BlockPos fromPos) {
|
||||
if(!worldIn.isRemote && variant == LuminizerVariant.TOGGLE) {
|
||||
if(state.get(BotaniaStateProps.POWERED) && !worldIn.isBlockPowered(pos))
|
||||
worldIn.setBlockState(pos, state.with(BotaniaStateProps.POWERED, false));
|
||||
@@ -81,56 +83,56 @@ public class BlockLightRelay extends BlockMod implements IWandable, ILexiconable
|
||||
}
|
||||
|
||||
@Override
|
||||
public void tick(IBlockState state, World world, BlockPos pos, Random rand) {
|
||||
public void tick(BlockState state, World world, BlockPos pos, Random rand) {
|
||||
world.setBlockState(pos, state.with(BotaniaStateProps.POWERED, false), 1 | 2);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canProvidePower(IBlockState state) {
|
||||
public boolean canProvidePower(BlockState state) {
|
||||
return variant == LuminizerVariant.DETECTOR;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getWeakPower(IBlockState state, IBlockReader world, BlockPos pos, EnumFacing s) {
|
||||
public int getWeakPower(BlockState state, IBlockReader world, BlockPos pos, Direction s) {
|
||||
return variant == LuminizerVariant.DETECTOR
|
||||
&& state.get(BotaniaStateProps.POWERED) ? 15 : 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isFullCube(IBlockState state) {
|
||||
public boolean isFullCube(BlockState state) {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Nonnull
|
||||
@Override
|
||||
public EnumBlockRenderType getRenderType(IBlockState state) {
|
||||
return EnumBlockRenderType.ENTITYBLOCK_ANIMATED;
|
||||
public BlockRenderType getRenderType(BlockState state) {
|
||||
return BlockRenderType.ENTITYBLOCK_ANIMATED;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean hasTileEntity(IBlockState state) {
|
||||
public boolean hasTileEntity(BlockState state) {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Nonnull
|
||||
@Override
|
||||
public TileEntity createTileEntity(@Nonnull IBlockState state, @Nonnull IBlockReader world) {
|
||||
public TileEntity createTileEntity(@Nonnull BlockState state, @Nonnull IBlockReader world) {
|
||||
return new TileLightRelay();
|
||||
}
|
||||
|
||||
@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 false;
|
||||
}
|
||||
|
||||
@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.luminizerTransport;
|
||||
}
|
||||
|
||||
@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;
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user