ActuallyAdditions/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockBioReactor.java

41 lines
1.4 KiB
Java
Raw Normal View History

2016-09-14 21:42:03 +02:00
/*
* This file ("BlockBioReactor.java") is part of the Actually Additions mod for Minecraft.
* It is created and owned by Ellpeck and distributed
* under the Actually Additions License to be found at
* http://ellpeck.de/actaddlicense
* View the source code at https://github.com/Ellpeck/ActuallyAdditions
*
2017-01-01 16:23:26 +01:00
* © 2015-2017 Ellpeck
2016-09-14 21:42:03 +02:00
*/
package de.ellpeck.actuallyadditions.mod.blocks;
import de.ellpeck.actuallyadditions.mod.blocks.base.BlockContainerBase;
import de.ellpeck.actuallyadditions.mod.tile.TileEntityBioReactor;
2021-02-27 21:24:26 +01:00
import net.minecraft.block.BlockState;
2021-02-26 22:15:48 +01:00
import net.minecraft.entity.player.PlayerEntity;
2016-09-14 21:42:03 +02:00
import net.minecraft.tileentity.TileEntity;
2021-02-27 21:24:26 +01:00
import net.minecraft.util.ActionResultType;
2021-02-26 22:15:48 +01:00
import net.minecraft.util.Hand;
2016-09-14 21:42:03 +02:00
import net.minecraft.util.math.BlockPos;
2021-02-27 21:24:26 +01:00
import net.minecraft.util.math.BlockRayTraceResult;
import net.minecraft.world.IBlockReader;
2016-09-14 21:42:03 +02:00
import net.minecraft.world.World;
2019-05-02 09:10:29 +02:00
public class BlockBioReactor extends BlockContainerBase {
2016-09-14 21:42:03 +02:00
public BlockBioReactor() {
2021-02-28 15:47:54 +01:00
super(ActuallyBlocks.defaultPickProps(0, 2.0F, 10.0F));
2016-09-14 21:42:03 +02:00
}
@Override
public TileEntity newBlockEntity(IBlockReader worldIn) {
2016-09-14 21:42:03 +02:00
return new TileEntityBioReactor();
}
@Override
public ActionResultType use(BlockState state, World world, BlockPos pos, PlayerEntity player, Hand hand, BlockRayTraceResult hit) {
2021-02-28 15:47:54 +01:00
return this.openGui(world, player, pos, TileEntityBioReactor.class);
2016-09-14 21:42:03 +02:00
}
}