Added the basic gui, block and tile for the centrifuge

This commit is contained in:
Modmuss50 2015-04-13 18:40:13 +01:00
parent 2b0fd80def
commit bd357e0a2c
8 changed files with 159 additions and 5 deletions

View 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;
}
}