mirror of
https://github.com/GTNewHorizons/BloodArsenal.git
synced 2026-11-17 11:05:07 +00:00
1.1-5 Update
This commit is contained in:
1 parent
130fa3e54d
commit
79cdb45028
32 files changed
+1056
-380
No files matched your search
@@ -6,7 +6,7 @@ import com.arc.bloodarsenal.items.ModItems;
|
||||
import com.arc.bloodarsenal.items.tinkers.BloodArsenalTinkers;
|
||||
import com.arc.bloodarsenal.items.tinkers.RecipeHelper;
|
||||
import com.arc.bloodarsenal.misc.CommandDownloadMod;
|
||||
import com.arc.bloodarsenal.potion.PotionVampiricAura;
|
||||
import com.arc.bloodarsenal.potion.PotionBloodArsenal;
|
||||
import com.arc.bloodarsenal.rituals.RitualRegistry;
|
||||
import cpw.mods.fml.common.FMLCommonHandler;
|
||||
import cpw.mods.fml.common.Loader;
|
||||
@@ -36,12 +36,13 @@ import org.apache.logging.log4j.Logger;
|
||||
import java.io.File;
|
||||
import java.lang.reflect.Field;
|
||||
import java.lang.reflect.Modifier;
|
||||
import java.util.Calendar;
|
||||
|
||||
@Mod(modid = BloodArsenal.MODID, version = BloodArsenal.VERSION, name = "Blood Arsenal", dependencies = "required-after:AWWayofTime;after:NotEnoughItems;after:Baubles;after:TConstruct", guiFactory = "com.arc.bloodarsenal.gui.ConfigGuiFactory")
|
||||
public class BloodArsenal
|
||||
{
|
||||
public final static String MODID = "BloodArsenal";
|
||||
public final static String VERSION = "1.1-4";
|
||||
public final static String VERSION = "1.1-5";
|
||||
|
||||
@SidedProxy(clientSide = "com.arc.bloodarsenal.ClientProxy", serverSide = "com.arc.bloodarsenal.CommonProxy")
|
||||
public static CommonProxy proxy;
|
||||
@@ -57,10 +58,8 @@ public class BloodArsenal
|
||||
public static Item.ToolMaterial infusedDiamond = EnumHelper.addToolMaterial("InfusedDiamond", 6, 0, 16.0F, 9.0F, 0);
|
||||
public static Item.ToolMaterial infusedNetherium = EnumHelper.addToolMaterial("InfusedNetherium", 9, 0, 31.0F, 18.0F, 0);
|
||||
|
||||
public static ItemArmor.ArmorMaterial vampireArmor = EnumHelper.addArmorMaterial("VampireArmor", 0, new int[]{3, 8, 6, 3}, 0);
|
||||
|
||||
public static boolean isBaublesLoaded;
|
||||
public static boolean isTinkersConstructLoaded;
|
||||
public static ItemArmor.ArmorMaterial vampireArmor = EnumHelper.addArmorMaterial("VampireArmor", 0, new int[]{2, 7, 4, 2}, 0);
|
||||
public static ItemArmor.ArmorMaterial lifeImbuedArmor = EnumHelper.addArmorMaterial("ImbuedArmor", 0, new int[]{4, 10, 8, 4}, 7);
|
||||
|
||||
public static Logger logger = LogManager.getLogger(MODID);
|
||||
public static CreativeTabs BA_TAB = new CreativeTabs("BA_TAB")
|
||||
@@ -74,6 +73,12 @@ public class BloodArsenal
|
||||
|
||||
public static DamageSource deathFromBlood = (new DamageSource("deathFromBlood")).setDamageBypassesArmor();
|
||||
|
||||
public static boolean isHalloween()
|
||||
{
|
||||
Calendar calendar = Calendar.getInstance();
|
||||
return calendar.get(Calendar.MONTH) == Calendar.OCTOBER;
|
||||
}
|
||||
|
||||
@Mod.EventHandler
|
||||
public void preInit(FMLPreInitializationEvent event)
|
||||
{
|
||||
@@ -132,53 +137,34 @@ public class BloodArsenal
|
||||
|
||||
proxy.init();
|
||||
|
||||
vampiricAura = new PotionVampiricAura(BloodArsenalConfig.vampiricAuraID, false, 0).setIconIndex(0, 0).setPotionName("Vampiric Aura");
|
||||
bleeding = new PotionVampiricAura(BloodArsenalConfig.bleedingID, true, 0).setIconIndex(1, 0).setPotionName("Bleeding");
|
||||
swimming = new PotionVampiricAura(BloodArsenalConfig.swimmingID, false, 0).setIconIndex(2, 0).setPotionName("Swimming");
|
||||
vampiricAura = new PotionBloodArsenal(BloodArsenalConfig.vampiricAuraID, false, 0).setIconIndex(0, 0).setPotionName("Vampiric Aura");
|
||||
bleeding = new PotionBloodArsenal(BloodArsenalConfig.bleedingID, true, 0).setIconIndex(1, 0).setPotionName("Bleeding");
|
||||
swimming = new PotionBloodArsenal(BloodArsenalConfig.swimmingID, false, 0).setIconIndex(2, 0).setPotionName("Swimming");
|
||||
}
|
||||
|
||||
@Mod.EventHandler
|
||||
public void postInit(FMLPostInitializationEvent event)
|
||||
{
|
||||
int craftingConstant = OreDictionary.WILDCARD_VALUE;
|
||||
|
||||
ItemStack weakOrb = new ItemStack(WayofTime.alchemicalWizardry.ModItems.weakBloodOrb, 1, craftingConstant);
|
||||
ItemStack apprenticeOrb = new ItemStack(WayofTime.alchemicalWizardry.ModItems.apprenticeBloodOrb, 1, craftingConstant);
|
||||
ItemStack magicianOrb = new ItemStack(WayofTime.alchemicalWizardry.ModItems.magicianBloodOrb, 1, craftingConstant);
|
||||
ItemStack masterOrb = new ItemStack(WayofTime.alchemicalWizardry.ModItems.masterBloodOrb, 1, craftingConstant);
|
||||
ItemStack archmageOrb = new ItemStack(WayofTime.alchemicalWizardry.ModItems.archmageBloodOrb, 1, craftingConstant);
|
||||
ItemStack transcendentOrb = new ItemStack(WayofTime.alchemicalWizardry.ModItems.transcendentBloodOrb, 1, craftingConstant);
|
||||
|
||||
if (Loader.isModLoaded("Baubles"))
|
||||
{
|
||||
isBaublesLoaded = true;
|
||||
logger.info("Loaded Baubles integration");
|
||||
|
||||
GameRegistry.registerItem(ModItems.vampire_ring, "vampire_ring");
|
||||
GameRegistry.registerItem(ModItems.self_sacrifice_amulet, "self_sacrifice_amulet");
|
||||
GameRegistry.registerItem(ModItems.sacrifice_amulet, "sacrifice_amulet");
|
||||
|
||||
BloodArsenalRecipes.addOreDictBloodOrbRecipe(new ItemStack(ModItems.vampire_ring), "ab ", "bcb", " b ", 'a', ModItems.blood_infused_diamond_bound, 'b', Blocks.stone, 'c', masterOrb);
|
||||
BloodArsenalRecipes.addOreDictBloodOrbRecipe(new ItemStack(ModItems.sacrifice_amulet), "aaa", "aba", "caa", 'a', ModItems.blood_burned_string, 'b', weakOrb, 'c', Items.gold_ingot);
|
||||
BloodArsenalRecipes.addOreDictBloodOrbRecipe(new ItemStack(ModItems.self_sacrifice_amulet), "aaa", "aba", "caa", 'a', ModItems.blood_burned_string, 'b', weakOrb, 'c', Items.glowstone_dust);
|
||||
}
|
||||
else
|
||||
{
|
||||
isBaublesLoaded = false;
|
||||
if (BloodArsenalConfig.baublesIntegration)
|
||||
{
|
||||
logger.info("Loaded Baubles integration");
|
||||
ModItems.registerBaubles();
|
||||
BloodArsenalRecipes.addBaublesRecipe();
|
||||
}
|
||||
}
|
||||
|
||||
if (Loader.isModLoaded("TConstruct"))
|
||||
{
|
||||
isTinkersConstructLoaded = true;
|
||||
logger.info("Loaded Tinker's Construct integration");
|
||||
if (BloodArsenalConfig.tinkersIntegration)
|
||||
{
|
||||
logger.info("Loaded Tinker's Construct integration");
|
||||
|
||||
BloodArsenalTinkers.addMaterials();
|
||||
BloodArsenalTinkers.addParts();
|
||||
RecipeHelper.addRecipes();
|
||||
}
|
||||
else
|
||||
{
|
||||
isTinkersConstructLoaded = false;
|
||||
BloodArsenalTinkers.addMaterials();
|
||||
BloodArsenalTinkers.addParts();
|
||||
RecipeHelper.addRecipes();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -56,7 +56,7 @@ public class BloodArsenalConfig
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
BloodArsenal.logger.error("There has been an error loading the configurations, go ask on the forums.");
|
||||
BloodArsenal.logger.error("There has been an error loading the configurations, go report this on the forum.");
|
||||
}
|
||||
finally
|
||||
{
|
||||
@@ -69,7 +69,7 @@ public class BloodArsenalConfig
|
||||
config.addCustomCategoryComment(potionId, "Change potion ID's here if you have conflicts");
|
||||
config.addCustomCategoryComment(ritualBlacklist, "Blacklist rituals that you don't want/like");
|
||||
config.addCustomCategoryComment(toolSetting, "Settings for various tools");
|
||||
config.addCustomCategoryComment(modSettings, "Disable mod integration");
|
||||
config.addCustomCategoryComment(modSettings, "Toggle mod integration");
|
||||
config.addCustomCategoryComment(lpSettings, "Change the LP costs for things");
|
||||
config.addCustomCategoryComment(misc, "Random stuffs");
|
||||
|
||||
@@ -82,8 +82,8 @@ public class BloodArsenalConfig
|
||||
|
||||
diamondToolsAllowed = config.get(toolSetting, "Are Infused Diamond tools allowed", true).getBoolean(diamondToolsAllowed);
|
||||
|
||||
baublesIntegration = config.get(modSettings, "Disable Baubles integration?", false).getBoolean(baublesIntegration);
|
||||
tinkersIntegration = config.get(modSettings, "Disable TConstruct integration?", false).getBoolean(tinkersIntegration);
|
||||
baublesIntegration = config.get(modSettings, "Enable Baubles integration?", true).getBoolean(baublesIntegration);
|
||||
tinkersIntegration = config.get(modSettings, "Enable TConstruct integration?", true).getBoolean(tinkersIntegration);
|
||||
|
||||
sigilSwimmingCost = config.get(lpSettings, "Sigil of Swimming cost; Default: 150", 150).getInt(sigilSwimmingCost);
|
||||
sigilDivinityCost = config.get(lpSettings, "Sigil of Divinity cost; Default: 1000000", 1000000).getInt(sigilDivinityCost);
|
||||
@@ -94,11 +94,4 @@ public class BloodArsenalConfig
|
||||
|
||||
config.save();
|
||||
}
|
||||
|
||||
public static void lpDouble(AltarRecipe altarRecipe)
|
||||
{
|
||||
List<AltarRecipe> recipeList = AltarRecipeRegistry.altarRecipes;
|
||||
int recipeCost = altarRecipe.getLiquidRequired();
|
||||
int newCost = recipeCost * 2;
|
||||
}
|
||||
}
|
||||
@@ -5,9 +5,12 @@ import baubles.common.lib.PlayerHandler;
|
||||
import baubles.common.network.PacketHandler;
|
||||
import baubles.common.network.PacketSyncBauble;
|
||||
import com.arc.bloodarsenal.items.ModItems;
|
||||
import com.arc.bloodarsenal.items.bauble.EmpoweredSacrificeAmulet;
|
||||
import com.arc.bloodarsenal.items.bauble.EmpoweredSelfSacrificeAmulet;
|
||||
import com.arc.bloodarsenal.items.bauble.SacrificeAmulet;
|
||||
import com.arc.bloodarsenal.items.bauble.SelfSacrificeAmulet;
|
||||
import cpw.mods.fml.client.event.ConfigChangedEvent;
|
||||
import cpw.mods.fml.common.Optional;
|
||||
import cpw.mods.fml.common.eventhandler.SubscribeEvent;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.BlockGlass;
|
||||
@@ -24,6 +27,7 @@ import net.minecraft.util.ChatComponentText;
|
||||
import net.minecraftforge.event.entity.living.LivingAttackEvent;
|
||||
import net.minecraftforge.event.entity.living.LivingDeathEvent;
|
||||
import net.minecraftforge.event.entity.living.LivingEvent;
|
||||
import net.minecraftforge.event.entity.living.LivingHealEvent;
|
||||
import net.minecraftforge.event.entity.player.PlayerEvent;
|
||||
import net.minecraftforge.event.world.BlockEvent;
|
||||
|
||||
@@ -64,39 +68,7 @@ public class BloodArsenalEventHooks
|
||||
|
||||
if (entityAttacked instanceof EntityPlayer)
|
||||
{
|
||||
EntityPlayer player = (EntityPlayer) entityAttacked;
|
||||
InventoryBaubles inv = PlayerHandler.getPlayerBaubles(player);
|
||||
|
||||
for (int i = 0; i < inv.getSizeInventory(); i++)
|
||||
{
|
||||
ItemStack stack = inv.getStackInSlot(i);
|
||||
|
||||
if (stack != null && stack.getItem() == ModItems.self_sacrifice_amulet)
|
||||
{
|
||||
SelfSacrificeAmulet selfSacrificeAmulet = (SelfSacrificeAmulet) ModItems.self_sacrifice_amulet;
|
||||
int lpReceived = (int) damageDone;
|
||||
boolean shouldExecute = selfSacrificeAmulet.getStoredLP(stack) < 10000;
|
||||
|
||||
if (shouldExecute)
|
||||
{
|
||||
PotionEffect regenEffect = player.getActivePotionEffect(Potion.regeneration);
|
||||
|
||||
if (regenEffect != null && regenEffect.getAmplifier() >= 2)
|
||||
{
|
||||
selfSacrificeAmulet.setStoredLP(stack, Math.min(selfSacrificeAmulet.getStoredLP(stack) + lpReceived / 2, 10000));
|
||||
}
|
||||
else
|
||||
{
|
||||
selfSacrificeAmulet.setStoredLP(stack, Math.min(selfSacrificeAmulet.getStoredLP(stack) + lpReceived, 10000));
|
||||
}
|
||||
}
|
||||
|
||||
if (player instanceof EntityPlayerMP)
|
||||
{
|
||||
PacketHandler.INSTANCE.sendTo(new PacketSyncBauble(player, i), (EntityPlayerMP) player);
|
||||
}
|
||||
}
|
||||
}
|
||||
selfSacrificeHandler(event);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -109,36 +81,10 @@ public class BloodArsenalEventHooks
|
||||
public void onLivingDeath(LivingDeathEvent event)
|
||||
{
|
||||
Entity killer = event.source.getEntity();
|
||||
EntityLivingBase victim = event.entityLiving;
|
||||
|
||||
if (killer instanceof EntityPlayer)
|
||||
{
|
||||
EntityPlayer player = (EntityPlayer) killer;
|
||||
InventoryBaubles inv = PlayerHandler.getPlayerBaubles(player);
|
||||
|
||||
for (int i = 0; i < inv.getSizeInventory(); i++)
|
||||
{
|
||||
ItemStack stack = inv.getStackInSlot(i);
|
||||
|
||||
if (stack != null && stack.getItem() == ModItems.sacrifice_amulet)
|
||||
{
|
||||
SacrificeAmulet sacrificeAmulet = (SacrificeAmulet) ModItems.sacrifice_amulet;
|
||||
float victimHealth = victim.getMaxHealth();
|
||||
boolean healthGood = victimHealth > 4.0F;
|
||||
int lpReceived = healthGood ? 200 : 50;
|
||||
boolean shouldExecute = sacrificeAmulet.getStoredLP(stack) < 10000;
|
||||
|
||||
if (shouldExecute)
|
||||
{
|
||||
sacrificeAmulet.setStoredLP(stack, Math.min(sacrificeAmulet.getStoredLP(stack) + lpReceived, 10000));
|
||||
}
|
||||
|
||||
if (player instanceof EntityPlayerMP)
|
||||
{
|
||||
PacketHandler.INSTANCE.sendTo(new PacketSyncBauble(player, i), (EntityPlayerMP) player);
|
||||
}
|
||||
}
|
||||
}
|
||||
sacrificeHandler(event);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -224,14 +170,17 @@ public class BloodArsenalEventHooks
|
||||
Block block = event.block;
|
||||
EntityPlayer player = event.harvester;
|
||||
|
||||
if (block instanceof BlockGlass)
|
||||
if (player != null)
|
||||
{
|
||||
if (!event.isSilkTouching)
|
||||
if (block != null && block instanceof BlockGlass)
|
||||
{
|
||||
if (player.getCurrentEquippedItem().getItem() == Items.flint)
|
||||
if (!event.isSilkTouching)
|
||||
{
|
||||
event.drops.add(new ItemStack(ModItems.glass_shard));
|
||||
event.dropChance = 0.75F;
|
||||
if (player.getCurrentEquippedItem().getItem() == Items.flint)
|
||||
{
|
||||
event.drops.add(new ItemStack(ModItems.glass_shard));
|
||||
event.dropChance = 0.75F;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -246,4 +195,120 @@ public class BloodArsenalEventHooks
|
||||
BloodArsenal.logger.info("Refreshing configuration file");
|
||||
}
|
||||
}
|
||||
|
||||
@Optional.Method(modid = "Baubles")
|
||||
private void sacrificeHandler(LivingDeathEvent event)
|
||||
{
|
||||
Entity killer = event.source.getEntity();
|
||||
EntityLivingBase victim = event.entityLiving;
|
||||
|
||||
EntityPlayer player = (EntityPlayer) killer;
|
||||
InventoryBaubles inv = PlayerHandler.getPlayerBaubles(player);
|
||||
|
||||
for (int i = 0; i < inv.getSizeInventory(); i++)
|
||||
{
|
||||
ItemStack stack = inv.getStackInSlot(i);
|
||||
|
||||
if (stack != null)
|
||||
{
|
||||
if (stack.getItem() == ModItems.sacrifice_amulet)
|
||||
{
|
||||
SacrificeAmulet sacrificeAmulet = (SacrificeAmulet) ModItems.sacrifice_amulet;
|
||||
float victimHealth = victim.getMaxHealth();
|
||||
boolean healthGood = victimHealth > 4.0F;
|
||||
int lpReceived = healthGood ? 200 : 50;
|
||||
boolean shouldExecute = sacrificeAmulet.getStoredLP(stack) < 10000;
|
||||
|
||||
if (shouldExecute)
|
||||
{
|
||||
sacrificeAmulet.setStoredLP(stack, Math.min(sacrificeAmulet.getStoredLP(stack) + (lpReceived * 2), 10000));
|
||||
}
|
||||
}
|
||||
|
||||
if (stack.getItem() == ModItems.empowered_sacrifice_amulet)
|
||||
{
|
||||
EmpoweredSacrificeAmulet sacrificeAmulet = (EmpoweredSacrificeAmulet) ModItems.empowered_sacrifice_amulet;
|
||||
float victimHealth = victim.getMaxHealth();
|
||||
boolean healthGood = victimHealth > 4.0F;
|
||||
int lpReceived = healthGood ? 200 : 50;
|
||||
boolean shouldExecute = sacrificeAmulet.getStoredLP(stack) < 50000;
|
||||
|
||||
if (shouldExecute)
|
||||
{
|
||||
sacrificeAmulet.setStoredLP(stack, Math.min(sacrificeAmulet.getStoredLP(stack) + (lpReceived * 5), 50000));
|
||||
}
|
||||
}
|
||||
|
||||
if (player instanceof EntityPlayerMP)
|
||||
{
|
||||
PacketHandler.INSTANCE.sendTo(new PacketSyncBauble(player, i), (EntityPlayerMP) player);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Optional.Method(modid = "Baubles")
|
||||
private void selfSacrificeHandler(LivingAttackEvent event)
|
||||
{
|
||||
EntityLivingBase entityAttacked = event.entityLiving;
|
||||
float damageDone = event.ammount;
|
||||
|
||||
EntityPlayer player = (EntityPlayer) entityAttacked;
|
||||
InventoryBaubles inv = PlayerHandler.getPlayerBaubles(player);
|
||||
|
||||
for (int i = 0; i < inv.getSizeInventory(); i++)
|
||||
{
|
||||
ItemStack stack = inv.getStackInSlot(i);
|
||||
|
||||
if (stack != null)
|
||||
{
|
||||
if (stack.getItem() == ModItems.self_sacrifice_amulet)
|
||||
{
|
||||
SelfSacrificeAmulet selfSacrificeAmulet = (SelfSacrificeAmulet) ModItems.self_sacrifice_amulet;
|
||||
int lpReceived = (int) damageDone;
|
||||
boolean shouldExecute = selfSacrificeAmulet.getStoredLP(stack) < 10000;
|
||||
|
||||
if (shouldExecute)
|
||||
{
|
||||
PotionEffect regenEffect = player.getActivePotionEffect(Potion.regeneration);
|
||||
|
||||
if (regenEffect != null && regenEffect.getAmplifier() >= 2)
|
||||
{
|
||||
selfSacrificeAmulet.setStoredLP(stack, Math.min(selfSacrificeAmulet.getStoredLP(stack) + (lpReceived * 2) / (regenEffect.getAmplifier() + 1), 10000));
|
||||
}
|
||||
else
|
||||
{
|
||||
selfSacrificeAmulet.setStoredLP(stack, Math.min(selfSacrificeAmulet.getStoredLP(stack) + (lpReceived * 2), 10000));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (stack.getItem() == ModItems.empowered_self_sacrifice_amulet)
|
||||
{
|
||||
EmpoweredSelfSacrificeAmulet selfSacrificeAmulet = (EmpoweredSelfSacrificeAmulet) ModItems.empowered_self_sacrifice_amulet;
|
||||
int lpReceived = (int) damageDone;
|
||||
boolean shouldExecute = selfSacrificeAmulet.getStoredLP(stack) < 50000;
|
||||
|
||||
if (shouldExecute)
|
||||
{
|
||||
PotionEffect regenEffect = player.getActivePotionEffect(Potion.regeneration);
|
||||
|
||||
if (regenEffect != null && regenEffect.getAmplifier() >= 2)
|
||||
{
|
||||
selfSacrificeAmulet.setStoredLP(stack, Math.min(selfSacrificeAmulet.getStoredLP(stack) + (lpReceived * 5) / (regenEffect.getAmplifier() + 1), 50000));
|
||||
}
|
||||
else
|
||||
{
|
||||
selfSacrificeAmulet.setStoredLP(stack, Math.min(selfSacrificeAmulet.getStoredLP(stack) + (lpReceived * 5), 50000));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (player instanceof EntityPlayerMP)
|
||||
{
|
||||
PacketHandler.INSTANCE.sendTo(new PacketSyncBauble(player, i), (EntityPlayerMP) player);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -46,9 +46,12 @@ public class BloodArsenalRecipes
|
||||
BindingRegistry.registerRecipe(new ItemStack(ModItems.blood_infused_diamond_bound), new ItemStack(ModItems.blood_infused_diamond_active));
|
||||
BindingRegistry.registerRecipe(new ItemStack(ModItems.bound_igniter), new ItemStack(Items.flint_and_steel));
|
||||
//Temporary
|
||||
BindingRegistry.registerRecipe(new ItemStack(ModItems.vampire_cape), new ItemStack(Items.leather_chestplate));
|
||||
BindingRegistry.registerRecipe(new ItemStack(ModItems.vampire_greaves), new ItemStack(Items.leather_leggings));
|
||||
BindingRegistry.registerRecipe(new ItemStack(ModItems.vampire_boots), new ItemStack(Items.leather_boots));
|
||||
if (BloodArsenal.isHalloween())
|
||||
{
|
||||
BindingRegistry.registerRecipe(new ItemStack(ModItems.vampire_cape), new ItemStack(Items.leather_chestplate));
|
||||
BindingRegistry.registerRecipe(new ItemStack(ModItems.vampire_greaves), new ItemStack(Items.leather_leggings));
|
||||
BindingRegistry.registerRecipe(new ItemStack(ModItems.vampire_boots), new ItemStack(Items.leather_boots));
|
||||
}
|
||||
}
|
||||
|
||||
public static void registerRecipes()
|
||||
@@ -95,10 +98,7 @@ public class BloodArsenalRecipes
|
||||
addOreDictRecipe(new ItemStack(ModBlocks.blood_stone, 1, 3), "aaa", "aaa", "aaa", 'a', demonicSlate);
|
||||
addOreDictRecipe(new ItemStack(ModBlocks.blood_stone, 1, 4), "aaa", "aaa", "aaa", 'a', etherealSlate);
|
||||
addOreDictRecipe(new ItemStack(ModBlocks.blood_infused_iron_block), "aaa", "aaa", "aaa", 'a', ModItems.blood_infused_iron);
|
||||
addOreDictRecipe(new ItemStack(ModBlocks.blood_door_wood), "aa", "aa", "aa", 'a', ModBlocks.blood_infused_planks);
|
||||
addOreDictRecipe(new ItemStack(ModBlocks.blood_stained_ice_packed), "aa", "aa", 'a', ModBlocks.blood_stained_ice);
|
||||
addOreDictRecipe(new ItemStack(ModBlocks.blood_door_wood), "aa", "aa", "aa", 'a', ModBlocks.blood_infused_planks);
|
||||
addOreDictRecipe(new ItemStack(ModBlocks.blood_door_iron), "aa", "aa", "aa", 'a', ModItems.blood_infused_iron);
|
||||
addOreDictRecipe(new ItemStack(ModBlocks.blood_infused_glowstone), "aa", "aa", 'a', ModItems.blood_infused_glowstone_dust);
|
||||
addOreDictRecipe(new ItemStack(ModBlocks.blood_lamp), "aba", "bcb", "aba", 'a', ModItems.blood_infused_iron, 'b', ModBlocks.blood_stained_glass, 'c', ModBlocks.blood_infused_glowstone);
|
||||
addOreDictRecipe(new ItemStack(ModBlocks.blood_infused_diamond_block), "aaa", "aaa", "aaa", 'a', ModItems.blood_infused_diamond_bound);
|
||||
@@ -123,6 +123,24 @@ public class BloodArsenalRecipes
|
||||
addShapelessOreDictRecipe(new ItemStack(ModItems.juice_and_cookies), Items.cookie, ModItems.orange_juice);
|
||||
}
|
||||
|
||||
public static void addBaublesRecipe()
|
||||
{
|
||||
int craftingConstant = OreDictionary.WILDCARD_VALUE;
|
||||
|
||||
ItemStack weakOrb = new ItemStack(WayofTime.alchemicalWizardry.ModItems.weakBloodOrb, 1, craftingConstant);
|
||||
// ItemStack apprenticeOrb = new ItemStack(WayofTime.alchemicalWizardry.ModItems.apprenticeBloodOrb, 1, craftingConstant);
|
||||
// ItemStack magicianOrb = new ItemStack(WayofTime.alchemicalWizardry.ModItems.magicianBloodOrb, 1, craftingConstant);
|
||||
ItemStack masterOrb = new ItemStack(WayofTime.alchemicalWizardry.ModItems.masterBloodOrb, 1, craftingConstant);
|
||||
// ItemStack archmageOrb = new ItemStack(WayofTime.alchemicalWizardry.ModItems.archmageBloodOrb, 1, craftingConstant);
|
||||
// ItemStack transcendentOrb = new ItemStack(WayofTime.alchemicalWizardry.ModItems.transcendentBloodOrb, 1, craftingConstant);
|
||||
|
||||
addOreDictBloodOrbRecipe(new ItemStack(ModItems.vampire_ring), "ab ", "bcb", " b ", 'a', ModItems.blood_infused_diamond_bound, 'b', Blocks.stone, 'c', masterOrb);
|
||||
addOreDictBloodOrbRecipe(new ItemStack(ModItems.sacrifice_amulet), "aaa", "aba", "caa", 'a', ModItems.blood_burned_string, 'b', weakOrb, 'c', Items.gold_ingot);
|
||||
addOreDictBloodOrbRecipe(new ItemStack(ModItems.self_sacrifice_amulet), "aaa", "aba", "caa", 'a', ModItems.blood_burned_string, 'b', weakOrb, 'c', Items.glowstone_dust);
|
||||
addOreDictBloodOrbRecipe(new ItemStack(ModItems.empowered_self_sacrifice_amulet), "aba", "cdc", "ecf", 'a', ModItems.blood_infused_glowstone_dust, 'b', Items.blaze_rod, 'c', WayofTime.alchemicalWizardry.ModBlocks.runeOfSelfSacrifice, 'd', ModItems.self_sacrifice_amulet, 'e', Blocks.gold_block, 'f', ModItems.amorphic_catalyst);
|
||||
addOreDictBloodOrbRecipe(new ItemStack(ModItems.empowered_sacrifice_amulet), "aba", "cdc", "ecf", 'a', ModItems.blood_infused_glowstone_dust, 'b', Items.blaze_rod, 'c', WayofTime.alchemicalWizardry.ModBlocks.runeOfSacrifice, 'd', ModItems.sacrifice_amulet, 'e', Blocks.glowstone, 'f', ModItems.amorphic_catalyst);
|
||||
}
|
||||
|
||||
public static void addOreDictRecipe(ItemStack output, Object... recipe)
|
||||
{
|
||||
CraftingManager.getInstance().getRecipeList().add(new ShapedOreRecipe(output, recipe));
|
||||
|
||||
@@ -119,22 +119,22 @@ public class BlockBloodCake extends Block
|
||||
|
||||
if (BloodArsenalConfig.cakeIsLie)
|
||||
{
|
||||
player.addChatMessage(new ChatComponentText("The cake is a lie!"));
|
||||
player.addChatMessage(new ChatComponentText(StatCollector.translateToLocal("message.cake.lie")));
|
||||
}
|
||||
else
|
||||
{
|
||||
player.addChatMessage(new ChatComponentText("Omm nom nom"));
|
||||
player.addChatMessage(new ChatComponentText(StatCollector.translateToLocal("message.cake.eating")));
|
||||
}
|
||||
}
|
||||
else if (player.canEat(true))
|
||||
{
|
||||
if (BloodArsenalConfig.cakeIsLie)
|
||||
{
|
||||
player.addChatMessage(new ChatComponentText("The cake is a lie!"));
|
||||
player.addChatMessage(new ChatComponentText(StatCollector.translateToLocal("message.cake.lie")));
|
||||
}
|
||||
else
|
||||
{
|
||||
player.addChatMessage(new ChatComponentText("You are too full to eat any cake"));
|
||||
player.addChatMessage(new ChatComponentText(StatCollector.translateToLocal("message.cake.tooFull")));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,264 @@
|
||||
package com.arc.bloodarsenal.block;
|
||||
|
||||
import com.arc.bloodarsenal.items.ModItems;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.init.Blocks;
|
||||
import net.minecraft.init.Items;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.util.AxisAlignedBB;
|
||||
import net.minecraft.util.Direction;
|
||||
import net.minecraft.world.IBlockAccess;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
import java.util.Iterator;
|
||||
import java.util.List;
|
||||
import java.util.Random;
|
||||
|
||||
public class BlockBurnedString extends Block
|
||||
{
|
||||
public BlockBurnedString()
|
||||
{
|
||||
super(Material.circuits);
|
||||
setBlockBounds(0.0F, 0.0F, 0.0F, 1.0F, 0.15625F, 1.0F);
|
||||
setBlockName("block_burned_string");
|
||||
setBlockTextureName("BloodArsenal:block_burned_string");
|
||||
setTickRandomly(true);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int tickRate(World p_149738_1_)
|
||||
{
|
||||
return 10;
|
||||
}
|
||||
|
||||
@Override
|
||||
public AxisAlignedBB getCollisionBoundingBoxFromPool(World p_149668_1_, int p_149668_2_, int p_149668_3_, int p_149668_4_)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isOpaqueCube()
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean renderAsNormalBlock()
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public int getRenderBlockPass()
|
||||
{
|
||||
return 1;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getRenderType()
|
||||
{
|
||||
return 30;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Item getItemDropped(int p_149650_1_, Random p_149650_2_, int p_149650_3_)
|
||||
{
|
||||
return ModItems.blood_burned_string;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setBlockBoundsBasedOnState(IBlockAccess p_149719_1_, int p_149719_2_, int p_149719_3_, int p_149719_4_)
|
||||
{
|
||||
int l = p_149719_1_.getBlockMetadata(p_149719_2_, p_149719_3_, p_149719_4_);
|
||||
boolean flag = (l & 4) == 4;
|
||||
boolean flag1 = (l & 2) == 2;
|
||||
|
||||
if (!flag1)
|
||||
{
|
||||
this.setBlockBounds(0.0F, 0.0F, 0.0F, 1.0F, 0.09375F, 1.0F);
|
||||
}
|
||||
else if (!flag)
|
||||
{
|
||||
this.setBlockBounds(0.0F, 0.0F, 0.0F, 1.0F, 0.5F, 1.0F);
|
||||
}
|
||||
else
|
||||
{
|
||||
this.setBlockBounds(0.0F, 0.0625F, 0.0F, 1.0F, 0.15625F, 1.0F);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public Item getItem(World p_149694_1_, int p_149694_2_, int p_149694_3_, int p_149694_4_)
|
||||
{
|
||||
return ModItems.blood_burned_string;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onBlockAdded(World p_149726_1_, int p_149726_2_, int p_149726_3_, int p_149726_4_)
|
||||
{
|
||||
int l = World.doesBlockHaveSolidTopSurface(p_149726_1_, p_149726_2_, p_149726_3_ - 1, p_149726_4_) ? 0 : 2;
|
||||
p_149726_1_.setBlockMetadataWithNotify(p_149726_2_, p_149726_3_, p_149726_4_, l, 3);
|
||||
this.func_150138_a(p_149726_1_, p_149726_2_, p_149726_3_, p_149726_4_, l);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void breakBlock(World p_149749_1_, int p_149749_2_, int p_149749_3_, int p_149749_4_, Block p_149749_5_, int p_149749_6_)
|
||||
{
|
||||
this.func_150138_a(p_149749_1_, p_149749_2_, p_149749_3_, p_149749_4_, p_149749_6_ | 1);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onBlockHarvested(World p_149681_1_, int p_149681_2_, int p_149681_3_, int p_149681_4_, int p_149681_5_, EntityPlayer p_149681_6_)
|
||||
{
|
||||
if (!p_149681_1_.isRemote)
|
||||
{
|
||||
if (p_149681_6_.getCurrentEquippedItem() != null && p_149681_6_.getCurrentEquippedItem().getItem() == Items.shears)
|
||||
{
|
||||
p_149681_1_.setBlockMetadataWithNotify(p_149681_2_, p_149681_3_, p_149681_4_, p_149681_5_ | 8, 4);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void func_150138_a(World p_150138_1_, int p_150138_2_, int p_150138_3_, int p_150138_4_, int p_150138_5_)
|
||||
{
|
||||
int i1 = 0;
|
||||
|
||||
while (i1 < 2)
|
||||
{
|
||||
int j1 = 1;
|
||||
|
||||
while (true)
|
||||
{
|
||||
if (j1 < 42)
|
||||
{
|
||||
int k1 = p_150138_2_ + Direction.offsetX[i1] * j1;
|
||||
int l1 = p_150138_4_ + Direction.offsetZ[i1] * j1;
|
||||
Block block = p_150138_1_.getBlock(k1, p_150138_3_, l1);
|
||||
|
||||
if (block == Blocks.tripwire_hook)
|
||||
{
|
||||
int i2 = p_150138_1_.getBlockMetadata(k1, p_150138_3_, l1) & 3;
|
||||
|
||||
if (i2 == Direction.rotateOpposite[i1])
|
||||
{
|
||||
Blocks.tripwire_hook.func_150136_a(p_150138_1_, k1, p_150138_3_, l1, false, p_150138_1_.getBlockMetadata(k1, p_150138_3_, l1), true, j1, p_150138_5_);
|
||||
}
|
||||
}
|
||||
else if (block == Blocks.tripwire)
|
||||
{
|
||||
++j1;
|
||||
continue;
|
||||
}
|
||||
}
|
||||
|
||||
++i1;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onEntityCollidedWithBlock(World p_149670_1_, int p_149670_2_, int p_149670_3_, int p_149670_4_, Entity p_149670_5_)
|
||||
{
|
||||
if (!p_149670_1_.isRemote)
|
||||
{
|
||||
if ((p_149670_1_.getBlockMetadata(p_149670_2_, p_149670_3_, p_149670_4_) & 1) != 1)
|
||||
{
|
||||
this.func_150140_e(p_149670_1_, p_149670_2_, p_149670_3_, p_149670_4_);
|
||||
}
|
||||
|
||||
p_149670_5_.setFire(1);
|
||||
}
|
||||
}
|
||||
|
||||
public void updateTick(World p_149674_1_, int p_149674_2_, int p_149674_3_, int p_149674_4_, Random p_149674_5_)
|
||||
{
|
||||
if (!p_149674_1_.isRemote)
|
||||
{
|
||||
if ((p_149674_1_.getBlockMetadata(p_149674_2_, p_149674_3_, p_149674_4_) & 1) == 1)
|
||||
{
|
||||
this.func_150140_e(p_149674_1_, p_149674_2_, p_149674_3_, p_149674_4_);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void func_150140_e(World p_150140_1_, int p_150140_2_, int p_150140_3_, int p_150140_4_)
|
||||
{
|
||||
int l = p_150140_1_.getBlockMetadata(p_150140_2_, p_150140_3_, p_150140_4_);
|
||||
boolean flag = (l & 1) == 1;
|
||||
boolean flag1 = false;
|
||||
List list = p_150140_1_.getEntitiesWithinAABBExcludingEntity((Entity)null, AxisAlignedBB.getBoundingBox((double)p_150140_2_ + this.minX, (double)p_150140_3_ + this.minY, (double)p_150140_4_ + this.minZ, (double)p_150140_2_ + this.maxX, (double)p_150140_3_ + this.maxY, (double)p_150140_4_ + this.maxZ));
|
||||
|
||||
if (!list.isEmpty())
|
||||
{
|
||||
Iterator iterator = list.iterator();
|
||||
|
||||
while (iterator.hasNext())
|
||||
{
|
||||
Entity entity = (Entity)iterator.next();
|
||||
|
||||
if (!entity.doesEntityNotTriggerPressurePlate())
|
||||
{
|
||||
flag1 = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (flag1 && !flag)
|
||||
{
|
||||
l |= 1;
|
||||
}
|
||||
|
||||
if (!flag1 && flag)
|
||||
{
|
||||
l &= -2;
|
||||
}
|
||||
|
||||
if (flag1 != flag)
|
||||
{
|
||||
p_150140_1_.setBlockMetadataWithNotify(p_150140_2_, p_150140_3_, p_150140_4_, l, 3);
|
||||
this.func_150138_a(p_150140_1_, p_150140_2_, p_150140_3_, p_150140_4_, l);
|
||||
}
|
||||
|
||||
if (flag1)
|
||||
{
|
||||
p_150140_1_.scheduleBlockUpdate(p_150140_2_, p_150140_3_, p_150140_4_, this, this.tickRate(p_150140_1_));
|
||||
}
|
||||
}
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
public static boolean func_150139_a(IBlockAccess p_150139_0_, int p_150139_1_, int p_150139_2_, int p_150139_3_, int p_150139_4_, int p_150139_5_)
|
||||
{
|
||||
int j1 = p_150139_1_ + Direction.offsetX[p_150139_5_];
|
||||
int k1 = p_150139_3_ + Direction.offsetZ[p_150139_5_];
|
||||
Block block = p_150139_0_.getBlock(j1, p_150139_2_, k1);
|
||||
boolean flag = (p_150139_4_ & 2) == 2;
|
||||
int l1;
|
||||
|
||||
if (block == Blocks.tripwire_hook)
|
||||
{
|
||||
l1 = p_150139_0_.getBlockMetadata(j1, p_150139_2_, k1);
|
||||
int i2 = l1 & 3;
|
||||
return i2 == Direction.rotateOpposite[p_150139_5_];
|
||||
}
|
||||
else if (block == Blocks.tripwire)
|
||||
{
|
||||
l1 = p_150139_0_.getBlockMetadata(j1, p_150139_2_, k1);
|
||||
boolean flag1 = (l1 & 2) == 2;
|
||||
return flag == flag1;
|
||||
}
|
||||
else
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -4,10 +4,8 @@ import WayofTime.alchemicalWizardry.api.items.interfaces.IBloodOrb;
|
||||
import WayofTime.alchemicalWizardry.api.rituals.RitualComponent;
|
||||
import WayofTime.alchemicalWizardry.api.rituals.Rituals;
|
||||
import WayofTime.alchemicalWizardry.api.soulNetwork.SoulNetworkHandler;
|
||||
import WayofTime.alchemicalWizardry.api.tile.IBloodAltar;
|
||||
import WayofTime.alchemicalWizardry.common.block.BlockAltar;
|
||||
import WayofTime.alchemicalWizardry.common.block.BlockMasterStone;
|
||||
import WayofTime.alchemicalWizardry.common.block.BloodRune;
|
||||
import WayofTime.alchemicalWizardry.common.bloodAltarUpgrade.AltarComponent;
|
||||
import WayofTime.alchemicalWizardry.common.bloodAltarUpgrade.AltarUpgradeComponent;
|
||||
import WayofTime.alchemicalWizardry.common.bloodAltarUpgrade.UpgradedAltars;
|
||||
@@ -23,11 +21,10 @@ import net.minecraft.block.Block;
|
||||
import net.minecraft.block.BlockContainer;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
import net.minecraft.entity.effect.EntityLightningBolt;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.init.Blocks;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.ChatComponentText;
|
||||
import net.minecraft.util.IIcon;
|
||||
@@ -66,6 +63,9 @@ public class BlockCompacter extends BlockContainer
|
||||
setBlockName("compacter");
|
||||
setBlockTextureName("BloodArsenal:compacter");
|
||||
setCreativeTab(BloodArsenal.BA_TAB);
|
||||
setHardness(8.0F);
|
||||
setResistance(5.0F);
|
||||
setStepSound(soundTypeMetal);
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -158,6 +158,7 @@ public class BlockCompacter extends BlockContainer
|
||||
{
|
||||
compactRitual(tile);
|
||||
SoulNetworkHandler.syphonFromNetwork(owner, cost);
|
||||
--player.inventory.getCurrentItem().stackSize;
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -219,6 +220,7 @@ public class BlockCompacter extends BlockContainer
|
||||
{
|
||||
compactAltar(tile);
|
||||
SoulNetworkHandler.syphonFromNetwork(owner, cost);
|
||||
--player.inventory.getCurrentItem().stackSize;
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -328,6 +330,7 @@ public class BlockCompacter extends BlockContainer
|
||||
|
||||
tile.setRitualName(ritualName);
|
||||
world.markBlockForUpdate(x, y, z);
|
||||
world.addWeatherEffect(new EntityLightningBolt(world, x, y, z));
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -340,6 +343,11 @@ public class BlockCompacter extends BlockContainer
|
||||
int z = altar.zCoord;
|
||||
|
||||
tier = altar.getTier();
|
||||
if (tier == 0)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
AltarUpgradeComponent upgrades = UpgradedAltars.getUpgrades(world, x, y, z, tier);
|
||||
|
||||
if (upgrades == null)
|
||||
@@ -420,6 +428,8 @@ public class BlockCompacter extends BlockContainer
|
||||
altar.setAccelerationUpgrades(accelerationUpgrades);
|
||||
|
||||
world.markBlockForUpdate(x, y, z);
|
||||
|
||||
world.addWeatherEffect(new EntityLightningBolt(world, x, y, z));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -29,6 +29,7 @@ public class BlockLifeInfuser extends BlockContainer
|
||||
setCreativeTab(BloodArsenal.BA_TAB);
|
||||
setHardness(6.0F);
|
||||
setResistance(12.0F);
|
||||
setStepSound(soundTypePiston);
|
||||
|
||||
setBlockBounds(0F, 0F, 0F, 1F, 0.875F, 1F);
|
||||
}
|
||||
|
||||
@@ -5,7 +5,6 @@ import WayofTime.alchemicalWizardry.api.items.IAltarManipulator;
|
||||
import WayofTime.alchemicalWizardry.common.items.EnergyBattery;
|
||||
import WayofTime.alchemicalWizardry.common.items.sigil.SigilOfHolding;
|
||||
import com.arc.bloodarsenal.BloodArsenal;
|
||||
import com.arc.bloodarsenal.tileentity.TileCompactedMRS;
|
||||
import com.arc.bloodarsenal.tileentity.TilePortableAltar;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
@@ -40,10 +39,11 @@ public class BlockPortableAltar extends BlockContainer
|
||||
public BlockPortableAltar()
|
||||
{
|
||||
super(Material.rock);
|
||||
setHardness(2.0F);
|
||||
setResistance(5.0F);
|
||||
setHardness(7.0F);
|
||||
setResistance(10.0F);
|
||||
setCreativeTab(BloodArsenal.BA_TAB);
|
||||
setBlockName("portable_altar");
|
||||
setStepSound(soundTypePiston);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
package com.arc.bloodarsenal.block;
|
||||
|
||||
import WayofTime.alchemicalWizardry.api.rituals.Rituals;
|
||||
import com.arc.bloodarsenal.items.block.BloodStoneBlock;
|
||||
import com.arc.bloodarsenal.items.block.CompactedMRSBlock;
|
||||
import com.arc.bloodarsenal.items.block.PortableAltarBlock;
|
||||
@@ -18,8 +17,6 @@ public class ModBlocks
|
||||
public static Block blood_stained_ice;
|
||||
public static Block blood_stained_ice_packed;
|
||||
public static Block blood_infused_iron_block;
|
||||
public static Block blood_door_wood;
|
||||
public static Block blood_door_iron;
|
||||
public static Block blood_cake;
|
||||
public static Block blood_torch;
|
||||
public static Block blood_infused_glowstone;
|
||||
@@ -30,6 +27,7 @@ public class ModBlocks
|
||||
public static Block compacter;
|
||||
public static Block lp_materializer;
|
||||
public static Block compacted_mrs;
|
||||
public static Block block_burned_string;
|
||||
|
||||
public static void init()
|
||||
{
|
||||
@@ -41,8 +39,6 @@ public class ModBlocks
|
||||
blood_stained_ice = new BlockBloodStainedIce();
|
||||
blood_stained_ice_packed = new BlockBloodStainedPackedIce();
|
||||
blood_infused_iron_block = new BlockInfusedIron();
|
||||
blood_door_wood = new BlockInfusedWoodenDoor();
|
||||
blood_door_iron = new BlockInfusedIronDoor();
|
||||
blood_cake = new BlockBloodCake();
|
||||
blood_torch = new BlockBloodTorch();
|
||||
blood_infused_glowstone = new BlockBloodInfusedGlowstone();
|
||||
@@ -53,6 +49,7 @@ public class ModBlocks
|
||||
compacter = new BlockCompacter();
|
||||
lp_materializer = new BlockLPMaterializer();
|
||||
compacted_mrs = new BlockCompactedMRS();
|
||||
block_burned_string = new BlockBurnedString();
|
||||
}
|
||||
|
||||
public static void registerBlocksInPre()
|
||||
@@ -65,8 +62,6 @@ public class ModBlocks
|
||||
GameRegistry.registerBlock(blood_stained_ice, "blood_stained_ice");
|
||||
GameRegistry.registerBlock(blood_stained_ice_packed, "blood_stained_ice_packed");
|
||||
GameRegistry.registerBlock(blood_infused_iron_block, "blood_infused_iron_block");
|
||||
GameRegistry.registerBlock(blood_door_wood, "blood_door_wood");
|
||||
GameRegistry.registerBlock(blood_door_iron, "blood_door_iron");
|
||||
GameRegistry.registerBlock(blood_cake, "blood_cake");
|
||||
GameRegistry.registerBlock(blood_torch, "blood_torch");
|
||||
GameRegistry.registerBlock(blood_infused_glowstone, "blood_infused_glowstone");
|
||||
@@ -77,11 +72,11 @@ public class ModBlocks
|
||||
GameRegistry.registerBlock(compacter, "compacter");
|
||||
GameRegistry.registerBlock(lp_materializer, "lp_materializer");
|
||||
GameRegistry.registerBlock(compacted_mrs, CompactedMRSBlock.class, "BloodArsenal" + ModBlocks.compacted_mrs.getUnlocalizedName());
|
||||
GameRegistry.registerBlock(block_burned_string, "block_burned_string");
|
||||
}
|
||||
|
||||
public static void registerTileEntities()
|
||||
{
|
||||
GameRegistry.registerTileEntity(TileOwned.class, "blood_infused_door");
|
||||
GameRegistry.registerTileEntity(TilePortableAltar.class, "portable_altar");
|
||||
GameRegistry.registerTileEntity(TileLifeInfuser.class, "life_infuser");
|
||||
GameRegistry.registerTileEntity(TileCompacter.class, "compacter");
|
||||
|
||||
@@ -105,7 +105,7 @@ public class EntityGatlingProjectile extends Entity implements IProjectile, IThr
|
||||
@Override
|
||||
protected void entityInit()
|
||||
{
|
||||
dataWatcher.addObject(16, Byte.valueOf((byte) 0));
|
||||
dataWatcher.addObject(16, 0);
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -382,7 +382,7 @@ public class EntityGatlingProjectile extends Entity implements IProjectile, IThr
|
||||
|
||||
private int d6()
|
||||
{
|
||||
return rand.nextInt(6) + 2;
|
||||
return rand.nextInt() + 5;
|
||||
}
|
||||
|
||||
protected void spawnHitParticles(String string, int i)
|
||||
|
||||
@@ -46,14 +46,17 @@ public class ItemBloodArsenal extends Item
|
||||
}
|
||||
*/
|
||||
|
||||
if (this.equals(ModItems.amorphic_catalyst))
|
||||
String unlocalizedName = this.getUnlocalizedName().replaceAll("item.", "");
|
||||
itemIcon = iconRegister.registerIcon(BloodArsenal.MODID + ":" + unlocalizedName);
|
||||
|
||||
/* if (this.equals(ModItems.amorphic_catalyst))
|
||||
itemIcon = iconRegister.registerIcon("BloodArsenal:amorphic_catalyst");
|
||||
else if (this.equals(ModItems.blood_infused_iron))
|
||||
itemIcon = iconRegister.registerIcon("BloodArsenal:blood_infused_iron");
|
||||
else if (this.equals(ModItems.soul_fragment))
|
||||
itemIcon = iconRegister.registerIcon("BloodArsenal:soul_fragment");
|
||||
else if (this.equals(ModItems.heart))
|
||||
itemIcon = iconRegister.registerIcon("BloodArsenal:heart2");
|
||||
itemIcon = iconRegister.registerIcon("BloodArsenal:heart");
|
||||
else if (this.equals(ModItems.blood_infused_stick))
|
||||
itemIcon = iconRegister.registerIcon("BloodArsenal:blood_infused_stick");
|
||||
else if (this.equals(ModItems.blood_cookie))
|
||||
@@ -68,6 +71,7 @@ public class ItemBloodArsenal extends Item
|
||||
itemIcon = iconRegister.registerIcon("BloodArsenal:blood_burned_string");
|
||||
else if (this.equals(ModItems.glass_shard))
|
||||
itemIcon = iconRegister.registerIcon("BloodArsenal:glass_shard");
|
||||
*/
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -88,14 +92,7 @@ public class ItemBloodArsenal extends Item
|
||||
}
|
||||
if (this.equals(ModItems.heart))
|
||||
{
|
||||
if (AlchemicalWizardry.wimpySettings)
|
||||
{
|
||||
par3List.add(StatCollector.translateToLocal("tooltip.itemba.heart1"));
|
||||
}
|
||||
else
|
||||
{
|
||||
par3List.add(StatCollector.translateToLocal("tooltip.itemba.heart2"));
|
||||
}
|
||||
par3List.add(StatCollector.translateToLocal("tooltip.itemba.heart"));
|
||||
}
|
||||
if (this.equals(ModItems.soul_fragment))
|
||||
{
|
||||
|
||||
@@ -11,9 +11,10 @@ import net.minecraft.creativetab.CreativeTabs;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.util.ChatComponentText;
|
||||
import net.minecraft.util.IIcon;
|
||||
import net.minecraft.util.MathHelper;
|
||||
import net.minecraft.util.StatCollector;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
import java.util.List;
|
||||
@@ -51,6 +52,9 @@ public class ItemBloodMoney extends Item
|
||||
String player = par3EntityPlayer.getCommandSenderName();
|
||||
World world = par3EntityPlayer.worldObj;
|
||||
LifeEssenceNetwork data = (LifeEssenceNetwork) world.loadItemData(LifeEssenceNetwork.class, player);
|
||||
int maxLP = SoulNetworkHandler.getMaximumForOrbTier(SoulNetworkHandler.getCurrentMaxOrb(player));
|
||||
int currentEssence = SoulNetworkHandler.getCurrentEssence(player);
|
||||
int CONSTANT = 10000;
|
||||
|
||||
if (data == null)
|
||||
{
|
||||
@@ -72,21 +76,55 @@ public class ItemBloodMoney extends Item
|
||||
|
||||
if (meta == 0)
|
||||
{
|
||||
SoulNetworkHandler.addCurrentEssenceToMaximum(player, 10000, Integer.MAX_VALUE);
|
||||
if ((maxLP - currentEssence) >= (MONEY_MULTIPLIER[meta] * CONSTANT) && maxLP >= (MONEY_MULTIPLIER[meta] * CONSTANT))
|
||||
{
|
||||
SoulNetworkHandler.addCurrentEssenceToMaximum(player, MONEY_MULTIPLIER[meta] * CONSTANT, maxLP);
|
||||
}
|
||||
else
|
||||
{
|
||||
par3EntityPlayer.addChatComponentMessage(new ChatComponentText(StatCollector.translateToLocal("message.bloodMoney.tooMuch")));
|
||||
return par1ItemStack;
|
||||
}
|
||||
}
|
||||
else if (meta == 1)
|
||||
{
|
||||
SoulNetworkHandler.addCurrentEssenceToMaximum(player, 40000, Integer.MAX_VALUE);
|
||||
if ((maxLP - currentEssence) >= (MONEY_MULTIPLIER[meta] * CONSTANT) && maxLP >= (MONEY_MULTIPLIER[meta] * CONSTANT))
|
||||
{
|
||||
SoulNetworkHandler.addCurrentEssenceToMaximum(player, MONEY_MULTIPLIER[meta] * CONSTANT, maxLP);
|
||||
}
|
||||
else
|
||||
{
|
||||
par3EntityPlayer.addChatComponentMessage(new ChatComponentText(StatCollector.translateToLocal("message.bloodMoney.tooMuch")));
|
||||
return par1ItemStack;
|
||||
}
|
||||
}
|
||||
else if (meta == 2)
|
||||
{
|
||||
SoulNetworkHandler.addCurrentEssenceToMaximum(player, 160000, Integer.MAX_VALUE);
|
||||
if ((maxLP - currentEssence) >= (MONEY_MULTIPLIER[meta] * CONSTANT) && maxLP >= (MONEY_MULTIPLIER[meta] * CONSTANT))
|
||||
{
|
||||
SoulNetworkHandler.addCurrentEssenceToMaximum(player, MONEY_MULTIPLIER[meta] * CONSTANT, maxLP);
|
||||
}
|
||||
else
|
||||
{
|
||||
par3EntityPlayer.addChatComponentMessage(new ChatComponentText(StatCollector.translateToLocal("message.bloodMoney.tooMuch")));
|
||||
return par1ItemStack;
|
||||
}
|
||||
}
|
||||
else if (meta == 3)
|
||||
{
|
||||
SoulNetworkHandler.addCurrentEssenceToMaximum(player, 640000, Integer.MAX_VALUE);
|
||||
if ((maxLP - currentEssence) >= (MONEY_MULTIPLIER[meta] * CONSTANT) && maxLP >= (MONEY_MULTIPLIER[meta] * CONSTANT))
|
||||
{
|
||||
SoulNetworkHandler.addCurrentEssenceToMaximum(player, MONEY_MULTIPLIER[meta] * CONSTANT, maxLP);
|
||||
}
|
||||
else
|
||||
{
|
||||
par3EntityPlayer.addChatComponentMessage(new ChatComponentText(StatCollector.translateToLocal("message.bloodMoney.tooMuch")));
|
||||
return par1ItemStack;
|
||||
}
|
||||
}
|
||||
|
||||
ItemStack currentStack = par3EntityPlayer.inventory.getCurrentItem();
|
||||
--currentStack.stackSize;
|
||||
return par1ItemStack;
|
||||
}
|
||||
|
||||
@@ -115,4 +153,10 @@ public class ItemBloodMoney extends Item
|
||||
list.add(new ItemStack(id, 1, meta));
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void addInformation(ItemStack itemStack, EntityPlayer player, List list, boolean par4)
|
||||
{
|
||||
list.add(StatCollector.translateToLocal("tooltip.bloodMoney.money"));
|
||||
}
|
||||
}
|
||||
@@ -4,9 +4,7 @@ import WayofTime.alchemicalWizardry.AlchemicalWizardry;
|
||||
import com.arc.bloodarsenal.BloodArsenal;
|
||||
import com.arc.bloodarsenal.block.ModBlocks;
|
||||
import com.arc.bloodarsenal.items.armor.VampireCostume;
|
||||
import com.arc.bloodarsenal.items.bauble.SacrificeAmulet;
|
||||
import com.arc.bloodarsenal.items.bauble.SelfSacrificeAmulet;
|
||||
import com.arc.bloodarsenal.items.bauble.VampireRing;
|
||||
import com.arc.bloodarsenal.items.bauble.*;
|
||||
import com.arc.bloodarsenal.items.block.*;
|
||||
import com.arc.bloodarsenal.items.sigil.SigilDivinity;
|
||||
import com.arc.bloodarsenal.items.sigil.SigilEnder;
|
||||
@@ -44,8 +42,6 @@ public class ModItems
|
||||
public static Item blood_infused_sword_diamond;
|
||||
public static Item heart;
|
||||
public static Item soul_fragment;
|
||||
public static Item item_blood_door_wood;
|
||||
public static Item item_blood_door_iron;
|
||||
public static Item bound_igniter;
|
||||
public static Item soul_booster;
|
||||
public static Item soul_nullifier;
|
||||
@@ -69,6 +65,8 @@ public class ModItems
|
||||
public static Item blood_money;
|
||||
public static Item blood_burned_string;
|
||||
public static Item glass_shard;
|
||||
public static Item empowered_sacrifice_amulet;
|
||||
public static Item empowered_self_sacrifice_amulet;
|
||||
|
||||
public static void init()
|
||||
{
|
||||
@@ -97,8 +95,6 @@ public class ModItems
|
||||
blood_infused_sword_diamond = new InfusedDiamondSword();
|
||||
heart = new ItemBloodArsenal().setUnlocalizedName("heart");
|
||||
soul_fragment = new ItemBloodArsenal().setUnlocalizedName("soul_fragment");
|
||||
item_blood_door_wood = new BloodDoor(Material.wood).setUnlocalizedName("item_blood_door_wood").setTextureName("BloodArsenal:item_blood_door_wood");
|
||||
item_blood_door_iron = new BloodDoor(Material.iron).setUnlocalizedName("item_blood_door_iron").setTextureName("BloodArsenal:item_blood_door_iron");
|
||||
bound_igniter = new BoundIgniter();
|
||||
soul_booster = new ItemSoulBooster();
|
||||
soul_nullifier = new ItemSoulNullifier();
|
||||
@@ -117,11 +113,13 @@ public class ModItems
|
||||
blood_ball = new ItemBloodBall();
|
||||
wolf_hide = new ItemBloodArsenal().setUnlocalizedName("wolf_hide");
|
||||
blood_money = new ItemBloodMoney();
|
||||
blood_burned_string = new ItemBloodArsenal().setUnlocalizedName("blood_burned_string");
|
||||
blood_burned_string = new ItemReed(ModBlocks.block_burned_string).setUnlocalizedName("blood_burned_string").setTextureName("BloodArsenal:blood_burned_string").setCreativeTab(BloodArsenal.BA_TAB);
|
||||
vampire_ring = new VampireRing();
|
||||
self_sacrifice_amulet = new SelfSacrificeAmulet();
|
||||
sacrifice_amulet = new SacrificeAmulet();
|
||||
glass_shard = new ItemBloodArsenal().setUnlocalizedName("glass_shard");
|
||||
empowered_sacrifice_amulet = new EmpoweredSacrificeAmulet();
|
||||
empowered_self_sacrifice_amulet = new EmpoweredSelfSacrificeAmulet();
|
||||
}
|
||||
|
||||
public static void registerItems()
|
||||
@@ -151,8 +149,6 @@ public class ModItems
|
||||
GameRegistry.registerItem(blood_infused_sword_diamond, "blood_infused_sword_diamond");
|
||||
GameRegistry.registerItem(heart, "heart");
|
||||
GameRegistry.registerItem(soul_fragment, "soul_fragment");
|
||||
GameRegistry.registerItem(item_blood_door_wood, "item_blood_door_wood");
|
||||
GameRegistry.registerItem(item_blood_door_iron, "item_blood_door_iron");
|
||||
GameRegistry.registerItem(item_blood_cake, "item_blood_cake");
|
||||
GameRegistry.registerItem(bound_igniter, "bound_flint_and_steel");
|
||||
GameRegistry.registerItem(soul_booster, "soul_booster");
|
||||
@@ -174,4 +170,13 @@ public class ModItems
|
||||
GameRegistry.registerItem(blood_burned_string, "blood_burned_string");
|
||||
GameRegistry.registerItem(glass_shard, "glass_shard");
|
||||
}
|
||||
|
||||
public static void registerBaubles()
|
||||
{
|
||||
GameRegistry.registerItem(vampire_ring, "vampire_ring");
|
||||
GameRegistry.registerItem(self_sacrifice_amulet, "self_sacrifice_amulet");
|
||||
GameRegistry.registerItem(sacrifice_amulet, "sacrifice_amulet");
|
||||
GameRegistry.registerItem(empowered_self_sacrifice_amulet, "empowered_self_sacrifice_amulet");
|
||||
GameRegistry.registerItem(empowered_sacrifice_amulet, "empowered_sacrifice_amulet");
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
package com.arc.bloodarsenal.items.armor;
|
||||
|
||||
import com.arc.bloodarsenal.BloodArsenal;
|
||||
import net.minecraft.item.ItemArmor;
|
||||
|
||||
public class LifeImbuedArmor extends ItemArmor
|
||||
{
|
||||
public LifeImbuedArmor(int armorType)
|
||||
{
|
||||
super(BloodArsenal.lifeImbuedArmor, 0, armorType);
|
||||
}
|
||||
}
|
||||
@@ -19,6 +19,8 @@ import net.minecraft.potion.PotionEffect;
|
||||
import net.minecraft.util.IIcon;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
import java.util.Calendar;
|
||||
|
||||
public class VampireCostume extends ItemArmor
|
||||
{
|
||||
private static IIcon chestIcon;
|
||||
|
||||
@@ -0,0 +1,170 @@
|
||||
package com.arc.bloodarsenal.items.bauble;
|
||||
|
||||
import WayofTime.alchemicalWizardry.api.items.interfaces.IBindable;
|
||||
import WayofTime.alchemicalWizardry.api.soulNetwork.SoulNetworkHandler;
|
||||
import WayofTime.alchemicalWizardry.common.items.EnergyItems;
|
||||
import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper;
|
||||
import WayofTime.alchemicalWizardry.common.tileEntity.TEAltar;
|
||||
import baubles.api.BaubleType;
|
||||
import baubles.api.IBauble;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.EnumRarity;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.MovingObjectPosition;
|
||||
import net.minecraft.util.StatCollector;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public class EmpoweredSacrificeAmulet extends SacrificeAmulet implements IBauble, IBindable
|
||||
{
|
||||
public EmpoweredSacrificeAmulet()
|
||||
{
|
||||
super();
|
||||
setMaxDamage(0);
|
||||
setUnlocalizedName("empowered_sacrifice_amulet");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void addInformation(ItemStack par1ItemStack, EntityPlayer par2EntityPlayer, List par3List, boolean par4)
|
||||
{
|
||||
par3List.add(StatCollector.translateToLocal("tooltip.bauble.empowered_sacrifice"));
|
||||
|
||||
if (!(par1ItemStack.stackTagCompound == null))
|
||||
{
|
||||
par3List.add("Stored LP: " + this.getStoredLP(par1ItemStack));
|
||||
|
||||
if (!par1ItemStack.stackTagCompound.getString("ownerName").equals(""))
|
||||
{
|
||||
par3List.add("Current owner: " + par1ItemStack.stackTagCompound.getString("ownerName"));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onWornTick(ItemStack par1ItemStack, EntityLivingBase player)
|
||||
{
|
||||
if (par1ItemStack.getItemDamage() == 1)
|
||||
{
|
||||
String owner = par1ItemStack.stackTagCompound.getString("ownerName");
|
||||
World world = Minecraft.getMinecraft().theWorld;
|
||||
|
||||
if (!owner.equals(""))
|
||||
{
|
||||
if (player instanceof EntityPlayer)
|
||||
{
|
||||
if (owner.equals(SpellHelper.getUsername((EntityPlayer) player)))
|
||||
{
|
||||
|
||||
if (!world.isRemote)
|
||||
{
|
||||
if (this.getStoredLP(par1ItemStack) >= 50)
|
||||
{
|
||||
SoulNetworkHandler.addCurrentEssenceToMaximum(owner, 50, SoulNetworkHandler.getMaximumForOrbTier(SoulNetworkHandler.getCurrentMaxOrb(owner)));
|
||||
setStoredLP(par1ItemStack, getStoredLP(par1ItemStack) - 50);
|
||||
}
|
||||
else if (this.getStoredLP(par1ItemStack) > 0)
|
||||
{
|
||||
SoulNetworkHandler.addCurrentEssenceToMaximum(owner, this.getStoredLP(par1ItemStack), SoulNetworkHandler.getMaximumForOrbTier(SoulNetworkHandler.getCurrentMaxOrb(owner)));
|
||||
setStoredLP(par1ItemStack, 0);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public BaubleType getBaubleType(ItemStack par1ItemStack)
|
||||
{
|
||||
return BaubleType.AMULET;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ItemStack onItemRightClick(ItemStack itemStack, World world, EntityPlayer player)
|
||||
{
|
||||
EnergyItems.checkAndSetItemOwner(itemStack, player);
|
||||
|
||||
if (world.isRemote)
|
||||
{
|
||||
return itemStack;
|
||||
}
|
||||
|
||||
MovingObjectPosition movingobjectposition = this.getMovingObjectPositionFromPlayer(world, player, false);
|
||||
|
||||
if (movingobjectposition == null || movingobjectposition.typeOfHit == MovingObjectPosition.MovingObjectType.MISS)
|
||||
{
|
||||
if (player.isSneaking())
|
||||
{
|
||||
if (getDamage(itemStack) == 1)
|
||||
{
|
||||
this.setDamage(itemStack, 0);
|
||||
}
|
||||
else
|
||||
{
|
||||
setDamage(itemStack, 1);
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (movingobjectposition.typeOfHit == MovingObjectPosition.MovingObjectType.BLOCK)
|
||||
{
|
||||
int x = movingobjectposition.blockX;
|
||||
int y = movingobjectposition.blockY;
|
||||
int z = movingobjectposition.blockZ;
|
||||
|
||||
TileEntity tile = world.getTileEntity(x, y, z);
|
||||
|
||||
if (!(tile instanceof TEAltar))
|
||||
{
|
||||
return super.onItemRightClick(itemStack, world, player);
|
||||
}
|
||||
|
||||
TEAltar altar = (TEAltar)tile;
|
||||
|
||||
if (!altar.isActive())
|
||||
{
|
||||
int amount = this.getStoredLP(itemStack);
|
||||
if (amount > 0)
|
||||
{
|
||||
int filledAmount = altar.fillMainTank(amount);
|
||||
amount -= filledAmount;
|
||||
this.setStoredLP(itemStack, amount);
|
||||
|
||||
world.markBlockForUpdate(x, y, z);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return itemStack;
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void registerIcons(IIconRegister iconRegister)
|
||||
{
|
||||
this.itemIcon = iconRegister.registerIcon("BloodArsenal:sacrifice_amulet");
|
||||
}
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
@Deprecated
|
||||
public boolean hasEffect(ItemStack p_77636_1_)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public EnumRarity getRarity(ItemStack p_77613_1_)
|
||||
{
|
||||
return EnumRarity.rare;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,169 @@
|
||||
package com.arc.bloodarsenal.items.bauble;
|
||||
|
||||
import WayofTime.alchemicalWizardry.api.items.interfaces.IBindable;
|
||||
import WayofTime.alchemicalWizardry.api.soulNetwork.SoulNetworkHandler;
|
||||
import WayofTime.alchemicalWizardry.common.items.EnergyItems;
|
||||
import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper;
|
||||
import WayofTime.alchemicalWizardry.common.tileEntity.TEAltar;
|
||||
import baubles.api.BaubleType;
|
||||
import baubles.api.IBauble;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.EnumRarity;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.MovingObjectPosition;
|
||||
import net.minecraft.util.StatCollector;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public class EmpoweredSelfSacrificeAmulet extends SelfSacrificeAmulet implements IBauble, IBindable
|
||||
{
|
||||
public EmpoweredSelfSacrificeAmulet()
|
||||
{
|
||||
super();
|
||||
setMaxDamage(0);
|
||||
setUnlocalizedName("empowered_self_sacrifice_amulet");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void addInformation(ItemStack par1ItemStack, EntityPlayer par2EntityPlayer, List par3List, boolean par4)
|
||||
{
|
||||
par3List.add(StatCollector.translateToLocal("tooltip.bauble.empowered_self_sacrifice"));
|
||||
|
||||
if (!(par1ItemStack.stackTagCompound == null))
|
||||
{
|
||||
par3List.add("Stored LP: " + this.getStoredLP(par1ItemStack));
|
||||
|
||||
if (!par1ItemStack.stackTagCompound.getString("ownerName").equals(""))
|
||||
{
|
||||
par3List.add("Current owner: " + par1ItemStack.stackTagCompound.getString("ownerName"));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onWornTick(ItemStack par1ItemStack, EntityLivingBase player)
|
||||
{
|
||||
if (par1ItemStack.getItemDamage() == 1)
|
||||
{
|
||||
String owner = par1ItemStack.getTagCompound().getString("ownerName");
|
||||
World world = player.worldObj;
|
||||
|
||||
if (!owner.equals(""))
|
||||
{
|
||||
if (player instanceof EntityPlayer)
|
||||
{
|
||||
if (owner.equals(SpellHelper.getUsername((EntityPlayer) player)))
|
||||
{
|
||||
|
||||
if (!world.isRemote)
|
||||
{
|
||||
if (this.getStoredLP(par1ItemStack) >= 50)
|
||||
{
|
||||
SoulNetworkHandler.addCurrentEssenceToMaximum(owner, 50, SoulNetworkHandler.getMaximumForOrbTier(SoulNetworkHandler.getCurrentMaxOrb(owner)));
|
||||
setStoredLP(par1ItemStack, getStoredLP(par1ItemStack) - 50);
|
||||
}
|
||||
else if (this.getStoredLP(par1ItemStack) > 0)
|
||||
{
|
||||
SoulNetworkHandler.addCurrentEssenceToMaximum(owner, this.getStoredLP(par1ItemStack), SoulNetworkHandler.getMaximumForOrbTier(SoulNetworkHandler.getCurrentMaxOrb(owner)));
|
||||
setStoredLP(par1ItemStack, 0);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public BaubleType getBaubleType(ItemStack par1ItemStack)
|
||||
{
|
||||
return BaubleType.AMULET;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ItemStack onItemRightClick(ItemStack itemStack, World world, EntityPlayer player)
|
||||
{
|
||||
EnergyItems.checkAndSetItemOwner(itemStack, player);
|
||||
|
||||
if (world.isRemote)
|
||||
{
|
||||
return itemStack;
|
||||
}
|
||||
|
||||
MovingObjectPosition movingobjectposition = this.getMovingObjectPositionFromPlayer(world, player, false);
|
||||
|
||||
if (movingobjectposition == null || movingobjectposition.typeOfHit == MovingObjectPosition.MovingObjectType.MISS)
|
||||
{
|
||||
if (player.isSneaking())
|
||||
{
|
||||
if (getDamage(itemStack) == 1)
|
||||
{
|
||||
this.setDamage(itemStack, 0);
|
||||
}
|
||||
else
|
||||
{
|
||||
setDamage(itemStack, 1);
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (movingobjectposition.typeOfHit == MovingObjectPosition.MovingObjectType.BLOCK)
|
||||
{
|
||||
int x = movingobjectposition.blockX;
|
||||
int y = movingobjectposition.blockY;
|
||||
int z = movingobjectposition.blockZ;
|
||||
|
||||
TileEntity tile = world.getTileEntity(x, y, z);
|
||||
|
||||
if (!(tile instanceof TEAltar))
|
||||
{
|
||||
return super.onItemRightClick(itemStack, world, player);
|
||||
}
|
||||
|
||||
TEAltar altar = (TEAltar)tile;
|
||||
|
||||
if (!altar.isActive())
|
||||
{
|
||||
int amount = this.getStoredLP(itemStack);
|
||||
if (amount > 0)
|
||||
{
|
||||
int filledAmount = altar.fillMainTank(amount);
|
||||
amount -= filledAmount;
|
||||
this.setStoredLP(itemStack, amount);
|
||||
|
||||
world.markBlockForUpdate(x, y, z);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return itemStack;
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void registerIcons(IIconRegister iconRegister)
|
||||
{
|
||||
this.itemIcon = iconRegister.registerIcon("BloodArsenal:self_sacrifice_amulet");
|
||||
}
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
@Deprecated
|
||||
public boolean hasEffect(ItemStack p_77636_1_)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public EnumRarity getRarity(ItemStack p_77613_1_)
|
||||
{
|
||||
return EnumRarity.rare;
|
||||
}
|
||||
}
|
||||
@@ -14,6 +14,7 @@ import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.IIcon;
|
||||
import net.minecraft.util.MovingObjectPosition;
|
||||
import net.minecraft.util.StatCollector;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
import java.util.List;
|
||||
@@ -29,7 +30,7 @@ public class SacrificeAmulet extends ItemBauble implements IAltarManipulator, IB
|
||||
@Override
|
||||
public void addInformation(ItemStack par1ItemStack, EntityPlayer par2EntityPlayer, List par3List, boolean par4)
|
||||
{
|
||||
par3List.add("Collecting some blood!");
|
||||
par3List.add(StatCollector.translateToLocal("tooltip.bauble.sacrifice"));
|
||||
|
||||
if (!(par1ItemStack.stackTagCompound == null))
|
||||
{
|
||||
|
||||
@@ -14,6 +14,7 @@ import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.IIcon;
|
||||
import net.minecraft.util.MovingObjectPosition;
|
||||
import net.minecraft.util.StatCollector;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
import java.util.List;
|
||||
@@ -29,7 +30,7 @@ public class SelfSacrificeAmulet extends ItemBauble implements IAltarManipulator
|
||||
@Override
|
||||
public void addInformation(ItemStack par1ItemStack, EntityPlayer par2EntityPlayer, List par3List, boolean par4)
|
||||
{
|
||||
par3List.add("Collecting your blood!");
|
||||
par3List.add(StatCollector.translateToLocal("tooltip.bauble.self_sacrifice"));
|
||||
|
||||
if (!(par1ItemStack.stackTagCompound == null))
|
||||
{
|
||||
|
||||
@@ -6,8 +6,10 @@ import com.arc.bloodarsenal.BloodArsenal;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.util.ChatComponentText;
|
||||
import net.minecraft.util.MovingObjectPosition;
|
||||
import net.minecraft.util.StatCollector;
|
||||
import net.minecraft.util.Vec3;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
import java.util.List;
|
||||
@@ -40,6 +42,10 @@ public class SigilEnder extends EnergyItems implements IBindable
|
||||
{
|
||||
EnergyItems.checkAndSetItemOwner(itemStack, player);
|
||||
|
||||
double playerPrevX = player.prevPosX;
|
||||
double playerPrevY = player.prevPosY;
|
||||
double playerPrevZ = player.prevPosZ;
|
||||
|
||||
if (itemStack.stackTagCompound == null)
|
||||
{
|
||||
itemStack.setTagCompound(new NBTTagCompound());
|
||||
@@ -80,6 +86,8 @@ public class SigilEnder extends EnergyItems implements IBindable
|
||||
break;
|
||||
}
|
||||
|
||||
player.setVelocity(0.0D, 0.0D, 0.0D);
|
||||
|
||||
world.playSoundAtEntity(player, "mob.endermen.portal", 1F, 1F);
|
||||
|
||||
for (int k = 0; k < 8; ++k)
|
||||
@@ -87,9 +95,16 @@ public class SigilEnder extends EnergyItems implements IBindable
|
||||
world.spawnParticle("portal", player.posX + (world.rand.nextDouble() - 0.5D) * (double)player.width, player.posY + world.rand.nextDouble() * (double)player.height - 0.25D, player.posZ + (world.rand.nextDouble() - 0.5D) * (double)player.width, 0, 0, 0);
|
||||
}
|
||||
|
||||
player.setPositionAndUpdate(ex, wy, zee);
|
||||
EnergyItems.syphonBatteries(itemStack, player, 2000);
|
||||
double xDifference = (Math.abs(player.posX) < Math.abs(playerPrevX) ? Math.abs(playerPrevX) - Math.abs(player.posX) : Math.abs(player.posX) - Math.abs(playerPrevX));
|
||||
double yDifference = (Math.abs(player.posY) < Math.abs(playerPrevY) ? Math.abs(playerPrevY) - Math.abs(player.posY) : Math.abs(player.posY) - Math.abs(playerPrevY));
|
||||
double zDifference = (Math.abs(player.posZ) < Math.abs(playerPrevZ) ? Math.abs(playerPrevZ) - Math.abs(player.posZ) : Math.abs(player.posZ) - Math.abs(playerPrevZ));
|
||||
Vec3 vec3 = Vec3.createVectorHelper(playerPrevX, playerPrevY, playerPrevZ);
|
||||
Vec3 newVec3 = Vec3.createVectorHelper(player.posX, player.posY, player.posZ);
|
||||
int distance = (int) vec3.distanceTo(newVec3);
|
||||
EnergyItems.syphonBatteries(itemStack, player, 2000); //This will not be for long!
|
||||
|
||||
player.addChatComponentMessage(new ChatComponentText("this: " + newVec3 + " " + vec3));
|
||||
player.setPositionAndUpdate(ex, wy, zee);
|
||||
player.swingItem();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -21,8 +21,6 @@ import java.util.List;
|
||||
|
||||
public class InfusedDiamondSword extends ItemSword implements IBindable
|
||||
{
|
||||
private int energyUsed;
|
||||
|
||||
public InfusedDiamondSword()
|
||||
{
|
||||
super(BloodArsenal.infusedDiamond);
|
||||
|
||||
@@ -0,0 +1,31 @@
|
||||
package com.arc.bloodarsenal.potion;
|
||||
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.potion.Potion;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
|
||||
public class PotionBloodArsenal extends Potion
|
||||
{
|
||||
private static final ResourceLocation resourceLocation = new ResourceLocation("bloodarsenal", "textures/misc/potions.png");
|
||||
|
||||
public PotionBloodArsenal(int par1, boolean par2, int par3)
|
||||
{
|
||||
super(par1, par2, par3);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Potion setIconIndex(int par1, int par2)
|
||||
{
|
||||
super.setIconIndex(par1, par2);
|
||||
return this;
|
||||
}
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
public int getStatusIconIndex()
|
||||
{
|
||||
Minecraft.getMinecraft().renderEngine.bindTexture(resourceLocation);
|
||||
return super.getStatusIconIndex();
|
||||
}
|
||||
}
|
||||
@@ -14,7 +14,7 @@ public class RenderTileLifeInfuser implements ISimpleBlockRenderingHandler
|
||||
public void renderInventoryBlock(Block block, int metadata, int modelID, RenderBlocks renderer) {
|
||||
GL11.glPushMatrix();
|
||||
GL11.glTranslatef(-0.5F, -0.5F, -0.5F);
|
||||
GL11.glScalef(1.1F, 1.1F, 1.1F);
|
||||
GL11.glScalef(1.0F, 1.0F, 1.0F);
|
||||
TileEntityRendererDispatcher.instance.renderTileEntityAt(new TileLifeInfuser(), 0.0D, 0.0D, 0.0D, 0.0F);
|
||||
GL11.glPopMatrix();
|
||||
}
|
||||
|
||||
@@ -4,11 +4,9 @@ import com.arc.bloodarsenal.renderer.model.ModelLifeInfuser;
|
||||
import com.arc.bloodarsenal.tileentity.TileLifeInfuser;
|
||||
import cpw.mods.fml.client.FMLClientHandler;
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.renderer.entity.Render;
|
||||
import net.minecraft.client.renderer.entity.RenderItem;
|
||||
import net.minecraft.client.renderer.entity.RenderManager;
|
||||
import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.entity.item.EntityItem;
|
||||
import net.minecraft.item.ItemBlock;
|
||||
import net.minecraft.item.ItemStack;
|
||||
@@ -21,7 +19,7 @@ import org.lwjgl.opengl.GL12;
|
||||
public class TileLifeInfuserRenderer extends TileEntitySpecialRenderer
|
||||
{
|
||||
private ModelLifeInfuser modelLifeInfuser = new ModelLifeInfuser();
|
||||
private final RenderItem customRenderItem;
|
||||
RenderItem customRenderItem;
|
||||
|
||||
public TileLifeInfuserRenderer()
|
||||
{
|
||||
@@ -39,61 +37,60 @@ public class TileLifeInfuserRenderer extends TileEntitySpecialRenderer
|
||||
@Override
|
||||
public void renderTileEntityAt(TileEntity tileEntity, double d0, double d1, double d2, float f)
|
||||
{
|
||||
ResourceLocation test = new ResourceLocation("bloodarsenal:textures/models/LifeInfuser.png");
|
||||
|
||||
TileLifeInfuser tile = (TileLifeInfuser) tileEntity;
|
||||
|
||||
GL11.glPushMatrix();
|
||||
GL11.glTranslatef((float) d0 + 0.5F, (float) d1 + 1.5F, (float) d2 + 0.5F);
|
||||
FMLClientHandler.instance().getClient().renderEngine.bindTexture(test);
|
||||
GL11.glPushMatrix();
|
||||
GL11.glRotatef(180F, 0.0F, 0.0F, 1.0F);
|
||||
modelLifeInfuser.render(null, 0.0F, 0.0F, -0.1F, 0.0F, 0.0F, 0.0625F);
|
||||
GL11.glPopMatrix();
|
||||
GL11.glPopMatrix();
|
||||
GL11.glPushMatrix();
|
||||
|
||||
if (tile.getStackInSlot(0) != null)
|
||||
if (tileEntity instanceof TileLifeInfuser)
|
||||
{
|
||||
float scaleFactor = getGhostItemScaleFactor(tile.getStackInSlot(0));
|
||||
float rotationAngle = (float) (720.0 * (System.currentTimeMillis() & 0x3FFFL) / 0x3FFFL);
|
||||
EntityItem ghostEntityItem = new EntityItem(tile.getWorldObj());
|
||||
ghostEntityItem.hoverStart = 0.0F;
|
||||
ghostEntityItem.setEntityItemStack(tile.getStackInSlot(0));
|
||||
float displacement = 0.2F;
|
||||
ResourceLocation test = new ResourceLocation("bloodarsenal:textures/models/LifeInfuser.png");
|
||||
|
||||
if (ghostEntityItem.getEntityItem().getItem() instanceof ItemBlock)
|
||||
TileLifeInfuser tile = (TileLifeInfuser) tileEntity;
|
||||
|
||||
GL11.glPushMatrix();
|
||||
GL11.glTranslatef((float) d0 + 0.5F, (float) d1 + 1.5F, (float) d2 + 0.5F);
|
||||
FMLClientHandler.instance().getClient().renderEngine.bindTexture(test);
|
||||
GL11.glPushMatrix();
|
||||
GL11.glRotatef(180F, 0.0F, 0.0F, 1.0F);
|
||||
modelLifeInfuser.render(null, 0.0F, 0.0F, -0.1F, 0.0F, 0.0F, 0.0625F);
|
||||
GL11.glPopMatrix();
|
||||
GL11.glPopMatrix();
|
||||
GL11.glPushMatrix();
|
||||
|
||||
if (tile.getStackInSlot(0) != null)
|
||||
{
|
||||
GL11.glTranslatef((float) d0 + 0.5F, (float) d1 + displacement + 0.25F, (float) d2 + 0.5F);
|
||||
}
|
||||
else
|
||||
{
|
||||
GL11.glTranslatef((float) d0 + 0.5F, (float) d1 + displacement + 0.25F, (float) d2 + 0.5F);
|
||||
float scaleFactor = getGhostItemScaleFactor(tile.getStackInSlot(0));
|
||||
float rotationAngle = (float) (720.0 * (System.currentTimeMillis() & 0x3FFFL) / 0x3FFFL);
|
||||
EntityItem ghostEntityItem = new EntityItem(tile.getWorldObj());
|
||||
ghostEntityItem.hoverStart = 0.0F;
|
||||
ghostEntityItem.setEntityItemStack(tile.getStackInSlot(0));
|
||||
float displacement = 0.2F;
|
||||
|
||||
if (ghostEntityItem.getEntityItem().getItem() instanceof ItemBlock)
|
||||
{
|
||||
GL11.glTranslatef((float) d0 + 0.5F, (float) d1 + displacement + 0.25F, (float) d2 + 0.5F);
|
||||
}
|
||||
else
|
||||
{
|
||||
GL11.glTranslatef((float) d0 + 0.5F, (float) d1 + displacement + 0.25F, (float) d2 + 0.5F);
|
||||
}
|
||||
|
||||
GL11.glScalef(scaleFactor, scaleFactor, scaleFactor);
|
||||
GL11.glRotatef(rotationAngle, 0.0F, 1.0F, 0.0F);
|
||||
customRenderItem.doRender(ghostEntityItem, 0, 0, 0, 0, 0);
|
||||
}
|
||||
|
||||
GL11.glScalef(scaleFactor, scaleFactor, scaleFactor);
|
||||
GL11.glRotatef(rotationAngle, 0.0F, 1.0F, 0.0F);
|
||||
customRenderItem.doRender(ghostEntityItem, 0, 0, 0, 0, 0);
|
||||
GL11.glPopMatrix();
|
||||
|
||||
GL11.glPushMatrix();
|
||||
GL11.glEnable(GL12.GL_RESCALE_NORMAL);
|
||||
GL11.glColor4f(1F, 1F, 1F, 1F);
|
||||
Minecraft.getMinecraft().renderEngine.bindTexture(test);
|
||||
|
||||
GL11.glTranslated(d0 + 0.5, d1 + 1.5, d2 + 0.5);
|
||||
GL11.glScalef(1F, -1F, -1F);
|
||||
modelLifeInfuser.render();
|
||||
GL11.glScalef(1F, -1F, -1F);
|
||||
GL11.glEnable(GL12.GL_RESCALE_NORMAL);
|
||||
|
||||
GL11.glPopMatrix();
|
||||
}
|
||||
|
||||
GL11.glPopMatrix();
|
||||
|
||||
GL11.glPushMatrix();
|
||||
GL11.glEnable(GL12.GL_RESCALE_NORMAL);
|
||||
GL11.glColor4f(1F, 1F, 1F, 1F);
|
||||
Minecraft.getMinecraft().renderEngine.bindTexture(test);
|
||||
|
||||
GL11.glTranslated(d0 + 0.5, d1 + 1.5, d2 + 0.5);
|
||||
GL11.glScalef(1F, -1F, -1F);
|
||||
modelLifeInfuser.render();
|
||||
GL11.glScalef(1F, -1F, -1F);
|
||||
GL11.glEnable(GL12.GL_RESCALE_NORMAL);
|
||||
|
||||
GL11.glEnable(GL11.GL_BLEND);
|
||||
GL11.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA);
|
||||
GL11.glDisable(GL11.GL_ALPHA_TEST);
|
||||
|
||||
GL11.glPopMatrix();
|
||||
}
|
||||
|
||||
private float getGhostItemScaleFactor(ItemStack itemStack)
|
||||
@@ -149,113 +146,4 @@ public class TileLifeInfuserRenderer extends TileEntitySpecialRenderer
|
||||
|
||||
return scaleFactor;
|
||||
}
|
||||
|
||||
private void translateGhostItemByOrientation(ItemStack ghostItemStack, double x, double y, double z, ForgeDirection forgeDirection)
|
||||
{
|
||||
if (ghostItemStack != null)
|
||||
{
|
||||
if (ghostItemStack.getItem() instanceof ItemBlock)
|
||||
{
|
||||
switch (forgeDirection)
|
||||
{
|
||||
case DOWN:
|
||||
{
|
||||
GL11.glTranslatef((float) x + 0.5F, (float) y + 2.7F, (float) z + 0.5F);
|
||||
return;
|
||||
}
|
||||
|
||||
case UP:
|
||||
{
|
||||
GL11.glTranslatef((float) x + 0.5F, (float) y + 0.25F, (float) z + 0.5F);
|
||||
return;
|
||||
}
|
||||
|
||||
case NORTH:
|
||||
{
|
||||
GL11.glTranslatef((float) x + 0.5F, (float) y + 0.5F, (float) z + 0.7F);
|
||||
return;
|
||||
}
|
||||
|
||||
case SOUTH:
|
||||
{
|
||||
GL11.glTranslatef((float) x + 0.5F, (float) y + 0.5F, (float) z + 0.3F);
|
||||
return;
|
||||
}
|
||||
|
||||
case EAST:
|
||||
{
|
||||
GL11.glTranslatef((float) x + 0.3F, (float) y + 0.5F, (float) z + 0.5F);
|
||||
return;
|
||||
}
|
||||
|
||||
case WEST:
|
||||
{
|
||||
GL11.glTranslatef((float) x + 0.70F, (float) y + 0.5F, (float) z + 0.5F);
|
||||
return;
|
||||
}
|
||||
|
||||
case UNKNOWN:
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
default:
|
||||
{
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
switch (forgeDirection)
|
||||
{
|
||||
case DOWN:
|
||||
{
|
||||
GL11.glTranslatef((float) x + 0.5F, (float) y + 0.6F, (float) z + 0.5F);
|
||||
return;
|
||||
}
|
||||
|
||||
case UP:
|
||||
{
|
||||
GL11.glTranslatef((float) x + 0.5F, (float) y + 0.20F, (float) z + 0.5F);
|
||||
return;
|
||||
}
|
||||
|
||||
case NORTH:
|
||||
{
|
||||
GL11.glTranslatef((float) x + 0.5F, (float) y + 0.4F, (float) z + 0.7F);
|
||||
return;
|
||||
}
|
||||
|
||||
case SOUTH:
|
||||
{
|
||||
GL11.glTranslatef((float) x + 0.5F, (float) y + 0.4F, (float) z + 0.3F);
|
||||
return;
|
||||
}
|
||||
|
||||
case EAST:
|
||||
{
|
||||
GL11.glTranslatef((float) x + 0.3F, (float) y + 0.4F, (float) z + 0.5F);
|
||||
return;
|
||||
}
|
||||
|
||||
case WEST:
|
||||
{
|
||||
GL11.glTranslatef((float) x + 0.70F, (float) y + 0.4F, (float) z + 0.5F);
|
||||
return;
|
||||
}
|
||||
|
||||
case UNKNOWN:
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
default:
|
||||
{
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -3,6 +3,7 @@ package com.arc.bloodarsenal.tileentity;
|
||||
import WayofTime.alchemicalWizardry.AlchemicalWizardry;
|
||||
import WayofTime.alchemicalWizardry.api.soulNetwork.SoulNetworkHandler;
|
||||
import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.inventory.IInventory;
|
||||
import net.minecraft.item.Item;
|
||||
@@ -37,7 +38,7 @@ public class TileLPMaterializer extends TileEntity implements IInventory, IFluid
|
||||
this.inv = new ItemStack[1];
|
||||
fluid = new FluidStack(AlchemicalWizardry.lifeEssenceFluid, 0);
|
||||
fluidOutput = new FluidStack(AlchemicalWizardry.lifeEssenceFluid, 0);
|
||||
capacity = FluidContainerRegistry.BUCKET_VOLUME * 10;
|
||||
capacity = FluidContainerRegistry.BUCKET_VOLUME * 20;
|
||||
|
||||
bufferCapacity = FluidContainerRegistry.BUCKET_VOLUME;
|
||||
drainRate = 0;
|
||||
@@ -335,7 +336,7 @@ public class TileLPMaterializer extends TileEntity implements IInventory, IFluid
|
||||
|
||||
if (worldObj.getWorldTime() % 50 == 0)
|
||||
{
|
||||
int syphonMax = 250;
|
||||
int syphonMax = 500;
|
||||
int fluidOutputted;
|
||||
fluidOutputted = Math.min(syphonMax, this.bufferCapacity - this.fluidOutput.amount);
|
||||
fluidOutputted = Math.min(this.fluid.amount, fluidOutputted);
|
||||
@@ -380,6 +381,28 @@ public class TileLPMaterializer extends TileEntity implements IInventory, IFluid
|
||||
}
|
||||
}
|
||||
|
||||
private IFluidHandler[] checkForTanks(TileLPMaterializer tile)
|
||||
{
|
||||
ForgeDirection[] directions = ForgeDirection.VALID_DIRECTIONS;
|
||||
|
||||
for (ForgeDirection forgeDirection : directions)
|
||||
{
|
||||
IFluidHandler[] fluidHandlers;
|
||||
int x = tile.xCoord;
|
||||
int y = tile.yCoord;
|
||||
int z = tile.zCoord;
|
||||
|
||||
switch (forgeDirection)
|
||||
{
|
||||
case NORTH:
|
||||
worldObj.getTileEntity(x, y, z);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
//Fluid Stuffs
|
||||
@Override
|
||||
public int fill(FluidStack resource, boolean doFill)
|
||||
|
||||
@@ -34,7 +34,7 @@ public class TileLifeInfuser extends TileEntity implements IInventory, IFluidTan
|
||||
private boolean canBeFilled;
|
||||
protected FluidStack fluidInput;
|
||||
|
||||
public FluidTank[] tanks = {new FluidTankRestricted(4000, new String[] {"Life Essence"})};
|
||||
public FluidTank[] tanks = {new FluidTankRestricted(FluidContainerRegistry.BUCKET_VOLUME * 20, "Life Essence")};
|
||||
|
||||
public TileLifeInfuser()
|
||||
{
|
||||
@@ -42,7 +42,7 @@ public class TileLifeInfuser extends TileEntity implements IInventory, IFluidTan
|
||||
isActive = false;
|
||||
fluid = new FluidStack(AlchemicalWizardry.lifeEssenceFluid, 0);
|
||||
fluidInput = new FluidStack(AlchemicalWizardry.lifeEssenceFluid, 0);
|
||||
this.capacity = FluidContainerRegistry.BUCKET_VOLUME * 10;
|
||||
this.capacity = FluidContainerRegistry.BUCKET_VOLUME * 20;
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -82,7 +82,6 @@ public class TileLifeInfuser extends TileEntity implements IInventory, IFluidTan
|
||||
isActive = par1NBTTagCompound.getBoolean("isActive");
|
||||
canBeFilled = par1NBTTagCompound.getBoolean("canBeFilled");
|
||||
capacity = par1NBTTagCompound.getInteger("capacity");
|
||||
// readCustomNBT(par1NBTTagCompound);
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -122,35 +121,7 @@ public class TileLifeInfuser extends TileEntity implements IInventory, IFluidTan
|
||||
par1NBTTagCompound.setBoolean("isActive", isActive);
|
||||
par1NBTTagCompound.setBoolean("canBeFilled", canBeFilled);
|
||||
par1NBTTagCompound.setInteger("capacity", capacity);
|
||||
// writeCustomNBT(par1NBTTagCompound);
|
||||
}
|
||||
/*
|
||||
public void readCustomNBT(NBTTagCompound par1NBTTagCompound)
|
||||
{
|
||||
NBTTagList nbttaglist = par1NBTTagCompound.getTagList("Inventory", Constants.NBT.TAG_COMPOUND);
|
||||
|
||||
if (nbttaglist.tagCount() > 0)
|
||||
{
|
||||
NBTTagCompound tagList = nbttaglist.getCompoundTagAt(0);
|
||||
inv[0] = ItemStack.loadItemStackFromNBT(tagList);
|
||||
}
|
||||
}
|
||||
|
||||
public void writeCustomNBT(NBTTagCompound par1NBTTagCompound)
|
||||
{
|
||||
NBTTagList nbttaglist = new NBTTagList();
|
||||
NBTTagCompound tagList = new NBTTagCompound();
|
||||
|
||||
if (inv[0] != null)
|
||||
{
|
||||
tagList.setByte("Slot", (byte) 0);
|
||||
inv[0].writeToNBT(tagList);
|
||||
nbttaglist.appendTag(tagList);
|
||||
}
|
||||
|
||||
par1NBTTagCompound.setTag("Inventory", nbttaglist);
|
||||
}
|
||||
*/
|
||||
|
||||
@Override
|
||||
public int getSizeInventory()
|
||||
@@ -253,7 +224,7 @@ public class TileLifeInfuser extends TileEntity implements IInventory, IFluidTan
|
||||
{
|
||||
int fluidInputted;
|
||||
|
||||
fluidInputted = Math.min(500, -this.fluid.amount + capacity);
|
||||
fluidInputted = Math.min(300, -this.fluid.amount + capacity);
|
||||
fluidInputted = Math.min(this.fluidInput.amount, fluidInputted);
|
||||
this.fluid.amount += fluidInputted;
|
||||
this.fluidInput.amount -= fluidInputted;
|
||||
@@ -263,7 +234,7 @@ public class TileLifeInfuser extends TileEntity implements IInventory, IFluidTan
|
||||
{
|
||||
if (inv[0] != null && inv[0].getItemDamage() > 0)
|
||||
{
|
||||
int lpCost = 500;
|
||||
int lpCost = 300;
|
||||
int damage = inv[0].getItemDamage();
|
||||
|
||||
if (getFluidAmount() >= lpCost)
|
||||
@@ -411,23 +382,23 @@ public class TileLifeInfuser extends TileEntity implements IInventory, IFluidTan
|
||||
{
|
||||
int c = getFuelBurn(getTanks()[i].getFluid());
|
||||
|
||||
if ((c > 0) && (getTanks()[i].getFluidAmount() >= fluidAmmount()))
|
||||
if ((c > 0) && (getTanks()[i].getFluidAmount() >= fluidAmount()))
|
||||
{
|
||||
getTanks()[i].drain(fluidAmmount(), true);
|
||||
getTanks()[i].drain(fluidAmount(), true);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
public int fluidAmmount()
|
||||
public int fluidAmount()
|
||||
{
|
||||
return 100;
|
||||
}
|
||||
|
||||
public int getFuelBurn(FluidStack fluid)
|
||||
{
|
||||
return fluidAmmount();
|
||||
return fluidAmount();
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -80,6 +80,8 @@ item.blood_money16.name=Blood Money x16
|
||||
item.blood_money64.name=Blood Money x64
|
||||
item.blood_burned_string.name=Blood Burned String
|
||||
item.glass_shard.name=Glass Shard
|
||||
item.empowered_sacrifice_amulet.name=Empowered Sacrifice Amulet
|
||||
item.empowered_self_sacrifice_amulet.name=Empowered Self Sacrifice Amulet
|
||||
|
||||
#TConstruct Stuffs
|
||||
material.blood.infused.iron=Blood Infused Iron
|
||||
@@ -122,8 +124,7 @@ tooltip.itemba.amorphic_catalyst=A coagulated mess
|
||||
tooltip.itemba.blood_infused_stick=A stick infused with life!
|
||||
tooltip.itemba.blood_infused_iron1=Mundane iron infused
|
||||
tooltip.itemba.blood_infused_iron2=with life essence
|
||||
tooltip.itemba.heart1=Bright red in color
|
||||
tooltip.itemba.heart2=Fresh from a body
|
||||
tooltip.itemba.heart=Bright red in color
|
||||
tooltip.itemba.soul_fragment=The raw essence of a soul
|
||||
tooltip.itemba.blood_cookie=A sugary treat
|
||||
tooltip.itemba.blood_orange=Completely organic
|
||||
@@ -152,6 +153,7 @@ tooltip.sigil.swimming=Just keep swimming!
|
||||
tooltip.sigil.ender1=Sticking your hand
|
||||
tooltip.sigil.ender2=into the End!
|
||||
tooltip.sigil.divinity=May the Divines protect you!
|
||||
tooltip.bloodMoney.money=Pay your debts in blood!
|
||||
|
||||
tooltip.shiftinfo=Press &cSHIFT&7 for more info
|
||||
|
||||
@@ -161,7 +163,22 @@ tooltip.currentEssence=Current Essence:
|
||||
tooltip.altarTier=Altar Tier:
|
||||
tooltip.capacity=Capacity:
|
||||
|
||||
tooltip.bauble.sacrifice=Collecting some life!
|
||||
tooltip.bauble.empowered_sacrifice=Collecting more life!
|
||||
tooltip.bauble.self_sacrifice=Collecting your life!
|
||||
tooltip.bauble.empowered_self_sacrifice=Collecting more of your life!
|
||||
|
||||
#Messages
|
||||
message.bloodMoney.tooMuch=Your Soul Network cannot hold that much LP.
|
||||
|
||||
message.cake.lie=The cake is a lie!
|
||||
message.cake.eating=Omm nom nom!
|
||||
message.cake.tooFull=You are too full to eat any cake
|
||||
|
||||
message.door.severedConnection=You have severed a connection to the Soul Network!
|
||||
message.door.tooWeak=You are too weak to open the door.
|
||||
message.door.draining=You feel an odd draining sensation as the door actively resists you.
|
||||
|
||||
message.compacter.notEnoughLP=There is not enough LP in your Soul Network!
|
||||
message.compacter.itemInAltar=There is an item in the altar!
|
||||
message.compacter.wrongOrbTier=You need a better orb to do this!
|
||||
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 259 B |
Binary file not shown.
|
Before Width: | Height: | Size: 517 B After Width: | Height: | Size: 252 B |
@@ -3,7 +3,7 @@
|
||||
"modid": "BloodArsenal",
|
||||
"name": "Blood Arsenal",
|
||||
"description": "Blood-themed tools, weapons, armor and much more!",
|
||||
"version": "1.1.4",
|
||||
"version": "1.1-5",
|
||||
"mcversion": "1.7.10",
|
||||
"url": "",
|
||||
"updateUrl": "",
|
||||
|
||||
+1
-1
@@ -1 +1 @@
|
||||
1.1-4
|
||||
1.1-5
|
||||
Reference in new issue
Block a user