mirror of
https://github.com/GTNewHorizons/Botania.git
synced 2026-11-26 06:52:58 +00:00
I don't want to be the guy who licks the boot!
This commit is contained in:
1 parent
d90cd50e38
commit
739d46ce5a
4 files changed
+34
-5
No files matched your search
@@ -38,7 +38,9 @@ import vazkii.botania.common.block.ModBlocks;
|
||||
import vazkii.botania.common.block.tile.TileTinyPotato;
|
||||
import vazkii.botania.common.item.ModItems;
|
||||
import vazkii.botania.common.item.equipment.bauble.ItemFlightTiara;
|
||||
import vazkii.botania.common.item.equipment.tool.manasteel.ItemManasteelSword;
|
||||
import vazkii.botania.common.item.material.ItemManaResource;
|
||||
import vazkii.botania.common.item.relic.ItemInfiniteFruit;
|
||||
|
||||
public class RenderTileTinyPotato extends TileEntitySpecialRenderer {
|
||||
|
||||
@@ -180,8 +182,9 @@ public class RenderTileTinyPotato extends TileEntitySpecialRenderer {
|
||||
} else if(name.equals("martysgames") || name.equals("marty")) {
|
||||
GL11.glScalef(0.7F, 0.7F, 0.7F);
|
||||
GL11.glRotatef(180F, 0F, 0F, 1F);
|
||||
GL11.glTranslatef(-0.5F, -2.9F, -0.7F);
|
||||
renderIcon(Items.golden_boots.getIconFromDamage(0));
|
||||
GL11.glTranslatef(-0.75F, -2.4F, -0.7F);
|
||||
GL11.glRotatef(10F, 0F, 0F, 1F);
|
||||
renderIcon(ItemInfiniteFruit.dasBootIcon);
|
||||
} else if(name.equals("tromped")) {
|
||||
GL11.glScalef(1.25F, 1.25F, 1.25F);
|
||||
GL11.glRotatef(180F, 0F, 0F, 1F);
|
||||
|
||||
+3
-2
@@ -37,7 +37,7 @@ public class ItemManasteelSword extends ItemSword implements IManaUsingItem {
|
||||
|
||||
public static final int MANA_PER_DAMAGE = 60;
|
||||
|
||||
IIcon elucidatorIcon;
|
||||
public static IIcon elucidatorIcon;
|
||||
|
||||
public ItemManasteelSword() {
|
||||
this(BotaniaAPI.manasteelToolMaterial, LibItemNames.MANASTEEL_SWORD);
|
||||
@@ -76,7 +76,8 @@ public class ItemManasteelSword extends ItemSword implements IManaUsingItem {
|
||||
|
||||
@Override
|
||||
public IIcon getIconIndex(ItemStack par1ItemStack) {
|
||||
return par1ItemStack.getDisplayName().equalsIgnoreCase("the elucidator") ? elucidatorIcon : super.getIconIndex(par1ItemStack);
|
||||
String name = par1ItemStack.getDisplayName().toLowerCase().trim();
|
||||
return name.equals("the elucidator") ? elucidatorIcon : super.getIconIndex(par1ItemStack);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -10,18 +10,25 @@
|
||||
*/
|
||||
package vazkii.botania.common.item.relic;
|
||||
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.EnumAction;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.IIcon;
|
||||
import net.minecraft.world.World;
|
||||
import vazkii.botania.api.mana.IManaUsingItem;
|
||||
import vazkii.botania.api.mana.ManaItemHandler;
|
||||
import vazkii.botania.client.core.helper.IconHelper;
|
||||
import vazkii.botania.common.lib.LibItemNames;
|
||||
import vazkii.botania.common.lib.LibObfuscation;
|
||||
import cpw.mods.fml.relauncher.ReflectionHelper;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
|
||||
public class ItemInfiniteFruit extends ItemRelic implements IManaUsingItem {
|
||||
|
||||
public static IIcon dasBootIcon;
|
||||
|
||||
public ItemInfiniteFruit() {
|
||||
super(LibItemNames.INFINITE_FRUIT);
|
||||
}
|
||||
@@ -33,7 +40,7 @@ public class ItemInfiniteFruit extends ItemRelic implements IManaUsingItem {
|
||||
|
||||
@Override
|
||||
public EnumAction getItemUseAction(ItemStack p_77661_1_) {
|
||||
return EnumAction.eat;
|
||||
return isBoot(p_77661_1_) ? EnumAction.drink : EnumAction.eat;
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -56,6 +63,24 @@ public class ItemInfiniteFruit extends ItemRelic implements IManaUsingItem {
|
||||
ReflectionHelper.setPrivateValue(EntityPlayer.class, player, 20, LibObfuscation.ITEM_IN_USE_COUNT);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void registerIcons(IIconRegister par1IconRegister) {
|
||||
itemIcon = IconHelper.forItem(par1IconRegister, this);
|
||||
dasBootIcon = IconHelper.forName(par1IconRegister, "dasBoot");
|
||||
}
|
||||
|
||||
@Override
|
||||
public IIcon getIconIndex(ItemStack par1ItemStack) {
|
||||
return isBoot(par1ItemStack) ? dasBootIcon : super.getIconIndex(par1ItemStack);
|
||||
}
|
||||
|
||||
private boolean isBoot(ItemStack par1ItemStack) {
|
||||
String name = par1ItemStack.getDisplayName().toLowerCase().trim();
|
||||
return name.equals("das boot");
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean usesMana(ItemStack stack) {
|
||||
|
||||
Reference in new issue
Block a user