mirror of
https://github.com/GTNewHorizons/Botania.git
synced 2026-11-21 12:42:50 +00:00
Package sorting around the place.
This commit is contained in:
1 parent
9b4f851fb0
commit
d0041babdd
36 files changed
+109
-45
No files matched your search
@@ -0,0 +1,77 @@
|
||||
/**
|
||||
* 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 a
|
||||
* Creative Commons Attribution-NonCommercial-ShareAlike 3.0 License
|
||||
* (http://creativecommons.org/licenses/by-nc-sa/3.0/deed.en_GB)
|
||||
*
|
||||
* File Created @ [Mar 16, 2014, 10:08:14 PM (GMT)]
|
||||
*/
|
||||
package vazkii.botania.common.block.mana;
|
||||
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.gui.ScaledResolution;
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.IIcon;
|
||||
import net.minecraft.world.World;
|
||||
import vazkii.botania.api.lexicon.ILexiconable;
|
||||
import vazkii.botania.api.lexicon.LexiconEntry;
|
||||
import vazkii.botania.api.wand.IWandHUD;
|
||||
import vazkii.botania.api.wand.IWandable;
|
||||
import vazkii.botania.client.core.helper.IconHelper;
|
||||
import vazkii.botania.common.block.BlockModContainer;
|
||||
import vazkii.botania.common.block.tile.mana.TileTurntable;
|
||||
import vazkii.botania.common.lexicon.LexiconData;
|
||||
import vazkii.botania.common.lib.LibBlockNames;
|
||||
|
||||
public class BlockTurntable extends BlockModContainer implements IWandable, IWandHUD, ILexiconable {
|
||||
|
||||
IIcon[] icons;
|
||||
|
||||
public BlockTurntable() {
|
||||
super(Material.wood);
|
||||
setHardness(2.0F);
|
||||
setStepSound(soundTypeWood);
|
||||
setBlockName(LibBlockNames.TURNTABLE);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void registerBlockIcons(IIconRegister par1IconRegister) {
|
||||
icons = new IIcon[2];
|
||||
for(int i = 0; i < icons.length; i++)
|
||||
icons[i] = IconHelper.forBlock(par1IconRegister, this, i);
|
||||
}
|
||||
|
||||
@Override
|
||||
public IIcon getIcon(int par1, int par2) {
|
||||
return par1 == 1 ? icons[0] : icons[1];
|
||||
}
|
||||
|
||||
@Override
|
||||
public TileEntity createNewTileEntity(World world, int meta) {
|
||||
return new TileTurntable();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void renderHUD(Minecraft mc, ScaledResolution res, World world, int x, int y, int z) {
|
||||
((TileTurntable) world.getTileEntity(x, y, z)).renderHUD(mc, res);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onUsedByWand(EntityPlayer player, ItemStack stack, World world, int x, int y, int z, int side) {
|
||||
((TileTurntable) world.getTileEntity(x, y, z)).onWanded(player, stack);
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public LexiconEntry getEntry(World world, int x, int y, int z, EntityPlayer player, ItemStack lexicon) {
|
||||
return LexiconData.turntable;
|
||||
}
|
||||
|
||||
}
|
||||
Reference in new issue
Block a user