mirror of
https://github.com/GTNewHorizons/Avaritia.git
synced 2026-11-20 12:19:39 +00:00
Minor Tweaks and AM2
This commit is contained in:
1 parent
3f1a00db68
commit
eabd525edd
5 files changed
+37
-5
No files matched your search
@@ -63,7 +63,9 @@ public class LudicrousEvents {
|
||||
if(drop.getItem() != Item.getItemFromBlock(event.block) && !(drop.getItem() instanceof ItemBlock)){
|
||||
drop.stackSize = Math.min(drop.stackSize * 4, drop.getMaxStackSize());
|
||||
}
|
||||
else if(drop.getItem() == Item.getItemFromBlock(event.block) && FurnaceRecipes.smelting().getSmeltingResult(drop) != null){
|
||||
else if(drop.getItem() == Item.getItemFromBlock(event.block) && FurnaceRecipes.smelting().getSmeltingResult(drop) != null
|
||||
&& drop.getItem() != Item.getItemFromBlock(Blocks.netherrack)
|
||||
&& !(FurnaceRecipes.smelting().getSmeltingResult(drop).getItem() instanceof ItemBlock)){
|
||||
ItemStack smelt = FurnaceRecipes.smelting().getSmeltingResult(drop).copy();
|
||||
smelt.stackSize = Math.min(drop.stackSize * 8, drop.getMaxStackSize());
|
||||
adds.add(smelt);
|
||||
|
||||
@@ -36,6 +36,7 @@ public class Compat {
|
||||
public static boolean magicrops = false;
|
||||
public static boolean ganyland = false;
|
||||
public static boolean pams = false;
|
||||
public static boolean am2 = false;
|
||||
|
||||
public static void census(){
|
||||
nei = Loader.isModLoaded("NotEnoughItems");
|
||||
@@ -58,6 +59,7 @@ public class Compat {
|
||||
magicrops = Loader.isModLoaded("magicalcrops");
|
||||
ganyland = Loader.isModLoaded("ganyssurface");
|
||||
pams = Loader.isModLoaded("harvestcraft");
|
||||
am2 = Loader.isModLoaded("arsmagica2");
|
||||
}
|
||||
|
||||
public static void compatify(){
|
||||
@@ -332,7 +334,21 @@ public class Compat {
|
||||
catch (Throwable e){
|
||||
Lumberjack.log(Level.INFO, "Avaritia got overwhelmed by all the food choices. D:");
|
||||
e.printStackTrace();
|
||||
pams = false;
|
||||
natura = false;
|
||||
}
|
||||
}
|
||||
|
||||
if(am2){
|
||||
try {
|
||||
Item gem = getItem("arsmagica2", "itemOre");
|
||||
Item essence = getItem("arsmagica2", "essence");
|
||||
|
||||
Grinder.catalyst.getInput().add(new ItemStack(essence, 1, 10));
|
||||
Grinder.catalyst.getInput().add(new ItemStack(gem, 1, 6));
|
||||
}
|
||||
catch (Throwable e){
|
||||
Lumberjack.log(Level.INFO, e, "Avaritia got sick of the arcane guardian's healspam.");
|
||||
am2 = false;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -11,12 +11,13 @@ import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraftforge.oredict.OreDictionary;
|
||||
import net.minecraftforge.oredict.ShapelessOreRecipe;
|
||||
import org.apache.logging.log4j.Level;
|
||||
|
||||
public class Mincer {
|
||||
public static ShapelessOreRecipe meatballRecipe;
|
||||
|
||||
// here's where all the food magic goes on
|
||||
private static String[] sacredCropNames = new String[]{"cropWheat", "cropCarrot", "cropPotato", "cropApple", "cropMelon", "cropPumpkin", "cropCactus"};
|
||||
private static String[] sacredCropNames = new String[]{"cropWheat", "cropCarrot", "cropPotato", "cropApple", "cropMelon", "cropPumpkin", "cropCactus", "cropMushroomRed", "cropMushroomBrown"};
|
||||
private static String[] forbiddenCropNames = new String[] {"cropEdibleroot", "cropWhitemushroom", "cropBeet", "cropCotton"};
|
||||
private static String[] knownMeatEntries = new String[]{"nuggetMeat", "ingotMeat", "dustMeat", "rawMutton"};
|
||||
private static List<ItemStack> knownMeats = new ArrayList<ItemStack>();
|
||||
@@ -31,6 +32,8 @@ public class Mincer {
|
||||
}*/
|
||||
knownMeats.add(new ItemStack(Items.fish));
|
||||
OreDictionary.registerOre("cropCactus", new ItemStack(Blocks.cactus));
|
||||
OreDictionary.registerOre("cropMushroomRed", new ItemStack(Blocks.red_mushroom));
|
||||
OreDictionary.registerOre("cropMushroomBrown", new ItemStack(Blocks.brown_mushroom));
|
||||
}
|
||||
private static Random randy;
|
||||
|
||||
@@ -200,6 +203,17 @@ public class Mincer {
|
||||
Compat.natura = false;
|
||||
}
|
||||
}
|
||||
|
||||
if(Compat.am2){
|
||||
try {
|
||||
Item stuff = Compat.getItem("arsmagica2", "itemOre");
|
||||
knownMeats.add(new ItemStack(stuff, 1, 8));
|
||||
}
|
||||
catch(Exception e){
|
||||
Lumberjack.log(Level.INFO, e, "Avaritia got sick of the arcane guardian's healspam.");
|
||||
Compat.am2 = false;
|
||||
}
|
||||
}
|
||||
|
||||
Lumberjack.info("rawMeats: "+rawMeats);
|
||||
Lumberjack.info("knownMeats: "+knownMeats);
|
||||
|
||||
@@ -80,7 +80,7 @@ public class ItemSwordInfinity extends ItemSword implements ICosmicRenderItem {
|
||||
{
|
||||
if(!entity.worldObj.isRemote && entity instanceof EntityPlayer) {
|
||||
EntityPlayer victim = (EntityPlayer)entity;
|
||||
if(victim.capabilities.isCreativeMode && !victim.isDead && victim.getHealth() > 0){
|
||||
if(victim.capabilities.isCreativeMode && !victim.isDead && victim.getHealth() > 0 && !LudicrousItems.isInfinite(victim)){
|
||||
victim.func_110142_aN().func_94547_a(new DamageSourceInfinitySword(player), victim.getHealth(), victim.getHealth());
|
||||
victim.setHealth(0);
|
||||
victim.onDeath(new EntityDamageSource("infinity", player));
|
||||
|
||||
Reference in new issue
Block a user