mirror of
https://github.com/GTNewHorizons/BloodMagic.git
synced 2026-11-27 07:13:14 +00:00
Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
e75e9f778a | ||
|
|
6bd083125a | ||
|
|
09fbb5574b | ||
|
|
559e2439b2 | ||
|
|
ef17235ae5 | ||
|
|
efe1e6044a | ||
|
|
14a4825e33 | ||
|
|
f5791ff631 | ||
|
|
ead07b752b | ||
|
|
d821098d4e | ||
|
|
8762c24331 | ||
|
|
a1f62e0db6 | ||
|
|
242312bee5 | ||
|
|
c0b4b797c8 | ||
|
|
bd584c6d52 |
No files matched your search
+1
-1
@@ -27,4 +27,4 @@ whitelist.json
|
||||
*.iws
|
||||
src/main/resources/mixins.*.json
|
||||
*.bat
|
||||
/layout.json
|
||||
layout.json
|
||||
+6
-6
@@ -23,19 +23,19 @@
|
||||
*/
|
||||
|
||||
dependencies {
|
||||
api("com.github.GTNewHorizons:waila:1.8.2:dev")
|
||||
api("com.github.GTNewHorizons:NotEnoughItems:2.7.23-GTNH:dev")
|
||||
api("com.github.GTNewHorizons:waila:1.8.4:dev")
|
||||
api("com.github.GTNewHorizons:NotEnoughItems:2.7.40-GTNH:dev")
|
||||
|
||||
compileOnly("com.github.GTNewHorizons:GT5-Unofficial:5.09.51.85:dev") {transitive = false }
|
||||
compileOnly("com.github.GTNewHorizons:GT5-Unofficial:5.09.51.266:dev") {transitive = false }
|
||||
|
||||
compileOnly("com.github.GTNewHorizons:Botania:1.12.5-GTNH:api") {transitive = false }
|
||||
compileOnly("com.github.GTNewHorizons:ForestryMC:4.10.1:api") {transitive = false }
|
||||
compileOnly("com.github.GTNewHorizons:Botania:1.12.6-GTNH:api") {transitive = false }
|
||||
compileOnly("com.github.GTNewHorizons:ForestryMC:4.10.7:api") {transitive = false }
|
||||
compileOnly("com.github.GTNewHorizons:ForgeMultipart:1.6.2:dev") {transitive = false }
|
||||
|
||||
compileOnly("com.github.GTNewHorizons:Chisel:2.16.2-GTNH:api") {transitive = false }
|
||||
|
||||
compileOnly("com.github.GTNewHorizons:ZenScript:1.0.0-GTNH") {transitive = false }
|
||||
compileOnly("com.github.GTNewHorizons:CraftTweaker:3.4.0:dev") {transitive = false }
|
||||
compileOnly("com.github.GTNewHorizons:CraftTweaker:3.4.1:dev") {transitive = false }
|
||||
|
||||
compileOnly("thaumcraft:Thaumcraft:1.7.10-4.2.3.5:dev") {transitive = false }
|
||||
compileOnly("curse.maven:guide-api-228832:2287185") {transitive = false }
|
||||
|
||||
+1
-1
@@ -14,7 +14,7 @@ modId = AWWayofTime
|
||||
modGroup = WayofTime.alchemicalWizardry
|
||||
|
||||
# Whether to use modGroup as the maven publishing group.
|
||||
# Due to a history of using JitPack, the default is com.github.GTNewHorizons for all mods.
|
||||
# When false, com.github.GTNewHorizons is used.
|
||||
useModGroupForPublishing = false
|
||||
|
||||
# Updates your build.gradle and settings.gradle automatically whenever an update is available.
|
||||
|
||||
Vendored
BIN
Binary file not shown.
+1
-1
@@ -1,6 +1,6 @@
|
||||
distributionBase=GRADLE_USER_HOME
|
||||
distributionPath=wrapper/dists
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-8.11.1-bin.zip
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-8.13-bin.zip
|
||||
networkTimeout=10000
|
||||
validateDistributionUrl=true
|
||||
zipStoreBase=GRADLE_USER_HOME
|
||||
|
||||
@@ -86,8 +86,7 @@ done
|
||||
# shellcheck disable=SC2034
|
||||
APP_BASE_NAME=${0##*/}
|
||||
# Discard cd standard output in case $CDPATH is set (https://github.com/gradle/gradle/issues/25036)
|
||||
APP_HOME=$( cd -P "${APP_HOME:-./}" > /dev/null && printf '%s
|
||||
' "$PWD" ) || exit
|
||||
APP_HOME=$( cd -P "${APP_HOME:-./}" > /dev/null && printf '%s\n' "$PWD" ) || exit
|
||||
|
||||
# Use the maximum available, or set MAX_FD != -1 to use that value.
|
||||
MAX_FD=maximum
|
||||
@@ -206,7 +205,7 @@ fi
|
||||
DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
|
||||
|
||||
# Collect all arguments for the java command:
|
||||
# * DEFAULT_JVM_OPTS, JAVA_OPTS, JAVA_OPTS, and optsEnvironmentVar are not allowed to contain shell fragments,
|
||||
# * DEFAULT_JVM_OPTS, JAVA_OPTS, and optsEnvironmentVar are not allowed to contain shell fragments,
|
||||
# and any embedded shellness will be escaped.
|
||||
# * For example: A user cannot expect ${Hostname} to be expanded, as it is an environment variable and will be
|
||||
# treated as '${Hostname}' itself on the command line.
|
||||
|
||||
+1
-1
@@ -17,7 +17,7 @@ pluginManagement {
|
||||
}
|
||||
|
||||
plugins {
|
||||
id 'com.gtnewhorizons.gtnhsettingsconvention' version '1.0.31'
|
||||
id 'com.gtnewhorizons.gtnhsettingsconvention' version '1.0.38'
|
||||
}
|
||||
|
||||
|
||||
@@ -493,6 +493,7 @@ public class AlchemicalWizardry {
|
||||
public static boolean causeHungerWithRegen;
|
||||
public static boolean causeHungerChatMessage = true;
|
||||
public static boolean disableBoundToolsRightClick;
|
||||
public static boolean allowPotionRepair;
|
||||
|
||||
public static BlockStack[] secondTierRunes = new BlockStack[10];
|
||||
public static BlockStack[] thirdTierRunes = new BlockStack[10];
|
||||
|
||||
@@ -131,6 +131,7 @@ public class BloodMagicConfiguration {
|
||||
.getBoolean();
|
||||
AlchemicalWizardry.causeHungerChatMessage = config.get("WimpySettings", "causeHungerChatMessage", true)
|
||||
.getBoolean();
|
||||
AlchemicalWizardry.allowPotionRepair = config.get("WimpySettings", "allowPotionRepair", true).getBoolean();
|
||||
// AlchemicalWizardry.lockdownAltar = config.get("WimpySettings", "LockdownAltarWithRegen", true).getBoolean();
|
||||
AlchemicalWizardry.lockdownAltar = false;
|
||||
AlchemicalWizardry.disableBoundToolsRightClick = config
|
||||
@@ -665,10 +666,19 @@ public class BloodMagicConfiguration {
|
||||
new BlockStack(ModBlocks.bloodRune, 6) });
|
||||
AlchemicalWizardry.specialAltarBlock = getAltarRunesForTier(
|
||||
"specialBlocks",
|
||||
new BlockStack[] { new BlockStack(Blocks.stonebrick, 0), new BlockStack(Blocks.glowstone, 0),
|
||||
new BlockStack(Blocks.stonebrick, 0), new BlockStack(ModBlocks.largeBloodStoneBrick, 0),
|
||||
new BlockStack(Blocks.beacon, 0), new BlockStack(Blocks.stonebrick, 0),
|
||||
new BlockStack(ModBlocks.blockCrystal, 0) });
|
||||
new BlockStack[] { new BlockStack(Blocks.air, 0), new BlockStack(Blocks.glowstone, 0),
|
||||
new BlockStack(Blocks.air, 0), new BlockStack(ModBlocks.largeBloodStoneBrick, 0),
|
||||
new BlockStack(Blocks.beacon, 0), new BlockStack(Blocks.air, 0),
|
||||
new BlockStack(ModBlocks.blockCrystal, 0) },
|
||||
"Set the special blocks for the altar with the format mod:block(:meta) in the following order:\n"
|
||||
+ "Tier 3 pillar\n"
|
||||
+ "Tier 3 cap\n"
|
||||
+ "Tier 4 pillar\n"
|
||||
+ "Tier 4 cap\n"
|
||||
+ "Tier 5 beacon\n"
|
||||
+ "Tier 6 pillar\n"
|
||||
+ "Tier 6 cap\n"
|
||||
+ "Set any of these to minecraft:air to allow for that component to be any block EXCEPT air (e.g., let any block be used for a pillar).");
|
||||
config.save();
|
||||
}
|
||||
|
||||
@@ -808,12 +818,16 @@ public class BloodMagicConfiguration {
|
||||
}
|
||||
|
||||
private static BlockStack[] getAltarRunesForTier(String tierName, BlockStack[] defaultValues) {
|
||||
return getAltarRunesForTier(tierName, defaultValues, "");
|
||||
}
|
||||
|
||||
private static BlockStack[] getAltarRunesForTier(String tierName, BlockStack[] defaultValues, String comment) {
|
||||
String[] defaultNames = new String[defaultValues.length];
|
||||
for (int i = 0; i < defaultValues.length; i++) {
|
||||
defaultNames[i] = Block.blockRegistry.getNameForObject(defaultValues[i].getBlock()) + ":"
|
||||
+ defaultValues[i].getMeta();
|
||||
}
|
||||
Property property = config.get("rune overrides", tierName, defaultNames);
|
||||
Property property = config.get("rune overrides", tierName, defaultNames, comment);
|
||||
String[] names = property.getStringList();
|
||||
if (names.length != defaultNames.length) {
|
||||
property.set(defaultNames);
|
||||
|
||||
@@ -13,6 +13,7 @@ import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.resources.I18n;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
import net.minecraftforge.oredict.OreDictionary;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
@@ -173,7 +174,7 @@ public class NEIMeteorRecipeHandler extends TemplateRecipeHandler {
|
||||
if (meteor.ores.stream().anyMatch(m -> matchItem(result, m.getBlock()))) {
|
||||
arecipes.add(new CachedMeteorRecipe(meteor, result));
|
||||
}
|
||||
if (meteor.filler.stream().anyMatch(m -> matchItem(result, m.getBlock()))) {
|
||||
if (meteor.fillerChance > 0 && meteor.filler.stream().anyMatch(m -> matchItem(result, m.getBlock()))) {
|
||||
arecipes.add(new CachedMeteorRecipe(meteor, result));
|
||||
}
|
||||
}
|
||||
@@ -193,11 +194,34 @@ public class NEIMeteorRecipeHandler extends TemplateRecipeHandler {
|
||||
if (NEIServerUtils.areStacksSameTypeCrafting(compared, compareTo)) {
|
||||
return true;
|
||||
}
|
||||
// ignore ore variants (like basalt ore)
|
||||
|
||||
// Ignore GregTech ore variants (like basalt ore)
|
||||
if (compared.getUnlocalizedName().startsWith("gt.blockores")
|
||||
&& compareTo.getUnlocalizedName().startsWith("gt.blockores")) {
|
||||
return compared.getItemDamage() % 1000 == compareTo.getItemDamage() % 1000;
|
||||
}
|
||||
|
||||
// Check oredicts for ores. Checks for direct matches (oreIron with oreIron) as well as IC2/GT crushed ores
|
||||
// (crushedGold with oreGold), EFR raw ores (rawCopper with oreCopper (although those all seem to have oreX
|
||||
// anyways)), and GT:NH raw ores (rawOreDiamond with oreDiamond).
|
||||
String[] prefixes = { "crushed", "rawOre", "raw" };
|
||||
for (int i : OreDictionary.getOreIDs(compareTo)) {
|
||||
String s1 = OreDictionary.getOreName(i);
|
||||
if (s1.startsWith("ore")) {
|
||||
for (int j : OreDictionary.getOreIDs(compared)) {
|
||||
if (i == j) {
|
||||
return true;
|
||||
}
|
||||
String s2 = OreDictionary.getOreName(j);
|
||||
for (String prefix : prefixes) {
|
||||
if (i == OreDictionary.getOreID(s2.replaceFirst("^" + prefix, "ore"))) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
+9
-3
@@ -5,6 +5,7 @@ import java.util.Arrays;
|
||||
import java.util.List;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.init.Blocks;
|
||||
import net.minecraft.world.IBlockAccess;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
@@ -65,9 +66,14 @@ public class UpgradedAltars {
|
||||
|
||||
private static boolean checkAltarComponent(AltarComponent altarComponent, IBlockAccess world, int x, int y, int z,
|
||||
int altarTier) {
|
||||
Block block = world.getBlock(x + altarComponent.getX(), y + altarComponent.getY(), z + altarComponent.getZ());
|
||||
int metadata = world
|
||||
.getBlockMetadata(x + altarComponent.getX(), y + altarComponent.getY(), z + altarComponent.getZ());
|
||||
int compX = x + altarComponent.getX();
|
||||
int compY = y + altarComponent.getY();
|
||||
int compZ = z + altarComponent.getZ();
|
||||
if (altarComponent.getBlock() == Blocks.air) {
|
||||
return !world.isAirBlock(compX, compY, compZ);
|
||||
}
|
||||
Block block = world.getBlock(compX, compY, compZ);
|
||||
int metadata = world.getBlockMetadata(compX, compY, compZ);
|
||||
if (altarComponent.isBloodRune()) {
|
||||
boolean result = false;
|
||||
BlockStack[] runes = getRuneOverrides(altarTier);
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
package WayofTime.alchemicalWizardry.common.items.potion;
|
||||
|
||||
import static WayofTime.alchemicalWizardry.AlchemicalWizardry.allowPotionRepair;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Iterator;
|
||||
import java.util.List;
|
||||
@@ -347,4 +349,10 @@ public class AlchemyFlask extends Item {
|
||||
potionStack.getTagCompound().setTag("CustomPotionEffects", nbttaglist);
|
||||
return new EntityPotion(worldObj, entityLivingBase, potionStack);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isRepairable() {
|
||||
if (allowPotionRepair) return super.isRepairable();
|
||||
return false;
|
||||
}
|
||||
}
|
||||
+23
-20
@@ -77,12 +77,7 @@ public class SigilDivination extends Item implements ArmourUpgrade, IReagentMani
|
||||
.getMovingObjectPositionFromPlayer(par2World, par3EntityPlayer, false);
|
||||
|
||||
if (movingobjectposition == null) {
|
||||
par3EntityPlayer.addChatMessage(
|
||||
new ChatComponentText(
|
||||
StatCollector.translateToLocal("message.divinationsigil.currentessence") + " "
|
||||
+ SoulNetworkHandler.getCurrentEssence(ownerName)
|
||||
+ "LP"));
|
||||
|
||||
tellEssence(par3EntityPlayer, ownerName);
|
||||
return par1ItemStack;
|
||||
} else {
|
||||
if (movingobjectposition.typeOfHit == MovingObjectPosition.MovingObjectType.BLOCK) {
|
||||
@@ -93,12 +88,7 @@ public class SigilDivination extends Item implements ArmourUpgrade, IReagentMani
|
||||
TileEntity tile = par2World.getTileEntity(x, y, z);
|
||||
|
||||
if (!(tile instanceof IReagentHandler)) {
|
||||
par3EntityPlayer.addChatMessage(
|
||||
new ChatComponentText(
|
||||
StatCollector.translateToLocal("message.divinationsigil.currentessence") + " "
|
||||
+ SoulNetworkHandler.getCurrentEssence(ownerName)
|
||||
+ "LP"));
|
||||
|
||||
tellEssence(par3EntityPlayer, ownerName);
|
||||
return par1ItemStack;
|
||||
}
|
||||
|
||||
@@ -108,14 +98,7 @@ public class SigilDivination extends Item implements ArmourUpgrade, IReagentMani
|
||||
if (infoList != null) {
|
||||
for (ReagentContainerInfo info : infoList) {
|
||||
if (info != null && info.reagent != null && info.reagent.reagent != null) {
|
||||
par3EntityPlayer.addChatComponentMessage(
|
||||
new ChatComponentText(
|
||||
StatCollector.translateToLocal("message.divinationsigil.reagent") + " "
|
||||
+ ReagentRegistry.getKeyForReagent(info.reagent.reagent)
|
||||
+ ","
|
||||
+ StatCollector.translateToLocal("message.divinationsigil.amount")
|
||||
+ " "
|
||||
+ info.reagent.amount));
|
||||
tellReagent(par3EntityPlayer, info);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -125,6 +108,26 @@ public class SigilDivination extends Item implements ArmourUpgrade, IReagentMani
|
||||
return par1ItemStack;
|
||||
}
|
||||
|
||||
private static void tellReagent(EntityPlayer par3EntityPlayer, ReagentContainerInfo info) {
|
||||
par3EntityPlayer.addChatComponentMessage(
|
||||
new ChatComponentText(
|
||||
StatCollector.translateToLocalFormatted(
|
||||
"message.divinationsigil.reagent",
|
||||
ReagentRegistry.getKeyForReagent(info.reagent.reagent))));
|
||||
par3EntityPlayer.addChatComponentMessage(
|
||||
new ChatComponentText(
|
||||
StatCollector
|
||||
.translateToLocalFormatted("message.divinationsigil.amount", info.reagent.amount)));
|
||||
}
|
||||
|
||||
private static void tellEssence(EntityPlayer par3EntityPlayer, String ownerName) {
|
||||
par3EntityPlayer.addChatMessage(
|
||||
new ChatComponentText(
|
||||
StatCollector.translateToLocalFormatted(
|
||||
"message.divinationsigil.currentessence",
|
||||
SoulNetworkHandler.getCurrentEssence(ownerName))));
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onArmourUpdate(World world, EntityPlayer player, ItemStack thisItemStack) {}
|
||||
|
||||
|
||||
+1
-1
@@ -31,7 +31,7 @@ public class RitualEffectAlphaPact extends RitualEffect {
|
||||
int y = ritualStone.getYCoord();
|
||||
int z = ritualStone.getZCoord();
|
||||
|
||||
if (world.getWorldTime() % 20 != 0) {
|
||||
if (world.getTotalWorldTime() % 20 != 0) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
+1
-1
@@ -34,7 +34,7 @@ public class RitualEffectAnimalGrowth extends RitualEffect {
|
||||
int y = ritualStone.getYCoord();
|
||||
int z = ritualStone.getZCoord();
|
||||
|
||||
if (world.getWorldTime() % 20 != 0) {
|
||||
if (world.getTotalWorldTime() % 20 != 0) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
+1
-1
@@ -208,7 +208,7 @@ public class RitualEffectAutoAlchemy extends RitualEffect {
|
||||
}
|
||||
}
|
||||
|
||||
if (world.getWorldTime() % 10 == 0) {
|
||||
if (world.getTotalWorldTime() % 10 == 0) {
|
||||
if (flag == 0 && inputInv1 != null) {
|
||||
for (int i = 0; i < recipe.length; i++) {
|
||||
ItemStack recItem = recipe[i];
|
||||
|
||||
+1
-1
@@ -90,7 +90,7 @@ public class RitualEffectContainment extends RitualEffect {
|
||||
}
|
||||
}
|
||||
|
||||
if (world.getWorldTime() % 2 == 0 && flag) {
|
||||
if (world.getTotalWorldTime() % 2 == 0 && flag) {
|
||||
SoulNetworkHandler.syphonFromNetwork(owner, this.getCostPerRefresh());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -48,7 +48,7 @@ public class RitualEffectCrafting extends RitualEffect {
|
||||
|
||||
boolean hasPotentia = this.canDrainReagent(ritualStone, ReagentRegistry.potentiaReagent, potentiaDrain, false);
|
||||
|
||||
if (world.getWorldTime() % (hasPotentia ? 1 : 4) != 0) {
|
||||
if (world.getTotalWorldTime() % (hasPotentia ? 1 : 4) != 0) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
@@ -38,7 +38,7 @@ public class RitualEffectCrushing extends RitualEffect {
|
||||
int currentEssence = SoulNetworkHandler.getCurrentEssence(owner);
|
||||
World world = ritualStone.getWorld();
|
||||
|
||||
if (world.getWorldTime() % 10 != 5) {
|
||||
if (world.getTotalWorldTime() % 10 != 5) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
+1
-1
@@ -69,7 +69,7 @@ public class RitualEffectFeatheredEarth extends RitualEffect // Nullifies all fa
|
||||
|
||||
SoulNetworkHandler.syphonFromNetwork(owner, this.getCostPerRefresh() * entityCount);
|
||||
|
||||
if (flag && world.getWorldTime() % costCooldown == 0) {
|
||||
if (flag && world.getTotalWorldTime() % costCooldown == 0) {
|
||||
if (hasTerrae) {
|
||||
this.canDrainReagent(ritualStone, ReagentRegistry.terraeReagent, terraeDrain, true);
|
||||
}
|
||||
|
||||
+1
-1
@@ -38,7 +38,7 @@ public class RitualEffectFeatheredKnife extends RitualEffect {
|
||||
|
||||
int timeDelay = hasPotentia ? 10 : 20;
|
||||
|
||||
if (world.getWorldTime() % timeDelay != 0) {
|
||||
if (world.getTotalWorldTime() % timeDelay != 0) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
@@ -62,7 +62,7 @@ public class RitualEffectFlight extends RitualEffect {
|
||||
entityCount++;
|
||||
}
|
||||
|
||||
if (entityCount > 0 && world.getWorldTime() % reagentCooldown == 0) {
|
||||
if (entityCount > 0 && world.getTotalWorldTime() % reagentCooldown == 0) {
|
||||
if (hasAether) {
|
||||
this.canDrainReagent(ritualStone, ReagentRegistry.aetherReagent, aetherDrain, true);
|
||||
}
|
||||
|
||||
+1
-1
@@ -31,7 +31,7 @@ public class RitualEffectFullStomach extends RitualEffect {
|
||||
int y = ritualStone.getYCoord();
|
||||
int z = ritualStone.getZCoord();
|
||||
|
||||
if (world.getWorldTime() % 20 != 0) {
|
||||
if (world.getTotalWorldTime() % 20 != 0) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
@@ -42,7 +42,7 @@ public class RitualEffectGrowth extends RitualEffect {
|
||||
boolean hasVirtus = this.canDrainReagent(ritualStone, ReagentRegistry.virtusReagent, virtusDrain, false);
|
||||
|
||||
int speed = this.getSpeedForReagents(hasTerrae, hasOrbisTerrae);
|
||||
if (world.getWorldTime() % speed != 0) {
|
||||
if (world.getTotalWorldTime() % speed != 0) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
@@ -40,7 +40,7 @@ public class RitualEffectHarvest extends RitualEffect {
|
||||
|
||||
entityOwner.addPotionEffect(new PotionEffect(Potion.confusion.id, 80));
|
||||
} else {
|
||||
if (world.getWorldTime() % 5 != 0) {
|
||||
if (world.getTotalWorldTime() % 5 != 0) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
@@ -35,7 +35,7 @@ public class RitualEffectHealing extends RitualEffect {
|
||||
|
||||
int timeDelay = 50;
|
||||
|
||||
if (world.getWorldTime() % timeDelay != 0) {
|
||||
if (world.getTotalWorldTime() % timeDelay != 0) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
+2
-2
@@ -100,14 +100,14 @@ public class RitualEffectInterdiction extends RitualEffect {
|
||||
|
||||
if (itemFlag) {
|
||||
flag = true;
|
||||
if (world.getWorldTime() % aetherDrainRate == 0) {
|
||||
if (world.getTotalWorldTime() % aetherDrainRate == 0) {
|
||||
this.canDrainReagent(ritualStone, ReagentRegistry.aetherReagent, aetherDrain, true);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (world.getWorldTime() % 2 == 0 && flag) {
|
||||
if (world.getTotalWorldTime() % 2 == 0 && flag) {
|
||||
SoulNetworkHandler.syphonFromNetwork(owner, getCostPerRefresh());
|
||||
}
|
||||
}
|
||||
|
||||
+1
-1
@@ -39,7 +39,7 @@ public class RitualEffectItemRouting extends RitualEffect {
|
||||
int y = ritualStone.getYCoord();
|
||||
int z = ritualStone.getZCoord();
|
||||
|
||||
if (world.getWorldTime() % 20 != 0) {
|
||||
if (world.getTotalWorldTime() % 20 != 0) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
@@ -46,7 +46,7 @@ public class RitualEffectLava extends RitualEffect {
|
||||
&& SoulNetworkHandler.canSyphonFromOnlyNetwork(owner, fireFuseCost)) {
|
||||
boolean hasReductus = this
|
||||
.canDrainReagent(ritualStone, ReagentRegistry.reductusReagent, reductusDrain, false);
|
||||
boolean drainReductus = world.getWorldTime() % 100 == 0;
|
||||
boolean drainReductus = world.getTotalWorldTime() % 100 == 0;
|
||||
|
||||
int range = 5;
|
||||
List<EntityLivingBase> entityList = SpellHelper
|
||||
|
||||
@@ -18,10 +18,15 @@ import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper;
|
||||
|
||||
public class RitualEffectLeap extends RitualEffect {
|
||||
|
||||
// Throws mobs with twice the horizontal speed
|
||||
public static final int aetherDrain = 10;
|
||||
// Throws mobs with half the vertical speed
|
||||
public static final int terraeDrain = 10;
|
||||
// Grants 3 seconds of fall immunity
|
||||
public static final int reductusDrain = 10;
|
||||
// Only throws adults (and non-sneaking players)
|
||||
public static final int tenebraeDrain = 10;
|
||||
// Only throws babies (and non-sneaking players)
|
||||
public static final int sanctusDrain = 10;
|
||||
|
||||
@Override
|
||||
@@ -39,152 +44,107 @@ public class RitualEffectLeap extends RitualEffect {
|
||||
List<EntityLivingBase> livingList = SpellHelper
|
||||
.getLivingEntitiesInRange(world, x + 0.5, y + 0.5, z + 0.5, range, range);
|
||||
|
||||
if (livingList == null) {
|
||||
if (livingList == null || livingList.isEmpty()) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (currentEssence < this.getCostPerRefresh() * livingList.size()) {
|
||||
SoulNetworkHandler.causeNauseaToPlayer(owner);
|
||||
} else {
|
||||
boolean hasAether = this.canDrainReagent(ritualStone, ReagentRegistry.aetherReagent, aetherDrain, false);
|
||||
boolean hasTerrae = this.canDrainReagent(ritualStone, ReagentRegistry.terraeReagent, terraeDrain, false);
|
||||
boolean hasReductus = this
|
||||
.canDrainReagent(ritualStone, ReagentRegistry.reductusReagent, reductusDrain, false);
|
||||
boolean hasTenebrae = this
|
||||
.canDrainReagent(ritualStone, ReagentRegistry.tenebraeReagent, tenebraeDrain, false);
|
||||
boolean hasSanctus = this.canDrainReagent(ritualStone, ReagentRegistry.sanctusReagent, sanctusDrain, false);
|
||||
return;
|
||||
}
|
||||
|
||||
int direction = ritualStone.getDirection();
|
||||
boolean hasAether = true;
|
||||
boolean hasTerrae = true;
|
||||
boolean hasReductus = true;
|
||||
boolean hasTenebrae = true;
|
||||
boolean hasSanctus = true;
|
||||
|
||||
int flag = 0;
|
||||
int direction = ritualStone.getDirection();
|
||||
|
||||
for (EntityLivingBase livingEntity : livingList) {
|
||||
if (livingEntity.isSneaking()) {
|
||||
continue;
|
||||
int count = 0;
|
||||
|
||||
for (EntityLivingBase livingEntity : livingList) {
|
||||
if (livingEntity.isSneaking()) {
|
||||
continue;
|
||||
}
|
||||
|
||||
hasReductus = hasReductus
|
||||
&& this.canDrainReagent(ritualStone, ReagentRegistry.reductusReagent, reductusDrain, false);
|
||||
hasTenebrae = hasTenebrae
|
||||
&& this.canDrainReagent(ritualStone, ReagentRegistry.tenebraeReagent, tenebraeDrain, false);
|
||||
hasSanctus = hasSanctus
|
||||
&& this.canDrainReagent(ritualStone, ReagentRegistry.sanctusReagent, sanctusDrain, false);
|
||||
|
||||
// Sanctus only makes it work on children and tenebrae only with adults.
|
||||
// Both being present prevents the ritual from working for any NPCs.
|
||||
if (((hasSanctus && !livingEntity.isChild()) || (hasTenebrae && livingEntity.isChild()))
|
||||
&& !(livingEntity instanceof EntityPlayer)) {
|
||||
continue;
|
||||
}
|
||||
|
||||
hasAether = hasAether
|
||||
&& this.canDrainReagent(ritualStone, ReagentRegistry.aetherReagent, aetherDrain, true);
|
||||
hasTerrae = hasTerrae
|
||||
&& this.canDrainReagent(ritualStone, ReagentRegistry.terraeReagent, terraeDrain, true);
|
||||
|
||||
double motionY = hasTerrae ? 0.6 : 1.2;
|
||||
double speed = hasAether ? 6.0 : 3.0;
|
||||
livingEntity.motionY = motionY;
|
||||
livingEntity.fallDistance = 0;
|
||||
count++;
|
||||
|
||||
if (livingEntity instanceof EntityPlayer) {
|
||||
switch (direction) {
|
||||
case 1:
|
||||
SpellHelper.setPlayerSpeedFromServer((EntityPlayer) livingEntity, 0, motionY, -speed);
|
||||
break;
|
||||
case 2:
|
||||
SpellHelper.setPlayerSpeedFromServer((EntityPlayer) livingEntity, speed, motionY, 0);
|
||||
break;
|
||||
case 3:
|
||||
SpellHelper.setPlayerSpeedFromServer((EntityPlayer) livingEntity, 0, motionY, speed);
|
||||
break;
|
||||
case 4:
|
||||
SpellHelper.setPlayerSpeedFromServer((EntityPlayer) livingEntity, -speed, motionY, 0);
|
||||
break;
|
||||
}
|
||||
} else {
|
||||
switch (direction) {
|
||||
case 1:
|
||||
livingEntity.motionX = 0.0;
|
||||
livingEntity.motionZ = -speed;
|
||||
break;
|
||||
case 2:
|
||||
livingEntity.motionX = speed;
|
||||
livingEntity.motionZ = 0.0;
|
||||
break;
|
||||
case 3:
|
||||
livingEntity.motionX = 0.0;
|
||||
livingEntity.motionZ = speed;
|
||||
break;
|
||||
case 4:
|
||||
livingEntity.motionX = -speed;
|
||||
livingEntity.motionZ = 0.0;
|
||||
break;
|
||||
}
|
||||
|
||||
hasAether = hasAether
|
||||
&& this.canDrainReagent(ritualStone, ReagentRegistry.aetherReagent, aetherDrain, false);
|
||||
hasTerrae = hasTerrae
|
||||
&& this.canDrainReagent(ritualStone, ReagentRegistry.terraeReagent, terraeDrain, false);
|
||||
hasReductus = hasReductus
|
||||
&& this.canDrainReagent(ritualStone, ReagentRegistry.reductusReagent, reductusDrain, false);
|
||||
hasTenebrae = hasTenebrae
|
||||
&& this.canDrainReagent(ritualStone, ReagentRegistry.tenebraeReagent, tenebraeDrain, false);
|
||||
hasSanctus = hasSanctus
|
||||
&& this.canDrainReagent(ritualStone, ReagentRegistry.sanctusReagent, sanctusDrain, false);
|
||||
|
||||
double motionY = hasTerrae ? 0.6 : 1.2;
|
||||
double speed = hasAether ? 6.0 : 3.0;
|
||||
|
||||
if (!(hasTenebrae || hasSanctus) || livingEntity instanceof EntityPlayer) {
|
||||
livingEntity.motionY = motionY;
|
||||
livingEntity.fallDistance = 0;
|
||||
|
||||
if (livingEntity instanceof EntityPlayer) {
|
||||
switch (direction) {
|
||||
case 1:
|
||||
SpellHelper.setPlayerSpeedFromServer((EntityPlayer) livingEntity, 0, motionY, -speed);
|
||||
break;
|
||||
|
||||
case 2:
|
||||
SpellHelper.setPlayerSpeedFromServer((EntityPlayer) livingEntity, speed, motionY, 0);
|
||||
break;
|
||||
|
||||
case 3:
|
||||
SpellHelper.setPlayerSpeedFromServer((EntityPlayer) livingEntity, 0, motionY, speed);
|
||||
break;
|
||||
|
||||
case 4:
|
||||
SpellHelper.setPlayerSpeedFromServer((EntityPlayer) livingEntity, -speed, motionY, 0);
|
||||
break;
|
||||
}
|
||||
} else {
|
||||
livingEntity.motionY = motionY;
|
||||
|
||||
switch (direction) {
|
||||
case 1:
|
||||
livingEntity.motionX = 0.0;
|
||||
livingEntity.motionZ = -speed;
|
||||
break;
|
||||
|
||||
case 2:
|
||||
livingEntity.motionX = speed;
|
||||
livingEntity.motionZ = 0.0;
|
||||
break;
|
||||
|
||||
case 3:
|
||||
livingEntity.motionX = 0.0;
|
||||
livingEntity.motionZ = -speed;
|
||||
break;
|
||||
|
||||
case 4:
|
||||
livingEntity.motionX = -speed;
|
||||
livingEntity.motionZ = 0.0;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
flag++;
|
||||
} else {
|
||||
if ((hasSanctus && !livingEntity.isChild()) || (hasTenebrae && livingEntity.isChild())) {
|
||||
continue;
|
||||
}
|
||||
|
||||
livingEntity.motionY = motionY;
|
||||
|
||||
switch (direction) {
|
||||
case 1:
|
||||
livingEntity.motionX = 0.0;
|
||||
livingEntity.motionZ = -speed;
|
||||
break;
|
||||
|
||||
case 2:
|
||||
livingEntity.motionX = speed;
|
||||
livingEntity.motionZ = 0.0;
|
||||
break;
|
||||
|
||||
case 3:
|
||||
livingEntity.motionX = 0.0;
|
||||
livingEntity.motionZ = -speed;
|
||||
break;
|
||||
|
||||
case 4:
|
||||
livingEntity.motionX = -speed;
|
||||
livingEntity.motionZ = 0.0;
|
||||
break;
|
||||
}
|
||||
|
||||
if (hasTenebrae) {
|
||||
this.canDrainReagent(ritualStone, ReagentRegistry.tenebraeReagent, tenebraeDrain, true);
|
||||
}
|
||||
if (hasSanctus) {
|
||||
this.canDrainReagent(ritualStone, ReagentRegistry.sanctusReagent, sanctusDrain, true);
|
||||
}
|
||||
|
||||
livingEntity.fallDistance = 0;
|
||||
flag++;
|
||||
}
|
||||
|
||||
if (hasAether) {
|
||||
this.canDrainReagent(ritualStone, ReagentRegistry.aetherReagent, aetherDrain, true);
|
||||
}
|
||||
if (hasTerrae) {
|
||||
this.canDrainReagent(ritualStone, ReagentRegistry.terraeReagent, terraeDrain, true);
|
||||
}
|
||||
if (hasReductus) {
|
||||
if (!livingEntity.isPotionActive(AlchemicalWizardry.customPotionFeatherFall)) {
|
||||
livingEntity.addPotionEffect(
|
||||
new PotionEffect(AlchemicalWizardry.customPotionFeatherFall.id, 3 * 20, 0));
|
||||
this.canDrainReagent(ritualStone, ReagentRegistry.reductusReagent, reductusDrain, true);
|
||||
}
|
||||
if (hasTenebrae) {
|
||||
this.canDrainReagent(ritualStone, ReagentRegistry.tenebraeReagent, tenebraeDrain, true);
|
||||
} else if (hasSanctus) {
|
||||
this.canDrainReagent(ritualStone, ReagentRegistry.sanctusReagent, sanctusDrain, true);
|
||||
}
|
||||
}
|
||||
|
||||
if (flag > 0) {
|
||||
SoulNetworkHandler.syphonFromNetwork(owner, this.getCostPerRefresh() * flag);
|
||||
if (hasReductus && !livingEntity.isPotionActive(AlchemicalWizardry.customPotionFeatherFall)) {
|
||||
livingEntity
|
||||
.addPotionEffect(new PotionEffect(AlchemicalWizardry.customPotionFeatherFall.id, 3 * 20, 0));
|
||||
this.canDrainReagent(ritualStone, ReagentRegistry.reductusReagent, reductusDrain, true);
|
||||
}
|
||||
}
|
||||
|
||||
if (count > 0) {
|
||||
SoulNetworkHandler.syphonFromNetwork(owner, this.getCostPerRefresh() * count);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -194,7 +154,7 @@ public class RitualEffectLeap extends RitualEffect {
|
||||
|
||||
@Override
|
||||
public List<RitualComponent> getRitualComponentList() {
|
||||
ArrayList<RitualComponent> leapingRitual = new ArrayList();
|
||||
ArrayList<RitualComponent> leapingRitual = new ArrayList<>();
|
||||
leapingRitual.add(new RitualComponent(0, 0, -2, RitualComponent.DUSK));
|
||||
leapingRitual.add(new RitualComponent(1, 0, -1, RitualComponent.AIR));
|
||||
leapingRitual.add(new RitualComponent(-1, 0, -1, RitualComponent.AIR));
|
||||
|
||||
@@ -68,7 +68,7 @@ public class RitualEffectMagnetic extends RitualEffect {
|
||||
|
||||
boolean hasPotentia = this.canDrainReagent(ritualStone, ReagentRegistry.potentiaReagent, potentiaDrain, false);
|
||||
|
||||
if (world.getWorldTime() % (hasPotentia ? 10 : 40) != 0) {
|
||||
if (world.getTotalWorldTime() % (hasPotentia ? 10 : 40) != 0) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
+1
-1
@@ -31,7 +31,7 @@ public class RitualEffectOmegaStalling extends RitualEffect {
|
||||
int y = ritualStone.getYCoord();
|
||||
int z = ritualStone.getZCoord();
|
||||
|
||||
if (world.getWorldTime() % 20 != 0) {
|
||||
if (world.getTotalWorldTime() % 20 != 0) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
+1
-1
@@ -46,7 +46,7 @@ public class RitualEffectOmegaTest extends RitualEffect {
|
||||
int y = ritualStone.getYCoord();
|
||||
int z = ritualStone.getZCoord();
|
||||
|
||||
if (world.getWorldTime() % 200 != 0) {
|
||||
if (world.getTotalWorldTime() % 200 != 0) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
+1
-1
@@ -40,7 +40,7 @@ public class RitualEffectSphereCreator extends RitualEffect {
|
||||
// boolean hasPotentia = this.canDrainReagent(ritualStone, ReagentRegistry.potentiaReagent,
|
||||
// potentiaDrain, false);
|
||||
|
||||
if (world.getWorldTime() % 1 != 0) {
|
||||
if (world.getTotalWorldTime() % 1 != 0) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
+13
-2
@@ -5,6 +5,7 @@ import java.util.List;
|
||||
|
||||
import net.minecraft.entity.item.EntityItem;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.potion.Potion;
|
||||
import net.minecraft.potion.PotionEffect;
|
||||
import net.minecraft.util.AxisAlignedBB;
|
||||
@@ -45,7 +46,10 @@ public class RitualEffectSummonMeteor extends RitualEffect {
|
||||
|
||||
for (EntityItem entityItem : entities) {
|
||||
if (entityItem != null && MeteorRegistry.isValidMeteorFocusItem(entityItem.getEntityItem())) {
|
||||
int meteorID = MeteorRegistry.getMeteorIDForItem(entityItem.getEntityItem());
|
||||
ItemStack stack = entityItem.getEntityItem();
|
||||
if (stack == null || stack.stackSize <= 0) continue;
|
||||
|
||||
int meteorID = MeteorRegistry.getMeteorIDForItem(stack);
|
||||
int cost = MeteorRegistry.meteorList.get(meteorID).cost;
|
||||
|
||||
if (currentEssence < cost) {
|
||||
@@ -63,7 +67,14 @@ public class RitualEffectSummonMeteor extends RitualEffect {
|
||||
}
|
||||
}
|
||||
|
||||
entityItem.setDead();
|
||||
stack.stackSize--;
|
||||
|
||||
if (stack.stackSize <= 0) {
|
||||
world.removeEntity(entityItem);
|
||||
} else {
|
||||
entityItem.setEntityItemStack(stack);
|
||||
}
|
||||
|
||||
world.spawnEntityInWorld(meteor);
|
||||
ritualStone.setActive(false);
|
||||
SoulNetworkHandler.syphonFromNetwork(owner, cost);
|
||||
|
||||
+2
-2
@@ -44,7 +44,7 @@ public class RitualEffectSupression extends RitualEffect {
|
||||
int radius = this.getRadiusForReagents(hasAether, hasAquasalus);
|
||||
int masterRadius = radius;
|
||||
|
||||
int yIndex = (int) (world.getWorldTime() % (2 * radius + 1)) - radius;
|
||||
int yIndex = (int) (world.getTotalWorldTime() % (2 * radius + 1)) - radius;
|
||||
boolean expansion = false;
|
||||
|
||||
if (ritualStone.getVar1() < (radius + 1)) {
|
||||
@@ -86,7 +86,7 @@ public class RitualEffectSupression extends RitualEffect {
|
||||
|
||||
SoulNetworkHandler.syphonFromNetwork(owner, this.getCostPerRefresh() * costMod);
|
||||
|
||||
if (world.getWorldTime() % 100 == 0) {
|
||||
if (world.getTotalWorldTime() % 100 == 0) {
|
||||
if (hasAquasalus) {
|
||||
this.canDrainReagent(ritualStone, ReagentRegistry.aquasalusReagent, aquasalusDrain, true);
|
||||
}
|
||||
|
||||
@@ -66,7 +66,7 @@ public class RitualEffectWater extends RitualEffect {
|
||||
if (hasOffensa) {
|
||||
boolean hasReductus = this
|
||||
.canDrainReagent(ritualStone, ReagentRegistry.reductusReagent, reductusDrain, false);
|
||||
boolean drainReductus = world.getWorldTime() % 100 == 0;
|
||||
boolean drainReductus = world.getTotalWorldTime() % 100 == 0;
|
||||
|
||||
int range = 10;
|
||||
List<Entity> list = SpellHelper.getEntitiesInRange(world, x + 0.5, y + 0.5, z + 0.5, range, range);
|
||||
|
||||
+1
-1
@@ -35,7 +35,7 @@ public class RitualEffectWellOfSuffering extends RitualEffect {
|
||||
int y = ritualStone.getYCoord();
|
||||
int z = ritualStone.getZCoord();
|
||||
|
||||
if (world.getWorldTime() % timeDelay != 0) {
|
||||
if (world.getTotalWorldTime() % timeDelay != 0) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
+46
@@ -0,0 +1,46 @@
|
||||
package WayofTime.alchemicalWizardry.common.summoning.meteor;
|
||||
|
||||
import java.io.IOException;
|
||||
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
||||
import com.google.gson.TypeAdapter;
|
||||
import com.google.gson.stream.JsonReader;
|
||||
import com.google.gson.stream.JsonWriter;
|
||||
|
||||
import WayofTime.alchemicalWizardry.AlchemicalWizardry;
|
||||
import cpw.mods.fml.common.registry.GameRegistry;
|
||||
|
||||
class ItemStackAdapter extends TypeAdapter<ItemStack> {
|
||||
|
||||
@Override
|
||||
public ItemStack read(JsonReader reader) throws IOException {
|
||||
String str = reader.nextString();
|
||||
String[] input = str.split(":");
|
||||
if (input.length < 2) {
|
||||
AlchemicalWizardry.logger
|
||||
.warn("Unable to read item stack \"{}\". Valid format is \"modid:name(:meta optional)\"", str);
|
||||
return null;
|
||||
}
|
||||
ItemStack itemStack = GameRegistry.findItemStack(input[0], input[1], 1);
|
||||
if (itemStack == null) {
|
||||
AlchemicalWizardry.logger.warn("Unable to find item stack \"{}\".", str);
|
||||
return null;
|
||||
}
|
||||
if (input.length < 3) {
|
||||
return itemStack;
|
||||
}
|
||||
try {
|
||||
itemStack.setItemDamage(Integer.parseInt(input[2]));
|
||||
} catch (NumberFormatException e) {
|
||||
AlchemicalWizardry.logger
|
||||
.warn("Invalid metadata value {} for item stack {}:{}", input[2], input[0], input[1]);
|
||||
}
|
||||
return itemStack;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void write(JsonWriter writer, ItemStack mpc) throws IOException {
|
||||
// Not implemented because it is not needed.
|
||||
}
|
||||
}
|
||||
@@ -8,7 +8,6 @@ import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Random;
|
||||
|
||||
import net.minecraft.init.Items;
|
||||
import net.minecraft.item.ItemBlock;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
@@ -27,7 +26,7 @@ public class Meteor {
|
||||
public int radius;
|
||||
public int cost;
|
||||
public float fillerChance; // Out of 100.0
|
||||
public transient ItemStack focusItem;
|
||||
public ItemStack focusItem;
|
||||
private String focusModId;
|
||||
private String focusName;
|
||||
private int focusMeta;
|
||||
@@ -203,13 +202,17 @@ public class Meteor {
|
||||
}
|
||||
|
||||
/**
|
||||
* Construct the focus item for this meteor from its modid, name, and metadata
|
||||
* Construct the focus item for this meteor from its modid, name, and metadata if using the old config format.
|
||||
*/
|
||||
private void buildFocusItem() {
|
||||
if (this.focusItem != null) return;
|
||||
this.focusItem = GameRegistry.findItemStack(this.focusModId, this.focusName, 1);
|
||||
if (this.focusItem == null) return;
|
||||
Items.feather.setDamage(this.focusItem, this.focusMeta);
|
||||
this.focusItem.setItemDamage(this.focusMeta);
|
||||
AlchemicalWizardry.logger.warn(
|
||||
"Setting focusModId, focusName, and focusMeta individually in meteor"
|
||||
+ "configs has been deprecated. Set \"focusItem\" with format \"modId:name(:meta optional)\""
|
||||
+ " instead.");
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
+1
-1
@@ -14,7 +14,7 @@ class MeteorComponentAdapter extends TypeAdapter<MeteorComponent> {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void write(JsonWriter writer, MeteorComponent mpc) throws IOException {
|
||||
public void write(JsonWriter writer, MeteorComponent component) throws IOException {
|
||||
// Not implemented because it is not needed.
|
||||
}
|
||||
}
|
||||
+2
-1
@@ -24,7 +24,8 @@ public class MeteorRegistry {
|
||||
|
||||
public static void loadConfig() {
|
||||
Gson gson = new GsonBuilder().setPrettyPrinting()
|
||||
.registerTypeAdapter(MeteorComponent.class, new MeteorComponentAdapter()).create();
|
||||
.registerTypeAdapter(MeteorComponent.class, new MeteorComponentAdapter())
|
||||
.registerTypeAdapter(ItemStack.class, new ItemStackAdapter()).create();
|
||||
File file = new File("config/BloodMagic/meteors");
|
||||
File[] files = file.listFiles();
|
||||
if (files != null) {
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
package WayofTime.alchemicalWizardry.common.tileEntity;
|
||||
|
||||
import java.text.NumberFormat;
|
||||
import java.util.List;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
@@ -941,13 +940,16 @@ public class TEAltar extends TEInventory implements IFluidTank, IFluidHandler, I
|
||||
|
||||
public void sendChatInfoToPlayer(EntityPlayer player) {
|
||||
player.addChatMessage(
|
||||
new ChatComponentTranslation(String.format("message.altar.currentessence"), this.fluid.amount));
|
||||
new ChatComponentText(
|
||||
StatCollector.translateToLocalFormatted("message.altar.currentessence", this.fluid.amount)));
|
||||
player.addChatMessage(
|
||||
new ChatComponentText(
|
||||
StatCollector.translateToLocalFormatted(
|
||||
"message.altar.currenttier",
|
||||
UpgradedAltars.isAltarValid(worldObj, xCoord, yCoord, zCoord))));
|
||||
player.addChatMessage(
|
||||
new ChatComponentTranslation(
|
||||
String.format("message.altar.currenttier"),
|
||||
UpgradedAltars.isAltarValid(worldObj, xCoord, yCoord, zCoord)));
|
||||
player.addChatMessage(
|
||||
new ChatComponentTranslation(String.format("message.altar.capacity"), this.getCapacity()));
|
||||
StatCollector.translateToLocalFormatted("message.altar.capacity", this.getCapacity())));
|
||||
}
|
||||
|
||||
public void sendMoreChatInfoToPlayer(EntityPlayer player) {
|
||||
@@ -955,23 +957,25 @@ public class TEAltar extends TEInventory implements IFluidTank, IFluidHandler, I
|
||||
int stackSize = getStackInSlot(0).stackSize;
|
||||
player.addChatMessage(
|
||||
new ChatComponentText(
|
||||
StatCollector.translateToLocal("message.altar.progress") + " "
|
||||
+ progress
|
||||
+ "LP/"
|
||||
+ liquidRequired * stackSize
|
||||
+ "LP"));
|
||||
StatCollector.translateToLocalFormatted(
|
||||
"message.altar.progress",
|
||||
progress,
|
||||
liquidRequired * stackSize)));
|
||||
player.addChatMessage(
|
||||
new ChatComponentText(
|
||||
StatCollector.translateToLocal("message.altar.consumptionrate") + " "
|
||||
+ (int) (consumptionRate * (1 + consumptionMultiplier))
|
||||
+ "LP/t"));
|
||||
StatCollector.translateToLocalFormatted(
|
||||
"message.altar.consumptionrate",
|
||||
(int) (consumptionRate * (1 + consumptionMultiplier)))));
|
||||
}
|
||||
player.addChatMessage(
|
||||
new ChatComponentTranslation(String.format("message.altar.currentessence"), this.fluid.amount));
|
||||
new ChatComponentText(
|
||||
StatCollector.translateToLocalFormatted("message.altar.currentessence", this.fluid.amount)));
|
||||
player.addChatMessage(
|
||||
new ChatComponentTranslation(String.format("message.altar.inputtank"), this.fluidInput.amount));
|
||||
new ChatComponentText(
|
||||
StatCollector.translateToLocalFormatted("message.altar.inputtank", this.fluidInput.amount)));
|
||||
player.addChatMessage(
|
||||
new ChatComponentTranslation(String.format("message.altar.outputtank"), this.fluidOutput.amount));
|
||||
new ChatComponentText(
|
||||
StatCollector.translateToLocalFormatted("message.altar.outputtank", this.fluidOutput.amount)));
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -988,26 +992,27 @@ public class TEAltar extends TEInventory implements IFluidTank, IFluidHandler, I
|
||||
return;
|
||||
|
||||
final NBTTagCompound altarData = accessor.getNBTData().getCompoundTag("altar");
|
||||
final NumberFormat numberFormat = NumberFormat.getIntegerInstance();
|
||||
|
||||
if (altarData.hasKey("stored")) {
|
||||
currenttip.add(
|
||||
StatCollector.translateToLocal("tooltip.waila.currentFluid")
|
||||
+ numberFormat.format(altarData.getInteger("stored")));
|
||||
StatCollector
|
||||
.translateToLocalFormatted("tooltip.waila.currentFluid", altarData.getInteger("stored")));
|
||||
} else {
|
||||
currenttip.add(StatCollector.translateToLocal("tooltip.waila.noFluid"));
|
||||
}
|
||||
|
||||
currenttip.add(
|
||||
StatCollector.translateToLocal("tooltip.waila.altarCapacity")
|
||||
+ numberFormat.format(altarData.getInteger("capacity")));
|
||||
currenttip.add(StatCollector.translateToLocal("tooltip.waila.tier") + altarData.getInteger("tier"));
|
||||
StatCollector
|
||||
.translateToLocalFormatted("tooltip.waila.altarCapacity", altarData.getInteger("capacity")));
|
||||
currenttip.add(StatCollector.translateToLocalFormatted("tooltip.waila.tier", altarData.getInteger("tier")));
|
||||
|
||||
if (altarData.hasKey("progress")) {
|
||||
currenttip.add(
|
||||
StatCollector.translateToLocal("tooltip.waila.altarProgress") + altarData.getInteger("progress")
|
||||
+ "%");
|
||||
currenttip.add(StatCollector.translateToLocal("tooltip.waila.crafting") + altarData.getString("crafting"));
|
||||
StatCollector.translateToLocalFormatted(
|
||||
"tooltip.waila.altarProgress",
|
||||
altarData.getInteger("progress")));
|
||||
currenttip.add(
|
||||
StatCollector.translateToLocalFormatted("tooltip.waila.crafting", altarData.getString("crafting")));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -733,10 +733,11 @@ public class TEWritingTable extends TEInventory implements ISidedInventory, IBlo
|
||||
final NBTTagCompound tag = accessor.getNBTData();
|
||||
final int curProgress = tag.getInteger("progress");
|
||||
if (curProgress > 0) {
|
||||
currenttip.add(StatCollector.translateToLocal("tooltip.waila.altarProgress") + curProgress + "%");
|
||||
currenttip.add(StatCollector.translateToLocalFormatted("tooltip.waila.chemistrySetProgress", curProgress));
|
||||
}
|
||||
if (tag.hasKey("crafting")) {
|
||||
currenttip.add(StatCollector.translateToLocal("tooltip.waila.crafting") + tag.getString("crafting"));
|
||||
currenttip
|
||||
.add(StatCollector.translateToLocalFormatted("tooltip.waila.crafting", tag.getString("crafting")));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -525,13 +525,13 @@ tooltip.routingFocus.desc=A focus used to route items
|
||||
tooltip.alchemy.usedinincense=Purifying incense used in a crucible
|
||||
|
||||
#Messages
|
||||
message.altar.capacity=Capacity: %s LP
|
||||
message.altar.consumptionrate=Consumption Rate:
|
||||
message.altar.currentessence=Altar's Current Essence: %s LP
|
||||
message.altar.capacity=Capacity: %,d LP
|
||||
message.altar.consumptionrate=Consumption Rate: %,d LP/t
|
||||
message.altar.currentessence=Altar's Current Essence: %,d LP
|
||||
message.altar.currenttier=Altar's Current Tier: %s
|
||||
message.altar.progress=Altar's Progress:
|
||||
message.altar.inputtank= Input Tank: %s LP
|
||||
message.altar.outputtank= Output Tank: %s LP
|
||||
message.altar.progress=Altar's Progress: %,d LP / %,d LP
|
||||
message.altar.inputtank= Input Tank: %,d LP
|
||||
message.altar.outputtank= Output Tank: %,d LP
|
||||
message.altar.hunger=[BM] Your high regeneration rate has caused you to become hungry...
|
||||
message.attunedcrystal.clearing=Clearing saved container...
|
||||
message.attunedcrystal.error.cannotfind=Can no longer find linked container.
|
||||
@@ -543,9 +543,9 @@ message.attunedcrystal.setto=Attuned Crystal now set to:
|
||||
message.demon.shallfollow=I shall follow and protect you!
|
||||
message.demon.willstay=I will stay here for now, Master.
|
||||
message.destinationclearer.cleared=Destination list now cleared.
|
||||
message.divinationsigil.amount=Amount:
|
||||
message.divinationsigil.currentessence=Current Essence:
|
||||
message.divinationsigil.reagent=Reagent:
|
||||
message.divinationsigil.amount=Amount: %,d AR
|
||||
message.divinationsigil.currentessence=Current Essence: %,d LP
|
||||
message.divinationsigil.reagent=Reagent: %s
|
||||
message.orb.currenttier=Current Tier: %d
|
||||
message.masterstone.crystalvibrates=Your crystal vibrates pathetically.
|
||||
message.masterstone.energyflows=A rush of energy flows through the ritual!
|
||||
@@ -624,13 +624,13 @@ bm.versioning.downloadingAlready=It's downloading! Be patient!
|
||||
bm.versioning.disabled=This feature is disabled.
|
||||
|
||||
# Waila localizations
|
||||
tooltip.waila.currentFluid=Life Essence:
|
||||
tooltip.waila.currentFluid=Life Essence: %,d
|
||||
tooltip.waila.noFluid=There is no Life Essence in the altar
|
||||
tooltip.waila.tier=Altar Tier:
|
||||
tooltip.waila.altarProgress=Altar Progress:
|
||||
tooltip.waila.crafting=Crafting:
|
||||
tooltip.waila.altarCapacity=Altar Capacity:
|
||||
tooltip.waila.chemistrySetProgress=Item Progress:
|
||||
tooltip.waila.tier=Altar Tier: %d
|
||||
tooltip.waila.altarProgress=Altar Progress: %d%%
|
||||
tooltip.waila.crafting=Crafting: %s
|
||||
tooltip.waila.altarCapacity=Altar Capacity: %,d
|
||||
tooltip.waila.chemistrySetProgress=Item Progress: %d%%
|
||||
tooltip.waila.owner=Owner:
|
||||
tooltip.waila.ritualString=Current Ritual:
|
||||
tooltip.waila.active=Ritual Active
|
||||
|
||||
@@ -416,13 +416,13 @@ tooltip.routingFocus.limit=Лимит:
|
||||
tooltip.routingFocus.desc=Фокус, используемый для направления предметов
|
||||
|
||||
#Messages
|
||||
message.altar.capacity=Ёмкость: %s LP
|
||||
message.altar.consumptionrate=Скорость потребления:
|
||||
message.altar.currentessence=Текущая эссенция алтаря: %s LP
|
||||
message.altar.capacity=Ёмкость: %,d LP
|
||||
message.altar.consumptionrate=Скорость потребления: %,d LP/тик
|
||||
message.altar.currentessence=Текущая эссенция алтаря: %,d LP
|
||||
message.altar.currenttier=Текущий уровень алтаря: %s
|
||||
message.altar.progress=Прогресс алтаря:
|
||||
message.altar.inputtank= Резервуар для входа: %s LP
|
||||
message.altar.outputtank= Резервуар для выхода: %s LP
|
||||
message.altar.progress=Прогресс алтаря: %,d LP / %,d LP
|
||||
message.altar.inputtank= Резервуар для входа: %,d LP
|
||||
message.altar.outputtank= Резервуар для выхода: %,d LP
|
||||
message.altar.hunger=[BM] Из-за Вашего высокого уровня регенерации Вы проголодались...
|
||||
message.attunedcrystal.clearing=Очистка сохранённого контейнера...
|
||||
message.attunedcrystal.error.cannotfind=Не удалось найти соединённый контейнер.
|
||||
@@ -434,9 +434,9 @@ message.attunedcrystal.setto=Алхимический маршрутизатор
|
||||
message.demon.shallfollow=Я обещаю следовать за Вами и защищать!
|
||||
message.demon.willstay=Я буду стоять здесь, Хозяин.
|
||||
message.destinationclearer.cleared=Список назначения очищен.
|
||||
message.divinationsigil.amount=Количество:
|
||||
message.divinationsigil.currentessence=Текущая эссенция:
|
||||
message.divinationsigil.reagent=Реагент:
|
||||
message.divinationsigil.amount=Количество: %,d AR
|
||||
message.divinationsigil.currentessence=Текущая эссенция: %,d LP
|
||||
message.divinationsigil.reagent=Реагент: %s
|
||||
message.masterstone.crystalvibrates=Ваш кристалл жалобно вибрирует.
|
||||
message.masterstone.energyflows=Порыв потоков энергии проходит через ритуал!
|
||||
message.masterstone.nothinghappened=Ничего не происходит...
|
||||
|
||||
@@ -510,13 +510,13 @@ tooltip.routingFocus.desc=一个传送物件的核心
|
||||
tooltip.alchemy.usedinincense=用于香炉的精炼熏香粉末
|
||||
|
||||
#Messages
|
||||
message.altar.capacity=容量: %s LP
|
||||
message.altar.consumptionrate=消耗率:
|
||||
message.altar.currentessence=祭坛目前的生命本质: %s LP
|
||||
message.altar.capacity=容量: %,d LP
|
||||
message.altar.consumptionrate=消耗率: %,d LP/t
|
||||
message.altar.currentessence=祭坛目前的生命本质: %,d LP
|
||||
message.altar.currenttier=祭坛目前的层数: %s
|
||||
message.altar.progress=祭坛的进展:
|
||||
message.altar.inputtank= 输入槽: %s LP
|
||||
message.altar.outputtank= 输出槽: %s LP
|
||||
message.altar.progress=祭坛的进展: %,d LP / %,d LP
|
||||
message.altar.inputtank= 输入槽: %,d LP
|
||||
message.altar.outputtank= 输出槽: %,d LP
|
||||
message.altar.hunger=[BM] 你的高级再生效果使你变得饥饿...
|
||||
message.attunedcrystal.clearing=清除已保存的容器...
|
||||
message.attunedcrystal.error.cannotfind=无法找到连接的容器.
|
||||
@@ -528,9 +528,9 @@ message.attunedcrystal.setto=调整水晶设置为:
|
||||
message.demon.shallfollow=我将会跟随并且保护你!
|
||||
message.demon.willstay=我会在这待着的,主人.
|
||||
message.destinationclearer.cleared=目标列表已清除.
|
||||
message.divinationsigil.amount=数额:
|
||||
message.divinationsigil.currentessence=目前的生命本质:
|
||||
message.divinationsigil.reagent=炼金试剂:
|
||||
message.divinationsigil.amount=数额: %,d AR
|
||||
message.divinationsigil.currentessence=目前的生命本质: %,d LP
|
||||
message.divinationsigil.reagent=炼金试剂: %s
|
||||
message.orb.currenttier=当前等级: %d
|
||||
message.masterstone.crystalvibrates=你的水晶弱弱的振动着.
|
||||
message.masterstone.energyflows=一股能量流经这个仪式!
|
||||
|
||||
@@ -424,13 +424,13 @@ tooltip.routingFocus.desc=A focus used to route items
|
||||
tooltip.alchemy.usedinincense=Purifying incense used in a crucible
|
||||
|
||||
#Messages
|
||||
message.altar.capacity=Capacity: %s LP
|
||||
message.altar.consumptionrate=Consumption Rate:
|
||||
message.altar.currentessence=Altar's Current Essence: %s LP
|
||||
message.altar.capacity=Capacity: %,d LP
|
||||
message.altar.consumptionrate=Consumption Rate: %,d LP/t
|
||||
message.altar.currentessence=Altar's Current Essence: %,d LP
|
||||
message.altar.currenttier=Altar's Current Tier: %s
|
||||
message.altar.progress=Altar's Progress:
|
||||
message.altar.inputtank= Input Tank: %s LP
|
||||
message.altar.outputtank= Output Tank: %s LP
|
||||
message.altar.progress=Altar's Progress: %,d LP / %,d LP
|
||||
message.altar.inputtank= Input Tank: %,d LP
|
||||
message.altar.outputtank= Output Tank: %,d LP
|
||||
message.altar.hunger=[BM] Your high regeneration rate has caused you to become hungry...
|
||||
message.attunedcrystal.clearing=Clearing saved container...
|
||||
message.attunedcrystal.error.cannotfind=Can no longer find linked container.
|
||||
@@ -442,9 +442,9 @@ message.attunedcrystal.setto=Attuned Crystal now set to:
|
||||
message.demon.shallfollow=I shall follow and protect you!
|
||||
message.demon.willstay=I will stay here for now, Master.
|
||||
message.destinationclearer.cleared=Destination list now cleared.
|
||||
message.divinationsigil.amount=Amount:
|
||||
message.divinationsigil.currentessence=Current Essence:
|
||||
message.divinationsigil.reagent=Reagent:
|
||||
message.divinationsigil.amount=Amount: %,d AR
|
||||
message.divinationsigil.currentessence=Current Essence: %,d LP
|
||||
message.divinationsigil.reagent=Reagent: %s
|
||||
message.masterstone.crystalvibrates=Your crystal vibrates pathetically.
|
||||
message.masterstone.energyflows=A rush of energy flows through the ritual!
|
||||
message.masterstone.nothinghappened=Nothing appears to have happened...
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
Before Width: | Height: | Size: 720 B After Width: | Height: | Size: 3.3 KiB |
Reference in new issue
Block a user