mirror of
https://github.com/GTNewHorizons/Avaritia.git
synced 2026-11-19 11:49:35 +00:00
Minor Tweaks
This commit is contained in:
1 parent
6ebd1305af
commit
198fe8b728
25 files changed
+381
-64
No files matched your search
@@ -4,6 +4,7 @@ import cpw.mods.fml.common.Loader;
|
||||
import cpw.mods.fml.common.registry.GameRegistry;
|
||||
import fox.spiteful.avaritia.Config;
|
||||
import fox.spiteful.avaritia.Lumberjack;
|
||||
import fox.spiteful.avaritia.blocks.LudicrousBlocks;
|
||||
import fox.spiteful.avaritia.compat.bloodmagic.Bloody;
|
||||
import fox.spiteful.avaritia.compat.botania.Tsundere;
|
||||
import fox.spiteful.avaritia.compat.forestry.Ranger;
|
||||
@@ -11,8 +12,11 @@ import fox.spiteful.avaritia.compat.modtweaker.Tweak;
|
||||
import fox.spiteful.avaritia.compat.nei.NotEnough;
|
||||
import fox.spiteful.avaritia.compat.thaumcraft.Lucrum;
|
||||
import fox.spiteful.avaritia.compat.ticon.Tonkers;
|
||||
import fox.spiteful.avaritia.crafting.ExtremeCraftingManager;
|
||||
import fox.spiteful.avaritia.crafting.Grinder;
|
||||
import fox.spiteful.avaritia.items.LudicrousItems;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.init.Blocks;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraftforge.oredict.OreDictionary;
|
||||
@@ -35,6 +39,7 @@ public class Compat {
|
||||
public static boolean mfr = false;
|
||||
public static boolean am2 = false;
|
||||
public static boolean forestry = false;
|
||||
public static boolean te = false;
|
||||
|
||||
public static void census(){
|
||||
nei = Loader.isModLoaded("NotEnoughItems");
|
||||
@@ -52,6 +57,7 @@ public class Compat {
|
||||
mfr = Loader.isModLoaded("MineFactoryReloaded") && Config.mfr;
|
||||
am2 = Loader.isModLoaded("arsmagica2") && Config.am2;
|
||||
forestry = Loader.isModLoaded("Forestry") && Config.forestry;
|
||||
te = Loader.isModLoaded("ThermalExpansion") && Config.te;
|
||||
}
|
||||
|
||||
public static void compatify(){
|
||||
@@ -358,6 +364,29 @@ public class Compat {
|
||||
}
|
||||
}
|
||||
|
||||
if(te){
|
||||
try {
|
||||
Block cell = getBlock("ThermalExpansion", "Cell");
|
||||
ExtremeCraftingManager.getInstance().addExtremeShapedOreRecipe(new ItemStack(cell, 1, 0),
|
||||
"IIIIRIIII",
|
||||
"IEEEREEEI",
|
||||
"IERRRRREI",
|
||||
"IERRRRREI",
|
||||
"RRRRXRRRR",
|
||||
"IERRRRREI",
|
||||
"IERRRRREI",
|
||||
"IEEEREEEI",
|
||||
"IIIIRIIII",
|
||||
'X', new ItemStack(LudicrousItems.resource, 1, 5),
|
||||
'E', "blockEnderium",
|
||||
'I', new ItemStack(LudicrousItems.resource, 1, 6),
|
||||
'R', new ItemStack(LudicrousItems.singularity, 1, 3));
|
||||
}
|
||||
catch (Throwable e){
|
||||
Lumberjack.log(Level.INFO, e, "Avaritia forgot one of Thermal Expansion's 500 prerequisites.");
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public static Block getBlock(String mod, String block) throws ItemNotFoundException {
|
||||
|
||||
@@ -48,7 +48,8 @@ public class TileInfinitato extends TileLudicrous {
|
||||
ent.addPotionEffect(new PotionEffect(Potion.fireResistance.id, time, 0));
|
||||
ent.addPotionEffect(new PotionEffect(Potion.waterBreathing.id, time, 0));
|
||||
ent.addPotionEffect(new PotionEffect(Potion.nightVision.id, time, 0));
|
||||
ent.addPotionEffect(new PotionEffect(Potion.field_76444_x.id, time, 4)); // absorb
|
||||
ent.addPotionEffect(new PotionEffect(Potion.field_76444_x.id, time, 4)); // absorb
|
||||
ent.addPotionEffect(new PotionEffect(Potion.field_76443_y.id, time, 4)); // saturation
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -11,17 +11,21 @@ public class Gregorizer {
|
||||
public static void balance(){
|
||||
if(Loader.isModLoaded("magicalcrops"))
|
||||
multiplier += 1;
|
||||
if(Loader.isModLoaded("AgriCraft"))
|
||||
multiplier += 1;
|
||||
if(Loader.isModLoaded("MineFactoryReloaded"))
|
||||
multiplier += 1;
|
||||
if(Loader.isModLoaded("BigReactors"))
|
||||
modifier += 100;
|
||||
if(Loader.isModLoaded("EE3")||Loader.isModLoaded("ProjectE"))
|
||||
multiplier += 2;
|
||||
if(Loader.isModLoaded("EE3"))
|
||||
multiplier += 1;
|
||||
else if(Loader.isModLoaded("ProjectE"))
|
||||
multiplier += 3;
|
||||
if(Loader.isModLoaded("Botania"))
|
||||
modifier += 50;
|
||||
if(Loader.isModLoaded("IC2"))
|
||||
modifier += 300;
|
||||
if(Loader.isModLoaded("ThermalExpansion"))
|
||||
if(Loader.isModLoaded("ThermalExpansion") || Loader.isModLoaded("TSteelworks"))
|
||||
modifier += 300;
|
||||
if(Loader.isModLoaded("technom"))
|
||||
modifier += 500;
|
||||
@@ -31,8 +35,6 @@ public class Gregorizer {
|
||||
modifier += 100;
|
||||
if(Loader.isModLoaded("appliedenergistics2"))
|
||||
modifier += 200;
|
||||
if(Loader.isModLoaded("TSteelworks"))
|
||||
modifier += 300;
|
||||
if(Loader.isModLoaded("ImmersiveEngineering"))
|
||||
modifier += 400;
|
||||
if(Loader.isModLoaded("Mekanism")) {
|
||||
@@ -40,8 +42,8 @@ public class Gregorizer {
|
||||
multiplier += 1;
|
||||
}
|
||||
|
||||
modifier += Config.modifier;
|
||||
multiplier += Config.multiplier;
|
||||
modifier = Math.max(modifier + Config.modifier, 0);
|
||||
multiplier = Math.max(multiplier + Config.multiplier, 0);
|
||||
}
|
||||
|
||||
public static int balanceCost(int cost){
|
||||
|
||||
@@ -20,7 +20,7 @@ public class Mincer {
|
||||
public static ShapelessOreRecipe meatballRecipe;
|
||||
|
||||
// here's where all the food magic goes on
|
||||
private static final String[] sacredCropNames = new String[]{"cropWheat", "cropCarrot", "cropPotato", "cropApple", "cropMelon", "cropPumpkin", "cropCactus", "cropMushroomRed", "cropMushroomBrown"};
|
||||
private static final String[] sacredCropNames = new String[]{"cropWheat", "cropCarrot", "cropPotato", "cropApple", "cropMelon", "cropPumpkin", "cropCactus", "cropMushroomRed", "cropMushroomBrown", "cropCherry"};
|
||||
private static final String[] forbiddenCropNames = new String[] {"cropEdibleroot", "cropWhitemushroom", "cropBeet", "cropCotton", "cropPoppy", "cropTulipRed", "cropTulipWhite", "cropDaisy",
|
||||
"cropTulipPink", "cropAllium", "cropOrchid", "cropTulipOrange", "cropDandelion", "cropShroomRed", "cropShroomBrown",
|
||||
"cropFerranium", "cropAurigold", "cropDiamahlia", "cropLapender", "cropEmeryllis", "cropRedstodendron", "cropCuprosia",
|
||||
|
||||
@@ -3,7 +3,6 @@ package fox.spiteful.avaritia.items;
|
||||
import com.google.common.collect.Multimap;
|
||||
import fox.spiteful.avaritia.Avaritia;
|
||||
import fox.spiteful.avaritia.LudicrousText;
|
||||
import fox.spiteful.avaritia.Lumberjack;
|
||||
import fox.spiteful.avaritia.compat.Compat;
|
||||
import fox.spiteful.avaritia.entity.EntityImmortalItem;
|
||||
import fox.spiteful.avaritia.render.ICosmicRenderItem;
|
||||
@@ -14,8 +13,6 @@ import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
import fox.spiteful.avaritia.PotionHelper;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
import net.minecraft.entity.SharedMonsterAttributes;
|
||||
import net.minecraft.entity.ai.attributes.AttributeModifier;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.EnumRarity;
|
||||
import net.minecraft.item.ItemArmor;
|
||||
@@ -39,7 +36,9 @@ import thaumcraft.api.IGoggles;
|
||||
import thaumcraft.api.IVisDiscountGear;
|
||||
import thaumcraft.api.aspects.Aspect;
|
||||
import thaumcraft.api.nodes.IRevealer;
|
||||
import vazkii.botania.api.item.IManaProficiencyArmor;
|
||||
import vazkii.botania.api.item.IPhantomInkable;
|
||||
import vazkii.botania.api.mana.IManaDiscountArmor;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collection;
|
||||
@@ -49,9 +48,12 @@ import java.util.List;
|
||||
@Optional.Interface(iface = "thaumcraft.api.IGoggles", modid = "Thaumcraft"),
|
||||
@Optional.Interface(iface = "thaumcraft.api.nodes.IRevealer", modid = "Thaumcraft"),
|
||||
@Optional.Interface(iface = "thaumcraft.api.IVisDiscountGear", modid = "Thaumcraft"),
|
||||
@Optional.Interface(iface = "vazkii.botania.api.item.IPhantomInkable", modid = "Botania")
|
||||
@Optional.Interface(iface = "vazkii.botania.api.item.IPhantomInkable", modid = "Botania"),
|
||||
@Optional.Interface(iface = "vazkii.botania.api.mana.IManaDiscountArmor", modid = "Botania"),
|
||||
@Optional.Interface(iface = "vazkii.botania.api.item.IManaProficiencyArmor", modid = "Botania")
|
||||
})
|
||||
public class ItemArmorInfinity extends ItemArmor implements ICosmicRenderItem, IGoggles, IRevealer, IVisDiscountGear, IPhantomInkable {
|
||||
public class ItemArmorInfinity extends ItemArmor implements ICosmicRenderItem, IGoggles, IRevealer, IVisDiscountGear, IPhantomInkable,
|
||||
IManaDiscountArmor, IManaProficiencyArmor {
|
||||
|
||||
public static final ArmorMaterial infinite_armor = EnumHelper.addArmorMaterial("infinity", 9999, new int[]{6, 16, 12, 6}, 1000);
|
||||
public IIcon cosmicMask;
|
||||
@@ -188,6 +190,18 @@ public class ItemArmorInfinity extends ItemArmor implements ICosmicRenderItem, I
|
||||
tag.setBoolean("phantomInk", ink);
|
||||
}
|
||||
|
||||
@Optional.Method(modid = "Botania")
|
||||
@Override
|
||||
public float getDiscount(ItemStack stack, int slot, EntityPlayer player){
|
||||
return 0.25F;
|
||||
}
|
||||
|
||||
@Optional.Method(modid = "Botania")
|
||||
@Override
|
||||
public boolean shouldGiveProficiency(ItemStack itemStack, int i, EntityPlayer player){
|
||||
return true;
|
||||
}
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
@Override
|
||||
public void registerIcons(IIconRegister ir) {
|
||||
|
||||
@@ -0,0 +1,44 @@
|
||||
/**
|
||||
* This class was created by <Vazkii>. It's distributed as
|
||||
* part of the Botania Mod. Get the Source Code in github:
|
||||
* https://github.com/Vazkii/Botania
|
||||
*
|
||||
* Botania is Open Source and distributed under the
|
||||
* Botania License: http://botaniamod.net/license.php
|
||||
*
|
||||
* File Created @ [Aug 28, 2015, 9:04:53 PM (GMT)]
|
||||
*/
|
||||
package vazkii.botania.api.item;
|
||||
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
||||
/**
|
||||
* An armor item that implements this gives the player wearing it mana proficiency, by
|
||||
* which it makes Rods the player use have a stronger effect. This is a boolean, and only
|
||||
* one armor piece with this returning true is required for the player to be considered
|
||||
* to be having proficiency, by which it's suggested that this is used alongside an
|
||||
* armor set, where only one piece implements it.
|
||||
*/
|
||||
public interface IManaProficiencyArmor {
|
||||
|
||||
public boolean shouldGiveProficiency(ItemStack stack, int slot, EntityPlayer player);
|
||||
|
||||
public final static class Helper {
|
||||
|
||||
public static boolean hasProficiency(EntityPlayer player) {
|
||||
for(int i = 0; i < 4; i++) {
|
||||
ItemStack armor = player.getCurrentArmor(i);
|
||||
if(armor != null) {
|
||||
Item item = armor.getItem();
|
||||
if(item instanceof IManaProficiencyArmor && ((IManaProficiencyArmor) item).shouldGiveProficiency(armor, i, player))
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,31 @@
|
||||
/**
|
||||
* This class was created by <Vazkii>. It's distributed as
|
||||
* part of the Botania Mod. Get the Source Code in github:
|
||||
* https://github.com/Vazkii/Botania
|
||||
*
|
||||
* Botania is Open Source and distributed under the
|
||||
* Botania License: http://botaniamod.net/license.php
|
||||
*
|
||||
* File Created @ [Jan 28, 2015, 9:22:53 PM (GMT)]
|
||||
*/
|
||||
package vazkii.botania.api.mana;
|
||||
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
||||
/**
|
||||
* An armor item that implements this can provide a mana discount for mana tools.
|
||||
* Mana tools are the ones on the main toolset (Pick, Shovel, Axe, Sword and Shovel)
|
||||
* as well as Rods.
|
||||
*/
|
||||
public interface IManaDiscountArmor {
|
||||
|
||||
/**
|
||||
* Gets the mana discount that this piece of armor provides. This is added
|
||||
* together to create the full discount.
|
||||
* Value is to be from 0.0 to 1.0. 0.1 is 10% discount, as an example.
|
||||
* You can also return negative values to make tools cost more.
|
||||
*/
|
||||
public float getDiscount(ItemStack stack, int slot, EntityPlayer player);
|
||||
|
||||
}
|
||||
@@ -0,0 +1,4 @@
|
||||
@API(owner = "Botania", apiVersion = "61", provides = "BotaniaAPI")
|
||||
package vazkii.botania.api;
|
||||
import cpw.mods.fml.common.API;
|
||||
|
||||
Reference in new issue
Block a user