Funness - I can't spell

This commit is contained in:
WayofTime 2015-02-13 14:48:22 -05:00
parent cf183a46ca
commit a1fa511e7a
8 changed files with 78 additions and 50 deletions

View file

@ -345,6 +345,7 @@ public class AlchemicalWizardry
public static boolean respawnWithDebuff; public static boolean respawnWithDebuff;
public static boolean lockdownAltar; public static boolean lockdownAltar;
public static boolean causeHungerWithRegen; public static boolean causeHungerWithRegen;
public static boolean causeHungerChatMessage = true;
public static List<Class> wellBlacklist; public static List<Class> wellBlacklist;
@ -1587,7 +1588,7 @@ public class AlchemicalWizardry
continue; continue;
} }
strLine = strLine.replace('”', '"').replace('“','"').replace("…", "...").replace('’', '\'').replace('–', '-'); strLine = strLine.replace('”', '"').replace('“','"').replace("", "...").replace('', '\'').replace('', '-');
if(Minecraft.getMinecraft() != null && Minecraft.getMinecraft().fontRenderer != null) if(Minecraft.getMinecraft() != null && Minecraft.getMinecraft().fontRenderer != null)
{ {

View file

@ -84,8 +84,8 @@ public class BloodMagicConfiguration
AlchemicalWizardry.customPotionSoulHardenID = config.get("Potion ID", "SoulHarden", 112).getInt(); AlchemicalWizardry.customPotionSoulHardenID = config.get("Potion ID", "SoulHarden", 112).getInt();
AlchemicalWizardry.customPotionDeafID = config.get("Potion ID", "Deaf", 113).getInt(); AlchemicalWizardry.customPotionDeafID = config.get("Potion ID", "Deaf", 113).getInt();
AlchemicalWizardry.customPotionFeatherFallID = config.get("Potion ID", "FeatherFall", 114).getInt(); AlchemicalWizardry.customPotionFeatherFallID = config.get("Potion ID", "FeatherFall", 114).getInt();
AlchemicalWizardry.customPotionDemonCloakID = config.get("Potion ID", "DemonCloak", 114).getInt(); AlchemicalWizardry.customPotionDemonCloakID = config.get("Potion ID", "DemonCloak", 115).getInt();
AlchemicalWizardry.customPotionAmphibianID = config.get("Potion ID", "Amphibian", 115).getInt(); AlchemicalWizardry.customPotionAmphibianID = config.get("Potion ID", "Amphibian", 116).getInt();
MeteorParadigm.maxChance = config.get("meteor", "maxChance", 1000).getInt(); MeteorParadigm.maxChance = config.get("meteor", "maxChance", 1000).getInt();
AlchemicalWizardry.doMeteorsDestroyBlocks = config.get("meteor", "doMeteorsDestroyBlocks", true).getBoolean(true); AlchemicalWizardry.doMeteorsDestroyBlocks = config.get("meteor", "doMeteorsDestroyBlocks", true).getBoolean(true);

View file

@ -0,0 +1,6 @@
package WayofTime.alchemicalWizardry.api.altarRecipeRegistry;
public interface IFadedRune
{
public int getAltarTierLimit(int meta);
}

View file

@ -332,7 +332,7 @@ public class AlchemicalWizardryEventHooks
@SubscribeEvent @SubscribeEvent
public void onPlayerRespawnEvent(PlayerRespawnEvent event) public void onPlayerRespawnEvent(PlayerRespawnEvent event)
{ {
if (AlchemicalWizardry.respawnWithDebuff) if (AlchemicalWizardry.respawnWithDebuff && event.player != null)
{ {
event.player.addPotionEffect(new PotionEffect(AlchemicalWizardry.customPotionSoulFray.id, 20 * 60 * 5, 0)); event.player.addPotionEffect(new PotionEffect(AlchemicalWizardry.customPotionSoulFray.id, 20 * 60 * 5, 0));
} }

View file

@ -1,14 +1,15 @@
package WayofTime.alchemicalWizardry.common.bloodAltarUpgrade; package WayofTime.alchemicalWizardry.common.bloodAltarUpgrade;
import WayofTime.alchemicalWizardry.ModBlocks;
import WayofTime.alchemicalWizardry.common.block.BloodRune;
import net.minecraft.block.Block;
import net.minecraft.init.Blocks;
import net.minecraft.world.World;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.List; import java.util.List;
import net.minecraft.block.Block;
import net.minecraft.init.Blocks;
import net.minecraft.world.World;
import WayofTime.alchemicalWizardry.ModBlocks;
import WayofTime.alchemicalWizardry.api.altarRecipeRegistry.IFadedRune;
import WayofTime.alchemicalWizardry.common.block.BloodRune;
public class UpgradedAltars public class UpgradedAltars
{ {
public static List<AltarComponent> secondTierAltar = new ArrayList(); public static List<AltarComponent> secondTierAltar = new ArrayList();
@ -170,6 +171,10 @@ public class UpgradedAltars
public static AltarUpgradeComponent getUpgrades(World world, int x, int y, int z, int altarTier) public static AltarUpgradeComponent getUpgrades(World world, int x, int y, int z, int altarTier)
{ {
if(!world.isRemote)
{
return null;
}
AltarUpgradeComponent upgrades = new AltarUpgradeComponent(); AltarUpgradeComponent upgrades = new AltarUpgradeComponent();
List<AltarComponent> list = UpgradedAltars.getAltarUpgradeListForTier(altarTier); List<AltarComponent> list = UpgradedAltars.getAltarUpgradeListForTier(altarTier);
@ -180,49 +185,52 @@ public class UpgradedAltars
//Currently checks the getRuneEffect. //Currently checks the getRuneEffect.
//TODO Change so that it uses the metadata instead, with the BlockID. //TODO Change so that it uses the metadata instead, with the BlockID.
Block testBlock = world.getBlock(x + ac.getX(), y + ac.getY(), z + ac.getZ()); Block testBlock = world.getBlock(x + ac.getX(), y + ac.getY(), z + ac.getZ());
int meta = world.getBlockMetadata(x + ac.getX(), y + ac.getY(), z + ac.getZ());
if (testBlock instanceof BloodRune) if (testBlock instanceof BloodRune)
{ {
if (!world.isRemote) if (testBlock instanceof IFadedRune && altarTier > ((IFadedRune)testBlock).getAltarTierLimit(meta))
{ {
switch (((BloodRune) testBlock).getRuneEffect(world.getBlockMetadata(x + ac.getX(), y + ac.getY(), z + ac.getZ()))) return UpgradedAltars.getUpgrades(world, x, y, z, ((IFadedRune)testBlock).getAltarTierLimit(meta));
{ }
case 1:
upgrades.addSpeedUpgrade(); switch (((BloodRune) testBlock).getRuneEffect(meta))
break; {
case 1:
upgrades.addSpeedUpgrade();
break;
case 2: case 2:
upgrades.addEfficiencyUpgrade(); upgrades.addEfficiencyUpgrade();
break; break;
case 3: case 3:
upgrades.addSacrificeUpgrade(); upgrades.addSacrificeUpgrade();
break; break;
case 4: case 4:
upgrades.addSelfSacrificeUpgrade(); upgrades.addSelfSacrificeUpgrade();
break; break;
case 5: case 5:
upgrades.addaltarCapacitiveUpgrade(); upgrades.addaltarCapacitiveUpgrade();
break; break;
case 6: case 6:
upgrades.addDisplacementUpgrade(); upgrades.addDisplacementUpgrade();
break; break;
case 7: case 7:
upgrades.addorbCapacitiveUpgrade(); upgrades.addorbCapacitiveUpgrade();
break; break;
case 8: case 8:
upgrades.addBetterCapacitiveUpgrade(); upgrades.addBetterCapacitiveUpgrade();
break; break;
case 9: case 9:
upgrades.addAccelerationUpgrade(); upgrades.addAccelerationUpgrade();
break; break;
}
} }
} }
} }

View file

@ -1,17 +1,19 @@
package WayofTime.alchemicalWizardry.common.items; package WayofTime.alchemicalWizardry.common.items;
import WayofTime.alchemicalWizardry.AlchemicalWizardry; import java.util.List;
import WayofTime.alchemicalWizardry.api.soulNetwork.LifeEssenceNetwork;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import net.minecraft.client.renderer.texture.IIconRegister; import net.minecraft.client.renderer.texture.IIconRegister;
import net.minecraft.entity.player.EntityPlayer; import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.ItemStack; import net.minecraft.item.ItemStack;
import net.minecraft.server.MinecraftServer; import net.minecraft.server.MinecraftServer;
import net.minecraft.util.StatCollector; import net.minecraft.util.StatCollector;
import net.minecraft.world.World; import net.minecraft.world.World;
import net.minecraft.world.WorldProvider;
import java.util.List; import net.minecraftforge.common.DimensionManager;
import WayofTime.alchemicalWizardry.AlchemicalWizardry;
import WayofTime.alchemicalWizardry.api.soulNetwork.LifeEssenceNetwork;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
public class LavaCrystal extends EnergyItems public class LavaCrystal extends EnergyItems
{ {
@ -84,7 +86,13 @@ public class LavaCrystal extends EnergyItems
return false; return false;
} }
World world = MinecraftServer.getServer().worldServers[0]; // World world = MinecraftServer.getServer().worldServers[0];
WorldProvider provider = DimensionManager.getProvider(0);
if(provider == null || provider.worldObj == null)
{
return false;
}
World world = provider.worldObj;
LifeEssenceNetwork data = (LifeEssenceNetwork) world.loadItemData(LifeEssenceNetwork.class, ownerName); LifeEssenceNetwork data = (LifeEssenceNetwork) world.loadItemData(LifeEssenceNetwork.class, ownerName);
if (data == null) if (data == null)

View file

@ -619,6 +619,10 @@ public class TEAltar extends TileEntity implements IInventory, IFluidTank, IFlui
PotionEffect regenEffect = player.getActivePotionEffect(Potion.regeneration); PotionEffect regenEffect = player.getActivePotionEffect(Potion.regeneration);
if (regenEffect != null && regenEffect.getAmplifier() > 0) if (regenEffect != null && regenEffect.getAmplifier() > 0)
{ {
if(AlchemicalWizardry.causeHungerChatMessage && player.getActivePotionEffect(Potion.hunger) != null)
{
player.addChatComponentMessage(new ChatComponentText(StatCollector.translateToLocal("message.altar.hunger")));
}
player.addPotionEffect(new PotionEffect(Potion.hunger.id, 40, regenEffect.getAmplifier() * 2 - 2)); player.addPotionEffect(new PotionEffect(Potion.hunger.id, 40, regenEffect.getAmplifier() * 2 - 2));
} }
} }

View file

@ -387,6 +387,7 @@ message.altar.currenttier=Altar's Current Tier: %s
message.altar.progress=Altar's Progress: message.altar.progress=Altar's Progress:
message.altar.inputtank= Input Tank: %s LP message.altar.inputtank= Input Tank: %s LP
message.altar.outputtank= Output Tank: %s LP message.altar.outputtank= Output Tank: %s LP
message.altar.hunger=[BM] Your high regeneration rate has caused you to become hungry...
message.attunedcrystal.clearing=Clearing saved container... message.attunedcrystal.clearing=Clearing saved container...
message.attunedcrystal.error.cannotfind=Can no longer find linked container. message.attunedcrystal.error.cannotfind=Can no longer find linked container.
message.attunedcrystal.error.noconnections=Linked container has no connections remaining! message.attunedcrystal.error.noconnections=Linked container has no connections remaining!