mirror of
https://github.com/GTNewHorizons/Botania.git
synced 2026-11-18 19:29:31 +00:00
Update JEI, more overrides
This commit is contained in:
1 parent
c8531fde67
commit
bcd00dbba3
8 files changed
+97
-44
No files matched your search
+1
-1
@@ -68,7 +68,7 @@ dependencies {
|
||||
//compile "codechicken:CodeChickenCore:1.8-1.0.5.36:dev"
|
||||
//compile "codechicken:NotEnoughItems:1.8-1.0.5.104:dev"
|
||||
//compile "codechicken:ForgeMultipart:1.7.10-1.1.1.320:dev"
|
||||
deobfCompile "mezz.jei:jei_1.9:3.0.2.164"
|
||||
deobfCompile "mezz.jei:jei_1.9:3.1.0.170"
|
||||
|
||||
//and a bit more for SCP
|
||||
sshAntTask "org.apache.ant:ant-jsch:1.7.1", "jsch:jsch:0.1.29"
|
||||
|
||||
@@ -198,27 +198,6 @@ public final class ModelHandler {
|
||||
? new ModelResourceLocation("botania:infiniteFruitBoot", "inventory")
|
||||
: new ModelResourceLocation("botania:infiniteFruit", "inventory")));
|
||||
|
||||
registerItemModel(magnetRing);
|
||||
registerItemModel(magnetRingGreater);
|
||||
|
||||
ModelLoader.registerItemVariants(manaGun,
|
||||
new ModelResourceLocation("botania:manaGun", "inventory"),
|
||||
new ModelResourceLocation("botania:manaGunClip", "inventory"),
|
||||
new ModelResourceLocation("botania:desuGun", "inventory"),
|
||||
new ModelResourceLocation("botania:desuGunClip", "inventory"));
|
||||
ModelLoader.setCustomMeshDefinition(manaGun, MesherWrapper.of(stack -> {
|
||||
String name = ((ItemManaGun) manaGun).isSugoiKawaiiDesuNe(stack) ? "botania:desuGun" : "botania:manaGun";
|
||||
return new ModelResourceLocation(name + (ItemManaGun.hasClip(stack) ? "Clip" : ""), "inventory");
|
||||
}));
|
||||
|
||||
ModelLoader.registerItemVariants(tornadoRod,
|
||||
new ModelResourceLocation("botania:tornadoRod", "inventory"),
|
||||
new ModelResourceLocation("botania:tornadoRod_flying", "inventory"));
|
||||
ModelLoader.setCustomMeshDefinition(tornadoRod, MesherWrapper.of(stack ->
|
||||
((ItemTornadoRod) ModItems.tornadoRod).isFlying(stack)
|
||||
? new ModelResourceLocation("botania:tornadoRod_flying", "inventory")
|
||||
: new ModelResourceLocation("botania:tornadoRod", "inventory")));
|
||||
|
||||
ModelLoader.registerItemVariants(manaCookie,
|
||||
new ModelResourceLocation("botania:manaCookie", "inventory"),
|
||||
new ModelResourceLocation("botania:totalBiscuit", "inventory"));
|
||||
@@ -226,25 +205,6 @@ public final class ModelHandler {
|
||||
stack.getDisplayName().toLowerCase().equals("totalbiscuit")
|
||||
? new ModelResourceLocation("botania:totalBiscuit", "inventory")
|
||||
: new ModelResourceLocation("botania:manaCookie", "inventory")));
|
||||
|
||||
registerItemModel(manasteelSword);
|
||||
registerItemModel(spawnerMover);
|
||||
|
||||
ModelLoader.registerItemVariants(terraPick,
|
||||
new ModelResourceLocation("botania:terraPick", "inventory"),
|
||||
new ModelResourceLocation("botania:terraPickEnabled", "inventory"),
|
||||
new ModelResourceLocation("botania:terraPickTipped", "inventory"),
|
||||
new ModelResourceLocation("botania:terraPickTippedEnabled", "inventory"));
|
||||
ModelLoader.setCustomMeshDefinition(terraPick, MesherWrapper.of(stack -> {
|
||||
String name = "botania:terraPick";
|
||||
if (ItemTerraPick.isTipped(stack)) {
|
||||
name += "Tipped";
|
||||
}
|
||||
if (ItemTerraPick.isEnabled(stack)) {
|
||||
name += "Enabled";
|
||||
}
|
||||
return new ModelResourceLocation(name, "inventory");
|
||||
}));
|
||||
}
|
||||
|
||||
private static void registerSubtiles() {
|
||||
@@ -401,6 +361,14 @@ public final class ModelHandler {
|
||||
}
|
||||
|
||||
private static void registerStandardItems() {
|
||||
registerItemModel(manasteelSword);
|
||||
registerItemModel(spawnerMover);
|
||||
registerItemModel(terraPick);
|
||||
registerItemModel(magnetRing);
|
||||
registerItemModel(magnetRingGreater);
|
||||
registerItemModel(manaGun);
|
||||
registerItemModel(tornadoRod);
|
||||
|
||||
registerItemModel(twigWand);
|
||||
registerItemModel(pestleAndMortar);
|
||||
registerItemModel(blackLotus);
|
||||
|
||||
@@ -16,9 +16,11 @@ import java.util.List;
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.gui.GuiScreen;
|
||||
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.Potion;
|
||||
@@ -26,6 +28,7 @@ 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.util.text.translation.I18n;
|
||||
@@ -72,6 +75,18 @@ public class ItemManaGun extends ItemMod implements IManaUsingItem, IColorable {
|
||||
RecipeSorter.register("botania:manaGunLens", ManaGunLensRecipe.class, Category.SHAPELESS, "");
|
||||
RecipeSorter.register("botania:manaGunRemoveLens", ManaGunRemoveLensRecipe.class, Category.SHAPELESS, "");
|
||||
RecipeSorter.register("botania:manaGunClip", ManaGunClipRecipe.class, Category.SHAPELESS, "");
|
||||
addPropertyOverride(new ResourceLocation("botania", "clip"), new IItemPropertyGetter() {
|
||||
@Override
|
||||
public float apply(ItemStack itemStack, World world, EntityLivingBase entityLivingBase) {
|
||||
return hasClip(itemStack) ? 1 : 0;
|
||||
}
|
||||
});
|
||||
addPropertyOverride(new ResourceLocation("botania", "desu"), new IItemPropertyGetter() {
|
||||
@Override
|
||||
public float apply(ItemStack itemStack, World world, EntityLivingBase entityLivingBase) {
|
||||
return isSugoiKawaiiDesuNe(itemStack) ? 1 : 0;
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -17,8 +17,10 @@ import net.minecraft.block.material.Material;
|
||||
import net.minecraft.creativetab.CreativeTabs;
|
||||
import net.minecraft.enchantment.EnchantmentHelper;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.init.Enchantments;
|
||||
import net.minecraft.item.IItemPropertyGetter;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
@@ -74,6 +76,18 @@ public class ItemTerraPick extends ItemManasteelPick implements IManaItem, ISequ
|
||||
super(BotaniaAPI.terrasteelToolMaterial, LibItemNames.TERRA_PICK);
|
||||
GameRegistry.addRecipe(new TerraPickTippingRecipe());
|
||||
RecipeSorter.register("botania:terraPickTipping", TerraPickTippingRecipe.class, Category.SHAPELESS, "");
|
||||
addPropertyOverride(new ResourceLocation("botania", "tipped"), new IItemPropertyGetter() {
|
||||
@Override
|
||||
public float apply(ItemStack itemStack, World world, EntityLivingBase entityLivingBase) {
|
||||
return isTipped(itemStack) ? 1 : 0;
|
||||
}
|
||||
});
|
||||
addPropertyOverride(new ResourceLocation("botania", "enabled"), new IItemPropertyGetter() {
|
||||
@Override
|
||||
public float apply(ItemStack itemStack, World world, EntityLivingBase entityLivingBase) {
|
||||
return isEnabled(itemStack) ? 1 : 0;
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -13,8 +13,10 @@ package vazkii.botania.common.item.rod;
|
||||
import java.util.List;
|
||||
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.EnumAction;
|
||||
import net.minecraft.item.IItemPropertyGetter;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.potion.PotionEffect;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
@@ -53,6 +55,12 @@ public class ItemTornadoRod extends ItemMod implements IManaUsingItem, IAvatarWi
|
||||
setMaxDamage(MAX_DAMAGE);
|
||||
setUnlocalizedName(LibItemNames.TORNADO_ROD);
|
||||
setMaxStackSize(1);
|
||||
addPropertyOverride(new ResourceLocation("botania", "flying"), new IItemPropertyGetter() {
|
||||
@Override
|
||||
public float apply(ItemStack itemStack, World world, EntityLivingBase entityLivingBase) {
|
||||
return isFlying(itemStack) ? 1 : 0;
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -3,5 +3,26 @@
|
||||
"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"
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -2,5 +2,26 @@
|
||||
"parent": "minecraft:item/handheld",
|
||||
"textures": {
|
||||
"layer0": "botania:items/terraPick0"
|
||||
}
|
||||
},
|
||||
"overrides": [
|
||||
{
|
||||
"predicate": {
|
||||
"botania:enabled": 1
|
||||
},
|
||||
"model": "botania:item/terraPickEnabled"
|
||||
},
|
||||
{
|
||||
"predicate": {
|
||||
"botania:tipped": 1
|
||||
},
|
||||
"model": "botania:item/terraPickTipped"
|
||||
},
|
||||
{
|
||||
"predicate": {
|
||||
"botania:tipped": 1,
|
||||
"botania:enabled": 1
|
||||
},
|
||||
"model": "botania:item/terraPickTippedEnabled"
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -2,5 +2,11 @@
|
||||
"parent": "minecraft:item/handheld",
|
||||
"textures": {
|
||||
"layer0": "botania:items/tornadoRod0"
|
||||
}
|
||||
},
|
||||
"overrides": [{
|
||||
"predicate": {
|
||||
"botania:flying": 1
|
||||
},
|
||||
"model": "botania:item/tornadoRod_flying"
|
||||
}]
|
||||
}
|
||||
Reference in new issue
Block a user