Added the basic gui, block and tile for the centrifuge
This commit is contained in:
parent
2b0fd80def
commit
bd357e0a2c
8 changed files with 159 additions and 5 deletions
30
src/main/java/techreborn/blocks/BlockCentrifuge.java
Normal file
30
src/main/java/techreborn/blocks/BlockCentrifuge.java
Normal file
|
@ -0,0 +1,30 @@
|
|||
package techreborn.blocks;
|
||||
|
||||
import net.minecraft.block.BlockContainer;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.world.World;
|
||||
import techreborn.Core;
|
||||
import techreborn.client.GuiHandler;
|
||||
import techreborn.tiles.TileCentrifuge;
|
||||
|
||||
public class BlockCentrifuge extends BlockContainer {
|
||||
|
||||
public BlockCentrifuge(){
|
||||
super(Material.piston);
|
||||
}
|
||||
|
||||
@Override
|
||||
public TileEntity createNewTileEntity(World p_149915_1_, int p_149915_2_) {
|
||||
return new TileCentrifuge();
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onBlockActivated(World world, int x, int y, int z, EntityPlayer player, int side, float hitX, float hitY, float hitZ) {
|
||||
if(!player.isSneaking())
|
||||
player.openGui(Core.INSTANCE, GuiHandler.centrifugeID, world, x, y, z);
|
||||
return true;
|
||||
}
|
||||
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue