mirror of
https://github.com/GTNewHorizons/MagicBees.git
synced 2026-11-16 18:45:11 +00:00
Spotless
This commit is contained in:
156 files changed
+14896
-13422
No files matched your search
@@ -1,5 +1,7 @@
|
||||
package magicbees.block;
|
||||
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import magicbees.client.gui.UIScreens;
|
||||
import magicbees.main.CommonProxy;
|
||||
import magicbees.main.MagicBees;
|
||||
@@ -16,16 +18,12 @@ import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.IIcon;
|
||||
import net.minecraft.world.World;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
|
||||
public class BlockMagicApiary extends BlockContainer
|
||||
{
|
||||
public class BlockMagicApiary extends BlockContainer {
|
||||
@SideOnly(Side.CLIENT)
|
||||
private IIcon[] icons;
|
||||
|
||||
public BlockMagicApiary()
|
||||
{
|
||||
public BlockMagicApiary() {
|
||||
super(Material.wood);
|
||||
this.setCreativeTab(TabMagicBees.tabMagicBees);
|
||||
this.setBlockName("magicApiary");
|
||||
@@ -35,12 +33,11 @@ public class BlockMagicApiary extends BlockContainer
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onBlockActivated(World world, int x, int y, int z, EntityPlayer player, int par6, float par7, float par8, float par9 )
|
||||
{
|
||||
public boolean onBlockActivated(
|
||||
World world, int x, int y, int z, EntityPlayer player, int par6, float par7, float par8, float par9) {
|
||||
boolean activate = false;
|
||||
|
||||
if (!player.isSneaking())
|
||||
{
|
||||
if (!player.isSneaking()) {
|
||||
player.openGui(MagicBees.object, UIScreens.THAUMIC_APIARY.ordinal(), world, x, y, z);
|
||||
activate = true;
|
||||
}
|
||||
@@ -50,23 +47,22 @@ public class BlockMagicApiary extends BlockContainer
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public IIcon getIcon(int side, int meta){
|
||||
public IIcon getIcon(int side, int meta) {
|
||||
|
||||
if (side == 0){
|
||||
if (side == 0) {
|
||||
return icons[0];
|
||||
}else if (side == 1){
|
||||
} else if (side == 1) {
|
||||
return icons[1];
|
||||
}else if (side == 2 || side == 3){
|
||||
} else if (side == 2 || side == 3) {
|
||||
return icons[2];
|
||||
}else{
|
||||
} else {
|
||||
return icons[3];
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void registerBlockIcons(IIconRegister register)
|
||||
{
|
||||
public void registerBlockIcons(IIconRegister register) {
|
||||
icons = new IIcon[4];
|
||||
|
||||
icons[0] = register.registerIcon(CommonProxy.DOMAIN + ":thaumicapiary.0");
|
||||
@@ -81,15 +77,15 @@ public class BlockMagicApiary extends BlockContainer
|
||||
}
|
||||
|
||||
@Override
|
||||
public void breakBlock(World world, int x, int y, int z, Block block, int meta){
|
||||
public void breakBlock(World world, int x, int y, int z, Block block, int meta) {
|
||||
TileEntity te = world.getTileEntity(x, y, z);
|
||||
if (te != null && te instanceof IInventory){
|
||||
IInventory inventory = (IInventory)te;
|
||||
if (te != null && te instanceof IInventory) {
|
||||
IInventory inventory = (IInventory) te;
|
||||
|
||||
for (int i = 0; i < inventory.getSizeInventory(); i++){
|
||||
for (int i = 0; i < inventory.getSizeInventory(); i++) {
|
||||
ItemStack itemStack = inventory.getStackInSlotOnClosing(i);
|
||||
|
||||
if (itemStack != null){
|
||||
if (itemStack != null) {
|
||||
float spawnX = x + world.rand.nextFloat();
|
||||
float spawnY = y + world.rand.nextFloat();
|
||||
float spawnZ = z + world.rand.nextFloat();
|
||||
|
||||
Reference in new issue
Block a user