mirror of
https://github.com/GTNewHorizons/BloodMagic.git
synced 2026-11-27 07:13:14 +00:00
Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
72ba898f39 | ||
|
|
9d18a56cc1 | ||
|
|
2c71765a1b | ||
|
|
fc86b1449c | ||
|
|
548dc50ef5 | ||
|
|
a7f4a16763 |
No files matched your search
+2
-2
@@ -24,9 +24,9 @@
|
||||
|
||||
dependencies {
|
||||
api("com.github.GTNewHorizons:waila:1.8.8:dev")
|
||||
api("com.github.GTNewHorizons:NotEnoughItems:2.7.57-GTNH:dev")
|
||||
api("com.github.GTNewHorizons:NotEnoughItems:2.7.59-GTNH:dev")
|
||||
|
||||
compileOnly("com.github.GTNewHorizons:GT5-Unofficial:5.09.51.349:dev") {transitive = false }
|
||||
compileOnly("com.github.GTNewHorizons:GT5-Unofficial:5.09.51.359:dev") {transitive = false }
|
||||
|
||||
compileOnly("com.github.GTNewHorizons:Botania:1.12.12-GTNH:api") {transitive = false }
|
||||
compileOnly("com.github.GTNewHorizons:ForestryMC:4.10.13:api") {transitive = false }
|
||||
|
||||
@@ -18,7 +18,9 @@ import net.minecraft.world.World;
|
||||
import WayofTime.alchemicalWizardry.AlchemicalWizardry;
|
||||
import WayofTime.alchemicalWizardry.ModItems;
|
||||
import WayofTime.alchemicalWizardry.api.items.IAltarManipulator;
|
||||
import WayofTime.alchemicalWizardry.common.items.EnergyBattery;
|
||||
import WayofTime.alchemicalWizardry.api.items.interfaces.IBindable;
|
||||
import WayofTime.alchemicalWizardry.api.items.interfaces.IBloodOrb;
|
||||
import WayofTime.alchemicalWizardry.api.soulNetwork.SoulNetworkHandler;
|
||||
import WayofTime.alchemicalWizardry.common.items.sigil.holding.SigilOfHolding;
|
||||
import WayofTime.alchemicalWizardry.common.tileEntity.TEAltar;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
@@ -70,19 +72,29 @@ public class BlockAltar extends BlockContainer {
|
||||
public int getComparatorInputOverride(World world, int x, int y, int z, int meta) {
|
||||
TileEntity tile = world.getTileEntity(x, y, z);
|
||||
|
||||
if (tile instanceof TEAltar) {
|
||||
ItemStack stack = ((TEAltar) tile).getStackInSlot(0);
|
||||
|
||||
if (stack != null && stack.getItem() instanceof EnergyBattery) {
|
||||
EnergyBattery bloodOrb = (EnergyBattery) stack.getItem();
|
||||
int maxEssence = bloodOrb.getMaxEssence();
|
||||
int currentEssence = bloodOrb.getCurrentEssence(stack);
|
||||
int level = currentEssence * 15 / maxEssence;
|
||||
return Math.min(15, level) % 16;
|
||||
}
|
||||
if (!(tile instanceof TEAltar altar)) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
return 0;
|
||||
int maxEssence;
|
||||
int currentEssence;
|
||||
|
||||
if (world.getBlock(x, y - 1, z) instanceof LargeBloodStoneBrick) {
|
||||
ItemStack stack = altar.getStackInSlot(0);
|
||||
|
||||
if (stack == null || !(stack.getItem() instanceof IBloodOrb bloodOrb)
|
||||
|| !(stack.getItem() instanceof IBindable)) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
maxEssence = (int) (bloodOrb.getMaxEssence() * altar.getOrbMultiplier());
|
||||
currentEssence = SoulNetworkHandler.getCurrentEssence(IBindable.getOwnerName(stack));
|
||||
} else {
|
||||
maxEssence = altar.getCapacity();
|
||||
currentEssence = altar.getCurrentBlood();
|
||||
}
|
||||
|
||||
return Math.min(15, currentEssence * 15 / maxEssence) % 16;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
+23
-49
@@ -8,6 +8,7 @@ import net.minecraft.entity.EntityLivingBase;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.ItemArmor;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.EnumChatFormatting;
|
||||
import net.minecraft.util.IIcon;
|
||||
import net.minecraft.util.StatCollector;
|
||||
import net.minecraft.world.World;
|
||||
@@ -88,49 +89,27 @@ public class ItemSanguineArmour extends ItemArmor
|
||||
|
||||
if (this == ModItems.sanguinePants) {
|
||||
return "alchemicalwizardry:models/armor/sanguineArmour_layer_2.png";
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void addInformation(ItemStack stack, EntityPlayer player, List<String> list, boolean adv) {
|
||||
if (this.armorType == 0) {
|
||||
list.add(StatCollector.translateToLocal("tooltip.sanguinearmor.desc1"));
|
||||
} else {
|
||||
return null;
|
||||
list.add(StatCollector.translateToLocal("tooltip.sanguinearmor.desc2"));
|
||||
}
|
||||
|
||||
list.add(
|
||||
EnumChatFormatting.DARK_PURPLE + StatCollector.translateToLocalFormatted(
|
||||
"tooltip.sanguinearmor.visdisc",
|
||||
getVisDiscount(stack, player, null)));
|
||||
}
|
||||
|
||||
@Override
|
||||
public void addInformation(ItemStack par1ItemStack, EntityPlayer par2EntityPlayer, List par3List, boolean par4) {
|
||||
int discount = 0;
|
||||
|
||||
switch (this.armorType) {
|
||||
case 0:
|
||||
discount = 6;
|
||||
break;
|
||||
case 1:
|
||||
discount = 3;
|
||||
break;
|
||||
case 2:
|
||||
discount = 3;
|
||||
break;
|
||||
case 3:
|
||||
discount = 2;
|
||||
break;
|
||||
}
|
||||
|
||||
switch (this.armorType) {
|
||||
case 0:
|
||||
par3List.add(StatCollector.translateToLocal("tooltip.sanguinearmor.desc1"));
|
||||
break;
|
||||
case 1:
|
||||
|
||||
case 2:
|
||||
|
||||
case 3:
|
||||
par3List.add(StatCollector.translateToLocal("tooltip.sanguinearmor.desc2"));
|
||||
}
|
||||
|
||||
par3List.add(StatCollector.translateToLocal("tooltip.sanguinearmor.visdisc") + " " + discount + "%");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onArmourUpdate(World world, EntityPlayer player, ItemStack thisItemStack) {
|
||||
return;
|
||||
}
|
||||
public void onArmourUpdate(World world, EntityPlayer player, ItemStack thisItemStack) {}
|
||||
|
||||
@Override
|
||||
public boolean isUpgrade() {
|
||||
@@ -149,17 +128,12 @@ public class ItemSanguineArmour extends ItemArmor
|
||||
|
||||
@Override
|
||||
public int getVisDiscount(ItemStack stack, EntityPlayer player, Aspect aspect) {
|
||||
switch (this.armorType) {
|
||||
case 0:
|
||||
return 7;
|
||||
case 1:
|
||||
return 3;
|
||||
case 2:
|
||||
return 2;
|
||||
case 3:
|
||||
return 2;
|
||||
}
|
||||
return 0;
|
||||
return switch (this.armorType) {
|
||||
case 0 -> 7;
|
||||
case 1 -> 3;
|
||||
case 2, 3 -> 2;
|
||||
default -> 0;
|
||||
};
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -269,7 +269,7 @@ bm.string.drain=Drain
|
||||
bm.string.tier=Tier
|
||||
bm.string.crafting.orb.shaped=Shaped Orb Crafting
|
||||
bm.string.crafting.orb.shapeless=Shapeless Orb Crafting
|
||||
bm.string.ritualDiviner=Radius: %s
|
||||
bm.string.ritualDiviner=Ritual: %s
|
||||
text.recipe.altar=Blood Altar
|
||||
text.recipe.altar.tier=Tier: %s
|
||||
text.recipe.altar.bloodRequired=LP: %s
|
||||
@@ -509,7 +509,7 @@ tooltip.sacrificialdagger.desc2=Just a prick of the
|
||||
tooltip.sacrificialdagger.desc3=finger will suffice...
|
||||
tooltip.sanguinearmor.desc1=A pair of goggles imbued with power
|
||||
tooltip.sanguinearmor.desc2=Robes imbued with forbidden power
|
||||
tooltip.sanguinearmor.visdisc=Vis discount:
|
||||
tooltip.sanguinearmor.visdisc=Vis discount: %d%%
|
||||
tooltip.scribetool.desc=The writing is on the wall...
|
||||
tooltip.seersigil.desc=When seeing all is not enough
|
||||
tooltip.sigilofelementalaffinity.desc1=Perfect for a fire-breathing fish
|
||||
@@ -662,4 +662,4 @@ structurelib.bloodmagic.altar.1=Blood Altar
|
||||
structurelib.bloodmagic.altar.2=Hold 1-6 Hologram Projectors to determine the tier
|
||||
structurelib.bloodmagic.altar.3=Tier %s pillars accept any block
|
||||
structurelib.bloodmagic.altar.4=Tier %s caps accept any block
|
||||
structurelib.bloodmagic.altar.5=Tier 5 beacons accept any block
|
||||
structurelib.bloodmagic.altar.5=Tier 5 beacons accept any block
|
||||
@@ -384,7 +384,7 @@ tooltip.sacrificialdagger.desc2=Простого укольчика
|
||||
tooltip.sacrificialdagger.desc3=будет достаточно...
|
||||
tooltip.sanguinearmor.desc1=Пара очков проникнутых силой
|
||||
tooltip.sanguinearmor.desc2=Одеяния проникнутые запретной силой
|
||||
tooltip.sanguinearmor.visdisc=Уменьшение затрат Вис:
|
||||
tooltip.sanguinearmor.visdisc=Уменьшение затрат Вис: %d%%
|
||||
tooltip.scribetool.desc=Росписи на стене...
|
||||
tooltip.seersigil.desc=Когда видеть всё, недостаточно.
|
||||
tooltip.sigilofelementalaffinity.desc1=Идеально подходит для огнедышащей рыбы,
|
||||
|
||||
@@ -482,7 +482,7 @@ tooltip.sacrificialdagger.desc2=只是刺一下手指
|
||||
tooltip.sacrificialdagger.desc3=你就能获得力量...
|
||||
tooltip.sanguinearmor.desc1=一双充满力量的护目镜
|
||||
tooltip.sanguinearmor.desc2=灌入被禁止的力量的长袍
|
||||
tooltip.sanguinearmor.visdisc=魔力减免:
|
||||
tooltip.sanguinearmor.visdisc=魔力减免: %d%%
|
||||
tooltip.scribetool.desc=书写是在墙壁上的...
|
||||
tooltip.seersigil.desc=看到更多总会有所不足
|
||||
tooltip.sigilofelementalaffinity.desc1=在火中呼吸的鱼
|
||||
|
||||
@@ -396,7 +396,7 @@ tooltip.sacrificialdagger.desc2=Just a prick of the
|
||||
tooltip.sacrificialdagger.desc3=finger will suffice...
|
||||
tooltip.sanguinearmor.desc1=A pair of goggles imbued with power
|
||||
tooltip.sanguinearmor.desc2=Robes imbued with forbidden power
|
||||
tooltip.sanguinearmor.visdisc=Vis discount:
|
||||
tooltip.sanguinearmor.visdisc=Vis discount: %d%%
|
||||
tooltip.scribetool.desc=The writing is on the wall...
|
||||
tooltip.seersigil.desc=When seeing all is not enough
|
||||
tooltip.sigilofelementalaffinity.desc1=Perfect for a fire-breathing fish
|
||||
|
||||
Reference in new issue
Block a user