From 5f35b8aef0d473979429493c545057b2242e4925 Mon Sep 17 00:00:00 2001 From: Vincent Lee Date: Thu, 9 Jun 2016 20:49:49 -0500 Subject: [PATCH] Readd old overrides, not working because of forge bug --- .../botania/common/item/ItemManaGun.java | 7 +- .../assets/botania/models/item/manaGun.json | 87 ++++---- .../botania/models/item/manaGunClip.json | 201 +++++++++++++++++- .../botania/models/item/manaGunOld.json | 28 --- 4 files changed, 250 insertions(+), 73 deletions(-) delete mode 100644 src/main/resources/assets/botania/models/item/manaGunOld.json diff --git a/src/main/java/vazkii/botania/common/item/ItemManaGun.java b/src/main/java/vazkii/botania/common/item/ItemManaGun.java index 2622ea423..d222d1f8c 100644 --- a/src/main/java/vazkii/botania/common/item/ItemManaGun.java +++ b/src/main/java/vazkii/botania/common/item/ItemManaGun.java @@ -14,15 +14,18 @@ import net.minecraft.client.Minecraft; import net.minecraft.client.gui.GuiScreen; import net.minecraft.client.resources.I18n; import net.minecraft.entity.Entity; +import net.minecraft.entity.EntityLivingBase; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.init.MobEffects; import net.minecraft.init.SoundEvents; +import net.minecraft.item.IItemPropertyGetter; import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; import net.minecraft.potion.PotionEffect; import net.minecraft.util.ActionResult; import net.minecraft.util.EnumActionResult; import net.minecraft.util.EnumHand; +import net.minecraft.util.ResourceLocation; import net.minecraft.util.SoundCategory; import net.minecraft.util.text.TextFormatting; import net.minecraft.world.World; @@ -73,7 +76,7 @@ public class ItemManaGun extends ItemMod implements IManaUsingItem, IColorable { RecipeSorter.register("botania:manaGunRemoveLens", ManaGunRemoveLensRecipe.class, Category.SHAPELESS, ""); RecipeSorter.register("botania:manaGunClip", ManaGunClipRecipe.class, Category.SHAPELESS, ""); - /*addPropertyOverride(new ResourceLocation("botania", "clip"), new IItemPropertyGetter() { + addPropertyOverride(new ResourceLocation("botania", "clip"), new IItemPropertyGetter() { @Override public float apply(@Nonnull ItemStack itemStack, World world, EntityLivingBase entityLivingBase) { return hasClip(itemStack) ? 1 : 0; @@ -84,7 +87,7 @@ public class ItemManaGun extends ItemMod implements IManaUsingItem, IColorable { public float apply(@Nonnull ItemStack itemStack, World world, EntityLivingBase entityLivingBase) { return isSugoiKawaiiDesuNe(itemStack) ? 1 : 0; } - })*/; + }); } @Nonnull diff --git a/src/main/resources/assets/botania/models/item/manaGun.json b/src/main/resources/assets/botania/models/item/manaGun.json index 34d3cccff..678d3ca53 100644 --- a/src/main/resources/assets/botania/models/item/manaGun.json +++ b/src/main/resources/assets/botania/models/item/manaGun.json @@ -3,14 +3,13 @@ "textures": { "layer0": "botania:items/manaBlaster", "layer1": "botania:items/manaBlasterColor", - "layer2": "botania:items/manaBlasterGlass", - "layer3": "botania:items/manaBlasterLensClip" + "layer2": "botania:items/manaBlasterGlass" }, "elements": [ { "name": "Barrel1", - "from": [ -10.0, 5.0, 5.5 ], - "to": [ -3.0, 14.0, 10.5 ], + "from": [ -10.0, 5.0, 5.5 ], + "to": [ -3.0, 14.0, 10.5 ], "faces": { "north": { "texture": "layer0", "uv": [ 0.0, 7.01, 3.5, 11.49 ] }, "east": { "texture": "layer0", "uv": [ 6.0, 7.0, 8.5, 11.5 ] }, @@ -22,8 +21,8 @@ }, { "name": "Barrel2", - "from": [ -3.0, 5.0, 5.5 ], - "to": [ 7.0, 9.0, 10.5 ], + "from": [ -3.0, 5.0, 5.5 ], + "to": [ 7.0, 9.0, 10.5 ], "faces": { "north": { "texture": "layer0", "uv": [ 11.01, 14.0, 15.99, 15.99 ] }, "south": { "texture": "layer0", "uv": [ 16.0, 14.0, 11.0, 16.0 ] }, @@ -33,8 +32,8 @@ }, { "name": "Barrel3", - "from": [ 7.0, 5.0, 5.5 ], - "to": [ 10.0, 14.0, 10.5 ], + "from": [ 7.0, 5.0, 5.5 ], + "to": [ 10.0, 14.0, 10.5 ], "faces": { "north": { "texture": "layer0", "uv": [ 0.0, 11.5, 1.5, 16.0 ] }, "east": { "texture": "layer0", "uv": [ 1.5, 11.5, 4.0, 16.0 ] }, @@ -46,8 +45,8 @@ }, { "name": "Barrel4", - "from": [ 10.0, 12.0, 5.5 ], - "to": [ 18.0, 14.0, 10.5 ], + "from": [ 10.0, 12.0, 5.5 ], + "to": [ 18.0, 14.0, 10.5 ], "faces": { "north": { "texture": "layer0", "uv": [ 4.01, 14.5, 8.0, 15.5 ] }, "east": { "texture": "layer0", "uv": [ 4.0, 14.5, 6.5, 15.5 ] }, @@ -58,8 +57,8 @@ }, { "name": "Barrel5", - "from": [ 10.0, 9.0, 5.5 ], - "to": [ 18.0, 11.0, 10.5 ], + "from": [ 10.0, 9.0, 5.5 ], + "to": [ 18.0, 11.0, 10.5 ], "faces": { "north": { "texture": "layer0", "uv": [ 8.0, 14.5, 4.0, 15.5 ] }, "east": { "texture": "layer0", "uv": [ 6.5, 14.5, 4.0, 15.5 ] }, @@ -70,8 +69,8 @@ }, { "name": "Strap", - "from": [ 14.0, -5.0, 6.5 ], - "to": [ 19.0, 9.0, 9.5 ], + "from": [ 14.0, -5.0, 6.5 ], + "to": [ 19.0, 9.0, 9.5 ], "rotation": { "origin": [ 8.0, 8.0, 8.0 ], "axis": "z", "angle": 22.5 }, "faces": { "north": { "texture": "layer0", "uv": [ 0.0, 0.01, 2.5, 6.99 ] }, @@ -83,8 +82,8 @@ }, { "name": "Magazine", - "from": [ 12.5, -6.0, 7.0 ], - "to": [ 18.5, -5.0, 9.0 ], + "from": [ 12.5, -6.0, 7.0 ], + "to": [ 18.5, -5.0, 9.0 ], "rotation": { "origin": [ 8.0, 8.0, 8.0 ], "axis": "z", "angle": 22.5 }, "faces": { "north": { "texture": "layer0", "uv": [ 7.5, 0.0, 8.0, 3.0 ], "rotation": 90 }, @@ -97,8 +96,8 @@ }, { "name": "Trigger Guard1", - "from": [ 10.0, 6.0, 7.0 ], - "to": [ 16.0, 7.0, 9.0 ], + "from": [ 10.0, 6.0, 7.0 ], + "to": [ 16.0, 7.0, 9.0 ], "faces": { "north": { "texture": "layer0", "uv": [ 5.5, 3.01, 8.5, 3.5 ] }, "south": { "texture": "layer0", "uv": [ 5.5, 3.01, 8.5, 3.49 ] }, @@ -108,8 +107,8 @@ }, { "name": "Trigger", - "from": [ 13.0, 7.0, 7.5 ], - "to": [ 16.0, 9.0, 8.5 ], + "from": [ 13.0, 7.0, 7.5 ], + "to": [ 16.0, 9.0, 8.5 ], "faces": { "north": { "texture": "layer0", "uv": [ 5.5, 5.0, 6.5, 6.0 ] }, "south": { "texture": "layer0", "uv": [ 5.5, 5.0, 6.5, 6.0 ] }, @@ -118,8 +117,8 @@ }, { "name": "Trigger Guard2", - "from": [ 10.0, 7.0, 7.0 ], - "to": [ 11.0, 9.0, 9.0 ], + "from": [ 10.0, 7.0, 7.0 ], + "to": [ 11.0, 9.0, 9.0 ], "faces": { "north": { "texture": "layer0", "uv": [ 5.5, 4.0, 6.0, 5.0 ] }, "east": { "texture": "layer0", "uv": [ 5.5, 4.0, 6.5, 5.0 ] }, @@ -128,8 +127,8 @@ }, { "name": "Colorizer", - "from": [ 9.5, 11.0, 6.0 ], - "to": [ 17.5, 12.0, 10.0 ], + "from": [ 9.5, 11.0, 6.0 ], + "to": [ 17.5, 12.0, 10.0 ], "faces": { "north": { "texture": "layer1", "uv": [ 0.0, 0.0, 8.0, 5.0 ], "tintindex": 1 }, "east": { "texture": "layer1", "uv": [ 0.0, 0.0, 5.0, 5.0 ], "tintindex": 1 }, @@ -138,8 +137,8 @@ }, { "name": "Glass", - "from": [ -3.5, 9.5, 6.0 ], - "to": [ 7.5, 13.5, 10.0 ], + "from": [ -3.5, 9.5, 6.0 ], + "to": [ 7.5, 13.5, 10.0 ], "faces": { "north": { "texture": "layer2", "uv": [ 0.01, 7.01, 6.99, 7.99 ] }, "east": { "texture": "layer2", "uv": [ 7.01, 7.01, 9.49, 7.99 ] }, @@ -147,19 +146,6 @@ "up": { "texture": "layer2", "uv": [ 11.01, 0.01, 13.49, 6.99 ] }, "down": { "texture": "layer2", "uv": [ 8.51, 0.01, 6.99, 9.99 ] } } - }, - { - "name": "Clip", - "from": [ -4.5, 2.0, 5.0 ], - "to": [ 8.5, 8.0, 11.0 ], - "faces": { - "north": { "texture": "layer3", "uv": [ 0.01, 6.51, 6.5, 9.49 ] }, - "east": { "texture": "layer3", "uv": [ 6.01, 0.0, 9.0, 3.0 ] }, - "south": { "texture": "layer3", "uv": [ 6.5, 6.5, 0.01, 9.5 ] }, - "west": { "texture": "layer3", "uv": [ 6.0, 3.0, 9.0, 6.0 ] }, - "up": { "texture": "layer3", "uv": [ 0.0, 0.01, 3.0, 6.5 ], "rotation": 90 }, - "down": { "texture": "layer3", "uv": [ 3.0, 0.01, 6.0, 6.5 ], "rotation": 90 } - } } ], "display": { @@ -198,5 +184,26 @@ "translation": [ -1.8, 2.5, 0 ], "scale": [ 0.45, 0.45, 0.45 ] } - } + }, + "overrides": [ + { + "predicate": { + "botania:clip": 1 + }, + "model": "botania:item/manaGunClip" + }, + { + "predicate": { + "botania:desu": 1 + }, + "model": "botania:item/desuGun" + }, + { + "predicate": { + "botania:desu": 1, + "botania:clip": 1 + }, + "model": "botania:item/desuGunClip" + } + ] } \ No newline at end of file diff --git a/src/main/resources/assets/botania/models/item/manaGunClip.json b/src/main/resources/assets/botania/models/item/manaGunClip.json index 4758d1c14..f13aec897 100644 --- a/src/main/resources/assets/botania/models/item/manaGunClip.json +++ b/src/main/resources/assets/botania/models/item/manaGunClip.json @@ -1,7 +1,202 @@ { - "parent": "minecraft:item/handheld", + "__comment": "Author: wiiv", "textures": { - "layer0": "botania:items/manaGun2", - "layer1": "botania:items/manaGun1" + "layer0": "botania:items/manaBlaster", + "layer1": "botania:items/manaBlasterColor", + "layer2": "botania:items/manaBlasterGlass", + "layer3": "botania:items/manaBlasterLensClip" + }, + "elements": [ + { + "name": "Barrel1", + "from": [ -10.0, 5.0, 5.5 ], + "to": [ -3.0, 14.0, 10.5 ], + "faces": { + "north": { "texture": "layer0", "uv": [ 0.0, 7.01, 3.5, 11.49 ] }, + "east": { "texture": "layer0", "uv": [ 6.0, 7.0, 8.5, 11.5 ] }, + "south": { "texture": "layer0", "uv": [ 3.5, 7.01, 0.0, 11.49 ] }, + "west": { "texture": "layer0", "uv": [ 3.5, 7.01, 6.0, 11.49 ] }, + "up": { "texture": "layer0", "uv": [ 11.01, 10.5, 13.49, 13.99 ], "rotation": 90 }, + "down": { "texture": "layer0", "uv": [ 13.5, 10.5, 16.0, 14.0 ], "rotation": 90 } + } + }, + { + "name": "Barrel2", + "from": [ -3.0, 5.0, 5.5 ], + "to": [ 7.0, 9.0, 10.5 ], + "faces": { + "north": { "texture": "layer0", "uv": [ 11.01, 14.0, 15.99, 15.99 ] }, + "south": { "texture": "layer0", "uv": [ 16.0, 14.0, 11.0, 16.0 ] }, + "up": { "texture": "layer0", "uv": [ 11.01, 5.0, 13.49, 10.0 ], "rotation": 270 }, + "down": { "texture": "layer0", "uv": [ 13.5, 5.0, 15.99, 10.0 ], "rotation": 270 } + } + }, + { + "name": "Barrel3", + "from": [ 7.0, 5.0, 5.5 ], + "to": [ 10.0, 14.0, 10.5 ], + "faces": { + "north": { "texture": "layer0", "uv": [ 0.0, 11.5, 1.5, 16.0 ] }, + "east": { "texture": "layer0", "uv": [ 1.5, 11.5, 4.0, 16.0 ] }, + "south": { "texture": "layer0", "uv": [ 0.0, 11.5, 1.5, 16.0 ] }, + "west": { "texture": "layer0", "uv": [ 1.5, 11.5, 4.0, 16.0 ] }, + "up": { "texture": "layer0", "uv": [ 11.0, 4.0, 13.5, 5.5 ], "rotation": 90 }, + "down": { "texture": "layer0", "uv": [ 13.5, 4.0, 16.0, 5.5 ], "rotation": 90 } + } + }, + { + "name": "Barrel4", + "from": [ 10.0, 12.0, 5.5 ], + "to": [ 18.0, 14.0, 10.5 ], + "faces": { + "north": { "texture": "layer0", "uv": [ 4.01, 14.5, 8.0, 15.5 ] }, + "east": { "texture": "layer0", "uv": [ 4.0, 14.5, 6.5, 15.5 ] }, + "south": { "texture": "layer0", "uv": [ 8.0, 14.5, 4.0, 15.5 ] }, + "up": { "texture": "layer0", "uv": [ 11.01, 0.01, 13.49, 3.99 ], "rotation": 90 }, + "down": { "texture": "layer0", "uv": [ 11.0, 0.01, 13.5, 4.0 ], "rotation": 90 } + } + }, + { + "name": "Barrel5", + "from": [ 10.0, 9.0, 5.5 ], + "to": [ 18.0, 11.0, 10.5 ], + "faces": { + "north": { "texture": "layer0", "uv": [ 8.0, 14.5, 4.0, 15.5 ] }, + "east": { "texture": "layer0", "uv": [ 6.5, 14.5, 4.0, 15.5 ] }, + "south": { "texture": "layer0", "uv": [ 4.0, 14.5, 8.0, 15.5 ] }, + "up": { "texture": "layer0", "uv": [ 11.01, 0.0, 13.49, 3.99 ], "rotation": 90 }, + "down": { "texture": "layer0", "uv": [ 13.51, 0.01, 15.99, 3.99 ], "rotation": 90 } + } + }, + { + "name": "Strap", + "from": [ 14.0, -5.0, 6.5 ], + "to": [ 19.0, 9.0, 9.5 ], + "rotation": { "origin": [ 8.0, 8.0, 8.0 ], "axis": "z", "angle": 22.5 }, + "faces": { + "north": { "texture": "layer0", "uv": [ 0.0, 0.01, 2.5, 6.99 ] }, + "east": { "texture": "layer0", "uv": [ 4.0, 0.01, 5.5, 6.99 ] }, + "south": { "texture": "layer0", "uv": [ 2.5, 0.01, 0.0, 6.99 ] }, + "west": { "texture": "layer0", "uv": [ 2.5, 0.01, 4.0, 6.99 ] }, + "down": { "texture": "layer0", "uv": [ 5.5, 0.0, 7.0, 2.5 ], "rotation": 90 } + } + }, + { + "name": "Magazine", + "from": [ 12.5, -6.0, 7.0 ], + "to": [ 18.5, -5.0, 9.0 ], + "rotation": { "origin": [ 8.0, 8.0, 8.0 ], "axis": "z", "angle": 22.5 }, + "faces": { + "north": { "texture": "layer0", "uv": [ 7.5, 0.0, 8.0, 3.0 ], "rotation": 90 }, + "east": { "texture": "layer0", "uv": [ 8.0, 0.0, 7.0, 0.5 ] }, + "south": { "texture": "layer0", "uv": [ 8.0, 0.01, 7.5, 3.0 ], "rotation": 90 }, + "west": { "texture": "layer0", "uv": [ 7.0, 0.01, 8.0, 0.5 ] }, + "up": { "texture": "layer0", "uv": [ 7.0, 0.01, 8.0, 3.0 ], "rotation": 90 }, + "down": { "texture": "layer0", "uv": [ 7.01, 0.0, 7.99, 3.0 ], "rotation": 90 } + } + }, + { + "name": "Trigger Guard1", + "from": [ 10.0, 6.0, 7.0 ], + "to": [ 16.0, 7.0, 9.0 ], + "faces": { + "north": { "texture": "layer0", "uv": [ 5.5, 3.01, 8.5, 3.5 ] }, + "south": { "texture": "layer0", "uv": [ 5.5, 3.01, 8.5, 3.49 ] }, + "up": { "texture": "layer0", "uv": [ 5.5, 3.0, 8.5, 4.0 ] }, + "down": { "texture": "layer0", "uv": [ 5.5, 3.0, 8.5, 4.0 ] } + } + }, + { + "name": "Trigger", + "from": [ 13.0, 7.0, 7.5 ], + "to": [ 16.0, 9.0, 8.5 ], + "faces": { + "north": { "texture": "layer0", "uv": [ 5.5, 5.0, 6.5, 6.0 ] }, + "south": { "texture": "layer0", "uv": [ 5.5, 5.0, 6.5, 6.0 ] }, + "west": { "texture": "layer0", "uv": [ 5.5, 5.0, 6.5, 5.5 ] } + } + }, + { + "name": "Trigger Guard2", + "from": [ 10.0, 7.0, 7.0 ], + "to": [ 11.0, 9.0, 9.0 ], + "faces": { + "north": { "texture": "layer0", "uv": [ 5.5, 4.0, 6.0, 5.0 ] }, + "east": { "texture": "layer0", "uv": [ 5.5, 4.0, 6.5, 5.0 ] }, + "south": { "texture": "layer0", "uv": [ 5.5, 4.0, 6.0, 5.0 ] } + } + }, + { + "name": "Colorizer", + "from": [ 9.5, 11.0, 6.0 ], + "to": [ 17.5, 12.0, 10.0 ], + "faces": { + "north": { "texture": "layer1", "uv": [ 0.0, 0.0, 8.0, 5.0 ], "tintindex": 1 }, + "east": { "texture": "layer1", "uv": [ 0.0, 0.0, 5.0, 5.0 ], "tintindex": 1 }, + "south": { "texture": "layer1", "uv": [ 0.0, 0.0, 8.0, 5.0 ], "tintindex": 1 } + } + }, + { + "name": "Glass", + "from": [ -3.5, 9.5, 6.0 ], + "to": [ 7.5, 13.5, 10.0 ], + "faces": { + "north": { "texture": "layer2", "uv": [ 0.01, 7.01, 6.99, 7.99 ] }, + "east": { "texture": "layer2", "uv": [ 7.01, 7.01, 9.49, 7.99 ] }, + "south": { "texture": "layer2", "uv": [ 6.99, 7.01, 0.01, 7.99 ] }, + "up": { "texture": "layer2", "uv": [ 11.01, 0.01, 13.49, 6.99 ] }, + "down": { "texture": "layer2", "uv": [ 8.51, 0.01, 6.99, 9.99 ] } + } + }, + { + "name": "Clip", + "from": [ -4.5, 2.0, 5.0 ], + "to": [ 8.5, 8.0, 11.0 ], + "faces": { + "north": { "texture": "layer3", "uv": [ 0.01, 6.51, 6.5, 9.49 ] }, + "east": { "texture": "layer3", "uv": [ 6.01, 0.0, 9.0, 3.0 ] }, + "south": { "texture": "layer3", "uv": [ 6.5, 6.5, 0.01, 9.5 ] }, + "west": { "texture": "layer3", "uv": [ 6.0, 3.0, 9.0, 6.0 ] }, + "up": { "texture": "layer3", "uv": [ 0.0, 0.01, 3.0, 6.5 ], "rotation": 90 }, + "down": { "texture": "layer3", "uv": [ 3.0, 0.01, 6.0, 6.5 ], "rotation": 90 } + } + } + ], + "display": { + "gui": { + "rotation": [ 0, -20, -40 ], + "translation": [ 0, 0, 0 ], + "scale": [ 0.4, 0.4, 0.4 ] + }, + "ground": { + "rotation": [ 0, 0, 0 ], + "translation": [ 0, 0, 0 ], + "scale": [ 0.4, 0.4, 0.4 ] + }, + "fixed": { + "rotation": [ 0, 0, 0 ], + "translation": [ 0, 0, 0 ], + "scale": [ 0.45, 0.45, 0.45 ] + }, + "thirdperson_lefthand": { + "rotation": [ 0, 90, 0 ], + "translation": [ 0, 2.45, -1.5 ], + "scale": [ 0.4, 0.4, 0.4 ] + }, + "thirdperson_righthand": { + "rotation": [ 0, -90, 0 ], + "translation": [ 0, 2.45, -1.5 ], + "scale": [ 0.4, 0.4, 0.4 ] + }, + "firstperson_lefthand": { + "rotation": [ 10, 80, -5 ], + "translation": [ 0.8, 2.5, 0 ], + "scale": [ 0.45, 0.45, 0.45 ] + }, + "firstperson_righthand": { + "rotation": [ 10, -80, 5 ], + "translation": [ -1.8, 2.5, 0 ], + "scale": [ 0.45, 0.45, 0.45 ] + } } } \ No newline at end of file diff --git a/src/main/resources/assets/botania/models/item/manaGunOld.json b/src/main/resources/assets/botania/models/item/manaGunOld.json deleted file mode 100644 index fa04ed4ee..000000000 --- a/src/main/resources/assets/botania/models/item/manaGunOld.json +++ /dev/null @@ -1,28 +0,0 @@ -{ - "parent": "minecraft:item/handheld", - "textures": { - "layer0": "botania:items/manaGun0", - "layer1": "botania:items/manaGun1" - }, - "overrides": [ - { - "predicate": { - "botania:clip": 1 - }, - "model": "botania:item/manaGunClip" - }, - { - "predicate": { - "botania:desu": 1 - }, - "model": "botania:item/desuGun" - }, - { - "predicate": { - "botania:desu": 1, - "botania:clip": 1 - }, - "model": "botania:item/desuGunClip" - } - ] -} \ No newline at end of file