Commit f37e81ac authored by Zandor Smith's avatar Zandor Smith 💻

Format all source files.

parent 1207c0bc
......@@ -8,17 +8,18 @@ import net.minecraft.world.IBlockAccess;
public class BlockNetherStar extends ATBlock {
public BlockNetherStar() {
super(Material.iron);
this.setCreativeTab(AdvancedTools.tabMaterials);
setHardness(5.0F);
setStepSound(Block.soundTypeMetal);
this.setBlockTextureName("advancedtools:blockNetherStar");
this.setBlockName("netherstarblock");
}
public BlockNetherStar() {
super(Material.iron);
this.setCreativeTab(AdvancedTools.tabMaterials);
setHardness(5.0F);
setStepSound(Block.soundTypeMetal);
this.setBlockTextureName("advancedtools:blockNetherStar");
this.setBlockName("netherstarblock");
}
@Override
public boolean isBeaconBase(IBlockAccess worldObj, int x, int y, int z, int beaconX, int beaconY, int beaconZ) {
return true;
}
@Override
public boolean isBeaconBase(IBlockAccess worldObj, int x, int y, int z, int beaconX, int beaconY, int beaconZ) {
return true;
}
}
......@@ -12,32 +12,27 @@ import net.minecraft.client.renderer.texture.IIconRegister;
*/
public class ATBlock extends Block {
public ATBlock(Material material)
{
super(material);
}
public ATBlock()
{
this(Material.rock);
}
@Override
public String getUnlocalizedName()
{
return String.format("tile.%s%s", ATProps.modid.toLowerCase() + ":", getUnwrappedUnlocalizedName(super.getUnlocalizedName()));
}
@Override
@SideOnly(Side.CLIENT)
public void registerBlockIcons(IIconRegister iconRegister)
{
blockIcon = iconRegister.registerIcon(String.format("%s", getUnwrappedUnlocalizedName(this.getUnlocalizedName())));
}
protected String getUnwrappedUnlocalizedName(String unlocalizedName)
{
return unlocalizedName.substring(unlocalizedName.indexOf(".") + 1);
}
public ATBlock(Material material) {
super(material);
}
public ATBlock() {
this(Material.rock);
}
@Override
public String getUnlocalizedName() {
return String.format("tile.%s%s", ATProps.modid.toLowerCase() + ":", getUnwrappedUnlocalizedName(super.getUnlocalizedName()));
}
@Override
@SideOnly(Side.CLIENT)
public void registerBlockIcons(IIconRegister iconRegister) {
blockIcon = iconRegister.registerIcon(String.format("%s", getUnwrappedUnlocalizedName(this.getUnlocalizedName())));
}
protected String getUnwrappedUnlocalizedName(String unlocalizedName) {
return unlocalizedName.substring(unlocalizedName.indexOf(".") + 1);
}
}
......@@ -12,33 +12,28 @@ import net.minecraft.item.ItemStack;
*/
public class ATItem extends Item {
public ATItem()
{
super();
}
@Override
public String getUnlocalizedName()
{
return String.format("item.%s%s", ATProps.modid.toLowerCase() + ":", getUnwrappedUnlocalizedName(super.getUnlocalizedName()));
}
@Override
public String getUnlocalizedName(ItemStack itemStack)
{
return String.format("item.%s%s", ATProps.modid.toLowerCase() + ":", getUnwrappedUnlocalizedName(super.getUnlocalizedName()));
}
@Override
@SideOnly(Side.CLIENT)
public void registerIcons(IIconRegister iconRegister)
{
itemIcon = iconRegister.registerIcon(this.getUnlocalizedName().substring(this.getUnlocalizedName().indexOf(".") + 1));
}
protected String getUnwrappedUnlocalizedName(String unlocalizedName)
{
return unlocalizedName.substring(unlocalizedName.indexOf(".") + 1);
}
public ATItem() {
super();
}
@Override
public String getUnlocalizedName() {
return String.format("item.%s%s", ATProps.modid.toLowerCase() + ":", getUnwrappedUnlocalizedName(super.getUnlocalizedName()));
}
@Override
public String getUnlocalizedName(ItemStack itemStack) {
return String.format("item.%s%s", ATProps.modid.toLowerCase() + ":", getUnwrappedUnlocalizedName(super.getUnlocalizedName()));
}
@Override
@SideOnly(Side.CLIENT)
public void registerIcons(IIconRegister iconRegister) {
itemIcon = iconRegister.registerIcon(this.getUnlocalizedName().substring(this.getUnlocalizedName().indexOf(".") + 1));
}
protected String getUnwrappedUnlocalizedName(String unlocalizedName) {
return unlocalizedName.substring(unlocalizedName.indexOf(".") + 1);
}
}
......@@ -12,31 +12,28 @@ import net.minecraft.item.ItemStack;
*/
public class ATItemAxe extends ItemAxe {
public ATItemAxe(ToolMaterial material) {
super(material);
}
@Override
public String getUnlocalizedName()
{
return String.format("item.%s%s", ATProps.modid.toLowerCase() + ":", getUnwrappedUnlocalizedName(super.getUnlocalizedName()));
}
@Override
public String getUnlocalizedName(ItemStack itemStack)
{
return String.format("item.%s%s", ATProps.modid.toLowerCase() + ":", getUnwrappedUnlocalizedName(super.getUnlocalizedName()));
}
@Override
@SideOnly(Side.CLIENT)
public void registerIcons(IIconRegister iconRegister)
{
itemIcon = iconRegister.registerIcon(this.getUnlocalizedName().substring(this.getUnlocalizedName().indexOf(".") + 1));
}
protected String getUnwrappedUnlocalizedName(String unlocalizedName)
{
return unlocalizedName.substring(unlocalizedName.indexOf(".") + 1);
}
public ATItemAxe(ToolMaterial material) {
super(material);
}
@Override
public String getUnlocalizedName() {
return String.format("item.%s%s", ATProps.modid.toLowerCase() + ":", getUnwrappedUnlocalizedName(super.getUnlocalizedName()));
}
@Override
public String getUnlocalizedName(ItemStack itemStack) {
return String.format("item.%s%s", ATProps.modid.toLowerCase() + ":", getUnwrappedUnlocalizedName(super.getUnlocalizedName()));
}
@Override
@SideOnly(Side.CLIENT)
public void registerIcons(IIconRegister iconRegister) {
itemIcon = iconRegister.registerIcon(this.getUnlocalizedName().substring(this.getUnlocalizedName().indexOf(".") + 1));
}
protected String getUnwrappedUnlocalizedName(String unlocalizedName) {
return unlocalizedName.substring(unlocalizedName.indexOf(".") + 1);
}
}
......@@ -12,32 +12,28 @@ import net.minecraft.item.ItemStack;
*/
public class ATItemHoe extends ItemHoe {
public ATItemHoe(ToolMaterial material) {
super(material);
}
@Override
public String getUnlocalizedName()
{
return String.format("item.%s%s", ATProps.modid.toLowerCase() + ":", getUnwrappedUnlocalizedName(super.getUnlocalizedName()));
}
@Override
public String getUnlocalizedName(ItemStack itemStack)
{
return String.format("item.%s%s", ATProps.modid.toLowerCase() + ":", getUnwrappedUnlocalizedName(super.getUnlocalizedName()));
}
@Override
@SideOnly(Side.CLIENT)
public void registerIcons(IIconRegister iconRegister)
{
itemIcon = iconRegister.registerIcon(this.getUnlocalizedName().substring(this.getUnlocalizedName().indexOf(".") + 1));
}
protected String getUnwrappedUnlocalizedName(String unlocalizedName)
{
return unlocalizedName.substring(unlocalizedName.indexOf(".") + 1);
}
public ATItemHoe(ToolMaterial material) {
super(material);
}
@Override
public String getUnlocalizedName() {
return String.format("item.%s%s", ATProps.modid.toLowerCase() + ":", getUnwrappedUnlocalizedName(super.getUnlocalizedName()));
}
@Override
public String getUnlocalizedName(ItemStack itemStack) {
return String.format("item.%s%s", ATProps.modid.toLowerCase() + ":", getUnwrappedUnlocalizedName(super.getUnlocalizedName()));
}
@Override
@SideOnly(Side.CLIENT)
public void registerIcons(IIconRegister iconRegister) {
itemIcon = iconRegister.registerIcon(this.getUnlocalizedName().substring(this.getUnlocalizedName().indexOf(".") + 1));
}
protected String getUnwrappedUnlocalizedName(String unlocalizedName) {
return unlocalizedName.substring(unlocalizedName.indexOf(".") + 1);
}
}
......@@ -12,31 +12,28 @@ import net.minecraft.item.ItemStack;
*/
public class ATItemPickaxe extends ItemPickaxe {
public ATItemPickaxe(ToolMaterial material) {
super(material);
}
@Override
public String getUnlocalizedName()
{
return String.format("item.%s%s", ATProps.modid.toLowerCase() + ":", getUnwrappedUnlocalizedName(super.getUnlocalizedName()));
}
@Override
public String getUnlocalizedName(ItemStack itemStack)
{
return String.format("item.%s%s", ATProps.modid.toLowerCase() + ":", getUnwrappedUnlocalizedName(super.getUnlocalizedName()));
}
@Override
@SideOnly(Side.CLIENT)
public void registerIcons(IIconRegister iconRegister)
{
itemIcon = iconRegister.registerIcon(this.getUnlocalizedName().substring(this.getUnlocalizedName().indexOf(".") + 1));
}
protected String getUnwrappedUnlocalizedName(String unlocalizedName)
{
return unlocalizedName.substring(unlocalizedName.indexOf(".") + 1);
}
public ATItemPickaxe(ToolMaterial material) {
super(material);
}
@Override
public String getUnlocalizedName() {
return String.format("item.%s%s", ATProps.modid.toLowerCase() + ":", getUnwrappedUnlocalizedName(super.getUnlocalizedName()));
}
@Override
public String getUnlocalizedName(ItemStack itemStack) {
return String.format("item.%s%s", ATProps.modid.toLowerCase() + ":", getUnwrappedUnlocalizedName(super.getUnlocalizedName()));
}
@Override
@SideOnly(Side.CLIENT)
public void registerIcons(IIconRegister iconRegister) {
itemIcon = iconRegister.registerIcon(this.getUnlocalizedName().substring(this.getUnlocalizedName().indexOf(".") + 1));
}
protected String getUnwrappedUnlocalizedName(String unlocalizedName) {
return unlocalizedName.substring(unlocalizedName.indexOf(".") + 1);
}
}
......@@ -12,31 +12,28 @@ import net.minecraft.item.ItemStack;
*/
public class ATItemShovel extends ItemSpade {
public ATItemShovel(ToolMaterial material) {
super(material);
}
@Override
public String getUnlocalizedName()
{
return String.format("item.%s%s", ATProps.modid.toLowerCase() + ":", getUnwrappedUnlocalizedName(super.getUnlocalizedName()));
}
@Override
public String getUnlocalizedName(ItemStack itemStack)
{
return String.format("item.%s%s", ATProps.modid.toLowerCase() + ":", getUnwrappedUnlocalizedName(super.getUnlocalizedName()));
}
@Override
@SideOnly(Side.CLIENT)
public void registerIcons(IIconRegister iconRegister)
{
itemIcon = iconRegister.registerIcon(this.getUnlocalizedName().substring(this.getUnlocalizedName().indexOf(".") + 1));
}
protected String getUnwrappedUnlocalizedName(String unlocalizedName)
{
return unlocalizedName.substring(unlocalizedName.indexOf(".") + 1);
}
public ATItemShovel(ToolMaterial material) {
super(material);
}
@Override
public String getUnlocalizedName() {
return String.format("item.%s%s", ATProps.modid.toLowerCase() + ":", getUnwrappedUnlocalizedName(super.getUnlocalizedName()));
}
@Override
public String getUnlocalizedName(ItemStack itemStack) {
return String.format("item.%s%s", ATProps.modid.toLowerCase() + ":", getUnwrappedUnlocalizedName(super.getUnlocalizedName()));
}
@Override
@SideOnly(Side.CLIENT)
public void registerIcons(IIconRegister iconRegister) {
itemIcon = iconRegister.registerIcon(this.getUnlocalizedName().substring(this.getUnlocalizedName().indexOf(".") + 1));
}
protected String getUnwrappedUnlocalizedName(String unlocalizedName) {
return unlocalizedName.substring(unlocalizedName.indexOf(".") + 1);
}
}
......@@ -12,31 +12,28 @@ import net.minecraft.item.ItemSword;
*/
public class ATItemSword extends ItemSword {
public ATItemSword(ToolMaterial material) {
super(material);
}
@Override
public String getUnlocalizedName()
{
return String.format("item.%s%s", ATProps.modid.toLowerCase() + ":", getUnwrappedUnlocalizedName(super.getUnlocalizedName()));
}
@Override
public String getUnlocalizedName(ItemStack itemStack)
{
return String.format("item.%s%s", ATProps.modid.toLowerCase() + ":", getUnwrappedUnlocalizedName(super.getUnlocalizedName()));
}
@Override
@SideOnly(Side.CLIENT)
public void registerIcons(IIconRegister iconRegister)
{
itemIcon = iconRegister.registerIcon(this.getUnlocalizedName().substring(this.getUnlocalizedName().indexOf(".") + 1));
}
protected String getUnwrappedUnlocalizedName(String unlocalizedName)
{
return unlocalizedName.substring(unlocalizedName.indexOf(".") + 1);
}
public ATItemSword(ToolMaterial material) {
super(material);
}
@Override
public String getUnlocalizedName() {
return String.format("item.%s%s", ATProps.modid.toLowerCase() + ":", getUnwrappedUnlocalizedName(super.getUnlocalizedName()));
}
@Override
public String getUnlocalizedName(ItemStack itemStack) {
return String.format("item.%s%s", ATProps.modid.toLowerCase() + ":", getUnwrappedUnlocalizedName(super.getUnlocalizedName()));
}
@Override
@SideOnly(Side.CLIENT)
public void registerIcons(IIconRegister iconRegister) {
itemIcon = iconRegister.registerIcon(this.getUnlocalizedName().substring(this.getUnlocalizedName().indexOf(".") + 1));
}
protected String getUnwrappedUnlocalizedName(String unlocalizedName) {
return unlocalizedName.substring(unlocalizedName.indexOf(".") + 1);
}
}
......@@ -9,13 +9,13 @@ import net.minecraft.item.Item;
*/
public class CreativeTabATCombat extends CreativeTabs {
public CreativeTabATCombat(String tabLabel) {
super(tabLabel);
}
public CreativeTabATCombat(String tabLabel) {
super(tabLabel);
}
@Override
public Item getTabIconItem() {
//return ModItems.emeraldSword;
return Items.diamond_sword;
}
@Override
public Item getTabIconItem() {
//return ModItems.emeraldSword;
return Items.diamond_sword;
}
}
......@@ -9,13 +9,13 @@ import net.minecraft.item.Item;
*/
public class CreativeTabATMaterials extends CreativeTabs {
public CreativeTabATMaterials(String tabLabel) {
super(tabLabel);
}
public CreativeTabATMaterials(String tabLabel) {
super(tabLabel);
}
@Override
public Item getTabIconItem() {
//return ModItems.enderionIngot;
return Items.iron_ingot;
}
@Override
public Item getTabIconItem() {
//return ModItems.enderionIngot;
return Items.iron_ingot;
}
}
......@@ -9,12 +9,12 @@ import net.minecraft.item.Item;
*/
public class CreativeTabATTools extends CreativeTabs {
public CreativeTabATTools(String tabLabel) {
super(tabLabel);
}
public CreativeTabATTools(String tabLabel) {
super(tabLabel);
}
@Override
public Item getTabIconItem() {
return Items.iron_axe;
}
@Override
public Item getTabIconItem() {
return Items.iron_axe;
}
}
......@@ -14,64 +14,64 @@ import net.minecraft.item.ItemStack;
*/
public class RingOfFlight extends ATItem implements IBauble {
public RingOfFlight() {
this.setUnlocalizedName("RingOfFlight");
this.setCreativeTab(AdvancedTools.tabTools);
}
public RingOfFlight() {
this.setUnlocalizedName("RingOfFlight");
this.setCreativeTab(AdvancedTools.tabTools);
}
@Override
public BaubleType getBaubleType(ItemStack itemStack) {
return BaubleType.RING;
}
@Override
public BaubleType getBaubleType(ItemStack itemStack) {
return BaubleType.RING;
}
/*@Override
public void onEquippedOrLoadedIntoWorld(ItemStack stack, EntityLivingBase entity) {
startFlying((EntityPlayer) entity);
}*/
@Override
public void onWornTick(ItemStack itemStack, EntityLivingBase entityLivingBase) {
if(entityLivingBase instanceof EntityPlayer) {
EntityPlayer player = ((EntityPlayer) entityLivingBase);
if(!player.capabilities.allowFlying) {
startFlying(player);
}
}
}
@Override
public void onWornTick(ItemStack itemStack, EntityLivingBase entityLivingBase) {
if (entityLivingBase instanceof EntityPlayer) {
EntityPlayer player = ((EntityPlayer) entityLivingBase);
if (!player.capabilities.allowFlying) {
startFlying(player);
}
}
}
@Override
public void onEquipped(ItemStack itemStack, EntityLivingBase entityLivingBase) {
startFlying((EntityPlayer) entityLivingBase);
}
@Override
public void onEquipped(ItemStack itemStack, EntityLivingBase entityLivingBase) {
startFlying((EntityPlayer) entityLivingBase);
}
@Override
public void onUnequipped(ItemStack itemStack, EntityLivingBase entityLivingBase) {
stopFlying((EntityPlayer) entityLivingBase);
}
@Override
public void onUnequipped(ItemStack itemStack, EntityLivingBase entityLivingBase) {
stopFlying((EntityPlayer) entityLivingBase);
}
@Override
public boolean canEquip(ItemStack itemStack, EntityLivingBase entityLivingBase) {
return true;
}
@Override
public boolean canEquip(ItemStack itemStack, EntityLivingBase entityLivingBase) {
return true;
}
@Override
public boolean canUnequip(ItemStack itemStack, EntityLivingBase entityLivingBase) {
return true;
}
@Override
public boolean canUnequip(ItemStack itemStack, EntityLivingBase entityLivingBase) {
return true;
}
private void startFlying(EntityPlayer player) {
player.capabilities.allowFlying = true;
if(!player.getEntityWorld().isRemote) {
player.sendPlayerAbilities();
}
}
private void startFlying(EntityPlayer player) {
player.capabilities.allowFlying = true;
if (!player.getEntityWorld().isRemote) {
player.sendPlayerAbilities();
}
}
private void stopFlying(EntityPlayer player) {
player.capabilities.allowFlying = false;
player.capabilities.isFlying = false;
private void stopFlying(EntityPlayer player) {
player.capabilities.allowFlying = false;
player.capabilities.isFlying = false;
if(!player.getEntityWorld().isRemote) {
player.sendPlayerAbilities();
}
}
if (!player.getEntityWorld().isRemote) {
player.sendPlayerAbilities();
}
}
}
......@@ -8,9 +8,9 @@ import com.advancedmods.advancedtools.common.generic.ATItem;
*/
public class BoneIngot extends ATItem {
public BoneIngot() {
this.setUnlocalizedName("boneingot");
this.setCreativeTab(AdvancedTools.tabMaterials);
}
public BoneIngot() {
this.setUnlocalizedName("boneingot");
this.setCreativeTab(AdvancedTools.tabMaterials);
}
}
......@@ -8,9 +8,9 @@ import com.advancedmods.advancedtools.common.generic.ATItem;
*/
public class CopperIngot extends ATItem {
public CopperIngot() {
this.setUnlocalizedName("copperingot");
this.setCreativeTab(AdvancedTools.tabMaterials);