mirror of
https://github.com/GTNewHorizons/Botania.git
synced 2026-11-27 15:33:08 +00:00
62 lines
1.7 KiB
Java
62 lines
1.7 KiB
Java
/**
|
|
* This class was created by <Vazkii>. It's distributed as
|
|
* part of the Botania Mod. Get the Source Code in github:
|
|
* https://github.com/Vazkii/Botania
|
|
*
|
|
* Botania is Open Source and distributed under the
|
|
* Botania License: http://botaniamod.net/license.php
|
|
*
|
|
* File Created @ [Jun 20, 2014, 8:23:17 PM (GMT)]
|
|
*/
|
|
package vazkii.botania.common.block;
|
|
|
|
import net.minecraft.block.state.IBlockState;
|
|
import net.minecraft.entity.player.EntityPlayer;
|
|
import net.minecraft.item.ItemStack;
|
|
import net.minecraft.tileentity.TileEntity;
|
|
import net.minecraft.util.math.BlockPos;
|
|
import net.minecraft.util.math.RayTraceResult;
|
|
import net.minecraft.world.World;
|
|
import vazkii.botania.api.lexicon.ILexiconable;
|
|
import vazkii.botania.common.block.tile.TileBifrost;
|
|
import vazkii.botania.common.item.ModItems;
|
|
import vazkii.botania.common.lib.LibBlockNames;
|
|
|
|
import javax.annotation.Nonnull;
|
|
import java.util.Random;
|
|
|
|
public class BlockBifrost extends BlockBifrostPerm implements ILexiconable {
|
|
|
|
public BlockBifrost() {
|
|
super(LibBlockNames.BIFROST);
|
|
setBlockUnbreakable();
|
|
}
|
|
|
|
@Override
|
|
public boolean registerInCreative() {
|
|
return false;
|
|
}
|
|
|
|
@Nonnull
|
|
@Override
|
|
public ItemStack getPickBlock(@Nonnull IBlockState state, RayTraceResult target, @Nonnull World world, @Nonnull BlockPos pos, EntityPlayer player) {
|
|
return new ItemStack(ModItems.rainbowRod);
|
|
}
|
|
|
|
@Override
|
|
public int quantityDropped(IBlockState state, int fortune, @Nonnull Random random) {
|
|
return 0;
|
|
}
|
|
|
|
@Override
|
|
public boolean hasTileEntity(IBlockState state) {
|
|
return true;
|
|
}
|
|
|
|
@Nonnull
|
|
@Override
|
|
public TileEntity createTileEntity(@Nonnull World world, @Nonnull IBlockState state) {
|
|
return new TileBifrost();
|
|
}
|
|
}
|