Merge pull request #2678 from quat1024/reallyMakesUThink

Add "Thinking Hand" cosmetic bauble
This commit is contained in:
Vasco Lavos authored and GitHub committed 2018-07-20 04:36:41 +01:00
commit 15f71c8a53
7 files changed
+49 -10

No files matched your search

@@ -43,6 +43,7 @@ import vazkii.botania.common.crafting.recipe.SpecialFloatingFlowerRecipe;
import vazkii.botania.common.crafting.recipe.SpellClothRecipe;
import vazkii.botania.common.crafting.recipe.TerraPickTippingRecipe;
import vazkii.botania.common.item.ModItems;
import vazkii.botania.common.item.equipment.bauble.ItemBaubleCosmetic;
import vazkii.botania.common.lib.LibItemNames;
import vazkii.botania.common.lib.LibMisc;
import vazkii.botania.common.lib.LibOreDict;
@@ -617,7 +618,7 @@ public final class ModCraftingRecipes {
recipeStarSword = ModItems.starSword.getRegistryName();
recipeThunderSword = ModItems.thunderSword.getRegistryName();
recipeCorporeaRetainer = ModBlocks.corporeaRetainer.getRegistryName();
recipesCosmeticItems = IntStream.range(0, 32).mapToObj(i -> path("cosmetic_" + i)).collect(Collectors.toList());
recipesCosmeticItems = IntStream.range(0, ItemBaubleCosmetic.SUBTYPES).mapToObj(i -> path("cosmetic_" + i)).collect(Collectors.toList());
recipeTinyPlanet = ModItems.tinyPlanet.getRegistryName();
recipeTinyPlanetBlock = ModBlocks.tinyPlanet.getRegistryName();
recipeManaRing = ModItems.manaRing.getRegistryName();
@@ -50,10 +50,11 @@ public class ItemBaubleCosmetic extends ItemBauble implements ICosmeticBauble {
FOUR_LEAF_CLOVER, CLOCK_EYE, UNICORN_HORN, DEVIL_HORNS,
HYPER_PLUS, BOTANIST_EMBLEM, ANCIENT_MASK, EERIE_MASK,
ALIEN_ANTENNA, ANAGLYPH_GLASSES, ORANGE_SHADES, GROUCHO_GLASSES,
THICK_EYEBROWS, LUSITANIC_SHIELD, TINY_POTATO_MASK, QUESTGIVER_MARK
THICK_EYEBROWS, LUSITANIC_SHIELD, TINY_POTATO_MASK, QUESTGIVER_MARK,
THINKING_HAND
}
private static final int SUBTYPES = 32;
public static final int SUBTYPES = Variants.values().length;
private ItemStack renderStack;
public ItemBaubleCosmetic() {
@@ -78,15 +79,15 @@ public class ItemBaubleCosmetic extends ItemBauble implements ICosmeticBauble {
@SideOnly(Side.CLIENT)
@Override
public void addHiddenTooltip(ItemStack par1ItemStack, World world, List<String> stacks, ITooltipFlag flags) {
addStringToTooltip(I18n.format("botaniamisc.cosmeticBauble"), stacks);
super.addHiddenTooltip(par1ItemStack, world, stacks, flags);
public void addHiddenTooltip(ItemStack stack, World world, List<String> stacks, ITooltipFlag flags) {
addStringToTooltip(I18n.format(stack.getItemDamage() == 32 ? "botaniamisc.cosmeticThinking" : "botaniamisc.cosmeticBauble"), stacks);
super.addHiddenTooltip(stack, world, stacks, flags);
}
@SideOnly(Side.CLIENT)
@Override
public void registerModels() {
ModelHandler.registerItemAppendMeta(this, 32, LibItemNames.COSMETIC);
ModelHandler.registerItemAppendMeta(this, SUBTYPES, LibItemNames.COSMETIC);
}
@Override
@@ -100,7 +101,7 @@ public class ItemBaubleCosmetic extends ItemBauble implements ICosmeticBauble {
renderStack = stack;
if (stack.getItemDamage() >= 32 || stack.getItemDamage() < 0) return;
if (stack.getItemDamage() >= SUBTYPES || stack.getItemDamage() < 0) return;
Variants variant = Variants.values()[stack.getItemDamage()];
if (type == RenderType.HEAD) {
@@ -163,7 +164,7 @@ public class ItemBaubleCosmetic extends ItemBauble implements ICosmeticBauble {
case GOOGLY_EYES:
GlStateManager.rotate(180F, 0F, 1F, 0F);
GlStateManager.scale(1.5F, 1.5F, 1F);
GlStateManager.translate(0F, -0.05F, -0.15F);
GlStateManager.translate(0F, -0.05F, 0F);
renderItem();
break;
case CLOCK_EYE:
@@ -239,6 +240,13 @@ public class ItemBaubleCosmetic extends ItemBauble implements ICosmeticBauble {
GlStateManager.translate(0F, 1F, 0.3F);
renderItem();
break;
case THINKING_HAND:
scale(0.9f);
GlStateManager.translate(0.2F, -0.5F, 0F);
GlStateManager.scale(-1, 1, 1);
GlStateManager.rotate(15F, 0F, 0F, 1F);
renderItem();
break;
default: break;
}
} else {
@@ -37,6 +37,7 @@ import vazkii.botania.common.crafting.ModPetalRecipes;
import vazkii.botania.common.crafting.ModRuneRecipes;
import vazkii.botania.common.item.ModItems;
import vazkii.botania.common.item.block.ItemBlockSpecialFlower;
import vazkii.botania.common.item.equipment.bauble.ItemBaubleCosmetic;
import vazkii.botania.common.lexicon.page.PageBrew;
import vazkii.botania.common.lexicon.page.PageCraftingRecipe;
import vazkii.botania.common.lexicon.page.PageElvenRecipe;
@@ -1149,7 +1150,7 @@ public final class LexiconData {
List<LexiconPage> pages = new ArrayList<>();
pages.add(new PageText("0"));
pages.add(new PageText("1"));
for (int i = 0; i < 32; i++)
for (int i = 0; i < ItemBaubleCosmetic.SUBTYPES; i++)
pages.add(new PageCraftingRecipe("" + (i + 2), ModCraftingRecipes.recipesCosmeticItems.get(i)));
cosmeticBaubles.setPriority().setLexiconPages(pages.toArray(new LexiconPage[pages.size()]));
}
@@ -90,6 +90,7 @@ botaniamisc.startTutorial=Start Tutorial
botaniamisc.tutorialStarted=You have started your tutorial, follow the red arrows and read the contents to be guided through the basics of Botania!
botaniamisc.tutorialEnded=Your tutorial is over, you should now have a basic idea of how Botania works. Make sure to read through the other pages at your leisure to learn more ways of using the mod.
botaniamisc.cosmeticBauble=&oCosmetic
botaniamisc.cosmeticThinking=&oReally makes you think
botaniamisc.hasCosmetic=&oHas Cosmetic Override: &r%s
botaniamisc.typeToSearch=(type to search)
botaniamisc.viewOnline=View Online
@@ -1551,6 +1552,7 @@ item.botania:cosmetic28.name=Thick Eyebrows
item.botania:cosmetic29.name=Lusitanic Shield
item.botania:cosmetic30.name=Tiny Potato Mask
item.botania:cosmetic31.name=Questgiver Mark
item.botania:cosmetic32.name=Thinking Hand
item.botania:manaString.name=Mana Infused String
item.botania:swapRing.name=Ring of Correction
item.botania:flowerBag.name=Flower Pouch
@@ -3384,6 +3386,7 @@ botania.page.cosmeticBaubles30=I can fly with these
botania.page.cosmeticBaubles31=Not actually part of spain
botania.page.cosmeticBaubles32=Now you too can believe
botania.page.cosmeticBaubles33=Get on the treadmill, angbadang
botania.page.cosmeticBaubles34=Really makes you think
# -- TINY PLANET
botania.entry.tinyPlanet=Tiny Planet
@@ -0,0 +1,6 @@
{
"parent": "minecraft:item/generated",
"textures": {
"layer0": "botania:items/cosmetic32"
}
}
@@ -0,0 +1,20 @@
{
"result": {
"item": "botania:cosmetic",
"data": 32
},
"pattern": [
"PPP",
"PSP",
"PPP"
],
"type": "forge:ore_shaped",
"key": {
"P": {
"item": "botania:tinypotato"
},
"S": {
"item": "#MANASTRING"
}
}
}
Binary file not shown.

After

Width:  |  Height:  |  Size: 252 B