Move config to annotation system
All old configs must be deleted for this to work properly. Since the rest
of the update is filled with world breaking changes, this should be fine.
Also some mapping updates
(cherry picked from commit d587a8c
)
This commit is contained in:
parent
a10b2ece9a
commit
d99cf77288
45 changed files with 320 additions and 561 deletions
|
@ -311,7 +311,7 @@ public class ClientHandler {
|
|||
|
||||
public static void cycleSigil(ItemStack stack, EntityPlayer player, int dWheel) {
|
||||
int mode = dWheel;
|
||||
if (!ConfigHandler.sigilHoldingSkipsEmptySlots) {
|
||||
if (!ConfigHandler.client.sigilHoldingSkipsEmptySlots) {
|
||||
mode = ItemSigilHolding.getCurrentItemOrdinal(stack);
|
||||
mode = dWheel < 0 ? ItemSigilHolding.next(mode) : ItemSigilHolding.prev(mode);
|
||||
}
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
package WayofTime.bloodmagic.util.handler.event;
|
||||
|
||||
import WayofTime.bloodmagic.BloodMagic;
|
||||
import WayofTime.bloodmagic.ConfigHandler;
|
||||
import WayofTime.bloodmagic.annot.Handler;
|
||||
import WayofTime.bloodmagic.api.Constants;
|
||||
import WayofTime.bloodmagic.api.event.AltarCraftedEvent;
|
||||
|
@ -51,19 +50,20 @@ public class CraftingHandler {
|
|||
// Handles crafting of: Revealing Upgrade Tome, Elytra Upgrade Tome, Combining Upgrade Tomes, Setting Upgrade for Trainer
|
||||
@SubscribeEvent
|
||||
public void onAnvil(AnvilUpdateEvent event) {
|
||||
if (ConfigHandler.thaumcraftGogglesUpgrade) {
|
||||
if (event.getLeft().getItem() == RegistrarBloodMagicItems.LIVING_ARMOUR_HELMET && event.getRight().getItem() == Constants.Compat.THAUMCRAFT_GOGGLES && !event.getRight().isItemDamaged()) {
|
||||
ItemStack output = new ItemStack(RegistrarBloodMagicItems.UPGRADE_TOME);
|
||||
output = NBTHelper.checkNBT(output);
|
||||
ItemHelper.LivingUpgrades.setKey(output, BloodMagic.MODID + ".upgrade.revealing");
|
||||
ItemHelper.LivingUpgrades.setLevel(output, 1);
|
||||
event.setCost(1);
|
||||
|
||||
event.setOutput(output);
|
||||
|
||||
return;
|
||||
}
|
||||
}
|
||||
// TODO - Azanor come back :(
|
||||
// if (ConfigHandler.thaumcraftGogglesUpgrade) {
|
||||
// if (event.getLeft().getItem() == RegistrarBloodMagicItems.LIVING_ARMOUR_HELMET && event.getRight().getItem() == Constants.Compat.THAUMCRAFT_GOGGLES && !event.getRight().isItemDamaged()) {
|
||||
// ItemStack output = new ItemStack(RegistrarBloodMagicItems.UPGRADE_TOME);
|
||||
// output = NBTHelper.checkNBT(output);
|
||||
// ItemHelper.LivingUpgrades.setKey(output, BloodMagic.MODID + ".upgrade.revealing");
|
||||
// ItemHelper.LivingUpgrades.setLevel(output, 1);
|
||||
// event.setCost(1);
|
||||
//
|
||||
// event.setOutput(output);
|
||||
//
|
||||
// return;
|
||||
// }
|
||||
// }
|
||||
|
||||
if (event.getLeft().getItem() == RegistrarBloodMagicItems.SIGIL_HOLDING) {
|
||||
if (event.getRight().getItem() == Items.NAME_TAG) {
|
||||
|
|
|
@ -186,7 +186,7 @@ public class GenericHandler {
|
|||
|
||||
boolean shouldSyphon = pack.getStoredLP(player.getItemStackFromSlot(EntityEquipmentSlot.CHEST)) < pack.CAPACITY;
|
||||
float damageDone = event.getEntityLiving().getHealth() < event.getAmount() ? event.getAmount() - event.getEntityLiving().getHealth() : event.getAmount();
|
||||
int totalLP = Math.round(damageDone * ConfigHandler.sacrificialPackConversion);
|
||||
int totalLP = Math.round(damageDone * ConfigHandler.values.coatOfArmsConversion);
|
||||
|
||||
if (shouldSyphon)
|
||||
ItemHelper.LPContainer.addLPToItem(player.getItemStackFromSlot(EntityEquipmentSlot.CHEST), totalLP, pack.CAPACITY);
|
||||
|
@ -228,7 +228,7 @@ public class GenericHandler {
|
|||
attackTaskMap.put(animal, attackTask);
|
||||
}
|
||||
|
||||
if (animal.getAttackTarget() != null && animal.getDistanceSqToEntity(animal.getAttackTarget()) < 4) {
|
||||
if (animal.getAttackTarget() != null && animal.getDistanceSq(animal.getAttackTarget()) < 4) {
|
||||
animal.getEntityWorld().createExplosion(null, animal.posX, animal.posY + (double) (animal.height / 16.0F), animal.posZ, 2 + animal.getActivePotionEffect(RegistrarBloodMagic.SACRIFICIAL_LAMB).getAmplifier() * 1.5f, false);
|
||||
targetTaskMap.remove(animal);
|
||||
attackTaskMap.remove(animal);
|
||||
|
|
|
@ -284,7 +284,7 @@ public class LivingArmourHandler {
|
|||
ItemStack arrowStack = new ItemStack(Items.ARROW);
|
||||
ItemArrow itemarrow = (ItemArrow) ((stack.getItem() instanceof ItemArrow ? arrowStack.getItem() : Items.ARROW));
|
||||
EntityArrow entityarrow = itemarrow.createArrow(world, arrowStack, player);
|
||||
entityarrow.setAim(player, player.rotationPitch, player.rotationYaw, 0.0F, velocity * 3.0F, 1.0F);
|
||||
entityarrow.shoot(player, player.rotationPitch, player.rotationYaw, 0.0F, velocity * 3.0F, 1.0F);
|
||||
|
||||
float velocityModifier = 0.6f * velocity;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue