mirror of
https://github.com/GTNewHorizons/BloodMagic.git
synced 2026-11-27 07:13:14 +00:00
Compare commits
35
Commits
1.7.33-pre
..
1.8.7
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
ee083ddf64 | ||
|
|
8e6d033785 | ||
|
|
8515558404 | ||
|
|
167d2104ed | ||
|
|
32666ac5ff | ||
|
|
49b1d051e8 | ||
|
|
65acf4c4b0 | ||
|
|
c89a320168 | ||
|
|
28d7b599f8 | ||
|
|
8bb7b1dd9b | ||
|
|
f6e054ccb0 | ||
|
|
7de1a553bc | ||
|
|
ba7de9e090 | ||
|
|
291218c2aa | ||
|
|
077af85b4b | ||
|
|
efdfec3945 | ||
|
|
6be1470620 | ||
|
|
df7a14a323 | ||
|
|
b6400fca87 | ||
|
|
71e82d0b6e | ||
|
|
72ba898f39 | ||
|
|
9d18a56cc1 | ||
|
|
2c71765a1b | ||
|
|
fc86b1449c | ||
|
|
548dc50ef5 | ||
|
|
a7f4a16763 | ||
|
|
503bb8f779 | ||
|
|
6acfde965a | ||
|
|
b7460516e8 | ||
|
|
782096f8eb | ||
|
|
b79692d27f | ||
|
|
73ae391e8a | ||
|
|
1f5a267be0 | ||
|
|
46de8cb05c | ||
|
|
8799a637f8 |
No files matched your search
+8
-8
@@ -23,16 +23,16 @@
|
||||
*/
|
||||
|
||||
dependencies {
|
||||
api("com.github.GTNewHorizons:waila:1.8.7:dev")
|
||||
api("com.github.GTNewHorizons:NotEnoughItems:2.7.49-GTNH:dev")
|
||||
api("com.github.GTNewHorizons:waila:1.9.2:dev")
|
||||
api("com.github.GTNewHorizons:NotEnoughItems:2.8.15-GTNH:dev")
|
||||
|
||||
compileOnly("com.github.GTNewHorizons:GT5-Unofficial:5.09.51.324:dev") {transitive = false }
|
||||
compileOnly("com.github.GTNewHorizons:GT5-Unofficial:5.09.52.45:dev") {transitive = false }
|
||||
|
||||
compileOnly("com.github.GTNewHorizons:Botania:1.12.10-GTNH:api") {transitive = false }
|
||||
compileOnly("com.github.GTNewHorizons:ForestryMC:4.10.10:api") {transitive = false }
|
||||
compileOnly("com.github.GTNewHorizons:ForgeMultipart:1.6.3:dev") {transitive = false }
|
||||
compileOnly("com.github.GTNewHorizons:Botania:1.13.3-GTNH:api") {transitive = false }
|
||||
compileOnly("com.github.GTNewHorizons:ForestryMC:4.10.17:api") {transitive = false }
|
||||
compileOnly("com.github.GTNewHorizons:ForgeMultipart:1.6.8:dev") {transitive = false }
|
||||
|
||||
compileOnly("com.github.GTNewHorizons:Chisel:2.16.4-GTNH:api") {transitive = false }
|
||||
compileOnly("com.github.GTNewHorizons:Chisel:2.17.0-GTNH:api") {transitive = false }
|
||||
|
||||
compileOnly("com.github.GTNewHorizons:ZenScript:1.0.0-GTNH") {transitive = false }
|
||||
compileOnly("com.github.GTNewHorizons:CraftTweaker:3.4.2:dev") {transitive = false }
|
||||
@@ -40,5 +40,5 @@ dependencies {
|
||||
compileOnly("thaumcraft:Thaumcraft:1.7.10-4.2.3.5:dev") {transitive = false }
|
||||
compileOnly("curse.maven:guide-api-228832:2287185") {transitive = false }
|
||||
|
||||
compileOnly("com.github.GTNewHorizons:StructureLib:1.4.10:dev")
|
||||
compileOnly("com.github.GTNewHorizons:StructureLib:1.4.23:dev")
|
||||
}
|
||||
+1
-1
@@ -151,7 +151,7 @@ modrinthProjectId =
|
||||
# type can be one of [project, version],
|
||||
# and the name is the Modrinth project or version slug/id of the other mod.
|
||||
# Example: required-project:fplib;optional-project:gasstation;incompatible-project:gregtech
|
||||
# Note: GTNH Mixins is automatically set as a required dependency if usesMixins = true
|
||||
# Note: UniMixins is automatically set as a required dependency if usesMixins = true.
|
||||
modrinthRelations =
|
||||
|
||||
# Publishing to CurseForge requires you to set the CURSEFORGE_TOKEN environment variable to one of your CurseForge API tokens.
|
||||
|
||||
+1
-1
@@ -17,7 +17,7 @@ pluginManagement {
|
||||
}
|
||||
|
||||
plugins {
|
||||
id 'com.gtnewhorizons.gtnhsettingsconvention' version '1.0.38'
|
||||
id 'com.gtnewhorizons.gtnhsettingsconvention' version '1.0.44'
|
||||
}
|
||||
|
||||
|
||||
@@ -496,12 +496,18 @@ public class AlchemicalWizardry {
|
||||
public static boolean disableBoundToolsRightClick;
|
||||
public static boolean allowPotionRepair;
|
||||
|
||||
public static BlockStack[] secondTierRunes = new BlockStack[10];
|
||||
public static BlockStack[] thirdTierRunes = new BlockStack[10];
|
||||
public static BlockStack[] fourthTierRunes = new BlockStack[10];
|
||||
public static BlockStack[] fifthTierRunes = new BlockStack[10];
|
||||
public static BlockStack[] sixthTierRunes = new BlockStack[10];
|
||||
public static BlockStack[] specialAltarBlock = new BlockStack[7];
|
||||
public static List<BlockStack> secondTierRunes;
|
||||
public static List<BlockStack> thirdTierRunes;
|
||||
public static List<BlockStack> fourthTierRunes;
|
||||
public static List<BlockStack> fifthTierRunes;
|
||||
public static List<BlockStack> sixthTierRunes;
|
||||
public static List<BlockStack> fifthTierBeacons;
|
||||
public static List<BlockStack> thirdTierCaps;
|
||||
public static List<BlockStack> thirdTierPillars;
|
||||
public static List<BlockStack> fourthTierCaps;
|
||||
public static List<BlockStack> fourthTierPillars;
|
||||
public static List<BlockStack> sixthTierCaps;
|
||||
public static List<BlockStack> sixthTierPillars;
|
||||
|
||||
public static int lpPerSelfSacrifice = 200;
|
||||
public static int lpPerSelfSacrificeSoulFray = 20;
|
||||
@@ -1431,39 +1437,42 @@ public class AlchemicalWizardry {
|
||||
emptyBucketStack,
|
||||
'l',
|
||||
new ItemStack(Items.leather_chestplate));
|
||||
|
||||
customPotionDrowning = (new PotionDrowning(customPotionDrowningID, true, 0)).setIconIndex(0, 0)
|
||||
.setPotionName("Drowning");
|
||||
customPotionBoost = (new PotionBoost(customPotionBoostID, false, 0)).setIconIndex(0, 0).setPotionName("Boost");
|
||||
.setPotionName("bm.buff.drowning");
|
||||
customPotionBoost = (new PotionBoost(customPotionBoostID, false, 0)).setIconIndex(0, 0)
|
||||
.setPotionName("bm.buff.boost");
|
||||
customPotionProjProt = (new PotionProjectileProtect(customPotionProjProtID, false, 0)).setIconIndex(0, 0)
|
||||
.setPotionName("Whirlwind");
|
||||
.setPotionName("bm.buff.whirlwind");
|
||||
customPotionInhibit = (new PotionInhibit(customPotionInhibitID, false, 0)).setIconIndex(0, 0)
|
||||
.setPotionName("Inhibit");
|
||||
.setPotionName("bm.buff.inhibit");
|
||||
customPotionFlight = (new PotionFlight(customPotionFlightID, false, 0)).setIconIndex(0, 0)
|
||||
.setPotionName("Flight");
|
||||
.setPotionName("bm.buff.flight");
|
||||
customPotionReciprocation = (new PotionReciprocation(customPotionReciprocationID, false, 0xFFFFFF))
|
||||
.setIconIndex(0, 0).setPotionName("Reciprocation");
|
||||
customPotionFlameCloak = (new PotionFlameCloak(customPotionFlameCloakID, false, 0).setIconIndex(0, 0)
|
||||
.setPotionName("Flame Cloak"));
|
||||
customPotionIceCloak = (new PotionIceCloak(customPotionIceCloakID, false, 0).setIconIndex(0, 0)
|
||||
.setPotionName("Ice Cloak"));
|
||||
customPotionHeavyHeart = (new PotionHeavyHeart(customPotionHeavyHeartID, true, 0).setIconIndex(0, 0)
|
||||
.setPotionName("Heavy Heart"));
|
||||
customPotionFireFuse = (new PotionFireFuse(customPotionFireFuseID, true, 0).setIconIndex(0, 0)
|
||||
.setPotionName("Fire Fuse"));
|
||||
customPotionPlanarBinding = (new PotionPlanarBinding(customPotionPlanarBindingID, true, 0).setIconIndex(0, 0)
|
||||
.setPotionName("Planar Binding"));
|
||||
customPotionSoulFray = (new PotionSoulFray(customPotionSoulFrayID, true, 0).setIconIndex(0, 0)
|
||||
.setPotionName("Soul Fray"));
|
||||
.setIconIndex(0, 0).setPotionName("bm.buff.reciprocation");
|
||||
customPotionFlameCloak = (new PotionFlameCloak(customPotionFlameCloakID, false, 0)).setIconIndex(0, 0)
|
||||
.setPotionName("bm.buff.flame_cloak");
|
||||
customPotionIceCloak = (new PotionIceCloak(customPotionIceCloakID, false, 0)).setIconIndex(0, 0)
|
||||
.setPotionName("bm.buff.ice_cloak");
|
||||
customPotionHeavyHeart = (new PotionHeavyHeart(customPotionHeavyHeartID, true, 0)).setIconIndex(0, 0)
|
||||
.setPotionName("bm.buff.heavy_heart");
|
||||
customPotionFireFuse = (new PotionFireFuse(customPotionFireFuseID, true, 0)).setIconIndex(0, 0)
|
||||
.setPotionName("bm.buff.fire_fuse");
|
||||
customPotionPlanarBinding = (new PotionPlanarBinding(customPotionPlanarBindingID, true, 0)).setIconIndex(0, 0)
|
||||
.setPotionName("bm.buff.planar_binding");
|
||||
customPotionSoulFray = (new PotionSoulFray(customPotionSoulFrayID, true, 0)).setIconIndex(0, 0)
|
||||
.setPotionName("bm.buff.soul_fray");
|
||||
PlayerSacrificeHandler.soulFrayId = customPotionSoulFray;
|
||||
customPotionSoulHarden = (new PotionSoulHarden(customPotionSoulHardenID, false, 0).setIconIndex(0, 0)
|
||||
.setPotionName("Soul Harden"));
|
||||
customPotionDeaf = (new PotionDeaf(customPotionDeafID, true, 0).setIconIndex(0, 0).setPotionName("Deafness"));
|
||||
customPotionFeatherFall = (new PotionFeatherFall(customPotionFeatherFallID, false, 0).setIconIndex(0, 0)
|
||||
.setPotionName("Feather Fall"));
|
||||
customPotionDemonCloak = (new PotionDemonCloak(customPotionDemonCloakID, false, 0).setIconIndex(0, 0)
|
||||
.setPotionName("Demon Cloaking"));
|
||||
customPotionAmphibian = (new PotionAmphibian(customPotionAmphibianID, false, 0).setIconIndex(0, 0)
|
||||
.setPotionName("Amphibian"));
|
||||
customPotionSoulHarden = (new PotionSoulHarden(customPotionSoulHardenID, false, 0)).setIconIndex(0, 0)
|
||||
.setPotionName("bm.buff.soul_harden");
|
||||
customPotionDeaf = (new PotionDeaf(customPotionDeafID, true, 0)).setIconIndex(0, 0)
|
||||
.setPotionName("bm.buff.deafness");
|
||||
customPotionFeatherFall = (new PotionFeatherFall(customPotionFeatherFallID, false, 0)).setIconIndex(0, 0)
|
||||
.setPotionName("bm.buff.feather_fall");
|
||||
customPotionDemonCloak = (new PotionDemonCloak(customPotionDemonCloakID, false, 0)).setIconIndex(0, 0)
|
||||
.setPotionName("bm.buff.demon_cloak");
|
||||
customPotionAmphibian = (new PotionAmphibian(customPotionAmphibianID, false, 0)).setIconIndex(0, 0)
|
||||
.setPotionName("bm.buff.amphibian");
|
||||
|
||||
ItemStack masterBloodOrbStack = new ItemStack(ModItems.masterBloodOrb);
|
||||
ItemStack transcendentBloodOrbStack = new ItemStack(ModItems.transcendentBloodOrb);
|
||||
@@ -3045,56 +3054,59 @@ public class AlchemicalWizardry {
|
||||
stringStack);
|
||||
|
||||
GameRegistry.addRecipe(
|
||||
new ItemStack(ModBlocks.blockStabilityGlyph),
|
||||
"1s1",
|
||||
"grg",
|
||||
"bob",
|
||||
'o',
|
||||
transcendentBloodOrbStack,
|
||||
'r',
|
||||
bloodRuneStack,
|
||||
'1',
|
||||
crepitousStack,
|
||||
'g',
|
||||
etherealSlateStack,
|
||||
'b',
|
||||
praesidiumStack,
|
||||
's',
|
||||
magicalesStack);
|
||||
new ShapedBloodOrbRecipe(
|
||||
new ItemStack(ModBlocks.blockStabilityGlyph),
|
||||
"1s1",
|
||||
"grg",
|
||||
"bob",
|
||||
'o',
|
||||
transcendentBloodOrbStack,
|
||||
'r',
|
||||
bloodRuneStack,
|
||||
'1',
|
||||
crepitousStack,
|
||||
'g',
|
||||
etherealSlateStack,
|
||||
'b',
|
||||
praesidiumStack,
|
||||
's',
|
||||
magicalesStack));
|
||||
GameRegistry.addRecipe(
|
||||
new ItemStack(ModBlocks.blockEnchantmentGlyph, 1, 0),
|
||||
"1s1",
|
||||
"grg",
|
||||
"bob",
|
||||
'o',
|
||||
transcendentBloodOrbStack,
|
||||
'r',
|
||||
bloodRuneStack,
|
||||
'g',
|
||||
etherealSlateStack,
|
||||
'b',
|
||||
magicalesStack,
|
||||
'1',
|
||||
offensaStack,
|
||||
's',
|
||||
lifeShardStack);
|
||||
new ShapedBloodOrbRecipe(
|
||||
new ItemStack(ModBlocks.blockEnchantmentGlyph, 1, 0),
|
||||
"1s1",
|
||||
"grg",
|
||||
"bob",
|
||||
'o',
|
||||
transcendentBloodOrbStack,
|
||||
'r',
|
||||
bloodRuneStack,
|
||||
'g',
|
||||
etherealSlateStack,
|
||||
'b',
|
||||
magicalesStack,
|
||||
'1',
|
||||
offensaStack,
|
||||
's',
|
||||
lifeShardStack));
|
||||
GameRegistry.addRecipe(
|
||||
new ItemStack(ModBlocks.blockEnchantmentGlyph, 1, 1),
|
||||
"1s1",
|
||||
"grg",
|
||||
"bob",
|
||||
'o',
|
||||
transcendentBloodOrbStack,
|
||||
'r',
|
||||
bloodRuneStack,
|
||||
'g',
|
||||
etherealSlateStack,
|
||||
'b',
|
||||
magicalesStack,
|
||||
'1',
|
||||
virtusStack,
|
||||
's',
|
||||
soulShardStack);
|
||||
new ShapedBloodOrbRecipe(
|
||||
new ItemStack(ModBlocks.blockEnchantmentGlyph, 1, 1),
|
||||
"1s1",
|
||||
"grg",
|
||||
"bob",
|
||||
'o',
|
||||
transcendentBloodOrbStack,
|
||||
'r',
|
||||
bloodRuneStack,
|
||||
'g',
|
||||
etherealSlateStack,
|
||||
'b',
|
||||
magicalesStack,
|
||||
'1',
|
||||
virtusStack,
|
||||
's',
|
||||
soulShardStack));
|
||||
|
||||
GameRegistry.addRecipe(
|
||||
dawnRitualDivinerStack,
|
||||
|
||||
@@ -16,7 +16,6 @@ import net.minecraft.entity.monster.EntityEnderman;
|
||||
import net.minecraft.entity.monster.EntitySlime;
|
||||
import net.minecraft.entity.passive.EntityAnimal;
|
||||
import net.minecraft.entity.passive.EntityVillager;
|
||||
import net.minecraft.init.Blocks;
|
||||
import net.minecraftforge.common.config.Configuration;
|
||||
import net.minecraftforge.common.config.Property;
|
||||
import net.minecraftforge.oredict.OreDictionary;
|
||||
@@ -624,66 +623,63 @@ public class BloodMagicConfiguration {
|
||||
}
|
||||
|
||||
public static void finishLoading() {
|
||||
AlchemicalWizardry.secondTierRunes = BloodMagicConfiguration.getAltarRunesForTier(
|
||||
"secondTier",
|
||||
new BlockStack[] { new BlockStack(ModBlocks.bloodRune, 0), new BlockStack(ModBlocks.speedRune, 0),
|
||||
new BlockStack(ModBlocks.efficiencyRune, 0), new BlockStack(ModBlocks.runeOfSacrifice, 0),
|
||||
new BlockStack(ModBlocks.runeOfSelfSacrifice, 0), new BlockStack(ModBlocks.bloodRune, 1),
|
||||
new BlockStack(ModBlocks.bloodRune, 2), new BlockStack(ModBlocks.bloodRune, 3),
|
||||
new BlockStack(ModBlocks.bloodRune, 4), new BlockStack(ModBlocks.bloodRune, 5),
|
||||
new BlockStack(ModBlocks.bloodRune, 6) });
|
||||
AlchemicalWizardry.thirdTierRunes = BloodMagicConfiguration.getAltarRunesForTier(
|
||||
"thirdTier",
|
||||
new BlockStack[] { new BlockStack(ModBlocks.bloodRune, 0), new BlockStack(ModBlocks.speedRune, 0),
|
||||
new BlockStack(ModBlocks.efficiencyRune, 0), new BlockStack(ModBlocks.runeOfSacrifice, 0),
|
||||
new BlockStack(ModBlocks.runeOfSelfSacrifice, 0), new BlockStack(ModBlocks.bloodRune, 1),
|
||||
new BlockStack(ModBlocks.bloodRune, 2), new BlockStack(ModBlocks.bloodRune, 3),
|
||||
new BlockStack(ModBlocks.bloodRune, 4), new BlockStack(ModBlocks.bloodRune, 5),
|
||||
new BlockStack(ModBlocks.bloodRune, 6) });
|
||||
AlchemicalWizardry.fourthTierRunes = BloodMagicConfiguration.getAltarRunesForTier(
|
||||
"fourthTier",
|
||||
new BlockStack[] { new BlockStack(ModBlocks.bloodRune, 0), new BlockStack(ModBlocks.speedRune, 0),
|
||||
new BlockStack(ModBlocks.efficiencyRune, 0), new BlockStack(ModBlocks.runeOfSacrifice, 0),
|
||||
new BlockStack(ModBlocks.runeOfSelfSacrifice, 0), new BlockStack(ModBlocks.bloodRune, 1),
|
||||
new BlockStack(ModBlocks.bloodRune, 2), new BlockStack(ModBlocks.bloodRune, 3),
|
||||
new BlockStack(ModBlocks.bloodRune, 4), new BlockStack(ModBlocks.bloodRune, 5),
|
||||
new BlockStack(ModBlocks.bloodRune, 6) });
|
||||
AlchemicalWizardry.fifthTierRunes = BloodMagicConfiguration.getAltarRunesForTier(
|
||||
"fifthTier",
|
||||
new BlockStack[] { new BlockStack(ModBlocks.bloodRune, 0), new BlockStack(ModBlocks.speedRune, 0),
|
||||
new BlockStack(ModBlocks.efficiencyRune, 0), new BlockStack(ModBlocks.runeOfSacrifice, 0),
|
||||
new BlockStack(ModBlocks.runeOfSelfSacrifice, 0), new BlockStack(ModBlocks.bloodRune, 1),
|
||||
new BlockStack(ModBlocks.bloodRune, 2), new BlockStack(ModBlocks.bloodRune, 3),
|
||||
new BlockStack(ModBlocks.bloodRune, 4), new BlockStack(ModBlocks.bloodRune, 5),
|
||||
new BlockStack(ModBlocks.bloodRune, 6) });
|
||||
AlchemicalWizardry.sixthTierRunes = BloodMagicConfiguration.getAltarRunesForTier(
|
||||
"sixthTier",
|
||||
new BlockStack[] { new BlockStack(ModBlocks.bloodRune, 0), new BlockStack(ModBlocks.speedRune, 0),
|
||||
new BlockStack(ModBlocks.efficiencyRune, 0), new BlockStack(ModBlocks.runeOfSacrifice, 0),
|
||||
new BlockStack(ModBlocks.runeOfSelfSacrifice, 0), new BlockStack(ModBlocks.bloodRune, 1),
|
||||
new BlockStack(ModBlocks.bloodRune, 2), new BlockStack(ModBlocks.bloodRune, 3),
|
||||
new BlockStack(ModBlocks.bloodRune, 4), new BlockStack(ModBlocks.bloodRune, 5),
|
||||
new BlockStack(ModBlocks.bloodRune, 6) });
|
||||
AlchemicalWizardry.specialAltarBlock = getAltarRunesForTier(
|
||||
"specialBlocks",
|
||||
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).");
|
||||
String[] defaultRunes = { "AWWayofTime:AlchemicalWizardrybloodRune", "AWWayofTime:speedRune",
|
||||
"AWWayofTime:efficiencyRune", "AWWayofTime:runeOfSacrifice", "AWWayofTime:runeOfSelfSacrifice",
|
||||
"AWWayofTime:AlchemicalWizardrybloodRune:1", "AWWayofTime:AlchemicalWizardrybloodRune:2",
|
||||
"AWWayofTime:AlchemicalWizardrybloodRune:3", "AWWayofTime:AlchemicalWizardrybloodRune:4",
|
||||
"AWWayofTime:AlchemicalWizardrybloodRune:5", "AWWayofTime:AlchemicalWizardrybloodRune:6" };
|
||||
|
||||
AlchemicalWizardry.secondTierRunes = readRuneOverrides("secondTier", defaultRunes);
|
||||
AlchemicalWizardry.thirdTierRunes = readRuneOverrides("thirdTier", defaultRunes);
|
||||
AlchemicalWizardry.fourthTierRunes = readRuneOverrides("fourthTier", defaultRunes);
|
||||
AlchemicalWizardry.fifthTierRunes = readRuneOverrides("fifthTier", defaultRunes);
|
||||
AlchemicalWizardry.sixthTierRunes = readRuneOverrides("sixthTier", defaultRunes);
|
||||
|
||||
AlchemicalWizardry.fifthTierBeacons = readBlockConfig(
|
||||
"altar blocks",
|
||||
"fifthTierBeacons",
|
||||
new String[] { "minecraft:beacon", "etfuturum:beacon", "chisel:beacon:*" },
|
||||
"Valid blocks for the Blood Altar's tier 5 beacons:\n"
|
||||
+ "Use the following format for all of these entries: mod:block(:meta). Meta * or 32767 allows for any meta.\n"
|
||||
+ "An empty entry allows for any non-air block to be used for that part of the structure.\n"
|
||||
+ "Invalid or missing blocks are skipped. If all entries are invalid, any block can be used as a fallback.");
|
||||
AlchemicalWizardry.thirdTierCaps = readBlockConfig(
|
||||
"altar blocks",
|
||||
"thirdTierCaps",
|
||||
new String[] { "minecraft:glowstone", "BloodArsenal:blood_infused_glowstone", "Botania:seaLamp",
|
||||
"chisel:glowstone:*", "etfuturum:sea_lantern", "etfuturum:shroomlight",
|
||||
"ExtraUtilities:color_lightgem:*" },
|
||||
"Valid blocks for the Blood Altar's tier 3 caps:");
|
||||
AlchemicalWizardry.thirdTierPillars = readBlockConfig(
|
||||
"altar blocks",
|
||||
"thirdTierPillars",
|
||||
new String[] {},
|
||||
"Valid blocks for the Blood Altar's tier 3 pillars:");
|
||||
AlchemicalWizardry.fourthTierCaps = readBlockConfig(
|
||||
"altar blocks",
|
||||
"fourthTierCaps",
|
||||
new String[] { "AWWayofTime:largeBloodStoneBrick" },
|
||||
"Valid blocks for the Blood Altar's tier 4 caps:");
|
||||
AlchemicalWizardry.fourthTierPillars = readBlockConfig(
|
||||
"altar blocks",
|
||||
"fourthTierPillars",
|
||||
new String[] {},
|
||||
"Valid blocks for the Blood Altar's tier 4 pillars.");
|
||||
AlchemicalWizardry.sixthTierCaps = readBlockConfig(
|
||||
"altar blocks",
|
||||
"sixthTierCaps",
|
||||
new String[] { "AWWayofTime:blockCrystal" },
|
||||
"Valid blocks for the Blood Altar's tier 6 caps:");
|
||||
AlchemicalWizardry.sixthTierPillars = readBlockConfig(
|
||||
"altar blocks",
|
||||
"sixthTierPillars",
|
||||
new String[] {},
|
||||
"Valid blocks for the Blood Altar's tier 6 pillars:");
|
||||
config.save();
|
||||
}
|
||||
|
||||
public static void loadCustomLPValues() {
|
||||
AlchemicalWizardry.lpPerSactificeCustom = new HashMap<Class<?>, Integer>();
|
||||
AlchemicalWizardry.lpPerSactificeCustom = new HashMap<>();
|
||||
for (Object object : EntityList.stringToClassMapping.entrySet()) {
|
||||
Entry entry = (Entry) object;
|
||||
String entityName = (String) entry.getKey();
|
||||
@@ -798,7 +794,6 @@ public class BloodMagicConfiguration {
|
||||
// Check if it's an int, if so, parse it. If not, set meta to 0 to avoid crashing.
|
||||
if (isInteger(blockData[2])) meta = Integer.parseInt(blockData[2]);
|
||||
else if (blockData[2].equals("*")) meta = OreDictionary.WILDCARD_VALUE;
|
||||
else meta = 0;
|
||||
}
|
||||
|
||||
AlchemicalWizardryEventHooks.teleposerBlacklist.add(new BlockStack(block, meta));
|
||||
@@ -808,53 +803,43 @@ public class BloodMagicConfiguration {
|
||||
private static boolean isInteger(String s) {
|
||||
try {
|
||||
Integer.parseInt(s);
|
||||
} catch (NumberFormatException e) {
|
||||
return false;
|
||||
} catch (NullPointerException e) {
|
||||
} catch (NumberFormatException | NullPointerException e) {
|
||||
return false;
|
||||
}
|
||||
// only got here if we didn't return false
|
||||
return true;
|
||||
}
|
||||
|
||||
private static BlockStack[] getAltarRunesForTier(String tierName, BlockStack[] defaultValues) {
|
||||
return getAltarRunesForTier(tierName, defaultValues, "");
|
||||
private static List<BlockStack> readRuneOverrides(String key, String[] defaultValues) {
|
||||
return readBlockConfig("rune overrides", key, 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, comment);
|
||||
String[] names = property.getStringList();
|
||||
if (names.length != defaultNames.length) {
|
||||
property.set(defaultNames);
|
||||
return defaultValues;
|
||||
}
|
||||
BlockStack[] blockStacks = new BlockStack[names.length];
|
||||
for (int i = 0; i < names.length; i++) {
|
||||
String[] parts = names[i].split(":");
|
||||
if (parts.length < 2 || parts.length > 3) {
|
||||
property.set(defaultNames);
|
||||
return defaultValues;
|
||||
}
|
||||
Block block = GameRegistry.findBlock(parts[0], parts[1]);
|
||||
int metadata = 0;
|
||||
if (parts.length == 3) {
|
||||
try {
|
||||
metadata = Integer.parseInt(parts[2]);
|
||||
} catch (NumberFormatException exception) {
|
||||
metadata = 0;
|
||||
}
|
||||
private static List<BlockStack> readBlockConfig(String category, String key, String[] defaultValues,
|
||||
String comment) {
|
||||
Property property = config.get(category, key, defaultValues, comment);
|
||||
List<BlockStack> validStacks = new ArrayList<>();
|
||||
|
||||
for (String name : property.getStringList()) {
|
||||
String[] blockData = name.split(":");
|
||||
if (blockData.length < 2 || blockData.length > 3) {
|
||||
continue;
|
||||
}
|
||||
|
||||
Block block = GameRegistry.findBlock(blockData[0], blockData[1]);
|
||||
if (block == null) {
|
||||
property.set(defaultNames);
|
||||
return defaultValues;
|
||||
AlchemicalWizardry.logger.info("Block not found for {} {}: {}", category, key, name);
|
||||
continue;
|
||||
}
|
||||
blockStacks[i] = new BlockStack(block, metadata);
|
||||
|
||||
int meta = 0;
|
||||
if (blockData.length == 3) {
|
||||
if (isInteger(blockData[2])) meta = Integer.parseInt(blockData[2]);
|
||||
else if (blockData[2].equals("*")) meta = OreDictionary.WILDCARD_VALUE;
|
||||
}
|
||||
|
||||
validStacks.add(new BlockStack(block, meta));
|
||||
}
|
||||
return blockStacks;
|
||||
|
||||
return validStacks;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -9,8 +9,8 @@ import cpw.mods.fml.common.registry.GameData;
|
||||
*/
|
||||
public class BlockStack {
|
||||
|
||||
private Block block;
|
||||
private int meta;
|
||||
private final Block block;
|
||||
private final int meta;
|
||||
|
||||
public BlockStack(Block block, int meta) {
|
||||
this.block = block;
|
||||
|
||||
@@ -38,8 +38,4 @@ public class Reagent {
|
||||
return colourIntensity;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(Object o) {
|
||||
return o instanceof Reagent && this == o && name.equals(((Reagent) o).name);
|
||||
}
|
||||
}
|
||||
@@ -2,6 +2,7 @@ package WayofTime.alchemicalWizardry.client.nei;
|
||||
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
|
||||
import WayofTime.alchemicalWizardry.AlchemicalWizardry;
|
||||
import cpw.mods.fml.common.event.FMLInterModComms;
|
||||
|
||||
public class IMCForNEI {
|
||||
@@ -12,6 +13,95 @@ public class IMCForNEI {
|
||||
sendCatalyst("alchemicalwizardry.meteor", "AWWayofTime:masterStone");
|
||||
sendCatalyst("alchemicalwizardry.bindingritual", "AWWayofTime:masterStone");
|
||||
sendCatalyst("alchemicalwizardry.calcinator", "AWWayofTime:blockAlchemicCalcinator");
|
||||
// Blood Altar Progression
|
||||
sendInfoPage(
|
||||
"AWWayofTime: Altar,sacrificialKnife",
|
||||
"nei.infopage.bloodAltar.1." + (AlchemicalWizardry.wimpySettings ? "b" : "a"));
|
||||
sendInfoPage("AWWayofTime: Altar", "nei.infopage.bloodAltar.2");
|
||||
sendInfoPage("AWWayofTime: Altar,bucketLife", "nei.infopage.bloodAltar.3");
|
||||
sendInfoPage("AWWayofTime: Altar,weakBloodOrb", "nei.infopage.bloodAltar.4");
|
||||
sendInfoPage(
|
||||
"AWWayofTime: Altar,apprenticeBloodOrb|<AWWayofTime:AlchemicalWizardrybloodRune>",
|
||||
"nei.infopage.bloodAltar.5");
|
||||
sendInfoPage("AWWayofTime: Altar,magicianBloodOrb|<minecraft:glowstone>", "nei.infopage.bloodAltar.6");
|
||||
sendInfoPage("AWWayofTime: Altar,masterBloodOrb,largeBloodStoneBrick", "nei.infopage.bloodAltar.7");
|
||||
sendInfoPage("AWWayofTime: Altar,archmageBloodOrb|minecraft:beacon", "nei.infopage.bloodAltar.8");
|
||||
sendInfoPage("AWWayofTime: Altar,transcendentBloodOrb|<AWWayofTime:blockCrystal>", "nei.infopage.bloodAltar.9");
|
||||
// Incense
|
||||
sendInfoPage("AWWayofTime: incense,sacrificialKnife,blockCrucible", "nei.infopage.incense.1");
|
||||
sendInfoPage(
|
||||
"AWWayofTime: incense,sacrificialKnife,blockCrucible",
|
||||
"nei.infopage.incense.2." + (AlchemicalWizardry.wimpySettings ? "b" : "a"));
|
||||
sendInfoPage("AWWayofTime: incense,sacrificialKnife,blockCrucible", "nei.infopage.incense.3");
|
||||
// Sacrifices
|
||||
sendInfoPage("AWWayofTime runeOfSacrifice,daggerOfSacrifice", "nei.infopage.sacrifice.1");
|
||||
sendInfoPage("AWWayofTime runeOfSacrifice,daggerOfSacrifice", "nei.infopage.sacrifice.2");
|
||||
sendInfoPage("AWWayofTime runeOfSacrifice,daggerOfSacrifice", "nei.infopage.sacrifice.3");
|
||||
// Altar Runes
|
||||
sendInfoPage("<AWWayofTime:AlchemicalWizardrybloodRune:1>", "nei.infopage.rune.augmentedCapacity");
|
||||
sendInfoPage("<AWWayofTime:AlchemicalWizardrybloodRune:2>", "nei.infopage.rune.dislocation");
|
||||
sendInfoPage("<AWWayofTime:AlchemicalWizardrybloodRune:3>", "nei.infopage.rune.orb");
|
||||
sendInfoPage("<AWWayofTime:AlchemicalWizardrybloodRune:4>", "nei.infopage.rune.superiorCapacity");
|
||||
sendInfoPage("<AWWayofTime:AlchemicalWizardrybloodRune:5>", "nei.infopage.rune.acceleration");
|
||||
sendInfoPage("<AWWayofTime:AlchemicalWizardrybloodRune:6>", "nei.infopage.rune.quickness");
|
||||
sendInfoPage("<AWWayofTime:speedRune>", "nei.infopage.rune.speed");
|
||||
sendInfoPage("<AWWayofTime:efficiencyRune>", "nei.infopage.rune.efficiency");
|
||||
sendInfoPage("AWWayofTime runeOfSacrifice,daggerOfSacrifice", "nei.infopage.rune.sacrifice");
|
||||
sendInfoPage("AWWayofTime runeOfSelfSacrifice,sacrificialKnife", "nei.infopage.rune.selfSacrifice");
|
||||
sendInfoPage(
|
||||
"<AWWayofTime:AlchemicalWizardrybloodRune>|AWWayofTime runeOfSacrifice,daggerOfSacrifice",
|
||||
"nei.infopage.rune.blank");
|
||||
// Progression Items
|
||||
sendInfoPage(
|
||||
"AWWayofTime: masterBloodOrb,largeBloodStoneBrick,weakBloodShard,energySword,alchemyFlask",
|
||||
"nei.infopage.bloodShards");
|
||||
sendInfoPage(
|
||||
"AWWayofTime: masterBloodOrb,demonBloodShard,blockPlinth,blockPedestal,aether,aquasalus,incendium,sanctus,tennebrae|<AWWayofTime:terrae>",
|
||||
"nei.infopage.demonShards.1");
|
||||
sendInfoPage(
|
||||
"AWWayofTime: masterBloodOrb,demonBloodShard,blockPlinth,blockPedestal,aether,aquasalus,incendium,sanctus,tennebrae|<AWWayofTime:terrae>",
|
||||
"nei.infopage.demonShards.2");
|
||||
sendInfoPage(
|
||||
"AWWayofTime: demonBloodShard,blockPlinth,blockPedestal,aether,aquasalus,incendium,sanctus,tennebrae|<AWWayofTime:terrae>",
|
||||
"nei.infopage.demonShards.3");
|
||||
sendInfoPage(
|
||||
"AWWayofTime:bloodMagicBaseItems 28,29|<AWWayofTime:blockCrystal>",
|
||||
"nei.infopage.convocationShards");
|
||||
// Blood Orb / Soul Network Explanation
|
||||
sendInfoPage(
|
||||
"AWWayofTime: BloodOrb|<avaritia:orb_armok>|<ForbiddenMagic:EldritchOrb>|<BloodArsenal:transparent_orb>",
|
||||
"nei.infopage.bloodOrbs.1");
|
||||
sendInfoPage(
|
||||
"AWWayofTime: BloodOrb|<avaritia:orb_armok>|<ForbiddenMagic:EldritchOrb>|<BloodArsenal:transparent_orb>",
|
||||
"nei.infopage.bloodOrbs.2");
|
||||
sendInfoPage(
|
||||
"AWWayofTime: BloodOrb|<avaritia:orb_armok>|<ForbiddenMagic:EldritchOrb>|<BloodArsenal:transparent_orb>",
|
||||
"nei.infopage.bloodOrbs.3");
|
||||
sendInfoPage(
|
||||
"AWWayofTime: BloodOrb,divinationSigil|<avaritia:orb_armok>|<ForbiddenMagic:EldritchOrb>|<BloodArsenal:transparent_orb>",
|
||||
"nei.infopage.bloodOrbs.4");
|
||||
// Rituals
|
||||
sendInfoPage("<AWWayofTime:imperfectRitualStone>", "nei.infopage.rituals.weak.1");
|
||||
sendInfoPage("<AWWayofTime:imperfectRitualStone>", "nei.infopage.rituals.weak.2");
|
||||
sendInfoPage(
|
||||
"<AWWayofTime:ritualStone>|AWWayofTime masterStone,itemRitualDiviner,ScribeTool|activationCrystal 0,1",
|
||||
"nei.infopage.rituals.1");
|
||||
sendInfoPage(
|
||||
"<AWWayofTime:ritualStone>|AWWayofTime masterStone,itemRitualDiviner,ScribeTool|activationCrystal 0,1",
|
||||
"nei.infopage.rituals.2");
|
||||
sendInfoPage(
|
||||
"<AWWayofTime:ritualStone>|AWWayofTime masterStone,itemRitualDiviner,ScribeTool|activationCrystal 0,1",
|
||||
"nei.infopage.rituals.3");
|
||||
// Reagents
|
||||
sendInfoPage("AWWayofTime masterStone,blockAlchemicCalcinator", "nei.infopage.reagents.1");
|
||||
sendInfoPage("AWWayofTime masterStone,blockAlchemicCalcinator|<AWWayofTime:terrae>", "nei.infopage.reagents.2");
|
||||
sendInfoPage("AWWayofTime masterStone,blockAlchemicCalcinator,itemAttunedCrystal", "nei.infopage.reagents.3");
|
||||
sendInfoPage(
|
||||
"AWWayofTime masterStone,blockAlchemicCalcinator,itemTankSegmenter,itemDestinationClearer",
|
||||
"nei.infopage.reagents.4");
|
||||
sendInfoPage(
|
||||
"AWWayofTime masterStone,blockAlchemicCalcinator,blockReagentConduit,CrystalBelljar",
|
||||
"nei.infopage.reagents.5");
|
||||
}
|
||||
|
||||
private static void sendHandler(String handlerName, String stack, int height, int recipesPerPage) {
|
||||
@@ -37,4 +127,11 @@ public class IMCForNEI {
|
||||
private static void sendCatalyst(String handlerName, String stack) {
|
||||
sendCatalyst(handlerName, stack, 0);
|
||||
}
|
||||
|
||||
private static void sendInfoPage(String filter, String page) {
|
||||
NBTTagCompound NBT = new NBTTagCompound();
|
||||
NBT.setString("filter", filter);
|
||||
NBT.setString("page", page);
|
||||
FMLInterModComms.sendMessage("NotEnoughItems", "addItemInfo", NBT);
|
||||
}
|
||||
}
|
||||
+11
-14
@@ -5,6 +5,7 @@ import static WayofTime.alchemicalWizardry.client.nei.NEIConfig.getBloodOrbs;
|
||||
|
||||
import java.awt.Rectangle;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
|
||||
import net.minecraft.client.gui.inventory.GuiContainer;
|
||||
@@ -29,15 +30,14 @@ public class NEIAlchemyRecipeHandler extends TemplateRecipeHandler {
|
||||
|
||||
public class CachedAlchemyRecipe extends CachedRecipe {
|
||||
|
||||
ArrayList<ItemStack> orbs;
|
||||
PositionedStack output;
|
||||
List<PositionedStack> inputs;
|
||||
int lp;
|
||||
private final PositionedStack orbs;
|
||||
private final PositionedStack output;
|
||||
private final List<PositionedStack> inputs;
|
||||
private final int lp;
|
||||
|
||||
public CachedAlchemyRecipe(AlchemyRecipe recipe, ItemStack orb) {
|
||||
this(recipe);
|
||||
this.orbs = new ArrayList<>();
|
||||
orbs.add(orb);
|
||||
this.orbs.setPermutationToRender(orb);
|
||||
}
|
||||
|
||||
public CachedAlchemyRecipe(AlchemyRecipe recipe) {
|
||||
@@ -51,12 +51,13 @@ public class NEIAlchemyRecipeHandler extends TemplateRecipeHandler {
|
||||
this.inputs = inputs;
|
||||
this.output = new PositionedStack(recipe.getResult(), 76, 25);
|
||||
this.lp = recipe.getAmountNeeded() * 100;
|
||||
this.orbs = new ArrayList<>();
|
||||
List<ItemStack> orbStacks = new ArrayList<>();
|
||||
for (Item orb : getBloodOrbs()) {
|
||||
if (((IBloodOrb) orb).getOrbLevel() >= recipe.getOrbLevel()) {
|
||||
orbs.add(new ItemStack(orb));
|
||||
orbStacks.add(new ItemStack(orb));
|
||||
}
|
||||
}
|
||||
orbs = new PositionedStack(orbStacks, 136, 47);
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -70,12 +71,8 @@ public class NEIAlchemyRecipeHandler extends TemplateRecipeHandler {
|
||||
}
|
||||
|
||||
@Override
|
||||
public PositionedStack getOtherStack() {
|
||||
if (orbs == null || orbs.isEmpty()) return null;
|
||||
PositionedStack stack = new PositionedStack(orbs, 136, 47, false);
|
||||
stack.setPermutationToRender((cycleticks / 48) % orbs.size());
|
||||
stack.setMaxSize(1);
|
||||
return stack;
|
||||
public List<PositionedStack> getOtherStacks() {
|
||||
return getCycledIngredients(cycleticks / 20, Collections.singletonList(orbs));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -25,10 +25,10 @@ public class NEIAltarRecipeHandler extends TemplateRecipeHandler {
|
||||
|
||||
public class CachedAltarRecipe extends CachedRecipe {
|
||||
|
||||
PositionedStack input;
|
||||
private final PositionedStack input;
|
||||
// PositionedStack inputItems;
|
||||
PositionedStack output;
|
||||
int tier, lp_amount, consumption, drain;
|
||||
private final PositionedStack output;
|
||||
private final int tier, lp_amount, consumption, drain;
|
||||
|
||||
public CachedAltarRecipe(AltarRecipe recipe) {
|
||||
// inputItems = new PositionedStack(recipe.input, 38, 2, false);
|
||||
|
||||
@@ -29,7 +29,7 @@ public class NEIBindingRitualHandler extends TemplateRecipeHandler {
|
||||
|
||||
public class CachedBindingRecipe extends CachedRecipe {
|
||||
|
||||
PositionedStack input, output;
|
||||
private final PositionedStack input, output;
|
||||
|
||||
public CachedBindingRecipe(BindingRecipe recipe) {
|
||||
input = new PositionedStack(recipe.requiredItem, 37, 21, false);
|
||||
|
||||
@@ -2,10 +2,12 @@ package WayofTime.alchemicalWizardry.client.nei;
|
||||
|
||||
import static WayofTime.alchemicalWizardry.client.ClientUtils.mc;
|
||||
import static WayofTime.alchemicalWizardry.client.nei.NEIConfig.ARROW_TEXTURE;
|
||||
import static codechicken.lib.gui.GuiDraw.fontRenderer;
|
||||
|
||||
import java.awt.Rectangle;
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
|
||||
import net.minecraft.client.gui.FontRenderer;
|
||||
import net.minecraft.client.renderer.Tessellator;
|
||||
import net.minecraft.client.renderer.texture.TextureManager;
|
||||
import net.minecraft.item.ItemStack;
|
||||
@@ -28,19 +30,39 @@ public class NEICalcinatorHandler extends TemplateRecipeHandler {
|
||||
public class CachedReagentInfo extends CachedRecipe {
|
||||
|
||||
private final Reagent reagent;
|
||||
private final PositionedStack stack;
|
||||
private final PositionedStack orbs;
|
||||
private final int amount;
|
||||
private final int color;
|
||||
|
||||
private final String amountText;
|
||||
private final int amountTextWidth;
|
||||
|
||||
private final String nameText;
|
||||
private final int nameTextWidth;
|
||||
|
||||
private static final int ARROW_WIDTH = 24;
|
||||
private static final int ARROW_HEIGHT = 16;
|
||||
private static final int FILL_TIME = 192;
|
||||
private static final int HOLD_TIME = 8;
|
||||
|
||||
public CachedReagentInfo(ReagentStack reagent) {
|
||||
this.reagent = reagent.reagent;
|
||||
this.stack = new PositionedStack(ReagentRegistry.getItemForReagent(reagent.reagent), 32, 6);
|
||||
this.amount = reagent.amount;
|
||||
this.color = reagent.reagent.getColourRed() << 16 | reagent.reagent.getColourGreen() << 8
|
||||
| reagent.reagent.getColourBlue();
|
||||
|
||||
ItemStack[] orbStacks = NEIConfig.getBloodOrbs().stream().map(ItemStack::new).toArray(ItemStack[]::new);
|
||||
this.orbs = new PositionedStack(orbStacks, 32, 33);
|
||||
|
||||
this.amountText = String.format("%,d AR", amount);
|
||||
this.amountTextWidth = fontRenderer.getStringWidth(amountText);
|
||||
|
||||
this.nameText = this.reagent.name;
|
||||
this.nameTextWidth = fontRenderer.getStringWidth(nameText);
|
||||
}
|
||||
|
||||
@Override
|
||||
public PositionedStack getResult() {
|
||||
return new PositionedStack(ReagentRegistry.getItemForReagent(reagent), 32, 6);
|
||||
return stack;
|
||||
}
|
||||
|
||||
public Reagent getReagent() {
|
||||
@@ -54,39 +76,29 @@ public class NEICalcinatorHandler extends TemplateRecipeHandler {
|
||||
public void onDraw(int x, int y) {
|
||||
drawColoredProgressBar(x, y);
|
||||
|
||||
String amountText = String.format("%,d AR", amount);
|
||||
FontRenderer fontRenderer = mc.fontRenderer;
|
||||
|
||||
int textWidth = fontRenderer.getStringWidth(amountText);
|
||||
int textX = x + 84 - (textWidth / 2);
|
||||
int textX = x + 84 - (amountTextWidth / 2);
|
||||
int textY = y + 19;
|
||||
|
||||
fontRenderer.drawString(amountText, textX, textY, 0x000000);
|
||||
|
||||
textWidth = fontRenderer.getStringWidth(reagent.name);
|
||||
textX = x + 84 - (textWidth / 2);
|
||||
textY = y + 29;
|
||||
|
||||
fontRenderer.drawString(reagent.name, textX, textY, color);
|
||||
textX = x + 84 - (nameTextWidth / 2);
|
||||
textY += 10;
|
||||
int color = reagent.getColourRed() << 16 | reagent.getColourGreen() << 8 | reagent.getColourBlue();
|
||||
fontRenderer.drawString(nameText, textX, textY, color);
|
||||
}
|
||||
|
||||
private void drawColoredProgressBar(int x, int y) {
|
||||
int arrowX = x + 25;
|
||||
int arrowY = y + 19;
|
||||
int arrowWidth = 24;
|
||||
int arrowHeight = 16;
|
||||
|
||||
int fillTime = 192;
|
||||
int holdTime = 8;
|
||||
int totalCycle = fillTime + holdTime;
|
||||
int totalCycle = FILL_TIME + HOLD_TIME;
|
||||
|
||||
int cycleTick = cycleticks % totalCycle;
|
||||
|
||||
int fillWidth;
|
||||
if (cycleTick < fillTime) {
|
||||
fillWidth = cycleTick * arrowWidth / fillTime;
|
||||
if (cycleTick < FILL_TIME) {
|
||||
fillWidth = cycleTick * ARROW_WIDTH / FILL_TIME;
|
||||
} else {
|
||||
fillWidth = arrowWidth;
|
||||
fillWidth = ARROW_WIDTH;
|
||||
}
|
||||
|
||||
TextureManager texManager = mc.getTextureManager();
|
||||
@@ -94,35 +106,33 @@ public class NEICalcinatorHandler extends TemplateRecipeHandler {
|
||||
|
||||
Tessellator tessellator = Tessellator.instance;
|
||||
|
||||
GL11.glPushMatrix();
|
||||
GL11.glPushAttrib(GL11.GL_ALL_ATTRIB_BITS);
|
||||
|
||||
GL11.glEnable(GL11.GL_BLEND);
|
||||
GL11.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA);
|
||||
|
||||
float r = ((color >> 16) & 0xFF) / 255f;
|
||||
float g = ((color >> 8) & 0xFF) / 255f;
|
||||
float b = (color & 0xFF) / 255f;
|
||||
|
||||
GL11.glColor4f(r, g, b, 1.0f);
|
||||
GL11.glColor4ub(
|
||||
(byte) reagent.getColourRed(),
|
||||
(byte) reagent.getColourGreen(),
|
||||
(byte) reagent.getColourBlue(),
|
||||
(byte) 255);
|
||||
|
||||
tessellator.startDrawingQuads();
|
||||
|
||||
tessellator.addVertexWithUV(arrowX, arrowY + arrowHeight, 0, 0, 1);
|
||||
tessellator.addVertexWithUV(arrowX + fillWidth, arrowY + arrowHeight, 0, fillWidth / (float) arrowWidth, 1);
|
||||
tessellator.addVertexWithUV(arrowX + fillWidth, arrowY, 0, fillWidth / (float) arrowWidth, 0);
|
||||
tessellator.addVertexWithUV(arrowX, arrowY + ARROW_HEIGHT, 0, 0, 1);
|
||||
tessellator
|
||||
.addVertexWithUV(arrowX + fillWidth, arrowY + ARROW_HEIGHT, 0, fillWidth / (float) ARROW_WIDTH, 1);
|
||||
tessellator.addVertexWithUV(arrowX + fillWidth, arrowY, 0, fillWidth / (float) ARROW_WIDTH, 0);
|
||||
tessellator.addVertexWithUV(arrowX, arrowY, 0, 0, 0);
|
||||
|
||||
tessellator.draw();
|
||||
|
||||
GL11.glDisable(GL11.GL_BLEND);
|
||||
GL11.glPopAttrib();
|
||||
GL11.glPopMatrix();
|
||||
}
|
||||
|
||||
@Override
|
||||
public PositionedStack getOtherStack() {
|
||||
ItemStack[] orbStacks = NEIConfig.getBloodOrbs().stream().map(ItemStack::new).toArray(ItemStack[]::new);
|
||||
|
||||
PositionedStack stack = new PositionedStack(orbStacks, 32, 33, true);
|
||||
stack.setPermutationToRender((cycleticks / 20) % orbStacks.length);
|
||||
|
||||
return stack;
|
||||
public List<PositionedStack> getIngredients() {
|
||||
return getCycledIngredients(cycleticks / 20, Collections.singletonList(this.orbs));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -151,24 +161,26 @@ public class NEICalcinatorHandler extends TemplateRecipeHandler {
|
||||
ReagentStack rs = ReagentRegistry.getReagentStackForItem(result);
|
||||
if (rs != null) {
|
||||
arecipes.add(new CachedReagentInfo(rs));
|
||||
} else { // Check reagents in crystal belljars or other reagent storages
|
||||
NBTTagCompound tagCompound = result.getTagCompound();
|
||||
if (tagCompound == null || tagCompound.hasNoTags()) {
|
||||
return;
|
||||
}
|
||||
NBTTagList tagList = tagCompound.getTagList("reagentTanks", Constants.NBT.TAG_COMPOUND);
|
||||
if (tagList.tagList.isEmpty()) {
|
||||
return;
|
||||
}
|
||||
for (int i = 0; i < tagList.tagCount(); i++) {
|
||||
// Get the proper size of the ReagentStack created by melting the item for this reagent
|
||||
NBTTagCompound savedTag = tagList.getCompoundTagAt(i);
|
||||
ReagentStack reagent = ReagentContainer.readFromNBT(savedTag).getReagent();
|
||||
ItemStack reagentItem = ReagentRegistry.getItemForReagent(reagent.reagent);
|
||||
ReagentStack reagentStackForItem = ReagentRegistry.getReagentStackForItem(reagentItem);
|
||||
if (reagentStackForItem != null) {
|
||||
arecipes.add(new CachedReagentInfo(reagentStackForItem));
|
||||
}
|
||||
return;
|
||||
}
|
||||
// Check reagents in crystal belljars or other reagent storages
|
||||
NBTTagCompound tagCompound = result.getTagCompound();
|
||||
if (tagCompound == null || tagCompound.hasNoTags()) {
|
||||
return;
|
||||
}
|
||||
NBTTagList tagList = tagCompound.getTagList("reagentTanks", Constants.NBT.TAG_COMPOUND);
|
||||
if (tagList.tagList.isEmpty()) {
|
||||
return;
|
||||
}
|
||||
for (int i = 0; i < tagList.tagCount(); i++) {
|
||||
// Get the proper size of the ReagentStack created by melting the item for this reagent
|
||||
NBTTagCompound savedTag = tagList.getCompoundTagAt(i);
|
||||
ReagentStack reagent = ReagentContainer.readFromNBT(savedTag).getReagent();
|
||||
if (reagent == null) continue;
|
||||
ItemStack reagentItem = ReagentRegistry.getItemForReagent(reagent.reagent);
|
||||
ReagentStack reagentStackForItem = ReagentRegistry.getReagentStackForItem(reagentItem);
|
||||
if (reagentStackForItem != null) {
|
||||
arecipes.add(new CachedReagentInfo(reagentStackForItem));
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -191,7 +203,7 @@ public class NEICalcinatorHandler extends TemplateRecipeHandler {
|
||||
|
||||
@Override
|
||||
public void loadTransferRects() {
|
||||
transferRects.add(new RecipeTransferRect(new Rectangle(54, 23, 23, 16), "alchemicalwizardry.calcinator"));
|
||||
transferRects.add(new RecipeTransferRect(new Rectangle(55, 18, 24, 17), "alchemicalwizardry.calcinator"));
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -20,13 +20,9 @@ public class NEIConfig implements IConfigureNEI {
|
||||
"alchemicalwizardry",
|
||||
"gui/nei/arrow.png");
|
||||
|
||||
public static ArrayList<Item> getBloodOrbs() {
|
||||
public synchronized static ArrayList<Item> getBloodOrbs() {
|
||||
if (bloodOrbs == null) {
|
||||
synchronized (NEIConfig.class) {
|
||||
if (bloodOrbs == null) {
|
||||
bloodOrbs = collectAllBloodOrbs();
|
||||
}
|
||||
}
|
||||
bloodOrbs = collectAllBloodOrbs();
|
||||
}
|
||||
return bloodOrbs;
|
||||
}
|
||||
@@ -39,7 +35,7 @@ public class NEIConfig implements IConfigureNEI {
|
||||
}
|
||||
}
|
||||
if (bloodOrbsTemp.isEmpty()) {
|
||||
// If there is NEI no cache - go to item registry
|
||||
// If there is no NEI cache - go to item registry
|
||||
for (Object anItemRegistry : Item.itemRegistry) {
|
||||
Item item = (Item) anItemRegistry;
|
||||
if (item instanceof IBloodOrb) {
|
||||
@@ -50,12 +46,12 @@ public class NEIConfig implements IConfigureNEI {
|
||||
return bloodOrbsTemp;
|
||||
}
|
||||
|
||||
public static ArrayList<Item> getOrbsByCapacity() {
|
||||
public synchronized static ArrayList<Item> getOrbsByCapacity() {
|
||||
if (byCapacity == null) {
|
||||
byCapacity = new ArrayList<>(getBloodOrbs());
|
||||
byCapacity.sort((a, b) -> {
|
||||
if (a instanceof IBloodOrb && b instanceof IBloodOrb) {
|
||||
return Integer.compare(((IBloodOrb) a).getMaxEssence(), ((IBloodOrb) b).getMaxEssence());
|
||||
if (a instanceof IBloodOrb orbA && b instanceof IBloodOrb orbB) {
|
||||
return Integer.compare(orbA.getMaxEssence(), orbB.getMaxEssence());
|
||||
}
|
||||
return 0;
|
||||
});
|
||||
|
||||
@@ -396,8 +396,14 @@ public class NEIMeteorRecipeHandler extends TemplateRecipeHandler {
|
||||
private String reagentFillerBlockNames(MeteorReagent mr) {
|
||||
ArrayList<String> blockNames = new ArrayList<>();
|
||||
for (MeteorComponent mc : mr.filler) {
|
||||
blockNames.add(mc.getBlock().getDisplayName());
|
||||
blockNames.add(mc.getBlock().getDisplayName() + requiredReagentsForFiller(mc));
|
||||
}
|
||||
return Joiner.on(", ").join(blockNames);
|
||||
}
|
||||
|
||||
private String requiredReagentsForFiller(MeteorComponent mc) {
|
||||
List<Reagent> reagents = mc.getRequiredReagents();
|
||||
if (reagents.isEmpty()) return "";
|
||||
return " (" + reagents.stream().map(r -> r.name).collect(Collectors.joining(", ")) + ")";
|
||||
}
|
||||
}
|
||||
@@ -5,6 +5,8 @@ import java.util.BitSet;
|
||||
import java.util.EnumMap;
|
||||
import java.util.LinkedList;
|
||||
import java.util.List;
|
||||
import java.util.stream.Collectors;
|
||||
import java.util.stream.IntStream;
|
||||
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
@@ -45,7 +47,7 @@ public enum NewPacketHandler {
|
||||
|
||||
INSTANCE;
|
||||
|
||||
private EnumMap<Side, FMLEmbeddedChannel> channels;
|
||||
private final EnumMap<Side, FMLEmbeddedChannel> channels;
|
||||
|
||||
NewPacketHandler() {
|
||||
this.channels = NetworkRegistry.INSTANCE.newChannel("BloodMagic", new TEAltarCodec());
|
||||
@@ -95,12 +97,10 @@ public enum NewPacketHandler {
|
||||
private static class TEAltarMessageHandler extends SimpleChannelInboundHandler<TEAltarMessage> {
|
||||
|
||||
@Override
|
||||
protected void channelRead0(ChannelHandlerContext ctx, TEAltarMessage msg) throws Exception {
|
||||
protected void channelRead0(ChannelHandlerContext ctx, TEAltarMessage msg) {
|
||||
World world = AlchemicalWizardry.proxy.getClientWorld();
|
||||
TileEntity te = world.getTileEntity(msg.x, msg.y, msg.z);
|
||||
if (te instanceof TEAltar) {
|
||||
TEAltar altar = (TEAltar) te;
|
||||
|
||||
if (te instanceof TEAltar altar) {
|
||||
altar.handlePacketData(msg.items, msg.fluids, msg.capacity);
|
||||
}
|
||||
}
|
||||
@@ -109,12 +109,12 @@ public enum NewPacketHandler {
|
||||
private static class TEOrientableMessageHandler extends SimpleChannelInboundHandler<TEOrientableMessage> {
|
||||
|
||||
@Override
|
||||
protected void channelRead0(ChannelHandlerContext ctx, TEOrientableMessage msg) throws Exception {
|
||||
protected void channelRead0(ChannelHandlerContext ctx, TEOrientableMessage msg) {
|
||||
World world = AlchemicalWizardry.proxy.getClientWorld();
|
||||
TileEntity te = world.getTileEntity(msg.x, msg.y, msg.z);
|
||||
if (te instanceof TEOrientable) {
|
||||
((TEOrientable) te).setInputDirection(ForgeDirection.getOrientation(msg.input));
|
||||
((TEOrientable) te).setOutputDirection(ForgeDirection.getOrientation(msg.output));
|
||||
if (te instanceof TEOrientable teOrientable) {
|
||||
teOrientable.setInputDirection(ForgeDirection.getOrientation(msg.input));
|
||||
teOrientable.setOutputDirection(ForgeDirection.getOrientation(msg.output));
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -122,12 +122,10 @@ public enum NewPacketHandler {
|
||||
private static class TEPedestalMessageHandler extends SimpleChannelInboundHandler<TEPedestalMessage> {
|
||||
|
||||
@Override
|
||||
protected void channelRead0(ChannelHandlerContext ctx, TEPedestalMessage msg) throws Exception {
|
||||
protected void channelRead0(ChannelHandlerContext ctx, TEPedestalMessage msg) {
|
||||
World world = AlchemicalWizardry.proxy.getClientWorld();
|
||||
TileEntity te = world.getTileEntity(msg.x, msg.y, msg.z);
|
||||
if (te instanceof TEPedestal) {
|
||||
TEPedestal pedestal = (TEPedestal) te;
|
||||
|
||||
if (te instanceof TEPedestal pedestal) {
|
||||
pedestal.handlePacketData(msg.items);
|
||||
}
|
||||
}
|
||||
@@ -136,12 +134,10 @@ public enum NewPacketHandler {
|
||||
private static class TEPlinthMessageHandler extends SimpleChannelInboundHandler<TEPlinthMessage> {
|
||||
|
||||
@Override
|
||||
protected void channelRead0(ChannelHandlerContext ctx, TEPlinthMessage msg) throws Exception {
|
||||
protected void channelRead0(ChannelHandlerContext ctx, TEPlinthMessage msg) {
|
||||
World world = AlchemicalWizardry.proxy.getClientWorld();
|
||||
TileEntity te = world.getTileEntity(msg.x, msg.y, msg.z);
|
||||
if (te instanceof TEPlinth) {
|
||||
TEPlinth Plinth = (TEPlinth) te;
|
||||
|
||||
if (te instanceof TEPlinth Plinth) {
|
||||
Plinth.handlePacketData(msg.items);
|
||||
}
|
||||
}
|
||||
@@ -150,12 +146,10 @@ public enum NewPacketHandler {
|
||||
private static class TESocketMessageHandler extends SimpleChannelInboundHandler<TESocketMessage> {
|
||||
|
||||
@Override
|
||||
protected void channelRead0(ChannelHandlerContext ctx, TESocketMessage msg) throws Exception {
|
||||
protected void channelRead0(ChannelHandlerContext ctx, TESocketMessage msg) {
|
||||
World world = AlchemicalWizardry.proxy.getClientWorld();
|
||||
TileEntity te = world.getTileEntity(msg.x, msg.y, msg.z);
|
||||
if (te instanceof TESocket) {
|
||||
TESocket Socket = (TESocket) te;
|
||||
|
||||
if (te instanceof TESocket Socket) {
|
||||
Socket.handlePacketData(msg.items);
|
||||
}
|
||||
}
|
||||
@@ -164,12 +158,10 @@ public enum NewPacketHandler {
|
||||
private static class TETeleposerMessageHandler extends SimpleChannelInboundHandler<TETeleposerMessage> {
|
||||
|
||||
@Override
|
||||
protected void channelRead0(ChannelHandlerContext ctx, TETeleposerMessage msg) throws Exception {
|
||||
protected void channelRead0(ChannelHandlerContext ctx, TETeleposerMessage msg) {
|
||||
World world = AlchemicalWizardry.proxy.getClientWorld();
|
||||
TileEntity te = world.getTileEntity(msg.x, msg.y, msg.z);
|
||||
if (te instanceof TETeleposer) {
|
||||
TETeleposer Teleposer = (TETeleposer) te;
|
||||
|
||||
if (te instanceof TETeleposer Teleposer) {
|
||||
Teleposer.handlePacketData(msg.items);
|
||||
}
|
||||
}
|
||||
@@ -178,12 +170,10 @@ public enum NewPacketHandler {
|
||||
private static class TEWritingTableMessageHandler extends SimpleChannelInboundHandler<TEWritingTableMessage> {
|
||||
|
||||
@Override
|
||||
protected void channelRead0(ChannelHandlerContext ctx, TEWritingTableMessage msg) throws Exception {
|
||||
protected void channelRead0(ChannelHandlerContext ctx, TEWritingTableMessage msg) {
|
||||
World world = AlchemicalWizardry.proxy.getClientWorld();
|
||||
TileEntity te = world.getTileEntity(msg.x, msg.y, msg.z);
|
||||
if (te instanceof TEWritingTable) {
|
||||
TEWritingTable WritingTable = (TEWritingTable) te;
|
||||
|
||||
if (te instanceof TEWritingTable WritingTable) {
|
||||
WritingTable.handlePacketData(msg.items);
|
||||
}
|
||||
}
|
||||
@@ -192,7 +182,7 @@ public enum NewPacketHandler {
|
||||
private static class ParticleMessageHandler extends SimpleChannelInboundHandler<ParticleMessage> {
|
||||
|
||||
@Override
|
||||
protected void channelRead0(ChannelHandlerContext ctx, ParticleMessage msg) throws Exception {
|
||||
protected void channelRead0(ChannelHandlerContext ctx, ParticleMessage msg) {
|
||||
World world = AlchemicalWizardry.proxy.getClientWorld();
|
||||
|
||||
world.spawnParticle(msg.particle, msg.xCoord, msg.yCoord, msg.zCoord, msg.xVel, msg.yVel, msg.zVel);
|
||||
@@ -202,7 +192,7 @@ public enum NewPacketHandler {
|
||||
private static class VelocityMessageHandler extends SimpleChannelInboundHandler<VelocityMessage> {
|
||||
|
||||
@Override
|
||||
protected void channelRead0(ChannelHandlerContext ctx, VelocityMessage msg) throws Exception {
|
||||
protected void channelRead0(ChannelHandlerContext ctx, VelocityMessage msg) {
|
||||
EntityPlayer player = Minecraft.getMinecraft().thePlayer;
|
||||
|
||||
if (player != null) {
|
||||
@@ -216,12 +206,10 @@ public enum NewPacketHandler {
|
||||
private static class TEMasterStoneMessageHandler extends SimpleChannelInboundHandler<TEMasterStoneMessage> {
|
||||
|
||||
@Override
|
||||
protected void channelRead0(ChannelHandlerContext ctx, TEMasterStoneMessage msg) throws Exception {
|
||||
protected void channelRead0(ChannelHandlerContext ctx, TEMasterStoneMessage msg) {
|
||||
World world = AlchemicalWizardry.proxy.getClientWorld();
|
||||
TileEntity te = world.getTileEntity(msg.x, msg.y, msg.z);
|
||||
if (te instanceof TEMasterStone) {
|
||||
TEMasterStone masterStone = (TEMasterStone) te;
|
||||
|
||||
if (te instanceof TEMasterStone masterStone) {
|
||||
masterStone.setCurrentRitual(msg.ritual);
|
||||
masterStone.isRunning = msg.isRunning;
|
||||
}
|
||||
@@ -231,12 +219,10 @@ public enum NewPacketHandler {
|
||||
private static class TEReagentConduitMessageHandler extends SimpleChannelInboundHandler<TEReagentConduitMessage> {
|
||||
|
||||
@Override
|
||||
protected void channelRead0(ChannelHandlerContext ctx, TEReagentConduitMessage msg) throws Exception {
|
||||
protected void channelRead0(ChannelHandlerContext ctx, TEReagentConduitMessage msg) {
|
||||
World world = AlchemicalWizardry.proxy.getClientWorld();
|
||||
TileEntity te = world.getTileEntity(msg.x, msg.y, msg.z);
|
||||
if (te instanceof TEReagentConduit) {
|
||||
TEReagentConduit reagentConduit = (TEReagentConduit) te;
|
||||
|
||||
if (te instanceof TEReagentConduit reagentConduit) {
|
||||
reagentConduit.destinationList = msg.destinationList;
|
||||
}
|
||||
}
|
||||
@@ -245,7 +231,7 @@ public enum NewPacketHandler {
|
||||
private static class CurrentLPMessageHandler extends SimpleChannelInboundHandler<CurrentLPMessage> {
|
||||
|
||||
@Override
|
||||
protected void channelRead0(ChannelHandlerContext ctx, CurrentLPMessage msg) throws Exception {
|
||||
protected void channelRead0(ChannelHandlerContext ctx, CurrentLPMessage msg) {
|
||||
EntityPlayer player = Minecraft.getMinecraft().thePlayer;
|
||||
|
||||
APISpellHelper.setPlayerLPTag(player, msg.currentLP);
|
||||
@@ -256,7 +242,7 @@ public enum NewPacketHandler {
|
||||
private static class CurrentReagentBarMessageHandler extends SimpleChannelInboundHandler<CurrentReagentBarMessage> {
|
||||
|
||||
@Override
|
||||
protected void channelRead0(ChannelHandlerContext ctx, CurrentReagentBarMessage msg) throws Exception {
|
||||
protected void channelRead0(ChannelHandlerContext ctx, CurrentReagentBarMessage msg) {
|
||||
EntityPlayer player = Minecraft.getMinecraft().thePlayer;
|
||||
|
||||
APISpellHelper.setPlayerReagentType(player, msg.reagent);
|
||||
@@ -268,7 +254,7 @@ public enum NewPacketHandler {
|
||||
private static class CurrentAddedHPMessageHandler extends SimpleChannelInboundHandler<CurrentAddedHPMessage> {
|
||||
|
||||
@Override
|
||||
protected void channelRead0(ChannelHandlerContext ctx, CurrentAddedHPMessage msg) throws Exception {
|
||||
protected void channelRead0(ChannelHandlerContext ctx, CurrentAddedHPMessage msg) {
|
||||
EntityPlayer player = Minecraft.getMinecraft().thePlayer;
|
||||
|
||||
APISpellHelper.setCurrentAdditionalHP(player, msg.currentHP);
|
||||
@@ -283,7 +269,7 @@ public enum NewPacketHandler {
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void channelRead0(ChannelHandlerContext ctx, KeyboardMessage msg) throws Exception {
|
||||
protected void channelRead0(ChannelHandlerContext ctx, KeyboardMessage msg) {
|
||||
System.out.println("Hmmm");
|
||||
}
|
||||
}
|
||||
@@ -291,7 +277,7 @@ public enum NewPacketHandler {
|
||||
private static class GaiaBiomeChangeMessageHandler extends SimpleChannelInboundHandler<GaiaBiomeChangeMessage> {
|
||||
|
||||
@Override
|
||||
protected void channelRead0(ChannelHandlerContext ctx, GaiaBiomeChangeMessage msg) throws Exception {
|
||||
protected void channelRead0(ChannelHandlerContext ctx, GaiaBiomeChangeMessage msg) {
|
||||
Chunk chunk = AlchemicalWizardry.proxy.getClientWorld().getChunkFromChunkCoords(msg.chunkX, msg.chunkZ);
|
||||
if (chunk != null) {
|
||||
byte[] biomeArray = chunk.getBiomeArray();
|
||||
@@ -449,30 +435,7 @@ public enum NewPacketHandler {
|
||||
public static final int maskByteCount = 32;
|
||||
}
|
||||
|
||||
private class ClientToServerCodec extends FMLIndexedMessageToMessageCodec<BMMessage> {
|
||||
|
||||
public ClientToServerCodec() {}
|
||||
|
||||
@Override
|
||||
public void encodeInto(ChannelHandlerContext ctx, BMMessage msg, ByteBuf target) throws Exception {
|
||||
target.writeInt(msg.index);
|
||||
|
||||
// switch(msg.index)
|
||||
{}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void decodeInto(ChannelHandlerContext ctx, ByteBuf source, BMMessage msg) {
|
||||
int index = source.readInt();
|
||||
|
||||
System.out.println("Packet is recieved and being decoded");
|
||||
|
||||
// switch(index)
|
||||
{}
|
||||
}
|
||||
}
|
||||
|
||||
private class TEAltarCodec extends FMLIndexedMessageToMessageCodec<BMMessage> {
|
||||
private static class TEAltarCodec extends FMLIndexedMessageToMessageCodec<BMMessage> {
|
||||
|
||||
public TEAltarCodec() {
|
||||
addDiscriminator(0, TEAltarMessage.class);
|
||||
@@ -494,175 +457,141 @@ public enum NewPacketHandler {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void encodeInto(ChannelHandlerContext ctx, BMMessage msg, ByteBuf target) throws Exception {
|
||||
public void encodeInto(ChannelHandlerContext ctx, BMMessage msg, ByteBuf target) {
|
||||
target.writeInt(msg.index);
|
||||
|
||||
switch (msg.index) {
|
||||
case 0:
|
||||
target.writeInt(((TEAltarMessage) msg).x);
|
||||
target.writeInt(((TEAltarMessage) msg).y);
|
||||
target.writeInt(((TEAltarMessage) msg).z);
|
||||
case 0 -> {
|
||||
TEAltarMessage m = (TEAltarMessage) msg;
|
||||
target.writeInt(m.x);
|
||||
target.writeInt(m.y);
|
||||
target.writeInt(m.z);
|
||||
|
||||
target.writeBoolean(((TEAltarMessage) msg).items != null);
|
||||
if (((TEAltarMessage) msg).items != null) {
|
||||
int[] items = ((TEAltarMessage) msg).items;
|
||||
for (int j = 0; j < items.length; j++) {
|
||||
int i = items[j];
|
||||
target.writeInt(i);
|
||||
}
|
||||
target.writeBoolean(m.items != null);
|
||||
if (m.items != null) {
|
||||
int[] items = m.items;
|
||||
Arrays.stream(items).forEach(target::writeInt);
|
||||
}
|
||||
|
||||
target.writeBoolean(((TEAltarMessage) msg).fluids != null);
|
||||
if (((TEAltarMessage) msg).fluids != null) {
|
||||
int[] fluids = ((TEAltarMessage) msg).fluids;
|
||||
for (int j = 0; j < fluids.length; j++) {
|
||||
int i = fluids[j];
|
||||
target.writeInt(i);
|
||||
}
|
||||
target.writeBoolean(m.fluids != null);
|
||||
if (m.fluids != null) {
|
||||
int[] fluids = m.fluids;
|
||||
Arrays.stream(fluids).forEach(target::writeInt);
|
||||
}
|
||||
|
||||
target.writeInt(((TEAltarMessage) msg).capacity);
|
||||
target.writeInt(m.capacity);
|
||||
}
|
||||
case 1 -> {
|
||||
TEOrientableMessage m = (TEOrientableMessage) msg;
|
||||
target.writeInt(m.x);
|
||||
target.writeInt(m.y);
|
||||
target.writeInt(m.z);
|
||||
|
||||
break;
|
||||
target.writeInt(m.input);
|
||||
target.writeInt(m.output);
|
||||
}
|
||||
case 2 -> {
|
||||
TEPedestalMessage m = (TEPedestalMessage) msg;
|
||||
target.writeInt(m.x);
|
||||
target.writeInt(m.y);
|
||||
target.writeInt(m.z);
|
||||
|
||||
case 1:
|
||||
target.writeInt(((TEOrientableMessage) msg).x);
|
||||
target.writeInt(((TEOrientableMessage) msg).y);
|
||||
target.writeInt(((TEOrientableMessage) msg).z);
|
||||
|
||||
target.writeInt(((TEOrientableMessage) msg).input);
|
||||
target.writeInt(((TEOrientableMessage) msg).output);
|
||||
|
||||
break;
|
||||
|
||||
case 2:
|
||||
target.writeInt(((TEPedestalMessage) msg).x);
|
||||
target.writeInt(((TEPedestalMessage) msg).y);
|
||||
target.writeInt(((TEPedestalMessage) msg).z);
|
||||
|
||||
target.writeBoolean(((TEPedestalMessage) msg).items != null);
|
||||
if (((TEPedestalMessage) msg).items != null) {
|
||||
int[] items = ((TEPedestalMessage) msg).items;
|
||||
for (int j = 0; j < items.length; j++) {
|
||||
int i = items[j];
|
||||
target.writeInt(i);
|
||||
}
|
||||
target.writeBoolean(m.items != null);
|
||||
if (m.items != null) {
|
||||
int[] items = m.items;
|
||||
Arrays.stream(items).forEach(target::writeInt);
|
||||
}
|
||||
}
|
||||
case 3 -> {
|
||||
TEPlinthMessage m = (TEPlinthMessage) msg;
|
||||
target.writeInt(m.x);
|
||||
target.writeInt(m.y);
|
||||
target.writeInt(m.z);
|
||||
|
||||
break;
|
||||
|
||||
case 3:
|
||||
target.writeInt(((TEPlinthMessage) msg).x);
|
||||
target.writeInt(((TEPlinthMessage) msg).y);
|
||||
target.writeInt(((TEPlinthMessage) msg).z);
|
||||
|
||||
target.writeBoolean(((TEPlinthMessage) msg).items != null);
|
||||
if (((TEPlinthMessage) msg).items != null) {
|
||||
int[] items = ((TEPlinthMessage) msg).items;
|
||||
for (int j = 0; j < items.length; j++) {
|
||||
int i = items[j];
|
||||
target.writeInt(i);
|
||||
}
|
||||
target.writeBoolean(m.items != null);
|
||||
if (m.items != null) {
|
||||
int[] items = m.items;
|
||||
Arrays.stream(items).forEach(target::writeInt);
|
||||
}
|
||||
}
|
||||
case 4 -> {
|
||||
TESocketMessage m = (TESocketMessage) msg;
|
||||
target.writeInt(m.x);
|
||||
target.writeInt(m.y);
|
||||
target.writeInt(m.z);
|
||||
|
||||
break;
|
||||
|
||||
case 4:
|
||||
target.writeInt(((TESocketMessage) msg).x);
|
||||
target.writeInt(((TESocketMessage) msg).y);
|
||||
target.writeInt(((TESocketMessage) msg).z);
|
||||
|
||||
target.writeBoolean(((TESocketMessage) msg).items != null);
|
||||
if (((TESocketMessage) msg).items != null) {
|
||||
int[] items = ((TESocketMessage) msg).items;
|
||||
for (int j = 0; j < items.length; j++) {
|
||||
int i = items[j];
|
||||
target.writeInt(i);
|
||||
}
|
||||
target.writeBoolean(m.items != null);
|
||||
if (m.items != null) {
|
||||
int[] items = m.items;
|
||||
Arrays.stream(items).forEach(target::writeInt);
|
||||
}
|
||||
}
|
||||
case 5 -> {
|
||||
TETeleposerMessage m = (TETeleposerMessage) msg;
|
||||
target.writeInt(m.x);
|
||||
target.writeInt(m.y);
|
||||
target.writeInt(m.z);
|
||||
|
||||
break;
|
||||
|
||||
case 5:
|
||||
target.writeInt(((TETeleposerMessage) msg).x);
|
||||
target.writeInt(((TETeleposerMessage) msg).y);
|
||||
target.writeInt(((TETeleposerMessage) msg).z);
|
||||
|
||||
target.writeBoolean(((TETeleposerMessage) msg).items != null);
|
||||
if (((TETeleposerMessage) msg).items != null) {
|
||||
int[] items = ((TETeleposerMessage) msg).items;
|
||||
for (int j = 0; j < items.length; j++) {
|
||||
int i = items[j];
|
||||
target.writeInt(i);
|
||||
}
|
||||
target.writeBoolean(m.items != null);
|
||||
if (m.items != null) {
|
||||
int[] items = m.items;
|
||||
Arrays.stream(items).forEach(target::writeInt);
|
||||
}
|
||||
}
|
||||
case 6 -> {
|
||||
TEWritingTableMessage m = (TEWritingTableMessage) msg;
|
||||
target.writeInt(m.x);
|
||||
target.writeInt(m.y);
|
||||
target.writeInt(m.z);
|
||||
|
||||
break;
|
||||
|
||||
case 6:
|
||||
target.writeInt(((TEWritingTableMessage) msg).x);
|
||||
target.writeInt(((TEWritingTableMessage) msg).y);
|
||||
target.writeInt(((TEWritingTableMessage) msg).z);
|
||||
|
||||
target.writeBoolean(((TEWritingTableMessage) msg).items != null);
|
||||
if (((TEWritingTableMessage) msg).items != null) {
|
||||
int[] items = ((TEWritingTableMessage) msg).items;
|
||||
for (int j = 0; j < items.length; j++) {
|
||||
int i = items[j];
|
||||
target.writeInt(i);
|
||||
}
|
||||
target.writeBoolean(m.items != null);
|
||||
if (m.items != null) {
|
||||
int[] items = m.items;
|
||||
Arrays.stream(items).forEach(target::writeInt);
|
||||
}
|
||||
|
||||
break;
|
||||
|
||||
case 7:
|
||||
String str = ((ParticleMessage) msg).particle;
|
||||
}
|
||||
case 7 -> {
|
||||
ParticleMessage m = (ParticleMessage) msg;
|
||||
String str = m.particle;
|
||||
target.writeInt(str.length());
|
||||
for (int i = 0; i < str.length(); i++) {
|
||||
target.writeChar(str.charAt(i));
|
||||
}
|
||||
IntStream.range(0, str.length()).map(str::charAt).forEach(target::writeChar);
|
||||
|
||||
target.writeDouble(((ParticleMessage) msg).xCoord);
|
||||
target.writeDouble(((ParticleMessage) msg).yCoord);
|
||||
target.writeDouble(((ParticleMessage) msg).zCoord);
|
||||
target.writeDouble(m.xCoord);
|
||||
target.writeDouble(m.yCoord);
|
||||
target.writeDouble(m.zCoord);
|
||||
|
||||
target.writeDouble(((ParticleMessage) msg).xVel);
|
||||
target.writeDouble(((ParticleMessage) msg).yVel);
|
||||
target.writeDouble(((ParticleMessage) msg).zVel);
|
||||
target.writeDouble(m.xVel);
|
||||
target.writeDouble(m.yVel);
|
||||
target.writeDouble(m.zVel);
|
||||
}
|
||||
case 8 -> {
|
||||
VelocityMessage m = (VelocityMessage) msg;
|
||||
target.writeDouble(m.xVel);
|
||||
target.writeDouble(m.yVel);
|
||||
target.writeDouble(m.zVel);
|
||||
}
|
||||
case 9 -> {
|
||||
TEMasterStoneMessage m = (TEMasterStoneMessage) msg;
|
||||
target.writeInt(m.x);
|
||||
target.writeInt(m.y);
|
||||
target.writeInt(m.z);
|
||||
|
||||
break;
|
||||
|
||||
case 8:
|
||||
target.writeDouble(((VelocityMessage) msg).xVel);
|
||||
target.writeDouble(((VelocityMessage) msg).yVel);
|
||||
target.writeDouble(((VelocityMessage) msg).zVel);
|
||||
|
||||
break;
|
||||
|
||||
case 9:
|
||||
target.writeInt(((TEMasterStoneMessage) msg).x);
|
||||
target.writeInt(((TEMasterStoneMessage) msg).y);
|
||||
target.writeInt(((TEMasterStoneMessage) msg).z);
|
||||
|
||||
String ritual = ((TEMasterStoneMessage) msg).ritual;
|
||||
String ritual = m.ritual;
|
||||
target.writeInt(ritual.length());
|
||||
for (int i = 0; i < ritual.length(); i++) {
|
||||
target.writeChar(ritual.charAt(i));
|
||||
}
|
||||
IntStream.range(0, ritual.length()).map(ritual::charAt).forEach(target::writeChar);
|
||||
|
||||
target.writeBoolean(((TEMasterStoneMessage) msg).isRunning);
|
||||
target.writeBoolean(m.isRunning);
|
||||
}
|
||||
case 10 -> {
|
||||
TEReagentConduitMessage m = (TEReagentConduitMessage) msg;
|
||||
target.writeInt(m.x);
|
||||
target.writeInt(m.y);
|
||||
target.writeInt(m.z);
|
||||
|
||||
break;
|
||||
|
||||
case 10:
|
||||
target.writeInt(((TEReagentConduitMessage) msg).x);
|
||||
target.writeInt(((TEReagentConduitMessage) msg).y);
|
||||
target.writeInt(((TEReagentConduitMessage) msg).z);
|
||||
|
||||
List<ColourAndCoords> list = ((TEReagentConduitMessage) msg).destinationList;
|
||||
List<ColourAndCoords> list = m.destinationList;
|
||||
target.writeInt(list.size());
|
||||
|
||||
for (ColourAndCoords colourSet : list) {
|
||||
list.forEach(colourSet -> {
|
||||
target.writeInt(colourSet.colourRed);
|
||||
target.writeInt(colourSet.colourGreen);
|
||||
target.writeInt(colourSet.colourBlue);
|
||||
@@ -670,49 +599,37 @@ public enum NewPacketHandler {
|
||||
target.writeInt(colourSet.xCoord);
|
||||
target.writeInt(colourSet.yCoord);
|
||||
target.writeInt(colourSet.zCoord);
|
||||
}
|
||||
|
||||
break;
|
||||
|
||||
case 11:
|
||||
target.writeInt(((CurrentLPMessage) msg).currentLP);
|
||||
target.writeInt(((CurrentLPMessage) msg).maxLP);
|
||||
|
||||
break;
|
||||
|
||||
case 12:
|
||||
char[] charSet = ((CurrentReagentBarMessage) msg).reagent.toCharArray();
|
||||
});
|
||||
}
|
||||
case 11 -> {
|
||||
CurrentLPMessage m = (CurrentLPMessage) msg;
|
||||
target.writeInt(m.currentLP);
|
||||
target.writeInt(m.maxLP);
|
||||
}
|
||||
case 12 -> {
|
||||
CurrentReagentBarMessage m = (CurrentReagentBarMessage) msg;
|
||||
char[] charSet = m.reagent.toCharArray();
|
||||
target.writeInt(charSet.length);
|
||||
for (char cha : charSet) {
|
||||
target.writeChar(cha);
|
||||
}
|
||||
target.writeFloat(((CurrentReagentBarMessage) msg).currentAR);
|
||||
target.writeFloat(((CurrentReagentBarMessage) msg).maxAR);
|
||||
|
||||
break;
|
||||
|
||||
case 13:
|
||||
target.writeFloat(((CurrentAddedHPMessage) msg).currentHP);
|
||||
target.writeFloat(((CurrentAddedHPMessage) msg).maxHP);
|
||||
|
||||
break;
|
||||
|
||||
case 14:
|
||||
System.out.println("Packet is being encoded");
|
||||
|
||||
target.writeByte(((KeyboardMessage) msg).keyPressed);
|
||||
break;
|
||||
|
||||
case 15:
|
||||
target.writeInt(((GaiaBiomeChangeMessage) msg).chunkX);
|
||||
target.writeInt(((GaiaBiomeChangeMessage) msg).chunkZ);
|
||||
target.writeByte(((GaiaBiomeChangeMessage) msg).biome);
|
||||
byte[] arr = Arrays.copyOf(
|
||||
((GaiaBiomeChangeMessage) msg).mask.toByteArray(),
|
||||
GaiaBiomeChangeMessage.maskByteCount);
|
||||
target.writeFloat(m.currentAR);
|
||||
target.writeFloat(m.maxAR);
|
||||
}
|
||||
case 13 -> {
|
||||
CurrentAddedHPMessage m = (CurrentAddedHPMessage) msg;
|
||||
target.writeFloat(m.currentHP);
|
||||
target.writeFloat(m.maxHP);
|
||||
}
|
||||
case 14 -> target.writeByte(((KeyboardMessage) msg).keyPressed);
|
||||
case 15 -> {
|
||||
GaiaBiomeChangeMessage m = (GaiaBiomeChangeMessage) msg;
|
||||
target.writeInt(m.chunkX);
|
||||
target.writeInt(m.chunkZ);
|
||||
target.writeByte(m.biome);
|
||||
byte[] arr = Arrays.copyOf(m.mask.toByteArray(), GaiaBiomeChangeMessage.maskByteCount);
|
||||
target.writeBytes(arr);
|
||||
break;
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -721,233 +638,183 @@ public enum NewPacketHandler {
|
||||
int index = dat.readInt();
|
||||
|
||||
switch (index) {
|
||||
case 0:
|
||||
((TEAltarMessage) msg).x = dat.readInt();
|
||||
((TEAltarMessage) msg).y = dat.readInt();
|
||||
((TEAltarMessage) msg).z = dat.readInt();
|
||||
case 0 -> {
|
||||
TEAltarMessage m = (TEAltarMessage) msg;
|
||||
m.x = dat.readInt();
|
||||
m.y = dat.readInt();
|
||||
m.z = dat.readInt();
|
||||
boolean hasStacks = dat.readBoolean();
|
||||
|
||||
((TEAltarMessage) msg).items = new int[TEAltar.sizeInv * 3];
|
||||
m.items = new int[TEAltar.sizeInv * 3];
|
||||
if (hasStacks) {
|
||||
((TEAltarMessage) msg).items = new int[TEAltar.sizeInv * 3];
|
||||
for (int i = 0; i < ((TEAltarMessage) msg).items.length; i++) {
|
||||
((TEAltarMessage) msg).items[i] = dat.readInt();
|
||||
}
|
||||
m.items = new int[TEAltar.sizeInv * 3];
|
||||
IntStream.range(0, m.items.length).forEach(i -> m.items[i] = dat.readInt());
|
||||
}
|
||||
|
||||
boolean hasFluids = dat.readBoolean();
|
||||
((TEAltarMessage) msg).fluids = new int[6];
|
||||
if (hasFluids) for (int i = 0; i < ((TEAltarMessage) msg).fluids.length; i++) {
|
||||
((TEAltarMessage) msg).fluids[i] = dat.readInt();
|
||||
m.fluids = new int[6];
|
||||
if (hasFluids) IntStream.range(0, m.fluids.length).forEach(i -> m.fluids[i] = dat.readInt());
|
||||
|
||||
m.capacity = dat.readInt();
|
||||
}
|
||||
case 1 -> {
|
||||
TEOrientableMessage m = (TEOrientableMessage) msg;
|
||||
m.x = dat.readInt();
|
||||
m.y = dat.readInt();
|
||||
m.z = dat.readInt();
|
||||
|
||||
m.input = dat.readInt();
|
||||
m.output = dat.readInt();
|
||||
}
|
||||
case 2 -> {
|
||||
TEPedestalMessage m = (TEPedestalMessage) msg;
|
||||
m.x = dat.readInt();
|
||||
m.y = dat.readInt();
|
||||
m.z = dat.readInt();
|
||||
|
||||
boolean hasStacks = dat.readBoolean();
|
||||
|
||||
m.items = new int[TEPedestal.sizeInv * 3];
|
||||
if (hasStacks) {
|
||||
m.items = new int[TEPedestal.sizeInv * 3];
|
||||
IntStream.range(0, m.items.length).forEach(i -> m.items[i] = dat.readInt());
|
||||
}
|
||||
}
|
||||
case 3 -> {
|
||||
TEPlinthMessage m = (TEPlinthMessage) msg;
|
||||
m.x = dat.readInt();
|
||||
m.y = dat.readInt();
|
||||
m.z = dat.readInt();
|
||||
|
||||
((TEAltarMessage) msg).capacity = dat.readInt();
|
||||
boolean hasStacks = dat.readBoolean();
|
||||
|
||||
break;
|
||||
|
||||
case 1:
|
||||
((TEOrientableMessage) msg).x = dat.readInt();
|
||||
((TEOrientableMessage) msg).y = dat.readInt();
|
||||
((TEOrientableMessage) msg).z = dat.readInt();
|
||||
|
||||
((TEOrientableMessage) msg).input = dat.readInt();
|
||||
((TEOrientableMessage) msg).output = dat.readInt();
|
||||
|
||||
break;
|
||||
|
||||
case 2:
|
||||
((TEPedestalMessage) msg).x = dat.readInt();
|
||||
((TEPedestalMessage) msg).y = dat.readInt();
|
||||
((TEPedestalMessage) msg).z = dat.readInt();
|
||||
|
||||
boolean hasStacks1 = dat.readBoolean();
|
||||
|
||||
((TEPedestalMessage) msg).items = new int[TEPedestal.sizeInv * 3];
|
||||
if (hasStacks1) {
|
||||
((TEPedestalMessage) msg).items = new int[TEPedestal.sizeInv * 3];
|
||||
for (int i = 0; i < ((TEPedestalMessage) msg).items.length; i++) {
|
||||
((TEPedestalMessage) msg).items[i] = dat.readInt();
|
||||
}
|
||||
m.items = new int[TEPlinth.sizeInv * 3];
|
||||
if (hasStacks) {
|
||||
m.items = new int[TEPlinth.sizeInv * 3];
|
||||
IntStream.range(0, m.items.length).forEach(i -> m.items[i] = dat.readInt());
|
||||
}
|
||||
}
|
||||
case 4 -> {
|
||||
TESocketMessage m = (TESocketMessage) msg;
|
||||
m.x = dat.readInt();
|
||||
m.y = dat.readInt();
|
||||
m.z = dat.readInt();
|
||||
|
||||
break;
|
||||
boolean hasStacks = dat.readBoolean();
|
||||
|
||||
case 3:
|
||||
((TEPlinthMessage) msg).x = dat.readInt();
|
||||
((TEPlinthMessage) msg).y = dat.readInt();
|
||||
((TEPlinthMessage) msg).z = dat.readInt();
|
||||
|
||||
boolean hasStacks2 = dat.readBoolean();
|
||||
|
||||
((TEPlinthMessage) msg).items = new int[TEPlinth.sizeInv * 3];
|
||||
if (hasStacks2) {
|
||||
((TEPlinthMessage) msg).items = new int[TEPlinth.sizeInv * 3];
|
||||
for (int i = 0; i < ((TEPlinthMessage) msg).items.length; i++) {
|
||||
((TEPlinthMessage) msg).items[i] = dat.readInt();
|
||||
}
|
||||
m.items = new int[TESocket.sizeInv * 3];
|
||||
if (hasStacks) {
|
||||
m.items = new int[TESocket.sizeInv * 3];
|
||||
IntStream.range(0, m.items.length).forEach(i -> m.items[i] = dat.readInt());
|
||||
}
|
||||
}
|
||||
case 5 -> {
|
||||
TETeleposerMessage m = (TETeleposerMessage) msg;
|
||||
m.x = dat.readInt();
|
||||
m.y = dat.readInt();
|
||||
m.z = dat.readInt();
|
||||
|
||||
break;
|
||||
boolean hasStacks = dat.readBoolean();
|
||||
|
||||
case 4:
|
||||
((TESocketMessage) msg).x = dat.readInt();
|
||||
((TESocketMessage) msg).y = dat.readInt();
|
||||
((TESocketMessage) msg).z = dat.readInt();
|
||||
|
||||
boolean hasStacks3 = dat.readBoolean();
|
||||
|
||||
((TESocketMessage) msg).items = new int[TESocket.sizeInv * 3];
|
||||
if (hasStacks3) {
|
||||
((TESocketMessage) msg).items = new int[TESocket.sizeInv * 3];
|
||||
for (int i = 0; i < ((TESocketMessage) msg).items.length; i++) {
|
||||
((TESocketMessage) msg).items[i] = dat.readInt();
|
||||
}
|
||||
m.items = new int[TETeleposer.sizeInv * 3];
|
||||
if (hasStacks) {
|
||||
m.items = new int[TETeleposer.sizeInv * 3];
|
||||
IntStream.range(0, m.items.length).forEach(i -> m.items[i] = dat.readInt());
|
||||
}
|
||||
}
|
||||
case 6 -> {
|
||||
TEWritingTableMessage m = (TEWritingTableMessage) msg;
|
||||
m.x = dat.readInt();
|
||||
m.y = dat.readInt();
|
||||
m.z = dat.readInt();
|
||||
|
||||
break;
|
||||
boolean hasStacks = dat.readBoolean();
|
||||
|
||||
case 5:
|
||||
((TETeleposerMessage) msg).x = dat.readInt();
|
||||
((TETeleposerMessage) msg).y = dat.readInt();
|
||||
((TETeleposerMessage) msg).z = dat.readInt();
|
||||
|
||||
boolean hasStacks4 = dat.readBoolean();
|
||||
|
||||
((TETeleposerMessage) msg).items = new int[TETeleposer.sizeInv * 3];
|
||||
if (hasStacks4) {
|
||||
((TETeleposerMessage) msg).items = new int[TETeleposer.sizeInv * 3];
|
||||
for (int i = 0; i < ((TETeleposerMessage) msg).items.length; i++) {
|
||||
((TETeleposerMessage) msg).items[i] = dat.readInt();
|
||||
}
|
||||
m.items = new int[TEWritingTable.sizeInv * 3];
|
||||
if (hasStacks) {
|
||||
m.items = new int[TEWritingTable.sizeInv * 3];
|
||||
IntStream.range(0, m.items.length).forEach(i -> m.items[i] = dat.readInt());
|
||||
}
|
||||
}
|
||||
case 7 -> {
|
||||
String str = IntStream.range(0, dat.readInt()).mapToObj(i -> String.valueOf(dat.readChar()))
|
||||
.collect(Collectors.joining());
|
||||
|
||||
break;
|
||||
ParticleMessage m = (ParticleMessage) msg;
|
||||
m.particle = str;
|
||||
|
||||
case 6:
|
||||
((TEWritingTableMessage) msg).x = dat.readInt();
|
||||
((TEWritingTableMessage) msg).y = dat.readInt();
|
||||
((TEWritingTableMessage) msg).z = dat.readInt();
|
||||
m.xCoord = dat.readDouble();
|
||||
m.yCoord = dat.readDouble();
|
||||
m.zCoord = dat.readDouble();
|
||||
|
||||
boolean hasStacks5 = dat.readBoolean();
|
||||
m.xVel = dat.readDouble();
|
||||
m.yVel = dat.readDouble();
|
||||
m.zVel = dat.readDouble();
|
||||
}
|
||||
case 8 -> {
|
||||
VelocityMessage m = (VelocityMessage) msg;
|
||||
m.xVel = dat.readDouble();
|
||||
m.yVel = dat.readDouble();
|
||||
m.zVel = dat.readDouble();
|
||||
}
|
||||
case 9 -> {
|
||||
TEMasterStoneMessage m = (TEMasterStoneMessage) msg;
|
||||
m.x = dat.readInt();
|
||||
m.y = dat.readInt();
|
||||
m.z = dat.readInt();
|
||||
|
||||
((TEWritingTableMessage) msg).items = new int[TEWritingTable.sizeInv * 3];
|
||||
if (hasStacks5) {
|
||||
((TEWritingTableMessage) msg).items = new int[TEWritingTable.sizeInv * 3];
|
||||
for (int i = 0; i < ((TEWritingTableMessage) msg).items.length; i++) {
|
||||
((TEWritingTableMessage) msg).items[i] = dat.readInt();
|
||||
}
|
||||
}
|
||||
|
||||
break;
|
||||
|
||||
case 7:
|
||||
int size = dat.readInt();
|
||||
String str = "";
|
||||
|
||||
for (int i = 0; i < size; i++) {
|
||||
str = str + dat.readChar();
|
||||
}
|
||||
|
||||
((ParticleMessage) msg).particle = str;
|
||||
|
||||
((ParticleMessage) msg).xCoord = dat.readDouble();
|
||||
((ParticleMessage) msg).yCoord = dat.readDouble();
|
||||
((ParticleMessage) msg).zCoord = dat.readDouble();
|
||||
|
||||
((ParticleMessage) msg).xVel = dat.readDouble();
|
||||
((ParticleMessage) msg).yVel = dat.readDouble();
|
||||
((ParticleMessage) msg).zVel = dat.readDouble();
|
||||
|
||||
break;
|
||||
|
||||
case 8:
|
||||
((VelocityMessage) msg).xVel = dat.readDouble();
|
||||
((VelocityMessage) msg).yVel = dat.readDouble();
|
||||
((VelocityMessage) msg).zVel = dat.readDouble();
|
||||
|
||||
break;
|
||||
|
||||
case 9:
|
||||
((TEMasterStoneMessage) msg).x = dat.readInt();
|
||||
((TEMasterStoneMessage) msg).y = dat.readInt();
|
||||
((TEMasterStoneMessage) msg).z = dat.readInt();
|
||||
|
||||
int ritualStrSize = dat.readInt();
|
||||
String ritual = "";
|
||||
|
||||
for (int i = 0; i < ritualStrSize; i++) {
|
||||
ritual = ritual + dat.readChar();
|
||||
}
|
||||
|
||||
((TEMasterStoneMessage) msg).ritual = ritual;
|
||||
((TEMasterStoneMessage) msg).isRunning = dat.readBoolean();
|
||||
|
||||
break;
|
||||
|
||||
case 10:
|
||||
((TEReagentConduitMessage) msg).x = dat.readInt();
|
||||
((TEReagentConduitMessage) msg).y = dat.readInt();
|
||||
((TEReagentConduitMessage) msg).z = dat.readInt();
|
||||
m.ritual = IntStream.range(0, dat.readInt()).mapToObj(i -> String.valueOf(dat.readChar()))
|
||||
.collect(Collectors.joining());
|
||||
m.isRunning = dat.readBoolean();
|
||||
}
|
||||
case 10 -> {
|
||||
TEReagentConduitMessage m = (TEReagentConduitMessage) msg;
|
||||
m.x = dat.readInt();
|
||||
m.y = dat.readInt();
|
||||
m.z = dat.readInt();
|
||||
|
||||
int listSize = dat.readInt();
|
||||
|
||||
List<ColourAndCoords> list = new LinkedList();
|
||||
|
||||
for (int i = 0; i < listSize; i++) {
|
||||
list.add(
|
||||
new ColourAndCoords(
|
||||
dat.readInt(),
|
||||
dat.readInt(),
|
||||
dat.readInt(),
|
||||
dat.readInt(),
|
||||
dat.readInt(),
|
||||
dat.readInt(),
|
||||
dat.readInt()));
|
||||
}
|
||||
|
||||
((TEReagentConduitMessage) msg).destinationList = list;
|
||||
|
||||
break;
|
||||
|
||||
case 11:
|
||||
((CurrentLPMessage) msg).currentLP = dat.readInt();
|
||||
((CurrentLPMessage) msg).maxLP = dat.readInt();
|
||||
|
||||
break;
|
||||
|
||||
case 12:
|
||||
int size1 = dat.readInt();
|
||||
String str1 = "";
|
||||
for (int i = 0; i < size1; i++) {
|
||||
str1 = str1 + dat.readChar();
|
||||
}
|
||||
|
||||
((CurrentReagentBarMessage) msg).reagent = str1;
|
||||
((CurrentReagentBarMessage) msg).currentAR = dat.readFloat();
|
||||
((CurrentReagentBarMessage) msg).maxAR = dat.readFloat();
|
||||
|
||||
break;
|
||||
|
||||
case 13:
|
||||
((CurrentAddedHPMessage) msg).currentHP = dat.readFloat();
|
||||
((CurrentAddedHPMessage) msg).maxHP = dat.readFloat();
|
||||
|
||||
break;
|
||||
|
||||
case 14:
|
||||
System.out.println("Packet recieved: being decoded");
|
||||
((KeyboardMessage) msg).keyPressed = dat.readByte();
|
||||
break;
|
||||
|
||||
case 15:
|
||||
((GaiaBiomeChangeMessage) msg).chunkX = dat.readInt();
|
||||
((GaiaBiomeChangeMessage) msg).chunkZ = dat.readInt();
|
||||
((GaiaBiomeChangeMessage) msg).biome = dat.readByte();
|
||||
m.destinationList = IntStream.range(0, listSize)
|
||||
.mapToObj(
|
||||
i -> new ColourAndCoords(
|
||||
dat.readInt(),
|
||||
dat.readInt(),
|
||||
dat.readInt(),
|
||||
dat.readInt(),
|
||||
dat.readInt(),
|
||||
dat.readInt(),
|
||||
dat.readInt()))
|
||||
.collect(Collectors.toCollection(LinkedList::new));
|
||||
}
|
||||
case 11 -> {
|
||||
CurrentLPMessage m = (CurrentLPMessage) msg;
|
||||
m.currentLP = dat.readInt();
|
||||
m.maxLP = dat.readInt();
|
||||
}
|
||||
case 12 -> {
|
||||
CurrentReagentBarMessage m = (CurrentReagentBarMessage) msg;
|
||||
m.reagent = IntStream.range(0, dat.readInt()).mapToObj(i -> String.valueOf(dat.readChar()))
|
||||
.collect(Collectors.joining());
|
||||
m.currentAR = dat.readFloat();
|
||||
m.maxAR = dat.readFloat();
|
||||
}
|
||||
case 13 -> {
|
||||
CurrentAddedHPMessage m = (CurrentAddedHPMessage) msg;
|
||||
m.currentHP = dat.readFloat();
|
||||
m.maxHP = dat.readFloat();
|
||||
}
|
||||
case 14 -> ((KeyboardMessage) msg).keyPressed = dat.readByte();
|
||||
case 15 -> {
|
||||
GaiaBiomeChangeMessage m = (GaiaBiomeChangeMessage) msg;
|
||||
m.chunkX = dat.readInt();
|
||||
m.chunkZ = dat.readInt();
|
||||
m.biome = dat.readByte();
|
||||
|
||||
byte[] buffer = new byte[GaiaBiomeChangeMessage.maskByteCount];
|
||||
dat.readBytes(buffer);
|
||||
((GaiaBiomeChangeMessage) msg).mask = BitSet.valueOf(buffer);
|
||||
break;
|
||||
m.mask = BitSet.valueOf(buffer);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -972,8 +839,8 @@ public enum NewPacketHandler {
|
||||
msg.x = tileOrientable.xCoord;
|
||||
msg.y = tileOrientable.yCoord;
|
||||
msg.z = tileOrientable.zCoord;
|
||||
msg.input = tileOrientable.getIntForForgeDirection(tileOrientable.getInputDirection());
|
||||
msg.output = tileOrientable.getIntForForgeDirection(tileOrientable.getOutputDirection());
|
||||
msg.input = TEOrientable.getIntForForgeDirection(tileOrientable.getInputDirection());
|
||||
msg.output = TEOrientable.getIntForForgeDirection(tileOrientable.getOutputDirection());
|
||||
|
||||
return INSTANCE.channels.get(Side.SERVER).generatePacketFrom(msg);
|
||||
}
|
||||
@@ -1116,8 +983,6 @@ public enum NewPacketHandler {
|
||||
msg.index = 14;
|
||||
msg.keyPressed = bt;
|
||||
|
||||
System.out.println("Packet is being created");
|
||||
|
||||
return INSTANCE.channels.get(Side.CLIENT).generatePacketFrom(msg);
|
||||
}
|
||||
|
||||
|
||||
+9
-10
@@ -16,6 +16,8 @@ import net.minecraft.util.IIcon;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
import WayofTime.alchemicalWizardry.AlchemicalWizardry;
|
||||
import WayofTime.alchemicalWizardry.api.alchemy.energy.ReagentRegistry;
|
||||
import WayofTime.alchemicalWizardry.api.items.interfaces.IBindable;
|
||||
import WayofTime.alchemicalWizardry.api.items.interfaces.IBloodOrb;
|
||||
import WayofTime.alchemicalWizardry.api.items.interfaces.IReagentManipulator;
|
||||
import WayofTime.alchemicalWizardry.common.tileEntity.TEAlchemicCalcinator;
|
||||
@@ -87,12 +89,10 @@ public class BlockAlchemicCalcinator extends BlockContainer {
|
||||
Random rand = new Random();
|
||||
TileEntity tileEntity = world.getTileEntity(x, y, z);
|
||||
|
||||
if (!(tileEntity instanceof IInventory)) {
|
||||
if (!(tileEntity instanceof IInventory inventory)) {
|
||||
return;
|
||||
}
|
||||
|
||||
IInventory inventory = (IInventory) tileEntity;
|
||||
|
||||
for (int i = 0; i < inventory.getSizeInventory(); i++) {
|
||||
ItemStack item = inventory.getStackInSlot(i);
|
||||
|
||||
@@ -139,18 +139,17 @@ public class BlockAlchemicCalcinator extends BlockContainer {
|
||||
|
||||
if (playerItem.getItem() instanceof IBloodOrb) {
|
||||
if (tileEntity.getStackInSlot(0) == null) {
|
||||
IBindable.checkAndSetItemOwner(playerItem, player);
|
||||
ItemStack newItem = playerItem.copy();
|
||||
newItem.stackSize = 1;
|
||||
--playerItem.stackSize;
|
||||
tileEntity.setInventorySlotContents(0, newItem);
|
||||
}
|
||||
} else if (tileEntity.getStackInSlot(1) == null) {
|
||||
ItemStack newItem = playerItem.copy();
|
||||
newItem.stackSize = 1;
|
||||
--playerItem.stackSize;
|
||||
tileEntity.setInventorySlotContents(1, newItem);
|
||||
}
|
||||
|
||||
} else if (tileEntity.getStackInSlot(1) == null
|
||||
&& ReagentRegistry.getReagentStackForItem(playerItem) != null) {
|
||||
tileEntity.setInventorySlotContents(1, playerItem);
|
||||
player.inventory.setInventorySlotContents(player.inventory.currentItem, null);
|
||||
}
|
||||
} else {
|
||||
if (tileEntity.getStackInSlot(1) != null) {
|
||||
player.inventory.addItemStackToInventory(tileEntity.getStackInSlot(1));
|
||||
|
||||
@@ -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;
|
||||
@@ -54,14 +56,11 @@ public class BlockAltar extends BlockContainer {
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public IIcon getIcon(int side, int meta) {
|
||||
switch (side) {
|
||||
case 0:
|
||||
return bottomIcon;
|
||||
case 1:
|
||||
return topIcon;
|
||||
default:
|
||||
return sideIcon2;
|
||||
}
|
||||
return switch (side) {
|
||||
case 0 -> bottomIcon;
|
||||
case 1 -> topIcon;
|
||||
default -> sideIcon2;
|
||||
};
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -73,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
|
||||
|
||||
@@ -41,14 +41,11 @@ public class BlockConduit extends BlockOrientable {
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public IIcon getIcon(int side, int meta) {
|
||||
switch (side) {
|
||||
case 0:
|
||||
return bottomIcon;
|
||||
case 1:
|
||||
return topIcon;
|
||||
default:
|
||||
return sideIcon2;
|
||||
}
|
||||
return switch (side) {
|
||||
case 0 -> bottomIcon;
|
||||
case 1 -> topIcon;
|
||||
default -> sideIcon2;
|
||||
};
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -78,22 +78,13 @@ public class BlockCrucible extends BlockContainer {
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public IIcon getIcon(int side, int meta) {
|
||||
switch (side) {
|
||||
case 0:
|
||||
return bottomIcon;
|
||||
case 1:
|
||||
return topIcon;
|
||||
default:
|
||||
return sideIcon;
|
||||
}
|
||||
return switch (side) {
|
||||
case 0 -> bottomIcon;
|
||||
case 1 -> topIcon;
|
||||
default -> sideIcon;
|
||||
};
|
||||
}
|
||||
|
||||
// @Override
|
||||
// public AxisAlignedBB getCollisionBoundingBoxFromPool(World world, int x, int y, int z)
|
||||
// {
|
||||
// return null;
|
||||
// }
|
||||
|
||||
@Override
|
||||
public void setBlockBoundsBasedOnState(IBlockAccess world, int x, int y, int z) {
|
||||
this.setBlockBounds(0.3125F, 0.0F, 0.3125F, 0.6875F, 0.625F, 0.6875F);
|
||||
|
||||
@@ -17,10 +17,6 @@ import cpw.mods.fml.relauncher.SideOnly;
|
||||
|
||||
public class BlockCrystal extends Block {
|
||||
|
||||
// private Icon bloodRuneIcon;
|
||||
@SideOnly(Side.CLIENT)
|
||||
private IIcon fullIcon;
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
private IIcon brickIcon;
|
||||
|
||||
@@ -35,8 +31,7 @@ public class BlockCrystal extends Block {
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void registerBlockIcons(IIconRegister iconRegister) {
|
||||
this.blockIcon = iconRegister.registerIcon("AlchemicalWizardry:BlankRune");
|
||||
this.fullIcon = iconRegister.registerIcon("AlchemicalWizardry:ShardCluster");
|
||||
this.blockIcon = iconRegister.registerIcon("AlchemicalWizardry:ShardCluster");
|
||||
this.brickIcon = iconRegister.registerIcon("AlchemicalWizardry:ShardClusterBrick");
|
||||
}
|
||||
|
||||
@@ -57,16 +52,10 @@ public class BlockCrystal extends Block {
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public IIcon getIcon(int side, int meta) {
|
||||
switch (meta) {
|
||||
case 0:
|
||||
return fullIcon;
|
||||
|
||||
case 1:
|
||||
return brickIcon;
|
||||
|
||||
default:
|
||||
return blockIcon;
|
||||
if (meta == 1) {
|
||||
return brickIcon;
|
||||
}
|
||||
return blockIcon;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -18,9 +18,6 @@ import cpw.mods.fml.relauncher.SideOnly;
|
||||
|
||||
public class BlockEnchantmentGlyph extends Block implements IEnchantmentGlyph {
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
private IIcon enchantability;
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
private IIcon enchantmentLevel;
|
||||
|
||||
@@ -35,22 +32,17 @@ public class BlockEnchantmentGlyph extends Block implements IEnchantmentGlyph {
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void registerBlockIcons(IIconRegister iconRegister) {
|
||||
this.blockIcon = iconRegister.registerIcon("AlchemicalWizardry:LargeBloodStoneBrick");
|
||||
this.enchantability = iconRegister.registerIcon("AlchemicalWizardry:GlyphEnchantability");
|
||||
this.blockIcon = iconRegister.registerIcon("AlchemicalWizardry:GlyphEnchantability");
|
||||
this.enchantmentLevel = iconRegister.registerIcon("AlchemicalWizardry:GlyphEnchantmentLevel");
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public IIcon getIcon(int side, int meta) {
|
||||
switch (meta) {
|
||||
case 0:
|
||||
return enchantability;
|
||||
case 1:
|
||||
return enchantmentLevel;
|
||||
default:
|
||||
return this.blockIcon;
|
||||
if (meta == 1) {
|
||||
return enchantmentLevel;
|
||||
}
|
||||
return this.blockIcon;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -46,14 +46,11 @@ public class BlockHomHeart extends BlockContainer {
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public IIcon getIcon(int side, int meta) {
|
||||
switch (side) {
|
||||
case 0:
|
||||
return bottomIcon;
|
||||
case 1:
|
||||
return topIcon;
|
||||
default:
|
||||
return sideIcon;
|
||||
}
|
||||
return switch (side) {
|
||||
case 0 -> bottomIcon;
|
||||
case 1 -> topIcon;
|
||||
default -> sideIcon;
|
||||
};
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -12,7 +12,6 @@ import net.minecraft.inventory.IInventory;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.IIcon;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
import WayofTime.alchemicalWizardry.AlchemicalWizardry;
|
||||
@@ -22,15 +21,6 @@ import cpw.mods.fml.relauncher.SideOnly;
|
||||
|
||||
public class BlockPedestal extends BlockContainer {
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
private IIcon topIcon;
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
private IIcon sideIcon2;
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
private IIcon bottomIcon;
|
||||
|
||||
public BlockPedestal() {
|
||||
super(Material.rock);
|
||||
setHardness(2.0F);
|
||||
@@ -44,22 +34,7 @@ public class BlockPedestal extends BlockContainer {
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void registerBlockIcons(IIconRegister iconRegister) {
|
||||
this.topIcon = iconRegister.registerIcon("AlchemicalWizardry:ArcanePedestal");
|
||||
this.sideIcon2 = iconRegister.registerIcon("AlchemicalWizardry:BloodSocket");
|
||||
this.bottomIcon = iconRegister.registerIcon("AlchemicalWizardry:BloodSocket");
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public IIcon getIcon(int side, int meta) {
|
||||
switch (side) {
|
||||
case 0:
|
||||
return bottomIcon;
|
||||
case 1:
|
||||
return topIcon;
|
||||
default:
|
||||
return sideIcon2;
|
||||
}
|
||||
this.blockIcon = iconRegister.registerIcon("AlchemicalWizardry:ArcanePedestal");
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -12,7 +12,6 @@ import net.minecraft.inventory.IInventory;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.IIcon;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
import WayofTime.alchemicalWizardry.AlchemicalWizardry;
|
||||
@@ -22,15 +21,6 @@ import cpw.mods.fml.relauncher.SideOnly;
|
||||
|
||||
public class BlockPlinth extends BlockContainer {
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
private IIcon topIcon;
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
private IIcon sideIcon2;
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
private IIcon bottomIcon;
|
||||
|
||||
public BlockPlinth() {
|
||||
super(Material.rock);
|
||||
setHardness(2.0F);
|
||||
@@ -44,22 +34,7 @@ public class BlockPlinth extends BlockContainer {
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void registerBlockIcons(IIconRegister iconRegister) {
|
||||
this.topIcon = iconRegister.registerIcon("AlchemicalWizardry:ArcanePlinth");
|
||||
this.sideIcon2 = iconRegister.registerIcon("AlchemicalWizardry:BloodSocket");
|
||||
this.bottomIcon = iconRegister.registerIcon("AlchemicalWizardry:BloodSocket");
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public IIcon getIcon(int side, int meta) {
|
||||
switch (side) {
|
||||
case 0:
|
||||
return bottomIcon;
|
||||
case 1:
|
||||
return topIcon;
|
||||
default:
|
||||
return sideIcon2;
|
||||
}
|
||||
this.blockIcon = iconRegister.registerIcon("AlchemicalWizardry:ArcanePlinth");
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -2,11 +2,14 @@ package WayofTime.alchemicalWizardry.common.block;
|
||||
|
||||
import net.minecraft.block.BlockContainer;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
import WayofTime.alchemicalWizardry.common.tileEntity.TESchematicSaver;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
|
||||
public class BlockSchematicSaver extends BlockContainer {
|
||||
|
||||
@@ -18,6 +21,12 @@ public class BlockSchematicSaver extends BlockContainer {
|
||||
this.setBlockName("schematicSaver");
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void registerBlockIcons(IIconRegister iconRegister) {
|
||||
this.blockIcon = iconRegister.registerIcon("AlchemicalWizardry:SchematicSaver");
|
||||
}
|
||||
|
||||
@Override
|
||||
public TileEntity createNewTileEntity(World var1, int var2) {
|
||||
return new TESchematicSaver();
|
||||
|
||||
@@ -12,7 +12,6 @@ import net.minecraft.inventory.IInventory;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.IIcon;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
import WayofTime.alchemicalWizardry.AlchemicalWizardry;
|
||||
@@ -23,15 +22,6 @@ import cpw.mods.fml.relauncher.SideOnly;
|
||||
|
||||
public class BlockSocket extends BlockContainer {
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
private IIcon topIcon;
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
private IIcon sideIcon2;
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
private IIcon bottomIcon;
|
||||
|
||||
public BlockSocket() {
|
||||
super(Material.rock);
|
||||
setHardness(2.0F);
|
||||
@@ -44,22 +34,7 @@ public class BlockSocket extends BlockContainer {
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void registerBlockIcons(IIconRegister iconRegister) {
|
||||
this.topIcon = iconRegister.registerIcon("AlchemicalWizardry:BloodSocket");
|
||||
this.sideIcon2 = iconRegister.registerIcon("AlchemicalWizardry:BloodSocket");
|
||||
this.bottomIcon = iconRegister.registerIcon("AlchemicalWizardry:BloodSocket");
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public IIcon getIcon(int side, int meta) {
|
||||
switch (side) {
|
||||
case 0:
|
||||
return bottomIcon;
|
||||
case 1:
|
||||
return topIcon;
|
||||
default:
|
||||
return sideIcon2;
|
||||
}
|
||||
this.blockIcon = iconRegister.registerIcon("AlchemicalWizardry:BloodSocket");
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -8,7 +8,6 @@ import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
import net.minecraft.creativetab.CreativeTabs;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.IIcon;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
import WayofTime.alchemicalWizardry.AlchemicalWizardry;
|
||||
@@ -18,9 +17,6 @@ import cpw.mods.fml.relauncher.SideOnly;
|
||||
|
||||
public class BlockStabilityGlyph extends Block implements IStabilityGlyph {
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
private IIcon stability1;
|
||||
|
||||
public BlockStabilityGlyph() {
|
||||
super(Material.iron);
|
||||
setHardness(2.0F);
|
||||
@@ -32,19 +28,7 @@ public class BlockStabilityGlyph extends Block implements IStabilityGlyph {
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void registerBlockIcons(IIconRegister iconRegister) {
|
||||
this.blockIcon = iconRegister.registerIcon("AlchemicalWizardry:LargeBloodStoneBrick");
|
||||
this.stability1 = iconRegister.registerIcon("AlchemicalWizardry:GlyphStability1");
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public IIcon getIcon(int side, int meta) {
|
||||
switch (meta) {
|
||||
case 0:
|
||||
return stability1;
|
||||
default:
|
||||
return this.blockIcon;
|
||||
}
|
||||
this.blockIcon = iconRegister.registerIcon("AlchemicalWizardry:GlyphStability1");
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -4,7 +4,6 @@ import java.util.Random;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.BlockContainer;
|
||||
import net.minecraft.block.BlockMobSpawner;
|
||||
import net.minecraft.block.BlockPortal;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
@@ -16,18 +15,19 @@ import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.IIcon;
|
||||
import net.minecraft.world.IBlockAccess;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.common.MinecraftForge;
|
||||
|
||||
import WayofTime.alchemicalWizardry.AlchemicalWizardry;
|
||||
import WayofTime.alchemicalWizardry.api.event.TeleposeEvent;
|
||||
import WayofTime.alchemicalWizardry.api.items.interfaces.IBindable;
|
||||
import WayofTime.alchemicalWizardry.api.soulNetwork.SoulNetworkHandler;
|
||||
import WayofTime.alchemicalWizardry.common.demonVillage.tileEntity.TEDemonPortal;
|
||||
import WayofTime.alchemicalWizardry.common.items.TelepositionFocus;
|
||||
import WayofTime.alchemicalWizardry.common.tileEntity.TETeleposer;
|
||||
import codechicken.multipart.MultipartHelper;
|
||||
import codechicken.multipart.TileMultipart;
|
||||
import cpw.mods.fml.common.Optional;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
|
||||
@@ -37,10 +37,7 @@ public class BlockTeleposer extends BlockContainer {
|
||||
private IIcon topIcon;
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
private IIcon sideIcon2;
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
private IIcon bottomIcon;
|
||||
private IIcon sideIcon;
|
||||
|
||||
public BlockTeleposer() {
|
||||
super(Material.rock);
|
||||
@@ -54,21 +51,14 @@ public class BlockTeleposer extends BlockContainer {
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void registerBlockIcons(IIconRegister iconRegister) {
|
||||
this.topIcon = iconRegister.registerIcon("AlchemicalWizardry:Teleposer_Top");
|
||||
this.sideIcon2 = iconRegister.registerIcon("AlchemicalWizardry:Teleposer_Side");
|
||||
this.bottomIcon = iconRegister.registerIcon("AlchemicalWizardry:Teleposer_Side");
|
||||
this.sideIcon = iconRegister.registerIcon("AlchemicalWizardry:Teleposer_Side");
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public IIcon getIcon(int side, int meta) {
|
||||
switch (side) {
|
||||
case 0:
|
||||
return bottomIcon;
|
||||
case 1:
|
||||
return topIcon;
|
||||
default:
|
||||
return sideIcon2;
|
||||
}
|
||||
if (side == 1) return topIcon;
|
||||
return sideIcon;
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -76,23 +66,18 @@ public class BlockTeleposer extends BlockContainer {
|
||||
float these, float are) {
|
||||
ItemStack playerItem = player.getCurrentEquippedItem();
|
||||
|
||||
if (playerItem != null) {
|
||||
if (playerItem.getItem() instanceof TelepositionFocus) {
|
||||
SoulNetworkHandler.checkAndSetItemPlayer(playerItem, player);
|
||||
|
||||
if (playerItem.getTagCompound() == null) {
|
||||
playerItem.setTagCompound(new NBTTagCompound());
|
||||
}
|
||||
|
||||
NBTTagCompound itemTag = playerItem.getTagCompound();
|
||||
itemTag.setInteger("xCoord", x);
|
||||
itemTag.setInteger("yCoord", y);
|
||||
itemTag.setInteger("zCoord", z);
|
||||
itemTag.setInteger("dimensionId", world.provider.dimensionId);
|
||||
return true;
|
||||
}
|
||||
if (playerItem == null || !(playerItem.getItem() instanceof TelepositionFocus)) {
|
||||
player.openGui(AlchemicalWizardry.instance, 1, world, x, y, z);
|
||||
return true;
|
||||
}
|
||||
player.openGui(AlchemicalWizardry.instance, 1, world, x, y, z);
|
||||
|
||||
SoulNetworkHandler.checkAndSetItemPlayer(playerItem, player);
|
||||
|
||||
NBTTagCompound itemTag = IBindable.getTag(playerItem);
|
||||
itemTag.setInteger("xCoord", x);
|
||||
itemTag.setInteger("yCoord", y);
|
||||
itemTag.setInteger("zCoord", z);
|
||||
itemTag.setInteger("dimensionId", world.provider.dimensionId);
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -106,38 +91,36 @@ public class BlockTeleposer extends BlockContainer {
|
||||
Random rand = new Random();
|
||||
TileEntity tileEntity = world.getTileEntity(x, y, z);
|
||||
|
||||
if (!(tileEntity instanceof IInventory)) {
|
||||
if (!(tileEntity instanceof IInventory inventory)) {
|
||||
return;
|
||||
}
|
||||
|
||||
IInventory inventory = (IInventory) tileEntity;
|
||||
ItemStack item = inventory.getStackInSlot(0);
|
||||
|
||||
for (int i = 0; i < inventory.getSizeInventory(); i++) {
|
||||
ItemStack item = inventory.getStackInSlot(i);
|
||||
|
||||
if (item != null && item.stackSize > 0) {
|
||||
float rx = rand.nextFloat() * 0.8F + 0.1F;
|
||||
float ry = rand.nextFloat() * 0.8F + 0.1F;
|
||||
float rz = rand.nextFloat() * 0.8F + 0.1F;
|
||||
EntityItem entityItem = new EntityItem(
|
||||
world,
|
||||
x + rx,
|
||||
y + ry,
|
||||
z + rz,
|
||||
new ItemStack(item.getItem(), item.stackSize, item.getItemDamage()));
|
||||
|
||||
if (item.hasTagCompound()) {
|
||||
entityItem.getEntityItem().setTagCompound((NBTTagCompound) item.getTagCompound().copy());
|
||||
}
|
||||
|
||||
float factor = 0.05F;
|
||||
entityItem.motionX = rand.nextGaussian() * factor;
|
||||
entityItem.motionY = rand.nextGaussian() * factor + 0.2F;
|
||||
entityItem.motionZ = rand.nextGaussian() * factor;
|
||||
world.spawnEntityInWorld(entityItem);
|
||||
item.stackSize = 0;
|
||||
}
|
||||
if (item == null || item.stackSize <= 0) {
|
||||
return;
|
||||
}
|
||||
|
||||
float rx = rand.nextFloat() * 0.8F + 0.1F;
|
||||
float ry = rand.nextFloat() * 0.8F + 0.1F;
|
||||
float rz = rand.nextFloat() * 0.8F + 0.1F;
|
||||
EntityItem entityItem = new EntityItem(
|
||||
world,
|
||||
x + rx,
|
||||
y + ry,
|
||||
z + rz,
|
||||
new ItemStack(item.getItem(), item.stackSize, item.getItemDamage()));
|
||||
|
||||
if (item.hasTagCompound()) {
|
||||
entityItem.getEntityItem().setTagCompound((NBTTagCompound) item.getTagCompound().copy());
|
||||
}
|
||||
|
||||
float factor = 0.05F;
|
||||
entityItem.motionX = rand.nextGaussian() * factor;
|
||||
entityItem.motionY = rand.nextGaussian() * factor + 0.2F;
|
||||
entityItem.motionZ = rand.nextGaussian() * factor;
|
||||
world.spawnEntityInWorld(entityItem);
|
||||
item.stackSize = 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -145,126 +128,98 @@ public class BlockTeleposer extends BlockContainer {
|
||||
return new TETeleposer();
|
||||
}
|
||||
|
||||
public static boolean swapBlocks(Object caller, World worldI, World worldF, int xi, int yi, int zi, int xf, int yf,
|
||||
int zf) {
|
||||
return swapBlocks(caller, worldI, worldF, xi, yi, zi, xf, yf, zf, true, 3);
|
||||
public static boolean swapBlocks(Object caller, World worldA, World worldB, int xA, int yA, int zA, int xB, int yB,
|
||||
int zB) {
|
||||
return swapBlocks(caller, worldA, worldB, xA, yA, zA, xB, yB, zB, true, 3);
|
||||
}
|
||||
|
||||
public static boolean swapBlocksWithoutSound(Object caller, World worldI, World worldF, int xi, int yi, int zi,
|
||||
int xf, int yf, int zf) {
|
||||
return swapBlocks(caller, worldI, worldF, xi, yi, zi, xf, yf, zf, false, 3);
|
||||
public static boolean swapBlocksWithoutSound(Object caller, World worldA, World worldB, int xA, int yA, int zA,
|
||||
int xB, int yB, int zB) {
|
||||
return swapBlocks(caller, worldA, worldB, xA, yA, zA, xB, yB, zB, false, 3);
|
||||
}
|
||||
|
||||
public static boolean swapBlocks(Object caller, World worldI, World worldF, int xi, int yi, int zi, int xf, int yf,
|
||||
int zf, boolean doSound, int flag) {
|
||||
TileEntity tileEntityI = worldI.getTileEntity(xi, yi, zi);
|
||||
TileEntity tileEntityF = worldF.getTileEntity(xf, yf, zf);
|
||||
public static boolean swapBlocks(Object caller, World worldA, World worldB, int xA, int yA, int zA, int xB, int yB,
|
||||
int zB, boolean doSound, int flag) {
|
||||
TileEntity tileA = worldA.getTileEntity(xA, yA, zA);
|
||||
TileEntity tileB = worldB.getTileEntity(xB, yB, zB);
|
||||
|
||||
NBTTagCompound nbttag1 = new NBTTagCompound();
|
||||
NBTTagCompound nbttag2 = new NBTTagCompound();
|
||||
NBTTagCompound nbtA = new NBTTagCompound();
|
||||
NBTTagCompound nbtB = new NBTTagCompound();
|
||||
|
||||
if (tileEntityI != null) {
|
||||
tileEntityI.writeToNBT(nbttag1);
|
||||
}
|
||||
if (tileA != null) tileA.writeToNBT(nbtA);
|
||||
if (tileB != null) tileB.writeToNBT(nbtB);
|
||||
|
||||
if (tileEntityF != null) {
|
||||
tileEntityF.writeToNBT(nbttag2);
|
||||
}
|
||||
Block blockA = worldA.getBlock(xA, yA, zA);
|
||||
Block blockB = worldB.getBlock(xB, yB, zB);
|
||||
|
||||
Block blockI = worldI.getBlock(xi, yi, zi);
|
||||
Block blockF = worldF.getBlock(xf, yf, zf);
|
||||
if (blockA.equals(Blocks.air) && blockB.equals(Blocks.air)) return false;
|
||||
|
||||
if (blockI.equals(Blocks.air) && blockF.equals(Blocks.air)) {
|
||||
if (!(caller instanceof TEDemonPortal) && (blockA instanceof BlockPortal || blockB instanceof BlockPortal))
|
||||
return false;
|
||||
}
|
||||
|
||||
if (blockI instanceof BlockMobSpawner || blockF instanceof BlockMobSpawner || caller instanceof TEDemonPortal
|
||||
? false
|
||||
: blockI instanceof BlockPortal || blockF instanceof BlockPortal) {
|
||||
return false;
|
||||
}
|
||||
int metaA = worldA.getBlockMetadata(xA, yA, zA);
|
||||
int metaB = worldB.getBlockMetadata(xB, yB, zB);
|
||||
|
||||
int metaI = worldI.getBlockMetadata(xi, yi, zi);
|
||||
int metaF = worldF.getBlockMetadata(xf, yf, zf);
|
||||
|
||||
TeleposeEvent evt = new TeleposeEvent(worldI, xi, yi, zi, blockI, metaI, worldF, xf, yf, zf, blockF, metaF);
|
||||
TeleposeEvent evt = new TeleposeEvent(worldA, xA, yA, zA, blockA, metaA, worldB, xB, yB, zB, blockB, metaB);
|
||||
if (MinecraftForge.EVENT_BUS.post(evt)) return false;
|
||||
|
||||
if (doSound) {
|
||||
worldI.playSoundEffect(xi, yi, zi, "mob.endermen.portal", 1.0F, 1.0F);
|
||||
worldF.playSoundEffect(xf, yf, zf, "mob.endermen.portal", 1.0F, 1.0F);
|
||||
String sound = "mob.endermen.portal";
|
||||
worldA.playSoundEffect(xA, yA, zA, sound, 1.0F, 1.0F);
|
||||
worldB.playSoundEffect(xB, yB, zB, sound, 1.0F, 1.0F);
|
||||
}
|
||||
|
||||
// CLEAR TILES
|
||||
Block finalBlock = blockF;
|
||||
// Clear current tile entities
|
||||
worldB.setTileEntity(xB, yB, zB, blockB.createTileEntity(worldB, metaB));
|
||||
worldA.setTileEntity(xA, yA, zA, blockA.createTileEntity(worldA, metaA));
|
||||
|
||||
if (finalBlock != null) {
|
||||
TileEntity tileToSet = finalBlock.createTileEntity(worldF, metaF);
|
||||
// Swap blocks
|
||||
worldB.setBlock(xB, yB, zB, blockA, metaA, flag);
|
||||
worldA.setBlock(xA, yA, zA, blockB, metaB, flag);
|
||||
|
||||
worldF.setTileEntity(xf, yf, zf, tileToSet);
|
||||
}
|
||||
|
||||
if (blockI != null) {
|
||||
TileEntity tileToSet = blockI.createTileEntity(worldI, metaI);
|
||||
|
||||
worldI.setTileEntity(xi, yi, zi, tileToSet);
|
||||
}
|
||||
|
||||
// TILES CLEARED
|
||||
worldF.setBlock(xf, yf, zf, blockI, metaI, flag);
|
||||
|
||||
if (tileEntityI != null) {
|
||||
TileEntity newTileEntityI = TileEntity.createAndLoadEntity(nbttag1);
|
||||
|
||||
if (AlchemicalWizardry.isFMPLoaded && isMultipart(tileEntityI)) {
|
||||
newTileEntityI = createMultipartFromNBT(worldF, nbttag1);
|
||||
}
|
||||
|
||||
worldF.setTileEntity(xf, yf, zf, newTileEntityI);
|
||||
|
||||
newTileEntityI.xCoord = xf;
|
||||
newTileEntityI.yCoord = yf;
|
||||
newTileEntityI.zCoord = zf;
|
||||
|
||||
if (AlchemicalWizardry.isFMPLoaded && isMultipart(tileEntityI)) {
|
||||
sendDescriptorOfTile(worldF, newTileEntityI);
|
||||
}
|
||||
}
|
||||
|
||||
worldI.setBlock(xi, yi, zi, finalBlock, metaF, flag);
|
||||
|
||||
if (tileEntityF != null) {
|
||||
TileEntity newTileEntityF = TileEntity.createAndLoadEntity(nbttag2);
|
||||
if (AlchemicalWizardry.isFMPLoaded && isMultipart(tileEntityF)) {
|
||||
newTileEntityF = createMultipartFromNBT(worldI, nbttag2);
|
||||
}
|
||||
|
||||
worldI.setTileEntity(xi, yi, zi, newTileEntityF);
|
||||
|
||||
newTileEntityF.xCoord = xi;
|
||||
newTileEntityF.yCoord = yi;
|
||||
newTileEntityF.zCoord = zi;
|
||||
|
||||
if (AlchemicalWizardry.isFMPLoaded && isMultipart(tileEntityF)) {
|
||||
sendDescriptorOfTile(worldI, newTileEntityF);
|
||||
}
|
||||
}
|
||||
// Restore tile entities
|
||||
swapTile(worldB, xB, yB, zB, tileA, nbtA);
|
||||
swapTile(worldA, xA, yA, zA, tileB, nbtB);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@Optional.Method(modid = "ForgeMultipart")
|
||||
public static boolean isMultipart(TileEntity tile) {
|
||||
return tile instanceof TileMultipart;
|
||||
private static void swapTile(World world, int x, int y, int z, TileEntity oldTile, NBTTagCompound nbt) {
|
||||
if (oldTile == null) return;
|
||||
|
||||
TileEntity newTile;
|
||||
|
||||
boolean multipart = AlchemicalWizardry.isFMPLoaded && oldTile instanceof TileMultipart;
|
||||
if (multipart) {
|
||||
newTile = MultipartHelper.createTileFromNBT(world, nbt);
|
||||
} else {
|
||||
newTile = TileEntity.createAndLoadEntity(nbt);
|
||||
}
|
||||
|
||||
world.setTileEntity(x, y, z, newTile);
|
||||
|
||||
newTile.xCoord = x;
|
||||
newTile.yCoord = y;
|
||||
newTile.zCoord = z;
|
||||
|
||||
if (multipart) MultipartHelper.sendDescPacket(world, newTile);
|
||||
}
|
||||
|
||||
@Optional.Method(modid = "ForgeMultipart")
|
||||
public static TileEntity createMultipartFromNBT(World world, NBTTagCompound tag) {
|
||||
return MultipartHelper.createTileFromNBT(world, tag);
|
||||
@Override
|
||||
public void onNeighborBlockChange(World world, int x, int y, int z, Block neighbor) {
|
||||
if (!(world.getTileEntity(x, y, z) instanceof TETeleposer teleposer)) return;
|
||||
// was it a low->high pulse
|
||||
boolean isPowered = world.isBlockIndirectlyGettingPowered(x, y, z);
|
||||
if (!teleposer.hasRedstone && isPowered) {
|
||||
teleposer.hasRedstone = true;
|
||||
teleposer.activate();
|
||||
} else {
|
||||
teleposer.hasRedstone = isPowered;
|
||||
}
|
||||
}
|
||||
|
||||
@Optional.Method(modid = "ForgeMultipart")
|
||||
public static void sendDescriptorOfTile(World world, TileEntity tile) {
|
||||
MultipartHelper.sendDescPacket(world, tile);
|
||||
@Override
|
||||
public boolean canConnectRedstone(IBlockAccess world, int x, int y, int z, int side) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
@@ -15,7 +15,6 @@ import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.AxisAlignedBB;
|
||||
import net.minecraft.util.IIcon;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
import WayofTime.alchemicalWizardry.AlchemicalWizardry;
|
||||
@@ -25,15 +24,6 @@ import cpw.mods.fml.relauncher.SideOnly;
|
||||
|
||||
public class BlockWritingTable extends BlockContainer {
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
private IIcon topIcon;
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
private IIcon sideIcon2;
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
private IIcon bottomIcon;
|
||||
|
||||
public BlockWritingTable() {
|
||||
super(Material.wood);
|
||||
setHardness(2.0F);
|
||||
@@ -45,22 +35,7 @@ public class BlockWritingTable extends BlockContainer {
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void registerBlockIcons(IIconRegister iconRegister) {
|
||||
this.topIcon = iconRegister.registerIcon("AlchemicalWizardry:AlchemicChemistrySet");
|
||||
this.sideIcon2 = iconRegister.registerIcon("AlchemicalWizardry:BloodAltar_SideType2");
|
||||
this.bottomIcon = iconRegister.registerIcon("AlchemicalWizardry:BloodAltar_Bottom");
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public IIcon getIcon(int side, int meta) {
|
||||
switch (side) {
|
||||
case 0:
|
||||
return bottomIcon;
|
||||
case 1:
|
||||
return topIcon;
|
||||
default:
|
||||
return sideIcon2;
|
||||
}
|
||||
this.blockIcon = iconRegister.registerIcon("AlchemicalWizardry:AlchemicChemistrySet");
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -105,31 +105,15 @@ public class BloodRune extends Block {
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public IIcon getIcon(int side, int meta) {
|
||||
switch (meta) {
|
||||
case 0:
|
||||
return blockIcon;
|
||||
|
||||
case 1:
|
||||
return altarCapacityRuneIcon;
|
||||
|
||||
case 2:
|
||||
return dislocationRuneIcon;
|
||||
|
||||
case 3:
|
||||
return this.orbCapacityRuneIcon;
|
||||
|
||||
case 4:
|
||||
return this.betterCapacityRuneIcon;
|
||||
|
||||
case 5:
|
||||
return this.accelerationRuneIcon;
|
||||
|
||||
case 6:
|
||||
return this.quicknessRuneIcon;
|
||||
|
||||
default:
|
||||
return blockIcon;
|
||||
}
|
||||
return switch (meta) {
|
||||
case 1 -> altarCapacityRuneIcon;
|
||||
case 2 -> dislocationRuneIcon;
|
||||
case 3 -> this.orbCapacityRuneIcon;
|
||||
case 4 -> this.betterCapacityRuneIcon;
|
||||
case 5 -> this.accelerationRuneIcon;
|
||||
case 6 -> this.quicknessRuneIcon;
|
||||
default -> blockIcon;
|
||||
};
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
+51
-11
@@ -1,23 +1,37 @@
|
||||
package WayofTime.alchemicalWizardry.common.bloodAltarUpgrade;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.init.Blocks;
|
||||
import net.minecraftforge.oredict.OreDictionary;
|
||||
|
||||
import WayofTime.alchemicalWizardry.api.BlockStack;
|
||||
|
||||
public class AltarComponent {
|
||||
|
||||
private int x;
|
||||
private int y;
|
||||
private int z;
|
||||
private Block block;
|
||||
private int metadata;
|
||||
private boolean isBloodRune;
|
||||
private boolean isUpgradeSlot;
|
||||
private final int x, y, z;
|
||||
private final List<BlockStack> validBlocks;
|
||||
|
||||
private final boolean isBloodRune, isUpgradeSlot;
|
||||
|
||||
public AltarComponent(int x, int y, int z, Block block, int metadata, boolean isBloodRune, boolean isUpgradeSlot) {
|
||||
this.x = x;
|
||||
this.y = y;
|
||||
this.z = z;
|
||||
this.block = block;
|
||||
this.metadata = metadata;
|
||||
this.validBlocks = new ArrayList<>();
|
||||
this.validBlocks.add(new BlockStack(block, metadata));
|
||||
this.isBloodRune = isBloodRune;
|
||||
this.isUpgradeSlot = isUpgradeSlot;
|
||||
}
|
||||
|
||||
public AltarComponent(int x, int y, int z, List<BlockStack> validBlocks, boolean isBloodRune,
|
||||
boolean isUpgradeSlot) {
|
||||
this.x = x;
|
||||
this.y = y;
|
||||
this.z = z;
|
||||
this.validBlocks = validBlocks;
|
||||
this.isBloodRune = isBloodRune;
|
||||
this.isUpgradeSlot = isUpgradeSlot;
|
||||
}
|
||||
@@ -35,11 +49,17 @@ public class AltarComponent {
|
||||
}
|
||||
|
||||
public Block getBlock() {
|
||||
return block;
|
||||
if (anyBlockMatches()) {
|
||||
return Blocks.air;
|
||||
}
|
||||
return validBlocks.get(0).getBlock();
|
||||
}
|
||||
|
||||
public int getMetadata() {
|
||||
return metadata;
|
||||
if (anyBlockMatches()) {
|
||||
return OreDictionary.WILDCARD_VALUE;
|
||||
}
|
||||
return validBlocks.get(0).getMeta();
|
||||
}
|
||||
|
||||
public boolean isBloodRune() {
|
||||
@@ -49,4 +69,24 @@ public class AltarComponent {
|
||||
public boolean isUpgradeSlot() {
|
||||
return isUpgradeSlot;
|
||||
}
|
||||
|
||||
public List<BlockStack> getValidBlocks() {
|
||||
return validBlocks;
|
||||
}
|
||||
|
||||
public boolean matches(Block block, int meta) {
|
||||
if (anyBlockMatches()) return true;
|
||||
|
||||
for (BlockStack pair : validBlocks) {
|
||||
if (pair.getBlock() == block
|
||||
&& (pair.getMeta() == meta || pair.getMeta() == OreDictionary.WILDCARD_VALUE)) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
public boolean anyBlockMatches() {
|
||||
return validBlocks.isEmpty();
|
||||
}
|
||||
}
|
||||
+119
-677
@@ -1,11 +1,9 @@
|
||||
package WayofTime.alchemicalWizardry.common.bloodAltarUpgrade;
|
||||
|
||||
import java.util.ArrayList;
|
||||
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;
|
||||
|
||||
@@ -47,21 +45,15 @@ public class UpgradedAltars {
|
||||
return true;
|
||||
}
|
||||
|
||||
private static BlockStack[] getRuneOverrides(int altarTier) {
|
||||
switch (altarTier) {
|
||||
case 2:
|
||||
return AlchemicalWizardry.secondTierRunes;
|
||||
case 3:
|
||||
return AlchemicalWizardry.thirdTierRunes;
|
||||
case 4:
|
||||
return AlchemicalWizardry.fourthTierRunes;
|
||||
case 5:
|
||||
return AlchemicalWizardry.fifthTierRunes;
|
||||
case 6:
|
||||
return AlchemicalWizardry.sixthTierRunes;
|
||||
default:
|
||||
return null;
|
||||
}
|
||||
private static List<BlockStack> getRuneOverrides(int altarTier) {
|
||||
return switch (altarTier) {
|
||||
case 2 -> AlchemicalWizardry.secondTierRunes;
|
||||
case 3 -> AlchemicalWizardry.thirdTierRunes;
|
||||
case 4 -> AlchemicalWizardry.fourthTierRunes;
|
||||
case 5 -> AlchemicalWizardry.fifthTierRunes;
|
||||
case 6 -> AlchemicalWizardry.sixthTierRunes;
|
||||
default -> null;
|
||||
};
|
||||
}
|
||||
|
||||
private static boolean checkAltarComponent(AltarComponent altarComponent, IBlockAccess world, int x, int y, int z,
|
||||
@@ -69,28 +61,29 @@ public class UpgradedAltars {
|
||||
int compX = x + altarComponent.getX();
|
||||
int compY = y + altarComponent.getY();
|
||||
int compZ = z + altarComponent.getZ();
|
||||
if (altarComponent.getBlock() == Blocks.air) {
|
||||
if (altarComponent.anyBlockMatches()) {
|
||||
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);
|
||||
if (runes == null) {
|
||||
return false;
|
||||
}
|
||||
for (BlockStack rune : runes) {
|
||||
result |= altarComponent.isUpgradeSlot() ? block == rune.getBlock() && metadata == rune.getMeta()
|
||||
: block == altarComponent.getBlock() && metadata == altarComponent.getMetadata();
|
||||
}
|
||||
return result;
|
||||
} else {
|
||||
if (altarComponent.getBlock() != block || altarComponent.getMetadata() != metadata) {
|
||||
return false;
|
||||
int meta = world.getBlockMetadata(compX, compY, compZ);
|
||||
if (!altarComponent.isBloodRune()) {
|
||||
return altarComponent.matches(block, meta);
|
||||
}
|
||||
|
||||
List<BlockStack> runes = getRuneOverrides(altarTier);
|
||||
if (runes == null) {
|
||||
return false;
|
||||
}
|
||||
|
||||
for (BlockStack rune : runes) {
|
||||
if (altarComponent.isUpgradeSlot() ? block == rune.getBlock() && meta == rune.getMeta()
|
||||
: altarComponent.matches(block, meta)) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return true;
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
public static AltarUpgradeComponent getUpgrades(World world, int x, int y, int z, int altarTier) {
|
||||
@@ -99,683 +92,132 @@ public class UpgradedAltars {
|
||||
}
|
||||
AltarUpgradeComponent upgrades = new AltarUpgradeComponent();
|
||||
List<AltarComponent> list = UpgradedAltars.getAltarUpgradeListForTier(altarTier);
|
||||
BlockStack[] runes = getRuneOverrides(altarTier);
|
||||
List<BlockStack> runes = getRuneOverrides(altarTier);
|
||||
if (list == null || runes == null) {
|
||||
return upgrades;
|
||||
}
|
||||
for (AltarComponent altarComponent : list) {
|
||||
if (altarComponent.isUpgradeSlot()) {
|
||||
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());
|
||||
BlockStack blockStack = new BlockStack(block, metadata);
|
||||
switch (Arrays.asList(runes).indexOf(blockStack)) {
|
||||
case 1:
|
||||
upgrades.addSpeedUpgrade();
|
||||
break;
|
||||
if (!altarComponent.isUpgradeSlot()) {
|
||||
continue;
|
||||
}
|
||||
|
||||
case 2:
|
||||
upgrades.addEfficiencyUpgrade();
|
||||
break;
|
||||
|
||||
case 3:
|
||||
upgrades.addSacrificeUpgrade();
|
||||
break;
|
||||
|
||||
case 4:
|
||||
upgrades.addSelfSacrificeUpgrade();
|
||||
break;
|
||||
|
||||
case 5:
|
||||
upgrades.addaltarCapacitiveUpgrade();
|
||||
break;
|
||||
|
||||
case 6:
|
||||
upgrades.addDisplacementUpgrade();
|
||||
break;
|
||||
|
||||
case 7:
|
||||
upgrades.addorbCapacitiveUpgrade();
|
||||
break;
|
||||
|
||||
case 8:
|
||||
upgrades.addBetterCapacitiveUpgrade();
|
||||
break;
|
||||
|
||||
case 9:
|
||||
upgrades.addAccelerationUpgrade();
|
||||
break;
|
||||
|
||||
case 10:
|
||||
upgrades.addQuicknessUpgrade();
|
||||
break;
|
||||
}
|
||||
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());
|
||||
BlockStack blockStack = new BlockStack(block, metadata);
|
||||
switch (runes.indexOf(blockStack)) {
|
||||
case 1 -> upgrades.addSpeedUpgrade();
|
||||
case 2 -> upgrades.addEfficiencyUpgrade();
|
||||
case 3 -> upgrades.addSacrificeUpgrade();
|
||||
case 4 -> upgrades.addSelfSacrificeUpgrade();
|
||||
case 5 -> upgrades.addaltarCapacitiveUpgrade();
|
||||
case 6 -> upgrades.addDisplacementUpgrade();
|
||||
case 7 -> upgrades.addorbCapacitiveUpgrade();
|
||||
case 8 -> upgrades.addBetterCapacitiveUpgrade();
|
||||
case 9 -> upgrades.addAccelerationUpgrade();
|
||||
case 10 -> upgrades.addQuicknessUpgrade();
|
||||
}
|
||||
}
|
||||
return upgrades;
|
||||
}
|
||||
|
||||
public static void loadAltars() {
|
||||
secondTierAltar.add(
|
||||
new AltarComponent(
|
||||
-1,
|
||||
-1,
|
||||
-1,
|
||||
AlchemicalWizardry.secondTierRunes[0].getBlock(),
|
||||
AlchemicalWizardry.secondTierRunes[0].getMeta(),
|
||||
true,
|
||||
false));
|
||||
secondTierAltar.add(
|
||||
new AltarComponent(
|
||||
0,
|
||||
-1,
|
||||
-1,
|
||||
AlchemicalWizardry.secondTierRunes[0].getBlock(),
|
||||
AlchemicalWizardry.secondTierRunes[0].getMeta(),
|
||||
true,
|
||||
true));
|
||||
secondTierAltar.add(
|
||||
new AltarComponent(
|
||||
1,
|
||||
-1,
|
||||
-1,
|
||||
AlchemicalWizardry.secondTierRunes[0].getBlock(),
|
||||
AlchemicalWizardry.secondTierRunes[0].getMeta(),
|
||||
true,
|
||||
false));
|
||||
secondTierAltar.add(
|
||||
new AltarComponent(
|
||||
-1,
|
||||
-1,
|
||||
0,
|
||||
AlchemicalWizardry.secondTierRunes[0].getBlock(),
|
||||
AlchemicalWizardry.secondTierRunes[0].getMeta(),
|
||||
true,
|
||||
true));
|
||||
secondTierAltar.add(
|
||||
new AltarComponent(
|
||||
1,
|
||||
-1,
|
||||
0,
|
||||
AlchemicalWizardry.secondTierRunes[0].getBlock(),
|
||||
AlchemicalWizardry.secondTierRunes[0].getMeta(),
|
||||
true,
|
||||
true));
|
||||
secondTierAltar.add(
|
||||
new AltarComponent(
|
||||
-1,
|
||||
-1,
|
||||
1,
|
||||
AlchemicalWizardry.secondTierRunes[0].getBlock(),
|
||||
AlchemicalWizardry.secondTierRunes[0].getMeta(),
|
||||
true,
|
||||
false));
|
||||
secondTierAltar.add(
|
||||
new AltarComponent(
|
||||
0,
|
||||
-1,
|
||||
1,
|
||||
AlchemicalWizardry.secondTierRunes[0].getBlock(),
|
||||
AlchemicalWizardry.secondTierRunes[0].getMeta(),
|
||||
true,
|
||||
true));
|
||||
secondTierAltar.add(
|
||||
new AltarComponent(
|
||||
1,
|
||||
-1,
|
||||
1,
|
||||
AlchemicalWizardry.secondTierRunes[0].getBlock(),
|
||||
AlchemicalWizardry.secondTierRunes[0].getMeta(),
|
||||
true,
|
||||
false));
|
||||
secondTierAltar.add(new AltarComponent(-1, -1, -1, AlchemicalWizardry.secondTierRunes, true, false));
|
||||
secondTierAltar.add(new AltarComponent(0, -1, -1, AlchemicalWizardry.secondTierRunes, true, true));
|
||||
secondTierAltar.add(new AltarComponent(1, -1, -1, AlchemicalWizardry.secondTierRunes, true, false));
|
||||
secondTierAltar.add(new AltarComponent(-1, -1, 0, AlchemicalWizardry.secondTierRunes, true, true));
|
||||
secondTierAltar.add(new AltarComponent(1, -1, 0, AlchemicalWizardry.secondTierRunes, true, true));
|
||||
secondTierAltar.add(new AltarComponent(-1, -1, 1, AlchemicalWizardry.secondTierRunes, true, false));
|
||||
secondTierAltar.add(new AltarComponent(0, -1, 1, AlchemicalWizardry.secondTierRunes, true, true));
|
||||
secondTierAltar.add(new AltarComponent(1, -1, 1, AlchemicalWizardry.secondTierRunes, true, false));
|
||||
|
||||
thirdTierAltar.add(
|
||||
new AltarComponent(
|
||||
-1,
|
||||
-1,
|
||||
-1,
|
||||
AlchemicalWizardry.secondTierRunes[0].getBlock(),
|
||||
AlchemicalWizardry.secondTierRunes[0].getMeta(),
|
||||
true,
|
||||
true));
|
||||
thirdTierAltar.add(
|
||||
new AltarComponent(
|
||||
0,
|
||||
-1,
|
||||
-1,
|
||||
AlchemicalWizardry.secondTierRunes[0].getBlock(),
|
||||
AlchemicalWizardry.secondTierRunes[0].getMeta(),
|
||||
true,
|
||||
true));
|
||||
thirdTierAltar.add(
|
||||
new AltarComponent(
|
||||
1,
|
||||
-1,
|
||||
-1,
|
||||
AlchemicalWizardry.secondTierRunes[0].getBlock(),
|
||||
AlchemicalWizardry.secondTierRunes[0].getMeta(),
|
||||
true,
|
||||
true));
|
||||
thirdTierAltar.add(
|
||||
new AltarComponent(
|
||||
-1,
|
||||
-1,
|
||||
0,
|
||||
AlchemicalWizardry.secondTierRunes[0].getBlock(),
|
||||
AlchemicalWizardry.secondTierRunes[0].getMeta(),
|
||||
true,
|
||||
true));
|
||||
thirdTierAltar.add(
|
||||
new AltarComponent(
|
||||
1,
|
||||
-1,
|
||||
0,
|
||||
AlchemicalWizardry.secondTierRunes[0].getBlock(),
|
||||
AlchemicalWizardry.secondTierRunes[0].getMeta(),
|
||||
true,
|
||||
true));
|
||||
thirdTierAltar.add(
|
||||
new AltarComponent(
|
||||
-1,
|
||||
-1,
|
||||
1,
|
||||
AlchemicalWizardry.secondTierRunes[0].getBlock(),
|
||||
AlchemicalWizardry.secondTierRunes[0].getMeta(),
|
||||
true,
|
||||
true));
|
||||
thirdTierAltar.add(
|
||||
new AltarComponent(
|
||||
0,
|
||||
-1,
|
||||
1,
|
||||
AlchemicalWizardry.secondTierRunes[0].getBlock(),
|
||||
AlchemicalWizardry.secondTierRunes[0].getMeta(),
|
||||
true,
|
||||
true));
|
||||
thirdTierAltar.add(
|
||||
new AltarComponent(
|
||||
1,
|
||||
-1,
|
||||
1,
|
||||
AlchemicalWizardry.secondTierRunes[0].getBlock(),
|
||||
AlchemicalWizardry.secondTierRunes[0].getMeta(),
|
||||
true,
|
||||
true));
|
||||
thirdTierAltar.add(
|
||||
new AltarComponent(
|
||||
-3,
|
||||
-1,
|
||||
-3,
|
||||
AlchemicalWizardry.specialAltarBlock[0].getBlock(),
|
||||
AlchemicalWizardry.specialAltarBlock[0].getMeta(),
|
||||
false,
|
||||
false));
|
||||
thirdTierAltar.add(
|
||||
new AltarComponent(
|
||||
-3,
|
||||
0,
|
||||
-3,
|
||||
AlchemicalWizardry.specialAltarBlock[0].getBlock(),
|
||||
AlchemicalWizardry.specialAltarBlock[0].getMeta(),
|
||||
false,
|
||||
false));
|
||||
thirdTierAltar.add(
|
||||
new AltarComponent(
|
||||
3,
|
||||
-1,
|
||||
-3,
|
||||
AlchemicalWizardry.specialAltarBlock[0].getBlock(),
|
||||
AlchemicalWizardry.specialAltarBlock[0].getMeta(),
|
||||
false,
|
||||
false));
|
||||
thirdTierAltar.add(
|
||||
new AltarComponent(
|
||||
3,
|
||||
0,
|
||||
-3,
|
||||
AlchemicalWizardry.specialAltarBlock[0].getBlock(),
|
||||
AlchemicalWizardry.specialAltarBlock[0].getMeta(),
|
||||
false,
|
||||
false));
|
||||
thirdTierAltar.add(
|
||||
new AltarComponent(
|
||||
-3,
|
||||
-1,
|
||||
3,
|
||||
AlchemicalWizardry.specialAltarBlock[0].getBlock(),
|
||||
AlchemicalWizardry.specialAltarBlock[0].getMeta(),
|
||||
false,
|
||||
false));
|
||||
thirdTierAltar.add(
|
||||
new AltarComponent(
|
||||
-3,
|
||||
0,
|
||||
3,
|
||||
AlchemicalWizardry.specialAltarBlock[0].getBlock(),
|
||||
AlchemicalWizardry.specialAltarBlock[0].getMeta(),
|
||||
false,
|
||||
false));
|
||||
thirdTierAltar.add(
|
||||
new AltarComponent(
|
||||
3,
|
||||
-1,
|
||||
3,
|
||||
AlchemicalWizardry.specialAltarBlock[0].getBlock(),
|
||||
AlchemicalWizardry.specialAltarBlock[0].getMeta(),
|
||||
false,
|
||||
false));
|
||||
thirdTierAltar.add(
|
||||
new AltarComponent(
|
||||
3,
|
||||
0,
|
||||
3,
|
||||
AlchemicalWizardry.specialAltarBlock[0].getBlock(),
|
||||
AlchemicalWizardry.specialAltarBlock[0].getMeta(),
|
||||
false,
|
||||
false));
|
||||
thirdTierAltar.add(
|
||||
new AltarComponent(
|
||||
-3,
|
||||
1,
|
||||
-3,
|
||||
AlchemicalWizardry.specialAltarBlock[1].getBlock(),
|
||||
AlchemicalWizardry.specialAltarBlock[1].getMeta(),
|
||||
false,
|
||||
false));
|
||||
thirdTierAltar.add(
|
||||
new AltarComponent(
|
||||
3,
|
||||
1,
|
||||
-3,
|
||||
AlchemicalWizardry.specialAltarBlock[1].getBlock(),
|
||||
AlchemicalWizardry.specialAltarBlock[1].getMeta(),
|
||||
false,
|
||||
false));
|
||||
thirdTierAltar.add(
|
||||
new AltarComponent(
|
||||
-3,
|
||||
1,
|
||||
3,
|
||||
AlchemicalWizardry.specialAltarBlock[1].getBlock(),
|
||||
AlchemicalWizardry.specialAltarBlock[1].getMeta(),
|
||||
false,
|
||||
false));
|
||||
thirdTierAltar.add(
|
||||
new AltarComponent(
|
||||
3,
|
||||
1,
|
||||
3,
|
||||
AlchemicalWizardry.specialAltarBlock[1].getBlock(),
|
||||
AlchemicalWizardry.specialAltarBlock[1].getMeta(),
|
||||
false,
|
||||
false));
|
||||
thirdTierAltar.add(new AltarComponent(-1, -1, -1, AlchemicalWizardry.secondTierRunes, true, true));
|
||||
thirdTierAltar.add(new AltarComponent(0, -1, -1, AlchemicalWizardry.secondTierRunes, true, true));
|
||||
thirdTierAltar.add(new AltarComponent(1, -1, -1, AlchemicalWizardry.secondTierRunes, true, true));
|
||||
thirdTierAltar.add(new AltarComponent(-1, -1, 0, AlchemicalWizardry.secondTierRunes, true, true));
|
||||
thirdTierAltar.add(new AltarComponent(1, -1, 0, AlchemicalWizardry.secondTierRunes, true, true));
|
||||
thirdTierAltar.add(new AltarComponent(-1, -1, 1, AlchemicalWizardry.secondTierRunes, true, true));
|
||||
thirdTierAltar.add(new AltarComponent(0, -1, 1, AlchemicalWizardry.secondTierRunes, true, true));
|
||||
thirdTierAltar.add(new AltarComponent(1, -1, 1, AlchemicalWizardry.secondTierRunes, true, true));
|
||||
thirdTierAltar.add(new AltarComponent(-3, -1, -3, AlchemicalWizardry.thirdTierPillars, false, false));
|
||||
thirdTierAltar.add(new AltarComponent(-3, 0, -3, AlchemicalWizardry.thirdTierPillars, false, false));
|
||||
thirdTierAltar.add(new AltarComponent(3, -1, -3, AlchemicalWizardry.thirdTierPillars, false, false));
|
||||
thirdTierAltar.add(new AltarComponent(3, 0, -3, AlchemicalWizardry.thirdTierPillars, false, false));
|
||||
thirdTierAltar.add(new AltarComponent(-3, -1, 3, AlchemicalWizardry.thirdTierPillars, false, false));
|
||||
thirdTierAltar.add(new AltarComponent(-3, 0, 3, AlchemicalWizardry.thirdTierPillars, false, false));
|
||||
thirdTierAltar.add(new AltarComponent(3, -1, 3, AlchemicalWizardry.thirdTierPillars, false, false));
|
||||
thirdTierAltar.add(new AltarComponent(3, 0, 3, AlchemicalWizardry.thirdTierPillars, false, false));
|
||||
thirdTierAltar.add(new AltarComponent(-3, 1, -3, AlchemicalWizardry.thirdTierCaps, false, false));
|
||||
thirdTierAltar.add(new AltarComponent(3, 1, -3, AlchemicalWizardry.thirdTierCaps, false, false));
|
||||
thirdTierAltar.add(new AltarComponent(-3, 1, 3, AlchemicalWizardry.thirdTierCaps, false, false));
|
||||
thirdTierAltar.add(new AltarComponent(3, 1, 3, AlchemicalWizardry.thirdTierCaps, false, false));
|
||||
|
||||
for (int i = -2; i <= 2; i++) {
|
||||
thirdTierAltar.add(
|
||||
new AltarComponent(
|
||||
3,
|
||||
-2,
|
||||
i,
|
||||
AlchemicalWizardry.thirdTierRunes[0].getBlock(),
|
||||
AlchemicalWizardry.thirdTierRunes[0].getMeta(),
|
||||
true,
|
||||
true));
|
||||
thirdTierAltar.add(
|
||||
new AltarComponent(
|
||||
-3,
|
||||
-2,
|
||||
i,
|
||||
AlchemicalWizardry.thirdTierRunes[0].getBlock(),
|
||||
AlchemicalWizardry.thirdTierRunes[0].getMeta(),
|
||||
true,
|
||||
true));
|
||||
thirdTierAltar.add(
|
||||
new AltarComponent(
|
||||
i,
|
||||
-2,
|
||||
3,
|
||||
AlchemicalWizardry.thirdTierRunes[0].getBlock(),
|
||||
AlchemicalWizardry.thirdTierRunes[0].getMeta(),
|
||||
true,
|
||||
true));
|
||||
thirdTierAltar.add(
|
||||
new AltarComponent(
|
||||
i,
|
||||
-2,
|
||||
-3,
|
||||
AlchemicalWizardry.thirdTierRunes[0].getBlock(),
|
||||
AlchemicalWizardry.thirdTierRunes[0].getMeta(),
|
||||
true,
|
||||
true));
|
||||
thirdTierAltar.add(new AltarComponent(3, -2, i, AlchemicalWizardry.thirdTierRunes, true, true));
|
||||
thirdTierAltar.add(new AltarComponent(-3, -2, i, AlchemicalWizardry.thirdTierRunes, true, true));
|
||||
thirdTierAltar.add(new AltarComponent(i, -2, 3, AlchemicalWizardry.thirdTierRunes, true, true));
|
||||
thirdTierAltar.add(new AltarComponent(i, -2, -3, AlchemicalWizardry.thirdTierRunes, true, true));
|
||||
}
|
||||
|
||||
fourthTierAltar.addAll(thirdTierAltar);
|
||||
|
||||
for (int i = -3; i <= 3; i++) {
|
||||
fourthTierAltar.add(
|
||||
new AltarComponent(
|
||||
5,
|
||||
-3,
|
||||
i,
|
||||
AlchemicalWizardry.fourthTierRunes[0].getBlock(),
|
||||
AlchemicalWizardry.fourthTierRunes[0].getMeta(),
|
||||
true,
|
||||
true));
|
||||
fourthTierAltar.add(
|
||||
new AltarComponent(
|
||||
-5,
|
||||
-3,
|
||||
i,
|
||||
AlchemicalWizardry.fourthTierRunes[0].getBlock(),
|
||||
AlchemicalWizardry.fourthTierRunes[0].getMeta(),
|
||||
true,
|
||||
true));
|
||||
fourthTierAltar.add(
|
||||
new AltarComponent(
|
||||
i,
|
||||
-3,
|
||||
5,
|
||||
AlchemicalWizardry.fourthTierRunes[0].getBlock(),
|
||||
AlchemicalWizardry.fourthTierRunes[0].getMeta(),
|
||||
true,
|
||||
true));
|
||||
fourthTierAltar.add(
|
||||
new AltarComponent(
|
||||
i,
|
||||
-3,
|
||||
-5,
|
||||
AlchemicalWizardry.fourthTierRunes[0].getBlock(),
|
||||
AlchemicalWizardry.fourthTierRunes[0].getMeta(),
|
||||
true,
|
||||
true));
|
||||
fourthTierAltar.add(new AltarComponent(5, -3, i, AlchemicalWizardry.fourthTierRunes, true, true));
|
||||
fourthTierAltar.add(new AltarComponent(-5, -3, i, AlchemicalWizardry.fourthTierRunes, true, true));
|
||||
fourthTierAltar.add(new AltarComponent(i, -3, 5, AlchemicalWizardry.fourthTierRunes, true, true));
|
||||
fourthTierAltar.add(new AltarComponent(i, -3, -5, AlchemicalWizardry.fourthTierRunes, true, true));
|
||||
}
|
||||
for (int i = -2; i <= 1; i++) {
|
||||
fourthTierAltar.add(
|
||||
new AltarComponent(
|
||||
5,
|
||||
i,
|
||||
5,
|
||||
AlchemicalWizardry.specialAltarBlock[2].getBlock(),
|
||||
AlchemicalWizardry.specialAltarBlock[2].getMeta(),
|
||||
false,
|
||||
false));
|
||||
fourthTierAltar.add(
|
||||
new AltarComponent(
|
||||
5,
|
||||
i,
|
||||
-5,
|
||||
AlchemicalWizardry.specialAltarBlock[2].getBlock(),
|
||||
AlchemicalWizardry.specialAltarBlock[2].getMeta(),
|
||||
false,
|
||||
false));
|
||||
fourthTierAltar.add(
|
||||
new AltarComponent(
|
||||
-5,
|
||||
i,
|
||||
-5,
|
||||
AlchemicalWizardry.specialAltarBlock[2].getBlock(),
|
||||
AlchemicalWizardry.specialAltarBlock[2].getMeta(),
|
||||
false,
|
||||
false));
|
||||
fourthTierAltar.add(
|
||||
new AltarComponent(
|
||||
-5,
|
||||
i,
|
||||
5,
|
||||
AlchemicalWizardry.specialAltarBlock[2].getBlock(),
|
||||
AlchemicalWizardry.specialAltarBlock[2].getMeta(),
|
||||
false,
|
||||
false));
|
||||
fourthTierAltar.add(new AltarComponent(5, i, 5, AlchemicalWizardry.fourthTierPillars, false, false));
|
||||
fourthTierAltar.add(new AltarComponent(5, i, -5, AlchemicalWizardry.fourthTierPillars, false, false));
|
||||
fourthTierAltar.add(new AltarComponent(-5, i, -5, AlchemicalWizardry.fourthTierPillars, false, false));
|
||||
fourthTierAltar.add(new AltarComponent(-5, i, 5, AlchemicalWizardry.fourthTierPillars, false, false));
|
||||
}
|
||||
fourthTierAltar.add(
|
||||
new AltarComponent(
|
||||
5,
|
||||
2,
|
||||
5,
|
||||
AlchemicalWizardry.specialAltarBlock[3].getBlock(),
|
||||
AlchemicalWizardry.specialAltarBlock[3].getMeta(),
|
||||
false,
|
||||
false));
|
||||
fourthTierAltar.add(
|
||||
new AltarComponent(
|
||||
5,
|
||||
2,
|
||||
-5,
|
||||
AlchemicalWizardry.specialAltarBlock[3].getBlock(),
|
||||
AlchemicalWizardry.specialAltarBlock[3].getMeta(),
|
||||
false,
|
||||
false));
|
||||
fourthTierAltar.add(
|
||||
new AltarComponent(
|
||||
-5,
|
||||
2,
|
||||
-5,
|
||||
AlchemicalWizardry.specialAltarBlock[3].getBlock(),
|
||||
AlchemicalWizardry.specialAltarBlock[3].getMeta(),
|
||||
false,
|
||||
false));
|
||||
fourthTierAltar.add(
|
||||
new AltarComponent(
|
||||
-5,
|
||||
2,
|
||||
5,
|
||||
AlchemicalWizardry.specialAltarBlock[3].getBlock(),
|
||||
AlchemicalWizardry.specialAltarBlock[3].getMeta(),
|
||||
false,
|
||||
false));
|
||||
fourthTierAltar.add(new AltarComponent(5, 2, 5, AlchemicalWizardry.fourthTierCaps, false, false));
|
||||
fourthTierAltar.add(new AltarComponent(5, 2, -5, AlchemicalWizardry.fourthTierCaps, false, false));
|
||||
fourthTierAltar.add(new AltarComponent(-5, 2, -5, AlchemicalWizardry.fourthTierCaps, false, false));
|
||||
fourthTierAltar.add(new AltarComponent(-5, 2, 5, AlchemicalWizardry.fourthTierCaps, false, false));
|
||||
|
||||
fifthTierAltar.addAll(fourthTierAltar);
|
||||
fifthTierAltar.add(
|
||||
new AltarComponent(
|
||||
-8,
|
||||
-3,
|
||||
8,
|
||||
AlchemicalWizardry.specialAltarBlock[4].getBlock(),
|
||||
AlchemicalWizardry.specialAltarBlock[4].getMeta(),
|
||||
false,
|
||||
false));
|
||||
fifthTierAltar.add(
|
||||
new AltarComponent(
|
||||
-8,
|
||||
-3,
|
||||
-8,
|
||||
AlchemicalWizardry.specialAltarBlock[4].getBlock(),
|
||||
AlchemicalWizardry.specialAltarBlock[4].getMeta(),
|
||||
false,
|
||||
false));
|
||||
fifthTierAltar.add(
|
||||
new AltarComponent(
|
||||
8,
|
||||
-3,
|
||||
-8,
|
||||
AlchemicalWizardry.specialAltarBlock[4].getBlock(),
|
||||
AlchemicalWizardry.specialAltarBlock[4].getMeta(),
|
||||
false,
|
||||
false));
|
||||
fifthTierAltar.add(
|
||||
new AltarComponent(
|
||||
8,
|
||||
-3,
|
||||
8,
|
||||
AlchemicalWizardry.specialAltarBlock[4].getBlock(),
|
||||
AlchemicalWizardry.specialAltarBlock[4].getMeta(),
|
||||
false,
|
||||
false));
|
||||
fifthTierAltar.add(new AltarComponent(-8, -3, 8, AlchemicalWizardry.fifthTierBeacons, false, false));
|
||||
fifthTierAltar.add(new AltarComponent(-8, -3, -8, AlchemicalWizardry.fifthTierBeacons, false, false));
|
||||
fifthTierAltar.add(new AltarComponent(8, -3, -8, AlchemicalWizardry.fifthTierBeacons, false, false));
|
||||
fifthTierAltar.add(new AltarComponent(8, -3, 8, AlchemicalWizardry.fifthTierBeacons, false, false));
|
||||
for (int i = -6; i <= 6; i++) {
|
||||
fifthTierAltar.add(
|
||||
new AltarComponent(
|
||||
8,
|
||||
-4,
|
||||
i,
|
||||
AlchemicalWizardry.fifthTierRunes[0].getBlock(),
|
||||
AlchemicalWizardry.fifthTierRunes[0].getMeta(),
|
||||
true,
|
||||
true));
|
||||
fifthTierAltar.add(
|
||||
new AltarComponent(
|
||||
-8,
|
||||
-4,
|
||||
i,
|
||||
AlchemicalWizardry.fifthTierRunes[0].getBlock(),
|
||||
AlchemicalWizardry.fifthTierRunes[0].getMeta(),
|
||||
true,
|
||||
true));
|
||||
fifthTierAltar.add(
|
||||
new AltarComponent(
|
||||
i,
|
||||
-4,
|
||||
8,
|
||||
AlchemicalWizardry.fifthTierRunes[0].getBlock(),
|
||||
AlchemicalWizardry.fifthTierRunes[0].getMeta(),
|
||||
true,
|
||||
true));
|
||||
fifthTierAltar.add(
|
||||
new AltarComponent(
|
||||
i,
|
||||
-4,
|
||||
-8,
|
||||
AlchemicalWizardry.fifthTierRunes[0].getBlock(),
|
||||
AlchemicalWizardry.fifthTierRunes[0].getMeta(),
|
||||
true,
|
||||
true));
|
||||
fifthTierAltar.add(new AltarComponent(8, -4, i, AlchemicalWizardry.fifthTierRunes, true, true));
|
||||
fifthTierAltar.add(new AltarComponent(-8, -4, i, AlchemicalWizardry.fifthTierRunes, true, true));
|
||||
fifthTierAltar.add(new AltarComponent(i, -4, 8, AlchemicalWizardry.fifthTierRunes, true, true));
|
||||
fifthTierAltar.add(new AltarComponent(i, -4, -8, AlchemicalWizardry.fifthTierRunes, true, true));
|
||||
}
|
||||
|
||||
sixthTierAltar.addAll(fifthTierAltar);
|
||||
for (int i = -4; i <= 2; i++) {
|
||||
sixthTierAltar.add(
|
||||
new AltarComponent(
|
||||
11,
|
||||
i,
|
||||
11,
|
||||
AlchemicalWizardry.specialAltarBlock[5].getBlock(),
|
||||
AlchemicalWizardry.specialAltarBlock[5].getMeta(),
|
||||
false,
|
||||
false));
|
||||
sixthTierAltar.add(
|
||||
new AltarComponent(
|
||||
-11,
|
||||
i,
|
||||
-11,
|
||||
AlchemicalWizardry.specialAltarBlock[5].getBlock(),
|
||||
AlchemicalWizardry.specialAltarBlock[5].getMeta(),
|
||||
false,
|
||||
false));
|
||||
sixthTierAltar.add(
|
||||
new AltarComponent(
|
||||
11,
|
||||
i,
|
||||
-11,
|
||||
AlchemicalWizardry.specialAltarBlock[5].getBlock(),
|
||||
AlchemicalWizardry.specialAltarBlock[5].getMeta(),
|
||||
false,
|
||||
false));
|
||||
sixthTierAltar.add(
|
||||
new AltarComponent(
|
||||
-11,
|
||||
i,
|
||||
11,
|
||||
AlchemicalWizardry.specialAltarBlock[5].getBlock(),
|
||||
AlchemicalWizardry.specialAltarBlock[5].getMeta(),
|
||||
false,
|
||||
false));
|
||||
sixthTierAltar.add(new AltarComponent(11, i, 11, AlchemicalWizardry.sixthTierPillars, false, false));
|
||||
sixthTierAltar.add(new AltarComponent(-11, i, -11, AlchemicalWizardry.sixthTierPillars, false, false));
|
||||
sixthTierAltar.add(new AltarComponent(11, i, -11, AlchemicalWizardry.sixthTierPillars, false, false));
|
||||
sixthTierAltar.add(new AltarComponent(-11, i, 11, AlchemicalWizardry.sixthTierPillars, false, false));
|
||||
}
|
||||
sixthTierAltar.add(
|
||||
new AltarComponent(
|
||||
11,
|
||||
3,
|
||||
11,
|
||||
AlchemicalWizardry.specialAltarBlock[6].getBlock(),
|
||||
AlchemicalWizardry.specialAltarBlock[6].getMeta(),
|
||||
false,
|
||||
false));
|
||||
sixthTierAltar.add(
|
||||
new AltarComponent(
|
||||
-11,
|
||||
3,
|
||||
-11,
|
||||
AlchemicalWizardry.specialAltarBlock[6].getBlock(),
|
||||
AlchemicalWizardry.specialAltarBlock[6].getMeta(),
|
||||
false,
|
||||
false));
|
||||
sixthTierAltar.add(
|
||||
new AltarComponent(
|
||||
11,
|
||||
3,
|
||||
-11,
|
||||
AlchemicalWizardry.specialAltarBlock[6].getBlock(),
|
||||
AlchemicalWizardry.specialAltarBlock[6].getMeta(),
|
||||
false,
|
||||
false));
|
||||
sixthTierAltar.add(
|
||||
new AltarComponent(
|
||||
-11,
|
||||
3,
|
||||
11,
|
||||
AlchemicalWizardry.specialAltarBlock[6].getBlock(),
|
||||
AlchemicalWizardry.specialAltarBlock[6].getMeta(),
|
||||
false,
|
||||
false));
|
||||
sixthTierAltar.add(new AltarComponent(11, 3, 11, AlchemicalWizardry.sixthTierCaps, false, false));
|
||||
sixthTierAltar.add(new AltarComponent(-11, 3, -11, AlchemicalWizardry.sixthTierCaps, false, false));
|
||||
sixthTierAltar.add(new AltarComponent(11, 3, -11, AlchemicalWizardry.sixthTierCaps, false, false));
|
||||
sixthTierAltar.add(new AltarComponent(-11, 3, 11, AlchemicalWizardry.sixthTierCaps, false, false));
|
||||
for (int i = -9; i <= 9; i++) {
|
||||
sixthTierAltar.add(
|
||||
new AltarComponent(
|
||||
11,
|
||||
-5,
|
||||
i,
|
||||
AlchemicalWizardry.sixthTierRunes[0].getBlock(),
|
||||
AlchemicalWizardry.sixthTierRunes[0].getMeta(),
|
||||
true,
|
||||
true));
|
||||
sixthTierAltar.add(
|
||||
new AltarComponent(
|
||||
-11,
|
||||
-5,
|
||||
i,
|
||||
AlchemicalWizardry.sixthTierRunes[0].getBlock(),
|
||||
AlchemicalWizardry.sixthTierRunes[0].getMeta(),
|
||||
true,
|
||||
true));
|
||||
sixthTierAltar.add(
|
||||
new AltarComponent(
|
||||
i,
|
||||
-5,
|
||||
11,
|
||||
AlchemicalWizardry.sixthTierRunes[0].getBlock(),
|
||||
AlchemicalWizardry.sixthTierRunes[0].getMeta(),
|
||||
true,
|
||||
true));
|
||||
sixthTierAltar.add(
|
||||
new AltarComponent(
|
||||
i,
|
||||
-5,
|
||||
-11,
|
||||
AlchemicalWizardry.sixthTierRunes[0].getBlock(),
|
||||
AlchemicalWizardry.sixthTierRunes[0].getMeta(),
|
||||
true,
|
||||
true));
|
||||
sixthTierAltar.add(new AltarComponent(11, -5, i, AlchemicalWizardry.sixthTierRunes, true, true));
|
||||
sixthTierAltar.add(new AltarComponent(-11, -5, i, AlchemicalWizardry.sixthTierRunes, true, true));
|
||||
sixthTierAltar.add(new AltarComponent(i, -5, 11, AlchemicalWizardry.sixthTierRunes, true, true));
|
||||
sixthTierAltar.add(new AltarComponent(i, -5, -11, AlchemicalWizardry.sixthTierRunes, true, true));
|
||||
}
|
||||
}
|
||||
|
||||
public static List<AltarComponent> getAltarUpgradeListForTier(int tier) {
|
||||
switch (tier) {
|
||||
case 2:
|
||||
return secondTierAltar;
|
||||
|
||||
case 3:
|
||||
return thirdTierAltar;
|
||||
|
||||
case 4:
|
||||
return fourthTierAltar;
|
||||
|
||||
case 5:
|
||||
return fifthTierAltar;
|
||||
|
||||
case 6:
|
||||
return sixthTierAltar;
|
||||
}
|
||||
|
||||
return null;
|
||||
return switch (tier) {
|
||||
case 2 -> secondTierAltar;
|
||||
case 3 -> thirdTierAltar;
|
||||
case 4 -> fourthTierAltar;
|
||||
case 5 -> fifthTierAltar;
|
||||
case 6 -> sixthTierAltar;
|
||||
default -> null;
|
||||
};
|
||||
}
|
||||
}
|
||||
@@ -7,16 +7,12 @@ import net.minecraft.creativetab.CreativeTabs;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.EnumChatFormatting;
|
||||
import net.minecraft.util.IIcon;
|
||||
import net.minecraft.util.MathHelper;
|
||||
import net.minecraft.util.StatCollector;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
import org.lwjgl.input.Keyboard;
|
||||
|
||||
import WayofTime.alchemicalWizardry.AlchemicalWizardry;
|
||||
import WayofTime.alchemicalWizardry.api.alchemy.AlchemyRecipeRegistry;
|
||||
import WayofTime.alchemicalWizardry.api.items.interfaces.IBindable;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
@@ -48,51 +44,13 @@ public class ActivationCrystal extends EnergyItems {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void addInformation(ItemStack par1ItemStack, EntityPlayer par2EntityPlayer, List par3List, boolean par4) {
|
||||
public void addInformation(ItemStack par1ItemStack, EntityPlayer par2EntityPlayer, List<String> par3List,
|
||||
boolean par4) {
|
||||
switch (par1ItemStack.getItemDamage()) {
|
||||
case 0: {
|
||||
par3List.add(StatCollector.translateToLocal("tooltip.activationcrystal.lowlevelrituals"));
|
||||
break;
|
||||
}
|
||||
|
||||
case 1: {
|
||||
par3List.add(StatCollector.translateToLocal("tooltip.activationcrystal.powerfulrituals"));
|
||||
|
||||
if (Keyboard.isKeyDown(Keyboard.KEY_RSHIFT) || Keyboard.isKeyDown(Keyboard.KEY_LSHIFT)) {
|
||||
ItemStack[] recipe = AlchemyRecipeRegistry.getRecipeForItemStack(par1ItemStack);
|
||||
|
||||
if (recipe != null) {
|
||||
par3List.add(
|
||||
EnumChatFormatting.BLUE + StatCollector.translateToLocal("tooltip.alchemy.recipe"));
|
||||
|
||||
for (ItemStack item : recipe) {
|
||||
if (item != null) {
|
||||
par3List.add("" + item.getDisplayName());
|
||||
}
|
||||
}
|
||||
}
|
||||
} else {
|
||||
par3List.add(
|
||||
"-" + StatCollector.translateToLocal("tooltip.alchemy.press")
|
||||
+ " "
|
||||
+ EnumChatFormatting.BLUE
|
||||
+ StatCollector.translateToLocal("tooltip.alchemy.shift")
|
||||
+ EnumChatFormatting.GRAY
|
||||
+ " "
|
||||
+ StatCollector.translateToLocal("tooltip.alchemy.forrecipe")
|
||||
+ "-");
|
||||
}
|
||||
|
||||
break;
|
||||
}
|
||||
|
||||
case 2: {
|
||||
par3List.add(StatCollector.translateToLocal("tooltip.activationcrystal.creativeonly"));
|
||||
|
||||
break;
|
||||
}
|
||||
case 0 -> par3List.add(StatCollector.translateToLocal("tooltip.activationcrystal.lowlevelrituals"));
|
||||
case 1 -> par3List.add(StatCollector.translateToLocal("tooltip.activationcrystal.powerfulrituals"));
|
||||
case 2 -> par3List.add(StatCollector.translateToLocal("tooltip.activationcrystal.creativeonly"));
|
||||
}
|
||||
|
||||
addBindingInformation(par1ItemStack, par3List);
|
||||
}
|
||||
|
||||
|
||||
@@ -49,7 +49,7 @@ public class BoundAxe extends ItemAxe implements IBindable {
|
||||
this.damageVsEntity = 5;
|
||||
setCreativeTab(AlchemicalWizardry.tabBloodMagic);
|
||||
setEnergyUsed(5);
|
||||
this.setHarvestLevel("axe", 5);
|
||||
this.setHarvestLevel("axe", 7);
|
||||
}
|
||||
|
||||
public void setEnergyUsed(int i) {
|
||||
|
||||
@@ -50,7 +50,7 @@ public class BoundPickaxe extends ItemPickaxe implements IBindable {
|
||||
this.damageVsEntity = 5;
|
||||
setCreativeTab(AlchemicalWizardry.tabBloodMagic);
|
||||
this.setEnergyUsed(5);
|
||||
setHarvestLevel("pickaxe", 5);
|
||||
setHarvestLevel("pickaxe", 7);
|
||||
}
|
||||
|
||||
public void setEnergyUsed(int i) {
|
||||
|
||||
@@ -51,7 +51,7 @@ public class BoundShovel extends ItemSpade implements IBindable {
|
||||
this.damageVsEntity = 5;
|
||||
setCreativeTab(AlchemicalWizardry.tabBloodMagic);
|
||||
setEnergyUsed(5);
|
||||
setHarvestLevel("shovel", 5);
|
||||
setHarvestLevel("shovel", 7);
|
||||
}
|
||||
|
||||
public void setEnergyUsed(int i) {
|
||||
|
||||
@@ -43,6 +43,7 @@ public class EnergyBattery extends Item implements ArmourUpgrade, IBindable, IBl
|
||||
@Override
|
||||
public void addInformation(ItemStack par1ItemStack, EntityPlayer par2EntityPlayer, List par3List, boolean par4) {
|
||||
par3List.add(StatCollector.translateToLocal("tooltip.energybattery.desc"));
|
||||
par3List.add(StatCollector.translateToLocalFormatted("tooltip.energybattery.capacity", this.getMaxEssence()));
|
||||
addBindingInformation(par1ItemStack, par3List);
|
||||
}
|
||||
|
||||
|
||||
@@ -71,15 +71,11 @@ public class EnergyBlast extends EnergyItems {
|
||||
@SideOnly(Side.CLIENT)
|
||||
public IIcon getIcon(ItemStack stack, int renderPass, EntityPlayer player, ItemStack usingItem, int useRemaining) {
|
||||
if (IBindable.isActive(stack)) {
|
||||
switch (this.tier) {
|
||||
case 1:
|
||||
return this.activeIcon;
|
||||
case 2:
|
||||
return this.activeIconTier2;
|
||||
case 3:
|
||||
return this.activeIconTier3;
|
||||
}
|
||||
return this.activeIcon;
|
||||
return switch (this.tier) {
|
||||
case 2 -> this.activeIconTier2;
|
||||
case 3 -> this.activeIconTier3;
|
||||
default -> this.activeIcon;
|
||||
};
|
||||
} else {
|
||||
return this.passiveIcon;
|
||||
}
|
||||
|
||||
@@ -133,25 +133,26 @@ public class EnergyItems extends Item implements IBindable {
|
||||
}
|
||||
|
||||
public static boolean canSyphonInContainer(ItemStack ist, int damageToBeDone) {
|
||||
if (ist.getTagCompound() != null && !(ist.getTagCompound().getString("ownerName").equals(""))) {
|
||||
String ownerName = ist.getTagCompound().getString("ownerName");
|
||||
|
||||
if (MinecraftServer.getServer() == null) {
|
||||
return false;
|
||||
}
|
||||
|
||||
World world = MinecraftServer.getServer().worldServers[0];
|
||||
LifeEssenceNetwork data = (LifeEssenceNetwork) world.loadItemData(LifeEssenceNetwork.class, ownerName);
|
||||
|
||||
if (data == null) {
|
||||
data = new LifeEssenceNetwork(ownerName);
|
||||
world.setItemData(ownerName, data);
|
||||
}
|
||||
|
||||
return data.currentEssence >= damageToBeDone;
|
||||
if (!(ist.getItem() instanceof IBindable)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
return false;
|
||||
String ownerName = IBindable.getOwnerName(ist);
|
||||
MinecraftServer server = MinecraftServer.getServer();
|
||||
|
||||
if (ownerName.isEmpty() || server == null) {
|
||||
return false;
|
||||
}
|
||||
|
||||
World world = server.worldServers[0];
|
||||
LifeEssenceNetwork data = (LifeEssenceNetwork) world.loadItemData(LifeEssenceNetwork.class, ownerName);
|
||||
|
||||
if (data == null) {
|
||||
data = new LifeEssenceNetwork(ownerName);
|
||||
world.setItemData(ownerName, data);
|
||||
}
|
||||
|
||||
return data.currentEssence >= damageToBeDone;
|
||||
}
|
||||
|
||||
public static void hurtPlayer(EntityPlayer user, int energySyphoned) {
|
||||
|
||||
@@ -7,16 +7,11 @@ import net.minecraft.creativetab.CreativeTabs;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.EnumChatFormatting;
|
||||
import net.minecraft.util.IIcon;
|
||||
import net.minecraft.util.MathHelper;
|
||||
import net.minecraft.util.StatCollector;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
import org.lwjgl.input.Keyboard;
|
||||
|
||||
import WayofTime.alchemicalWizardry.AlchemicalWizardry;
|
||||
import WayofTime.alchemicalWizardry.api.alchemy.AlchemyRecipeRegistry;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
|
||||
@@ -46,43 +41,15 @@ public class ItemAlchemyBase extends Item {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void addInformation(ItemStack par1ItemStack, EntityPlayer par2EntityPlayer, List par3List, boolean par4) {
|
||||
public void addInformation(ItemStack par1ItemStack, EntityPlayer par2EntityPlayer, List<String> par3List,
|
||||
boolean par4) {
|
||||
par3List.add(StatCollector.translateToLocal("tooltip.alchemy.usedinalchemy"));
|
||||
|
||||
if (Keyboard.isKeyDown(Keyboard.KEY_RSHIFT) || Keyboard.isKeyDown(Keyboard.KEY_LSHIFT)) {
|
||||
ItemStack[] recipe = AlchemyRecipeRegistry.getRecipeForItemStack(par1ItemStack);
|
||||
|
||||
if (recipe != null) {
|
||||
par3List.add(EnumChatFormatting.BLUE + StatCollector.translateToLocal("tooltip.alchemy.recipe"));
|
||||
|
||||
for (ItemStack item : recipe) {
|
||||
if (item != null) {
|
||||
par3List.add("" + item.getDisplayName());
|
||||
}
|
||||
}
|
||||
}
|
||||
} else {
|
||||
par3List.add(
|
||||
"-" + StatCollector.translateToLocal("tooltip.alchemy.press")
|
||||
+ " "
|
||||
+ EnumChatFormatting.BLUE
|
||||
+ StatCollector.translateToLocal("tooltip.alchemy.shift")
|
||||
+ EnumChatFormatting.GRAY
|
||||
+ " "
|
||||
+ StatCollector.translateToLocal("tooltip.alchemy.forrecipe")
|
||||
+ "-");
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public ItemStack onItemRightClick(ItemStack par1ItemStack, World par2World, EntityPlayer par3EntityPlayer) {
|
||||
return par1ItemStack;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getUnlocalizedName(ItemStack itemStack) {
|
||||
int meta = MathHelper.clamp_int(itemStack.getItemDamage(), 0, ITEM_NAMES.length - 1);
|
||||
return ("" + "item.bloodMagicAlchemyItem." + ITEM_NAMES[meta]);
|
||||
return ("item.bloodMagicAlchemyItem." + ITEM_NAMES[meta]);
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -94,7 +61,7 @@ public class ItemAlchemyBase extends Item {
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void getSubItems(Item id, CreativeTabs creativeTab, List list) {
|
||||
public void getSubItems(Item id, CreativeTabs creativeTab, List<ItemStack> list) {
|
||||
for (int meta = 0; meta < ITEM_NAMES.length; ++meta) {
|
||||
list.add(new ItemStack(id, 1, meta));
|
||||
}
|
||||
|
||||
@@ -17,7 +17,7 @@ import cpw.mods.fml.relauncher.SideOnly;
|
||||
|
||||
public class TelepositionFocus extends EnergyItems {
|
||||
|
||||
private int focusLevel;
|
||||
private final int focusLevel;
|
||||
|
||||
public TelepositionFocus(int focusLevel) {
|
||||
super();
|
||||
@@ -33,7 +33,8 @@ public class TelepositionFocus extends EnergyItems {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void addInformation(ItemStack par1ItemStack, EntityPlayer par2EntityPlayer, List par3List, boolean par4) {
|
||||
public void addInformation(ItemStack par1ItemStack, EntityPlayer par2EntityPlayer, List<String> par3List,
|
||||
boolean par4) {
|
||||
par3List.add(StatCollector.translateToLocal("tooltip.telepositionfocus.desc"));
|
||||
addBindingInformation(par1ItemStack, par3List);
|
||||
|
||||
@@ -50,20 +51,12 @@ public class TelepositionFocus extends EnergyItems {
|
||||
|
||||
@Override
|
||||
public ItemStack onItemRightClick(ItemStack par1ItemStack, World par2World, EntityPlayer par3EntityPlayer) {
|
||||
if (IBindable.checkAndSetItemOwner(par1ItemStack, par3EntityPlayer)) {
|
||||
if (par3EntityPlayer.isSneaking()) {
|
||||
return par1ItemStack;
|
||||
}
|
||||
}
|
||||
IBindable.checkAndSetItemOwner(par1ItemStack, par3EntityPlayer);
|
||||
return par1ItemStack;
|
||||
}
|
||||
|
||||
public int getDimensionID(ItemStack itemStack) {
|
||||
if (itemStack.getTagCompound() == null) {
|
||||
itemStack.setTagCompound(new NBTTagCompound());
|
||||
}
|
||||
|
||||
return itemStack.getTagCompound().getInteger("dimensionId");
|
||||
return IBindable.getTag(itemStack).getInteger("dimensionId");
|
||||
}
|
||||
|
||||
public World getWorld(ItemStack itemStack) {
|
||||
@@ -72,27 +65,15 @@ public class TelepositionFocus extends EnergyItems {
|
||||
}
|
||||
|
||||
public int xCoord(ItemStack itemStack) {
|
||||
if (!(itemStack.getTagCompound() == null)) {
|
||||
return itemStack.getTagCompound().getInteger("xCoord");
|
||||
} else {
|
||||
return 0;
|
||||
}
|
||||
return IBindable.getTag(itemStack).getInteger("xCoord");
|
||||
}
|
||||
|
||||
public int yCoord(ItemStack itemStack) {
|
||||
if (!(itemStack.getTagCompound() == null)) {
|
||||
return itemStack.getTagCompound().getInteger("yCoord");
|
||||
} else {
|
||||
return 0;
|
||||
}
|
||||
return IBindable.getTag(itemStack).getInteger("yCoord");
|
||||
}
|
||||
|
||||
public int zCoord(ItemStack itemStack) {
|
||||
if (!(itemStack.getTagCompound() == null)) {
|
||||
return itemStack.getTagCompound().getInteger("zCoord");
|
||||
} else {
|
||||
return 0;
|
||||
}
|
||||
return IBindable.getTag(itemStack).getInteger("zCoord");
|
||||
}
|
||||
|
||||
public int getFocusLevel() {
|
||||
|
||||
@@ -25,6 +25,7 @@ import WayofTime.alchemicalWizardry.ModItems;
|
||||
import WayofTime.alchemicalWizardry.api.alchemy.energy.IAlchemyGoggles;
|
||||
import WayofTime.alchemicalWizardry.api.items.interfaces.ArmourUpgrade;
|
||||
import WayofTime.alchemicalWizardry.api.items.interfaces.IBindable;
|
||||
import WayofTime.alchemicalWizardry.api.items.interfaces.IBloodOrb;
|
||||
import WayofTime.alchemicalWizardry.api.items.interfaces.ILPGauge;
|
||||
import WayofTime.alchemicalWizardry.common.items.EnergyItems;
|
||||
import WayofTime.alchemicalWizardry.common.items.sigil.SigilDivination;
|
||||
@@ -33,6 +34,8 @@ import cpw.mods.fml.common.Optional;
|
||||
import cpw.mods.fml.common.Optional.Interface;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import gregtech.api.hazards.Hazard;
|
||||
import gregtech.api.hazards.IHazardProtector;
|
||||
import thaumcraft.api.IGoggles;
|
||||
import thaumcraft.api.IRunicArmor;
|
||||
import thaumcraft.api.nodes.IRevealer;
|
||||
@@ -40,9 +43,10 @@ import thaumcraft.api.nodes.IRevealer;
|
||||
@Optional.InterfaceList(
|
||||
value = { @Interface(iface = "thaumcraft.api.nodes.IRevealer", modid = "Thaumcraft"),
|
||||
@Interface(iface = "thaumcraft.api.IGoggles", modid = "Thaumcraft"),
|
||||
@Interface(iface = "thaumcraft.api.IRunicArmor", modid = "Thaumcraft") })
|
||||
public class BoundArmour extends ItemArmor
|
||||
implements IAlchemyGoggles, ISpecialArmor, IBindable, IRevealer, IGoggles, IRunicArmor, ILPGauge {
|
||||
@Interface(iface = "thaumcraft.api.IRunicArmor", modid = "Thaumcraft"),
|
||||
@Interface(iface = "gregtech.api.hazards.IHazardProtector", modid = "gregtech_nh") })
|
||||
public class BoundArmour extends ItemArmor implements IAlchemyGoggles, ISpecialArmor, IBindable, IRevealer, IGoggles,
|
||||
IRunicArmor, ILPGauge, IHazardProtector {
|
||||
|
||||
private static int invSize = 9;
|
||||
|
||||
@@ -605,29 +609,17 @@ public class BoundArmour extends ItemArmor
|
||||
}
|
||||
|
||||
for (ItemStack item : inv) {
|
||||
if (item == null) {
|
||||
if (item == null || !(item.getItem() instanceof IBloodOrb orb)) {
|
||||
continue;
|
||||
}
|
||||
|
||||
if (item.getItem().equals(ModItems.weakBloodOrb)) {
|
||||
return 0.75f;
|
||||
}
|
||||
|
||||
if (item.getItem().equals(ModItems.apprenticeBloodOrb)) {
|
||||
return 0.50f;
|
||||
}
|
||||
|
||||
if (item.getItem().equals(ModItems.magicianBloodOrb)) {
|
||||
return 0.25f;
|
||||
}
|
||||
|
||||
if (item.getItem().equals(ModItems.masterBloodOrb)) {
|
||||
return 0.0f;
|
||||
}
|
||||
|
||||
if (item.getItem().equals(ModItems.archmageBloodOrb)) {
|
||||
return 0.0f;
|
||||
}
|
||||
return switch (orb.getOrbLevel()) {
|
||||
case 1 -> 0.75f;
|
||||
case 2 -> 0.50f;
|
||||
case 3 -> 0.25f;
|
||||
case 4, 5, 6 -> 0;
|
||||
default -> 1;
|
||||
};
|
||||
}
|
||||
|
||||
return 1.0f;
|
||||
@@ -751,4 +743,11 @@ public class BoundArmour extends ItemArmor
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
/// GT5 Hazmat protection
|
||||
@Optional.Method(modid = "gregtech_nh")
|
||||
@Override
|
||||
public boolean protectsAgainst(ItemStack itemStack, Hazard hazard) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
+5
-7
@@ -124,13 +124,11 @@ public class ItemAttunedCrystal extends Item implements IReagentManipulator {
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public IIcon getIcon(ItemStack stack, int pass) {
|
||||
switch (pass) {
|
||||
case 0:
|
||||
return this.crystalBody;
|
||||
case 1:
|
||||
return this.crystalLabel;
|
||||
}
|
||||
return this.itemIcon;
|
||||
return switch (pass) {
|
||||
case 0 -> this.crystalBody;
|
||||
case 1 -> this.crystalLabel;
|
||||
default -> this.itemIcon;
|
||||
};
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
+5
-7
@@ -104,13 +104,11 @@ public class ItemTankSegmenter extends Item implements IReagentManipulator {
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public IIcon getIcon(ItemStack stack, int pass) {
|
||||
switch (pass) {
|
||||
case 0:
|
||||
return this.crystalBody;
|
||||
case 1:
|
||||
return this.crystalLabel;
|
||||
}
|
||||
return this.itemIcon;
|
||||
return switch (pass) {
|
||||
case 0 -> this.crystalBody;
|
||||
case 1 -> this.crystalLabel;
|
||||
default -> this.itemIcon;
|
||||
};
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -6,14 +6,10 @@ import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.EnumChatFormatting;
|
||||
import net.minecraft.util.StatCollector;
|
||||
|
||||
import org.lwjgl.input.Keyboard;
|
||||
|
||||
import WayofTime.alchemicalWizardry.AlchemicalWizardry;
|
||||
import WayofTime.alchemicalWizardry.ModItems;
|
||||
import WayofTime.alchemicalWizardry.api.alchemy.AlchemyRecipeRegistry;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
|
||||
@@ -70,31 +66,8 @@ public class AlchemyReagent extends Item {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void addInformation(ItemStack par1ItemStack, EntityPlayer par2EntityPlayer, List par3List, boolean par4) {
|
||||
public void addInformation(ItemStack par1ItemStack, EntityPlayer par2EntityPlayer, List<String> par3List,
|
||||
boolean par4) {
|
||||
par3List.add(StatCollector.translateToLocal("tooltip.alchemy.usedinalchemy"));
|
||||
|
||||
if (Keyboard.isKeyDown(Keyboard.KEY_RSHIFT) || Keyboard.isKeyDown(Keyboard.KEY_LSHIFT)) {
|
||||
ItemStack[] recipe = AlchemyRecipeRegistry.getRecipeForItemStack(par1ItemStack);
|
||||
|
||||
if (recipe != null) {
|
||||
par3List.add(EnumChatFormatting.BLUE + StatCollector.translateToLocal("tooltip.alchemy.recipe"));
|
||||
|
||||
for (ItemStack item : recipe) {
|
||||
if (item != null) {
|
||||
par3List.add("" + item.getDisplayName());
|
||||
}
|
||||
}
|
||||
}
|
||||
} else {
|
||||
par3List.add(
|
||||
"-" + StatCollector.translateToLocal("tooltip.alchemy.press")
|
||||
+ " "
|
||||
+ EnumChatFormatting.BLUE
|
||||
+ StatCollector.translateToLocal("tooltip.alchemy.shift")
|
||||
+ EnumChatFormatting.GRAY
|
||||
+ " "
|
||||
+ StatCollector.translateToLocal("tooltip.alchemy.forrecipe")
|
||||
+ "-");
|
||||
}
|
||||
}
|
||||
}
|
||||
+2
-29
@@ -5,13 +5,9 @@ import java.util.List;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.EnumChatFormatting;
|
||||
import net.minecraft.util.StatCollector;
|
||||
|
||||
import org.lwjgl.input.Keyboard;
|
||||
|
||||
import WayofTime.alchemicalWizardry.AlchemicalWizardry;
|
||||
import WayofTime.alchemicalWizardry.api.alchemy.AlchemyRecipeRegistry;
|
||||
import WayofTime.alchemicalWizardry.common.ICatalyst;
|
||||
|
||||
public class LengtheningCatalyst extends Item implements ICatalyst {
|
||||
@@ -34,31 +30,8 @@ public class LengtheningCatalyst extends Item implements ICatalyst {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void addInformation(ItemStack par1ItemStack, EntityPlayer par2EntityPlayer, List par3List, boolean par4) {
|
||||
public void addInformation(ItemStack par1ItemStack, EntityPlayer par2EntityPlayer, List<String> par3List,
|
||||
boolean par4) {
|
||||
par3List.add(StatCollector.translateToLocal("tooltip.alchemy.usedinalchemy"));
|
||||
|
||||
if (Keyboard.isKeyDown(Keyboard.KEY_RSHIFT) || Keyboard.isKeyDown(Keyboard.KEY_LSHIFT)) {
|
||||
ItemStack[] recipe = AlchemyRecipeRegistry.getRecipeForItemStack(par1ItemStack);
|
||||
|
||||
if (recipe != null) {
|
||||
par3List.add(EnumChatFormatting.BLUE + StatCollector.translateToLocal("tooltip.alchemy.recipe"));
|
||||
|
||||
for (ItemStack item : recipe) {
|
||||
if (item != null) {
|
||||
par3List.add("" + item.getDisplayName());
|
||||
}
|
||||
}
|
||||
}
|
||||
} else {
|
||||
par3List.add(
|
||||
"-" + StatCollector.translateToLocal("tooltip.alchemy.press")
|
||||
+ " "
|
||||
+ EnumChatFormatting.BLUE
|
||||
+ StatCollector.translateToLocal("tooltip.alchemy.shift")
|
||||
+ EnumChatFormatting.GRAY
|
||||
+ " "
|
||||
+ StatCollector.translateToLocal("tooltip.alchemy.forrecipe")
|
||||
+ "-");
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -5,13 +5,9 @@ import java.util.List;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.EnumChatFormatting;
|
||||
import net.minecraft.util.StatCollector;
|
||||
|
||||
import org.lwjgl.input.Keyboard;
|
||||
|
||||
import WayofTime.alchemicalWizardry.AlchemicalWizardry;
|
||||
import WayofTime.alchemicalWizardry.api.alchemy.AlchemyRecipeRegistry;
|
||||
import WayofTime.alchemicalWizardry.common.ICatalyst;
|
||||
|
||||
public class PowerCatalyst extends Item implements ICatalyst {
|
||||
@@ -35,31 +31,8 @@ public class PowerCatalyst extends Item implements ICatalyst {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void addInformation(ItemStack par1ItemStack, EntityPlayer par2EntityPlayer, List par3List, boolean par4) {
|
||||
public void addInformation(ItemStack par1ItemStack, EntityPlayer par2EntityPlayer, List<String> par3List,
|
||||
boolean par4) {
|
||||
par3List.add(StatCollector.translateToLocal("tooltip.alchemy.usedinalchemy"));
|
||||
|
||||
if (Keyboard.isKeyDown(Keyboard.KEY_RSHIFT) || Keyboard.isKeyDown(Keyboard.KEY_LSHIFT)) {
|
||||
ItemStack[] recipe = AlchemyRecipeRegistry.getRecipeForItemStack(par1ItemStack);
|
||||
|
||||
if (recipe != null) {
|
||||
par3List.add(EnumChatFormatting.BLUE + StatCollector.translateToLocal("tooltip.alchemy.recipe"));
|
||||
|
||||
for (ItemStack item : recipe) {
|
||||
if (item != null) {
|
||||
par3List.add("" + item.getDisplayName());
|
||||
}
|
||||
}
|
||||
}
|
||||
} else {
|
||||
par3List.add(
|
||||
"-" + StatCollector.translateToLocal("tooltip.alchemy.press")
|
||||
+ " "
|
||||
+ EnumChatFormatting.BLUE
|
||||
+ StatCollector.translateToLocal("tooltip.alchemy.shift")
|
||||
+ EnumChatFormatting.GRAY
|
||||
+ " "
|
||||
+ StatCollector.translateToLocal("tooltip.alchemy.forrecipe")
|
||||
+ "-");
|
||||
}
|
||||
}
|
||||
}
|
||||
+2
-29
@@ -6,13 +6,9 @@ import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.EnumChatFormatting;
|
||||
import net.minecraft.util.StatCollector;
|
||||
|
||||
import org.lwjgl.input.Keyboard;
|
||||
|
||||
import WayofTime.alchemicalWizardry.AlchemicalWizardry;
|
||||
import WayofTime.alchemicalWizardry.api.alchemy.AlchemyRecipeRegistry;
|
||||
import WayofTime.alchemicalWizardry.common.IBindingAgent;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
@@ -36,31 +32,8 @@ public class StandardBindingAgent extends Item implements IBindingAgent {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void addInformation(ItemStack par1ItemStack, EntityPlayer par2EntityPlayer, List par3List, boolean par4) {
|
||||
public void addInformation(ItemStack par1ItemStack, EntityPlayer par2EntityPlayer, List<String> par3List,
|
||||
boolean par4) {
|
||||
par3List.add(StatCollector.translateToLocal("tooltip.alchemy.usedinalchemy"));
|
||||
|
||||
if (Keyboard.isKeyDown(Keyboard.KEY_RSHIFT) || Keyboard.isKeyDown(Keyboard.KEY_LSHIFT)) {
|
||||
ItemStack[] recipe = AlchemyRecipeRegistry.getRecipeForItemStack(par1ItemStack);
|
||||
|
||||
if (recipe != null) {
|
||||
par3List.add(EnumChatFormatting.BLUE + StatCollector.translateToLocal("tooltip.alchemy.recipe"));
|
||||
|
||||
for (ItemStack item : recipe) {
|
||||
if (item != null) {
|
||||
par3List.add("" + item.getDisplayName());
|
||||
}
|
||||
}
|
||||
}
|
||||
} else {
|
||||
par3List.add(
|
||||
"-" + StatCollector.translateToLocal("tooltip.alchemy.press")
|
||||
+ " "
|
||||
+ EnumChatFormatting.BLUE
|
||||
+ StatCollector.translateToLocal("tooltip.alchemy.shift")
|
||||
+ EnumChatFormatting.GRAY
|
||||
+ " "
|
||||
+ StatCollector.translateToLocal("tooltip.alchemy.forrecipe")
|
||||
+ "-");
|
||||
}
|
||||
}
|
||||
}
|
||||
+2
-29
@@ -7,13 +7,9 @@ import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.EnumChatFormatting;
|
||||
import net.minecraft.util.StatCollector;
|
||||
|
||||
import org.lwjgl.input.Keyboard;
|
||||
|
||||
import WayofTime.alchemicalWizardry.AlchemicalWizardry;
|
||||
import WayofTime.alchemicalWizardry.api.alchemy.AlchemyRecipeRegistry;
|
||||
import WayofTime.alchemicalWizardry.common.IFillingAgent;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
@@ -51,31 +47,8 @@ public class WeakFillingAgent extends Item implements IFillingAgent {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void addInformation(ItemStack par1ItemStack, EntityPlayer par2EntityPlayer, List par3List, boolean par4) {
|
||||
public void addInformation(ItemStack par1ItemStack, EntityPlayer par2EntityPlayer, List<String> par3List,
|
||||
boolean par4) {
|
||||
par3List.add(StatCollector.translateToLocal("tooltip.alchemy.usedinalchemy"));
|
||||
|
||||
if (Keyboard.isKeyDown(Keyboard.KEY_RSHIFT) || Keyboard.isKeyDown(Keyboard.KEY_LSHIFT)) {
|
||||
ItemStack[] recipe = AlchemyRecipeRegistry.getRecipeForItemStack(par1ItemStack);
|
||||
|
||||
if (recipe != null) {
|
||||
par3List.add(EnumChatFormatting.BLUE + StatCollector.translateToLocal("tooltip.alchemy.recipe"));
|
||||
|
||||
for (ItemStack item : recipe) {
|
||||
if (item != null) {
|
||||
par3List.add("" + item.getDisplayName());
|
||||
}
|
||||
}
|
||||
}
|
||||
} else {
|
||||
par3List.add(
|
||||
"-" + StatCollector.translateToLocal("tooltip.alchemy.press")
|
||||
+ " "
|
||||
+ EnumChatFormatting.BLUE
|
||||
+ StatCollector.translateToLocal("tooltip.alchemy.shift")
|
||||
+ EnumChatFormatting.GRAY
|
||||
+ " "
|
||||
+ StatCollector.translateToLocal("tooltip.alchemy.forrecipe")
|
||||
+ "-");
|
||||
}
|
||||
}
|
||||
}
|
||||
+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
|
||||
|
||||
+88
-87
@@ -1,7 +1,6 @@
|
||||
package WayofTime.alchemicalWizardry.common.spell.complex.effect;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Iterator;
|
||||
import java.util.List;
|
||||
import java.util.Random;
|
||||
import java.util.regex.Pattern;
|
||||
@@ -26,17 +25,15 @@ import net.minecraft.item.crafting.FurnaceRecipes;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.nbt.NBTTagList;
|
||||
import net.minecraft.network.play.server.S06PacketUpdateHealth;
|
||||
import net.minecraft.network.play.server.S07PacketRespawn;
|
||||
import net.minecraft.network.play.server.S1DPacketEntityEffect;
|
||||
import net.minecraft.network.play.server.S1FPacketSetExperience;
|
||||
import net.minecraft.potion.Potion;
|
||||
import net.minecraft.potion.PotionEffect;
|
||||
import net.minecraft.server.MinecraftServer;
|
||||
import net.minecraft.server.management.ServerConfigurationManager;
|
||||
import net.minecraft.util.AxisAlignedBB;
|
||||
import net.minecraft.util.ChatComponentTranslation;
|
||||
import net.minecraft.util.DamageSource;
|
||||
import net.minecraft.util.MovingObjectPosition;
|
||||
import net.minecraft.util.Vec3;
|
||||
import net.minecraft.world.Teleporter;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraft.world.WorldServer;
|
||||
import net.minecraftforge.common.util.FakePlayer;
|
||||
@@ -52,7 +49,6 @@ import WayofTime.alchemicalWizardry.api.soulNetwork.SoulNetworkHandler;
|
||||
import WayofTime.alchemicalWizardry.api.spell.APISpellHelper;
|
||||
import WayofTime.alchemicalWizardry.common.NewPacketHandler;
|
||||
import WayofTime.alchemicalWizardry.common.items.sigil.SigilDivination;
|
||||
import cpw.mods.fml.common.FMLCommonHandler;
|
||||
|
||||
public class SpellHelper {
|
||||
|
||||
@@ -756,89 +752,64 @@ public class SpellHelper {
|
||||
return null;
|
||||
}
|
||||
|
||||
// Adapated from Enhanced Portals 3 code
|
||||
public static Entity teleportEntityToDim(World oldWorld, int newWorldID, double d, double e, double f,
|
||||
public static void teleportEntityToDim(World oldWorld, int newWorldID, double x, double y, double z,
|
||||
Entity entity) {
|
||||
if (entity != null) {
|
||||
if (entity.timeUntilPortal <= 0) {
|
||||
WorldServer oldWorldServer = MinecraftServer.getServer().worldServerForDimension(entity.dimension);
|
||||
WorldServer newWorldServer = MinecraftServer.getServer().worldServerForDimension(newWorldID);
|
||||
if (entity instanceof EntityPlayer) {
|
||||
EntityPlayerMP player = (EntityPlayerMP) entity;
|
||||
if (!player.worldObj.isRemote) {
|
||||
player.worldObj.theProfiler.startSection("portal");
|
||||
player.worldObj.theProfiler.startSection("changeDimension");
|
||||
ServerConfigurationManager config = player.mcServer.getConfigurationManager();
|
||||
oldWorld.playSoundEffect(
|
||||
player.posX,
|
||||
player.posY,
|
||||
player.posZ,
|
||||
"mob.endermen.portal",
|
||||
1.0F,
|
||||
1.0F);
|
||||
player.closeScreen();
|
||||
player.dimension = newWorldServer.provider.dimensionId;
|
||||
player.playerNetServerHandler.sendPacket(
|
||||
new S07PacketRespawn(
|
||||
player.dimension,
|
||||
player.worldObj.difficultySetting,
|
||||
newWorldServer.getWorldInfo().getTerrainType(),
|
||||
player.theItemInWorldManager.getGameType()));
|
||||
oldWorldServer.removeEntity(player);
|
||||
player.isDead = false;
|
||||
player.setLocationAndAngles(d, e, f, player.rotationYaw, player.rotationPitch);
|
||||
newWorldServer.spawnEntityInWorld(player);
|
||||
player.setWorld(newWorldServer);
|
||||
config.func_72375_a(player, oldWorldServer);
|
||||
player.playerNetServerHandler
|
||||
.setPlayerLocation(d, e, f, entity.rotationYaw, entity.rotationPitch);
|
||||
player.theItemInWorldManager.setWorld(newWorldServer);
|
||||
config.updateTimeAndWeatherForPlayer(player, newWorldServer);
|
||||
config.syncPlayerInventory(player);
|
||||
player.worldObj.theProfiler.endSection();
|
||||
oldWorldServer.resetUpdateEntityTick();
|
||||
newWorldServer.resetUpdateEntityTick();
|
||||
player.worldObj.theProfiler.endSection();
|
||||
for (Iterator<PotionEffect> potion = player.getActivePotionEffects().iterator(); potion
|
||||
.hasNext();) {
|
||||
player.playerNetServerHandler
|
||||
.sendPacket(new S1DPacketEntityEffect(player.getEntityId(), potion.next()));
|
||||
}
|
||||
player.playerNetServerHandler.sendPacket(
|
||||
new S1FPacketSetExperience(
|
||||
player.experience,
|
||||
player.experienceTotal,
|
||||
player.experienceLevel));
|
||||
FMLCommonHandler.instance().firePlayerChangedDimensionEvent(
|
||||
player,
|
||||
oldWorldServer.provider.dimensionId,
|
||||
player.dimension);
|
||||
player.timeUntilPortal = 150;
|
||||
}
|
||||
player.worldObj.theProfiler.endSection();
|
||||
newWorldServer.playSoundEffect(d, e, f, "mob.endermen.portal", 1.0F, 1.0F);
|
||||
return player;
|
||||
} else {
|
||||
NBTTagCompound tag = new NBTTagCompound();
|
||||
entity.writeToNBTOptional(tag);
|
||||
entity.setDead();
|
||||
oldWorld.playSoundEffect(entity.posX, entity.posY, entity.posZ, "mob.endermen.portal", 1.0F, 1.0F);
|
||||
Entity teleportedEntity = EntityList.createEntityFromNBT(tag, newWorldServer);
|
||||
if (teleportedEntity != null) {
|
||||
teleportedEntity.setLocationAndAngles(d, e, f, entity.rotationYaw, entity.rotationPitch);
|
||||
teleportedEntity.forceSpawn = true;
|
||||
newWorldServer.spawnEntityInWorld(teleportedEntity);
|
||||
teleportedEntity.setWorld(newWorldServer);
|
||||
teleportedEntity.timeUntilPortal = 150;
|
||||
}
|
||||
oldWorldServer.resetUpdateEntityTick();
|
||||
newWorldServer.resetUpdateEntityTick();
|
||||
newWorldServer.playSoundEffect(d, e, f, "mob.endermen.portal", 1.0F, 1.0F);
|
||||
return teleportedEntity;
|
||||
}
|
||||
}
|
||||
if (entity == null || entity.timeUntilPortal > 0) return;
|
||||
|
||||
MinecraftServer server = MinecraftServer.getServer();
|
||||
WorldServer oldWorldServer = server.worldServerForDimension(entity.dimension);
|
||||
WorldServer newWorldServer = server.worldServerForDimension(newWorldID);
|
||||
|
||||
oldWorld.playSoundEffect(entity.posX, entity.posY, entity.posZ, "mob.endermen.portal", 1.0F, 1.0F);
|
||||
|
||||
if (entity instanceof EntityPlayerMP player) {
|
||||
teleportPlayer(player, newWorldServer, x, y, z);
|
||||
} else {
|
||||
teleportNonPlayer(entity, oldWorldServer, newWorldServer, x, y, z);
|
||||
}
|
||||
return null;
|
||||
|
||||
newWorldServer.playSoundEffect(x, y, z, "mob.endermen.portal", 1.0F, 1.0F);
|
||||
}
|
||||
|
||||
private static void teleportPlayer(EntityPlayerMP player, WorldServer newWorldServer, double x, double y,
|
||||
double z) {
|
||||
if (player.worldObj.isRemote) return;
|
||||
|
||||
// Teleporting to the Spirit World from Witchery causes the player to get stuck until exiting the world.
|
||||
// Blocks and mobs are fine, so only player TPs need to be canceled.
|
||||
// TODO: Figure out a better fix for this instead of just preventing it.
|
||||
if (newWorldServer.provider.getDimensionName().equals("Spirit World")) {
|
||||
player.addChatComponentMessage(new ChatComponentTranslation("message.warn.spiritWorld"));
|
||||
return;
|
||||
}
|
||||
|
||||
player.mcServer.getConfigurationManager().transferPlayerToDimension(
|
||||
player,
|
||||
newWorldServer.provider.dimensionId,
|
||||
new BMTeleporter(newWorldServer, x, y, z));
|
||||
|
||||
player.timeUntilPortal = 20;
|
||||
player.playerNetServerHandler.sendPacket(
|
||||
new S1FPacketSetExperience(player.experience, player.experienceTotal, player.experienceLevel));
|
||||
}
|
||||
|
||||
private static void teleportNonPlayer(Entity entity, WorldServer oldWorldServer, WorldServer newWorldServer,
|
||||
double x, double y, double z) {
|
||||
NBTTagCompound tag = new NBTTagCompound();
|
||||
entity.writeToNBTOptional(tag);
|
||||
entity.setDead();
|
||||
|
||||
Entity newEntity = EntityList.createEntityFromNBT(tag, newWorldServer);
|
||||
if (newEntity != null) {
|
||||
newEntity.setLocationAndAngles(x, y, z, entity.rotationYaw, entity.rotationPitch);
|
||||
newEntity.forceSpawn = true;
|
||||
newWorldServer.spawnEntityInWorld(newEntity);
|
||||
newEntity.setWorld(newWorldServer);
|
||||
newEntity.timeUntilPortal = 20;
|
||||
}
|
||||
|
||||
oldWorldServer.resetUpdateEntityTick();
|
||||
newWorldServer.resetUpdateEntityTick();
|
||||
}
|
||||
|
||||
public static boolean areItemStacksEqual(ItemStack stack, ItemStack compressedStack) {
|
||||
@@ -926,4 +897,34 @@ public class SpellHelper {
|
||||
|
||||
return damage;
|
||||
}
|
||||
|
||||
private static class BMTeleporter extends Teleporter {
|
||||
|
||||
private final double x;
|
||||
private final double y;
|
||||
private final double z;
|
||||
|
||||
public BMTeleporter(WorldServer worldServer, double x, double y, double z) {
|
||||
super(worldServer);
|
||||
this.x = x;
|
||||
this.y = y;
|
||||
this.z = z;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void placeInPortal(Entity entity, double x, double y, double z, float rotationYaw) {
|
||||
entity.setLocationAndAngles(this.x, this.y, this.z, entity.rotationYaw, entity.rotationPitch);
|
||||
entity.motionX = entity.motionY = entity.motionZ = 0.0D;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean placeInExistingPortal(Entity entity, double x, double y, double z, float rotationYaw) {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean makePortal(Entity entity) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -10,14 +10,16 @@ import java.util.Random;
|
||||
|
||||
import net.minecraft.item.ItemBlock;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
import com.gtnewhorizon.gtnhlib.util.data.ImmutableBlockMeta;
|
||||
|
||||
import WayofTime.alchemicalWizardry.AlchemicalWizardry;
|
||||
import WayofTime.alchemicalWizardry.api.alchemy.energy.Reagent;
|
||||
import cpw.mods.fml.common.Optional;
|
||||
import cpw.mods.fml.common.registry.GameRegistry;
|
||||
import gregtech.common.blocks.TileEntityOres;
|
||||
import gregtech.common.ores.OreInfo;
|
||||
import gregtech.common.ores.OreManager;
|
||||
|
||||
public class Meteor {
|
||||
|
||||
@@ -230,9 +232,14 @@ public class Meteor {
|
||||
|
||||
@Optional.Method(modid = "gregtech")
|
||||
private static void setGTOresNaturalIfNeeded(World world, int x, int y, int z) {
|
||||
final TileEntity tileEntity = world.getTileEntity(x, y, z);
|
||||
if (tileEntity instanceof TileEntityOres) {
|
||||
((TileEntityOres) tileEntity).mNatural = true;
|
||||
try (OreInfo<?> info = OreManager.getOreInfo(world, x, y, z)) {
|
||||
if (info == null) return;
|
||||
|
||||
info.isNatural = true;
|
||||
|
||||
ImmutableBlockMeta bm = OreManager.getAdapter(info).getBlock(info);
|
||||
|
||||
world.setBlock(x, y, z, bm.getBlock(), bm.getBlockMeta(), 2);
|
||||
}
|
||||
}
|
||||
}
|
||||
+3
-1
@@ -318,7 +318,9 @@ public class TEAlchemicCalcinator extends TEReagentConduit implements IInventory
|
||||
|
||||
@Override
|
||||
public boolean isItemValidForSlot(int slot, ItemStack itemStack) {
|
||||
return true;
|
||||
if (itemStack == null) return false;
|
||||
return (slot == 0 && itemStack.getItem() instanceof IBloodOrb)
|
||||
|| (slot == 1 && ReagentRegistry.getReagentStackForItem(itemStack) != null);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -1,18 +1,17 @@
|
||||
package WayofTime.alchemicalWizardry.common.tileEntity;
|
||||
|
||||
import java.util.Iterator;
|
||||
import java.util.List;
|
||||
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
import net.minecraft.entity.player.EntityPlayerMP;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.network.Packet;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.AxisAlignedBB;
|
||||
import net.minecraft.util.StatCollector;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
import WayofTime.alchemicalWizardry.api.items.interfaces.IBindable;
|
||||
import WayofTime.alchemicalWizardry.api.soulNetwork.SoulNetworkHandler;
|
||||
import WayofTime.alchemicalWizardry.common.NewPacketHandler;
|
||||
import WayofTime.alchemicalWizardry.common.block.BlockTeleposer;
|
||||
@@ -30,16 +29,14 @@ public class TETeleposer extends TEInventory implements IBloodMagicWailaProvider
|
||||
|
||||
private int resultID;
|
||||
private int resultDamage;
|
||||
private int previousInput;
|
||||
|
||||
private boolean isActive;
|
||||
public boolean hasRedstone;
|
||||
|
||||
public TETeleposer() {
|
||||
super(sizeInv);
|
||||
resultID = 0;
|
||||
resultDamage = 0;
|
||||
isActive = false;
|
||||
previousInput = 0;
|
||||
hasRedstone = false;
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -48,8 +45,7 @@ public class TETeleposer extends TEInventory implements IBloodMagicWailaProvider
|
||||
|
||||
resultID = par1NBTTagCompound.getInteger("resultID");
|
||||
resultDamage = par1NBTTagCompound.getInteger("resultDamage");
|
||||
isActive = par1NBTTagCompound.getBoolean("isActive");
|
||||
previousInput = par1NBTTagCompound.getInteger("previousInput");
|
||||
hasRedstone = par1NBTTagCompound.getBoolean("hasRedstone");
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -58,8 +54,7 @@ public class TETeleposer extends TEInventory implements IBloodMagicWailaProvider
|
||||
|
||||
par1NBTTagCompound.setInteger("resultID", resultID);
|
||||
par1NBTTagCompound.setInteger("resultDamage", resultDamage);
|
||||
par1NBTTagCompound.setBoolean("isActive", isActive);
|
||||
par1NBTTagCompound.setInteger("previousInput", previousInput);
|
||||
par1NBTTagCompound.setBoolean("hasRedstone", hasRedstone);
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -72,167 +67,131 @@ public class TETeleposer extends TEInventory implements IBloodMagicWailaProvider
|
||||
return 1;
|
||||
}
|
||||
|
||||
// Logic for the actual block is under here
|
||||
@Override
|
||||
public void updateEntity() {
|
||||
super.updateEntity();
|
||||
public void activate() {
|
||||
if (worldObj.isRemote) return;
|
||||
|
||||
if (worldObj.isRemote) {
|
||||
ItemStack focus = this.getStackInSlot(0);
|
||||
|
||||
if (focus == null || !(focus.getItem() instanceof TelepositionFocus focusItem)) {
|
||||
return;
|
||||
}
|
||||
|
||||
int currentInput = worldObj.getBlockPowerInput(xCoord, yCoord, zCoord);
|
||||
World targetWorld = focusItem.getWorld(focus);
|
||||
if (targetWorld == null) return;
|
||||
|
||||
if (previousInput == 0 && currentInput != 0) {
|
||||
ItemStack focus = this.getStackInSlot(0);
|
||||
int x = focusItem.xCoord(focus);
|
||||
int y = focusItem.yCoord(focus);
|
||||
int z = focusItem.zCoord(focus);
|
||||
|
||||
if (focus != null && focus.getItem() instanceof TelepositionFocus) {
|
||||
TelepositionFocus focusItem = (TelepositionFocus) (focus.getItem());
|
||||
int xf = focusItem.xCoord(focus);
|
||||
int yf = focusItem.yCoord(focus);
|
||||
int zf = focusItem.zCoord(focus);
|
||||
World worldF = focusItem.getWorld(focus);
|
||||
int damage = (int) (0.5f * Math.sqrt(
|
||||
(xCoord - xf) * (xCoord - xf) + (yCoord - yf + 1) * (yCoord - yf + 1)
|
||||
+ (zCoord - zf) * (zCoord - zf)));
|
||||
int focusLevel = focusItem.getFocusLevel();
|
||||
int transportCount = 0;
|
||||
int entityCount = 0;
|
||||
if (!(targetWorld.getTileEntity(x, y, z) instanceof TETeleposer target) || target == this) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (worldF != null && worldF.getTileEntity(xf, yf, zf) instanceof TETeleposer
|
||||
&& !worldF.getTileEntity(xf, yf, zf).equals(this)) {
|
||||
// Prime the teleportation
|
||||
int d0 = focusLevel - 1;
|
||||
AxisAlignedBB axisalignedbb1 = AxisAlignedBB.getBoundingBox(
|
||||
(double) this.xCoord - 0.5,
|
||||
(double) this.yCoord + d0 + 0.5,
|
||||
(double) this.zCoord - 0.5,
|
||||
(double) (this.xCoord + 0.5),
|
||||
(double) (this.yCoord + 1.5 + d0),
|
||||
(double) (this.zCoord + 0.5)).expand(d0, d0, d0);
|
||||
axisalignedbb1.maxY = Math.min((double) this.worldObj.getHeight(), this.yCoord + 2 + d0 + d0);
|
||||
List list1 = this.worldObj.getEntitiesWithinAABB(EntityLivingBase.class, axisalignedbb1);
|
||||
Iterator iterator1 = list1.iterator();
|
||||
EntityLivingBase entityplayer1;
|
||||
int damage = (int) (0.5f
|
||||
* Math.sqrt(Math.pow(xCoord - x, 2) + Math.pow(yCoord - y + 1, 2) + Math.pow(zCoord - z, 2)));
|
||||
|
||||
while (iterator1.hasNext()) {
|
||||
entityplayer1 = (EntityLivingBase) iterator1.next();
|
||||
entityCount++;
|
||||
}
|
||||
int size = focusItem.getFocusLevel();
|
||||
|
||||
AxisAlignedBB axisalignedbb2 = AxisAlignedBB
|
||||
.getBoundingBox(xf - 0.5, yf + d0 + 0.5, zf - 0.5, xf + 0.5, yf + 1.5 + d0, zf + 0.5)
|
||||
.expand(d0, d0, d0);
|
||||
List list2 = worldF.getEntitiesWithinAABB(EntityLivingBase.class, axisalignedbb2);
|
||||
Iterator iterator2 = list2.iterator();
|
||||
EntityLivingBase entityplayer2;
|
||||
List<EntityLivingBase> localEntities = getEntitiesInArea(worldObj, xCoord, yCoord, zCoord, size);
|
||||
List<EntityLivingBase> targetEntities = getEntitiesInArea(targetWorld, x, y, z, size);
|
||||
|
||||
while (iterator2.hasNext()) {
|
||||
entityplayer2 = (EntityLivingBase) iterator2.next();
|
||||
entityCount++;
|
||||
}
|
||||
int entityCount = localEntities.size() + targetEntities.size();
|
||||
|
||||
if (EnergyItems.canSyphonInContainer(
|
||||
focus,
|
||||
damage * (focusLevel * 2 - 1) * (focusLevel * 2 - 1) * (focusLevel * 2 - 1)
|
||||
+ damage * entityCount)) {
|
||||
for (int k = 0; k <= (focusLevel * 2 - 2); k++)
|
||||
for (int i = -(focusLevel - 1); i <= (focusLevel - 1); i++) {
|
||||
for (int j = -(focusLevel - 1); j <= (focusLevel - 1); j++) {
|
||||
{
|
||||
if (BlockTeleposer.swapBlocks(
|
||||
this,
|
||||
worldObj,
|
||||
worldF,
|
||||
xCoord + i,
|
||||
yCoord + 1 + k,
|
||||
zCoord + j,
|
||||
xf + i,
|
||||
yf + 1 + k,
|
||||
zf + j)) {
|
||||
transportCount++;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
if (!EnergyItems.canSyphonInContainer(focus, damage * entityCount)) return;
|
||||
|
||||
if (!worldF.equals(worldObj)) {
|
||||
entityCount = 0;
|
||||
}
|
||||
int movedBlocks = moveBlocks(size, targetWorld, x, y, z);
|
||||
|
||||
// Teleport with minimum cost of 2000 LP.
|
||||
int cost = Math.max(damage * transportCount + damage * entityCount, 2000);
|
||||
SoulNetworkHandler.syphonFromNetwork(focus, cost);
|
||||
int cost = Math.max(damage * movedBlocks + damage * entityCount, 2000);
|
||||
|
||||
if (worldF.equals(worldObj)) {
|
||||
iterator1 = list1.iterator();
|
||||
iterator2 = list2.iterator();
|
||||
SoulNetworkHandler.syphonFromNetwork(focus, cost);
|
||||
|
||||
while (iterator1.hasNext()) {
|
||||
entityplayer1 = (EntityLivingBase) iterator1.next();
|
||||
entityplayer1.worldObj = worldF;
|
||||
entityplayer1.setPositionAndUpdate(
|
||||
entityplayer1.posX - this.xCoord + xf,
|
||||
entityplayer1.posY - this.yCoord + yf,
|
||||
entityplayer1.posZ - this.zCoord + zf);
|
||||
}
|
||||
if (targetWorld.equals(worldObj)) {
|
||||
teleportEntitiesSameWorld(localEntities, this.xCoord, this.yCoord, this.zCoord, x, y, z);
|
||||
teleportEntitiesSameWorld(targetEntities, x, y, z, this.xCoord, this.yCoord, this.zCoord);
|
||||
} else {
|
||||
teleportEntitiesToOtherWorld(
|
||||
localEntities,
|
||||
worldObj,
|
||||
this.xCoord,
|
||||
this.yCoord,
|
||||
this.zCoord,
|
||||
targetWorld,
|
||||
x,
|
||||
y,
|
||||
z);
|
||||
teleportEntitiesToOtherWorld(
|
||||
targetEntities,
|
||||
targetWorld,
|
||||
x,
|
||||
y,
|
||||
z,
|
||||
worldObj,
|
||||
this.xCoord,
|
||||
this.yCoord,
|
||||
this.zCoord);
|
||||
|
||||
while (iterator2.hasNext()) {
|
||||
entityplayer2 = (EntityLivingBase) iterator2.next();
|
||||
entityplayer2.worldObj = worldF;
|
||||
entityplayer2.setPositionAndUpdate(
|
||||
entityplayer2.posX + this.xCoord - xf,
|
||||
entityplayer2.posY + this.yCoord - yf,
|
||||
entityplayer2.posZ + this.zCoord - zf);
|
||||
}
|
||||
} else {
|
||||
iterator1 = list1.iterator();
|
||||
iterator2 = list2.iterator();
|
||||
}
|
||||
}
|
||||
|
||||
while (iterator1.hasNext()) {
|
||||
entityplayer1 = (EntityLivingBase) iterator1.next();
|
||||
SpellHelper.teleportEntityToDim(
|
||||
worldObj,
|
||||
worldF.provider.dimensionId,
|
||||
entityplayer1.posX - this.xCoord + xf,
|
||||
entityplayer1.posY - this.yCoord + yf,
|
||||
entityplayer1.posZ - this.zCoord + zf,
|
||||
entityplayer1);
|
||||
// entityplayer1.worldObj = worldF;
|
||||
// entityplayer1.setPositionAndUpdate(entityplayer1.posX
|
||||
// - this.xCoord + xf, entityplayer1.posY - this.yCoord + yf, entityplayer1.posZ -
|
||||
// this.zCoord + zf);
|
||||
}
|
||||
private List<EntityLivingBase> getEntitiesInArea(World world, int x, int y, int z, int size) {
|
||||
double half = (size * 2 - 1) / 2.0;
|
||||
|
||||
while (iterator2.hasNext()) {
|
||||
entityplayer2 = (EntityLivingBase) iterator2.next();
|
||||
SpellHelper.teleportEntityToDim(
|
||||
worldF,
|
||||
worldObj.provider.dimensionId,
|
||||
entityplayer2.posX + this.xCoord - xf,
|
||||
entityplayer2.posY + this.yCoord - yf,
|
||||
entityplayer2.posZ + this.zCoord - zf,
|
||||
entityplayer2);
|
||||
// entityplayer2.worldObj = worldF;
|
||||
// entityplayer2.setPositionAndUpdate(entityplayer2.posX
|
||||
// + this.xCoord - xf, entityplayer2.posY + this.yCoord - yf, entityplayer2.posZ +
|
||||
// this.zCoord - zf);
|
||||
}
|
||||
}
|
||||
AxisAlignedBB box = AxisAlignedBB.getBoundingBox(
|
||||
x + 0.5 - half,
|
||||
y + 1,
|
||||
z + 0.5 - half,
|
||||
x + 0.5 + half,
|
||||
y + 1 + (size * 2 - 1),
|
||||
z + 0.5 + half);
|
||||
|
||||
return world.getEntitiesWithinAABB(EntityLivingBase.class, box);
|
||||
}
|
||||
|
||||
private int moveBlocks(int focusLevel, World targetWorld, int x, int y, int z) {
|
||||
int transportCount = 0;
|
||||
int range = focusLevel - 1;
|
||||
|
||||
for (int k = 0; k <= (focusLevel * 2 - 2); k++) {
|
||||
for (int i = -range; i <= range; i++) {
|
||||
for (int j = -range; j <= range; j++) {
|
||||
if (BlockTeleposer.swapBlocks(
|
||||
this,
|
||||
worldObj,
|
||||
targetWorld,
|
||||
xCoord + i,
|
||||
yCoord + 1 + k,
|
||||
zCoord + j,
|
||||
x + i,
|
||||
y + 1 + k,
|
||||
z + j)) {
|
||||
transportCount++;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
previousInput = currentInput;
|
||||
return transportCount;
|
||||
}
|
||||
|
||||
public void setActive() {
|
||||
isActive = false;
|
||||
private void teleportEntitiesSameWorld(List<EntityLivingBase> list, int sourceX, int sourceY, int sourceZ,
|
||||
int destX, int destY, int destZ) {
|
||||
String sound = "mob.endermen.portal";
|
||||
for (EntityLivingBase e : list) {
|
||||
e.setPositionAndUpdate(e.posX - sourceX + destX, e.posY - sourceY + destY, e.posZ - sourceZ + destZ);
|
||||
e.worldObj.playSoundEffect(e.posX, e.posY, e.posZ, sound, 1.0F, 1.0F);
|
||||
}
|
||||
}
|
||||
|
||||
public boolean isActive() {
|
||||
return isActive;
|
||||
private void teleportEntitiesToOtherWorld(List<EntityLivingBase> list, World sourceWorld, int sourceX, int sourceY,
|
||||
int sourceZ, World destWorld, int destX, int destY, int destZ) {
|
||||
for (EntityLivingBase e : list) {
|
||||
SpellHelper.teleportEntityToDim(
|
||||
sourceWorld,
|
||||
destWorld.provider.dimensionId,
|
||||
e.posX - sourceX + destX,
|
||||
e.posY - sourceY + destY,
|
||||
e.posZ - sourceZ + destZ,
|
||||
e);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -247,11 +206,8 @@ public class TETeleposer extends TEInventory implements IBloodMagicWailaProvider
|
||||
|
||||
if (intData.length == 3) {
|
||||
for (int i = 0; i < 1; i++) {
|
||||
if (intData[i * 3 + 2] != 0) {
|
||||
ItemStack is = new ItemStack(
|
||||
Item.getItemById(intData[i * 3]),
|
||||
intData[i * 3 + 2],
|
||||
intData[i * 3 + 1]);
|
||||
if (intData[2] != 0) {
|
||||
ItemStack is = new ItemStack(Item.getItemById(intData[i * 3]), intData[2], intData[1]);
|
||||
inv[i] = is;
|
||||
} else {
|
||||
inv[i] = null;
|
||||
@@ -261,18 +217,17 @@ public class TETeleposer extends TEInventory implements IBloodMagicWailaProvider
|
||||
}
|
||||
|
||||
public int[] buildIntDataList() {
|
||||
int[] sortList = new int[3]; // 1 * 3
|
||||
int pos = 0;
|
||||
int[] sortList = new int[3];
|
||||
|
||||
for (ItemStack is : inv) {
|
||||
if (is != null) {
|
||||
sortList[pos++] = Item.getIdFromItem(is.getItem());
|
||||
sortList[pos++] = is.getItemDamage();
|
||||
sortList[pos++] = is.stackSize;
|
||||
sortList[0] = Item.getIdFromItem(is.getItem());
|
||||
sortList[1] = is.getItemDamage();
|
||||
sortList[2] = is.stackSize;
|
||||
} else {
|
||||
sortList[pos++] = 0;
|
||||
sortList[pos++] = 0;
|
||||
sortList[pos++] = 0;
|
||||
for (int i = 0; i < 3; i++) {
|
||||
sortList[i] = 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -289,12 +244,20 @@ public class TETeleposer extends TEInventory implements IBloodMagicWailaProvider
|
||||
IWailaConfigHandler config) {
|
||||
if (!config.getConfig(BloodMagicWailaPlugin.WAILA_CONFIG_TELEPOSER)) return;
|
||||
final ItemStack contained = getStackInSlot(0);
|
||||
if (contained != null) {
|
||||
if (contained.getItem() instanceof TelepositionFocus focus) {
|
||||
currenttip.add(contained.getDisplayName());
|
||||
|
||||
NBTTagCompound itemTag = IBindable.getTag(contained);
|
||||
currenttip.add(
|
||||
StatCollector.translateToLocal("tooltip.alchemy.coords") + " "
|
||||
+ itemTag.getInteger("xCoord")
|
||||
+ ", "
|
||||
+ itemTag.getInteger("yCoord")
|
||||
+ ", "
|
||||
+ itemTag.getInteger("zCoord"));
|
||||
currenttip.add(
|
||||
StatCollector.translateToLocal("tooltip.alchemy.dimension") + " "
|
||||
+ focus.getDimensionID(contained));
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void getWailaNBTData(final EntityPlayerMP player, final TileEntity tile, final NBTTagCompound tag,
|
||||
final World world, int x, int y, int z) {}
|
||||
}
|
||||
+40
-19
@@ -12,15 +12,18 @@ import static com.gtnewhorizon.structurelib.structure.StructureUtility.ofChain;
|
||||
import static com.gtnewhorizon.structurelib.structure.StructureUtility.transpose;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import net.minecraft.init.Blocks;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.StatCollector;
|
||||
import net.minecraftforge.oredict.OreDictionary;
|
||||
|
||||
import com.github.bsideup.jabel.Desugar;
|
||||
import com.google.common.base.Joiner;
|
||||
import com.gtnewhorizon.structurelib.alignment.constructable.IMultiblockInfoContainer;
|
||||
import com.gtnewhorizon.structurelib.alignment.enumerable.ExtendedFacing;
|
||||
import com.gtnewhorizon.structurelib.structure.IStructureDefinition;
|
||||
import com.gtnewhorizon.structurelib.structure.IStructureElement;
|
||||
import com.gtnewhorizon.structurelib.structure.ISurvivalBuildEnvironment;
|
||||
import com.gtnewhorizon.structurelib.structure.StructureDefinition;
|
||||
|
||||
@@ -82,27 +85,42 @@ public class AltarStructure {
|
||||
.addElement('r',ofChain(ofBlockAnyMeta(ModBlocks.bloodRune),ofBlockAnyMeta(ModBlocks.speedRune),ofBlockAnyMeta(ModBlocks.runeOfSelfSacrifice),ofBlockAnyMeta(ModBlocks.runeOfSacrifice),ofBlockAnyMeta(ModBlocks.efficiencyRune)));
|
||||
|
||||
char[] keys = {'t', 'g', 'v', 'b', 'e', 'i', 'c'};
|
||||
List<BlockStack>[] values = new List[] {
|
||||
AlchemicalWizardry.thirdTierPillars,
|
||||
AlchemicalWizardry.thirdTierCaps,
|
||||
AlchemicalWizardry.fourthTierPillars,
|
||||
AlchemicalWizardry.fourthTierCaps,
|
||||
AlchemicalWizardry.fifthTierBeacons,
|
||||
AlchemicalWizardry.sixthTierPillars,
|
||||
AlchemicalWizardry.sixthTierCaps
|
||||
};
|
||||
|
||||
for (int i = 0; i < keys.length; i++) {
|
||||
BlockStack stack = AlchemicalWizardry.specialAltarBlock[i];
|
||||
if (stack != null && stack.getBlock() != Blocks.air) {
|
||||
altarBuilder.addElement(keys[i], ofBlock(stack.getBlock(), stack.getMeta()));
|
||||
} else {
|
||||
if (values[i].isEmpty()) {
|
||||
altarBuilder.addElement(keys[i], ANY_BLOCK);
|
||||
continue;
|
||||
}
|
||||
|
||||
altarBuilder.addElement(keys[i],
|
||||
ofChain(
|
||||
values[i].stream()
|
||||
.map(s -> s.getMeta() == OreDictionary.WILDCARD_VALUE
|
||||
? ofBlockAnyMeta(s.getBlock())
|
||||
: ofBlock(s.getBlock(), s.getMeta()))
|
||||
.toArray(IStructureElement[]::new)
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
IMultiblockInfoContainer.registerTileClass(TEAltar.class,
|
||||
new AltarStructure.AltarMultiblockInfoContainer(altarBuilder.build()));
|
||||
// spotless:on
|
||||
}
|
||||
|
||||
private static class AltarMultiblockInfoContainer implements IMultiblockInfoContainer<TEAltar> {
|
||||
|
||||
private final IStructureDefinition<TEAltar> structureAltar;
|
||||
|
||||
public AltarMultiblockInfoContainer(IStructureDefinition<TEAltar> structureAltar) {
|
||||
this.structureAltar = structureAltar;
|
||||
}
|
||||
@Desugar
|
||||
private record AltarMultiblockInfoContainer(IStructureDefinition<TEAltar> structureAltar)
|
||||
implements IMultiblockInfoContainer<TEAltar> {
|
||||
|
||||
@Override
|
||||
public void construct(ItemStack triggerStack, boolean hintsOnly, TEAltar ctx, ExtendedFacing aSide) {
|
||||
@@ -157,18 +175,20 @@ public class AltarStructure {
|
||||
return built;
|
||||
}
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
@Override
|
||||
public String[] getDescription(ItemStack stackSize) {
|
||||
ArrayList<String> out = new ArrayList<>();
|
||||
out.add(StatCollector.translateToLocal("structurelib.bloodmagic.altar.1"));
|
||||
out.add(StatCollector.translateToLocal("structurelib.bloodmagic.altar.2"));
|
||||
|
||||
int[] pillarIndices = { 0, 2, 5 };
|
||||
int[] pillarTiers = { 3, 4, 6 };
|
||||
List<BlockStack>[] pillarLists = new List[] { AlchemicalWizardry.thirdTierPillars,
|
||||
AlchemicalWizardry.fourthTierPillars, AlchemicalWizardry.sixthTierPillars };
|
||||
ArrayList<Integer> pillars = new ArrayList<>();
|
||||
|
||||
for (int i = 0; i < pillarIndices.length; i++) {
|
||||
if (AlchemicalWizardry.specialAltarBlock[pillarIndices[i]].getBlock() == Blocks.air) {
|
||||
for (int i = 0; i < pillarTiers.length; i++) {
|
||||
if (pillarLists[i].isEmpty()) {
|
||||
pillars.add(pillarTiers[i]);
|
||||
}
|
||||
}
|
||||
@@ -180,12 +200,13 @@ public class AltarStructure {
|
||||
Joiner.on(", ").join(pillars)));
|
||||
}
|
||||
|
||||
int[] capIndices = { 1, 3, 6 };
|
||||
int[] capTiers = { 3, 4, 6 };
|
||||
List<BlockStack>[] capLists = new List[] { AlchemicalWizardry.thirdTierCaps,
|
||||
AlchemicalWizardry.fourthTierCaps, AlchemicalWizardry.sixthTierCaps };
|
||||
ArrayList<Integer> caps = new ArrayList<>();
|
||||
|
||||
for (int i = 0; i < capIndices.length; i++) {
|
||||
if (AlchemicalWizardry.specialAltarBlock[capIndices[i]].getBlock() == Blocks.air) {
|
||||
for (int i = 0; i < capTiers.length; i++) {
|
||||
if (capLists[i].isEmpty()) {
|
||||
caps.add(capTiers[i]);
|
||||
}
|
||||
}
|
||||
@@ -197,7 +218,7 @@ public class AltarStructure {
|
||||
Joiner.on(", ").join(caps)));
|
||||
}
|
||||
|
||||
if (AlchemicalWizardry.specialAltarBlock[4].getBlock() == Blocks.air) { // T5 Beacon
|
||||
if (AlchemicalWizardry.fifthTierBeacons.isEmpty()) { // T5 Beacon
|
||||
out.add(StatCollector.translateToLocal("structurelib.bloodmagic.altar.5"));
|
||||
}
|
||||
|
||||
|
||||
@@ -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
|
||||
@@ -423,11 +423,7 @@ tooltip.alchemy.coords=Coords:
|
||||
tooltip.alchemy.damage=Damage:
|
||||
tooltip.alchemy.dimension=Bound Dimension:
|
||||
tooltip.alchemy.direction=Direction:
|
||||
tooltip.alchemy.forrecipe=for Recipe
|
||||
tooltip.alchemy.press=Press
|
||||
tooltip.alchemy.recipe=Recipe:
|
||||
tooltip.alchemy.ritualid=RitualID:
|
||||
tooltip.alchemy.shift=shift
|
||||
tooltip.alchemy.usedinalchemy=Used in Alchemy
|
||||
tooltip.alchemyflask.caution=CAUTION: Contents are throwable
|
||||
tooltip.alchemyflask.swigsleft=Swigs Left:
|
||||
@@ -461,6 +457,7 @@ tooltip.divinationsigil.desc1=Peer into the soul to
|
||||
tooltip.divinationsigil.desc2=get the current essence
|
||||
tooltip.energybazooka.desc=Boom.
|
||||
tooltip.energybattery.desc=Stores raw Life Essence
|
||||
tooltip.energybattery.capacity=Capacity: %,d LP
|
||||
tooltip.energyblast.desc1=Used to fire devastating
|
||||
tooltip.energyblast.desc2=projectiles.
|
||||
tooltip.enhancedtelepfocus.desc=A focus further enhanced in an altar
|
||||
@@ -508,7 +505,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
|
||||
@@ -578,6 +575,7 @@ message.tanksegmenter.nowhas=Tank now has
|
||||
message.tanksegmenter.setto=Tank Segmenter now set to:
|
||||
message.tanksegmenter.tankssetto=tank(s) set to:
|
||||
message.routerfocus.limit=Focus' Item Limit set to:
|
||||
message.warn.spiritWorld=Teleporting to Witchery's Spirit World causes problems and is temporarily disabled.
|
||||
|
||||
#Achievements
|
||||
achievement.alchemicalwizardry:firstPrick=Your First Prick!
|
||||
@@ -629,6 +627,25 @@ achievement.alchemicalwizardry:demons.desc=Kill a demon summoned by the Convocat
|
||||
achievement.alchemicalwizardry:trancsendentOrb=OVERPOWERED
|
||||
achievement.alchemicalwizardry:trancsendentOrb.desc=Pick up a Transcendent Blood Orb
|
||||
|
||||
#Buff
|
||||
bm.buff.drowning=Drowning
|
||||
bm.buff.boost=Boost
|
||||
bm.buff.whirlwind=Whirlwind
|
||||
bm.buff.inhibit=Inhibit
|
||||
bm.buff.flight=Flight
|
||||
bm.buff.reciprocation=Reciprocation
|
||||
bm.buff.flame_cloak=Flame Cloak
|
||||
bm.buff.ice_cloak=Ice Cloak
|
||||
bm.buff.heavy_heart=Heavy Heart
|
||||
bm.buff.fire_fuse=Fire Fuse
|
||||
bm.buff.planar_binding=Planar Binding
|
||||
bm.buff.soul_fray=Soul Fray
|
||||
bm.buff.soul_harden=Soul Harden
|
||||
bm.buff.deafness=Deafness
|
||||
bm.buff.feather_fall=Feather Fall
|
||||
bm.buff.demon_cloak=Demon Cloaking
|
||||
bm.buff.amphibian=Amphibian
|
||||
|
||||
#G-API Downloading
|
||||
bm.versioning.getGAPI=["[BM] You don't have Guide-API installed! Install it to get it to unlock the book! [",{"text":"Download","color":"red","hoverEvent":{"action":"show_text","value":{"text":"Click this to auto-magically download the latest version","color":"red"}},"clickEvent":{"action":"run_command","value":"/bloodmagic-download-g-api"}},"]"]
|
||||
bm.versioning.startingDownload=[{"text":"Starting download of %s Please do not remove your hard disk.", "color":"orange"}]
|
||||
@@ -661,4 +678,60 @@ 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
|
||||
|
||||
# GTNH NEI Information Pages
|
||||
# Blood Altar Progression
|
||||
nei.infopage.bloodAltar.1.a=The Blood Altar is the bleeding heart of Blood Magic: Alchemical Wizardry.\n\nTo begin your journey to immense power, place it in the world and use a Sacrificial Knife while standing close to the altar to turn 1 heart into raw Life Essence.
|
||||
nei.infopage.bloodAltar.1.b=The Blood Altar is the bleeding heart of Blood Magic: Alchemical Wizardry.\n\nTo begin your journey to immense power, place it in the world and use a Sacrificial Orb while standing close to the altar to turn 1 heart into raw Life Essence.
|
||||
nei.infopage.bloodAltar.2=Once the Blood Altar holds enough Life Essence, you may place an item inside with right-click. Compatible offerings will absorb Life Essence from the altar and be transmuted. Items can be removed with an empty hand. They may also be inserted and extracted with hoppers and pipes.
|
||||
nei.infopage.bloodAltar.3=Alongside its main crafting pool, the Blood Altar has two internal fluid buffers: one for input, one for output. Life Essence will slowly seep between the altar's main storage and buffers, which handle all interactions with any manner of fluid pipe or pump. Both buffers have a capacity of 1/10th of the altar's main pool.
|
||||
nei.infopage.bloodAltar.4=Your first offering should be used to create a Weak Blood Orb. Once created, right-click with it in hand to bind it to your soul. Once bound, it can be placed in the Blood Altar to add life essence to your Soul Network in the form of LP.
|
||||
nei.infopage.bloodAltar.5=The Blood Altar may be strengthened with Blood Runes. Construct a 3×3 ring beneath its base to reach Tier 2. Each new tier awakens greater transmutations.
|
||||
nei.infopage.bloodAltar.6=Upgrading the Blood Altar to Tier 3 requires 20 additional Runes in a 7×7 ring (centered on the altar, place 5 on each side) placed one block below the previous ring. Place two-block tall pillars in the corners made from any material and cap them with blocks of Glowstone. The gaps between rings of Runes may be filled by any cosmetic block, or nothing at all.
|
||||
nei.infopage.bloodAltar.7=Upgrading the Blood Altar to Tier 4 requires 28 additional Runes in an 11×11 ring (centered on the altar, place 7 on each side) placed one block below the previous ring. Place four-block tall pillars in the corners made from any material and cap them with Large Bloodstone Bricks. The Bloodstone should stand one block above the Glowstone.
|
||||
nei.infopage.bloodAltar.8=Upgrading the Blood Altar to Tier 5 requires 52 additional Runes in a 17×17 ring (centered on the altar, place 13 on each side) placed one block below the previous ring. Place one Beacon in each corner, one block above the Runes. The altar's structure can accommodate the maximum size beacon base for all four beacons.
|
||||
nei.infopage.bloodAltar.9=Upgrading the Blood Altar to Tier 6 requires 76 additional Runes in a 23×23 ring (centered on the altar, place 19 on each side) placed one block below the previous ring. Place seven-block tall pillars in the corners made from any material and cap them with Crystal Cluster blocks. These caps should stand one block above the Bloodstone used for Tier 4.
|
||||
# Incense
|
||||
nei.infopage.incense.1=The Incense Crucible empowers self-sacrifice. Place one near your Blood Altar for each type of incense you will use, and add them with right-click. The flames and colored smoke will fade once the incense is ready. Multiple crucibles with the same incense will burn faster, charging more quickly.
|
||||
nei.infopage.incense.2.a=Burning incense lasts for about 10 sacrifices. Your Sacrificial Knife will start to glow as the incense burns. While active, using your knife drains all but the last 10% of your health at once, greatly increasing the LP gained. This leaves you with the Soul Fray effect for a short time, preventing further sacrifices.
|
||||
nei.infopage.incense.2.b=Burning incense lasts for about 10 sacrifices. Your Sacrificial Orb will start to glow as the incense burns. While active, using your orb drains all but the last 10% of your health at once, greatly increasing the LP gained. This leaves you with the Soul Fray effect for a short time, preventing further sacrifices.
|
||||
nei.infopage.incense.3=Incense increases the LP gained compared to normal sacrifices. Each tier requires the previous, and grants the following bonus when fully charged:\n\nWood Ash: 40%\nByrrus: 80%\nLivens: 150%\nViridis: 240%\nPurpura: 350%
|
||||
# Sacrifices
|
||||
nei.infopage.sacrifice.1=The Dagger of Sacrifice channels the life of others into the Blood Altar. Strike a creature with the dagger while it is near the altar, and it will be slain instantly, pouring its essence into the altar's pool.
|
||||
nei.infopage.sacrifice.2=Creatures yield Life Essence according to their vitality: animals give the least, monsters give more, and villagers offer the greatest. Bosses, babies, and other players resist this magic and cannot be sacrificed.
|
||||
nei.infopage.sacrifice.3=Mechanical hands are unable to wield the Dagger of Sacrifice with the finesse it requires. For automatic sacrifices, seek the Well of Suffering ritual.
|
||||
# Altar Runes
|
||||
nei.infopage.rune.augmentedCapacity=The Rune of Augmented Capacity increases the altar's maximum storage by 3500 LP per rune. This bonus applies after Superior Capacity's.\n\nIncreasing the altar's capacity also increases the size of its input and output buffers by a proportional amount.
|
||||
nei.infopage.rune.dislocation=The Rune of Dislocation accelerates the flow of essence between the altar and its buffers, increasing transfer by 50% per rune, stacking multiplicatively. The altar's veins strain, pushing blood faster through every channel.
|
||||
nei.infopage.rune.orb=The Rune of the Orb strengthens the link between altar and Soul Network. Each rune temporarily increases the inserted Blood Orb's maximum LP capacity by 4% per rune, stacking additively. Pushing the limits is required to achieve ultimate power.
|
||||
nei.infopage.rune.superiorCapacity=The Rune of Superior Capacity increases the altar's base storage by 14% per rune, stacking multiplicatively. With enough runes, the altar may hold oceans of Life Essence.
|
||||
nei.infopage.rune.acceleration=The Rune of Acceleration hastens interactions with the altar's fluid buffers. Normally, they cycle fluid once per second; each rune reduces this delay by 1 tick.\n\nThe effect caps after 19 runes, allowing for a ceaseless torrent of Life Essence.
|
||||
nei.infopage.rune.quickness=The Rune of Quickness shortens the five-second pause between transmutations by 20%, stacking multiplicatively.\n\nThe effect caps after 18 runes. Unfortunately, the Blood Altar is unable to break the laws of time...
|
||||
nei.infopage.rune.speed=The Rune of Speed increases the rate at which the altar infuses essence into offerings by 25% per rune, stacking additively. A little haste never hurt anybody.
|
||||
nei.infopage.rune.efficiency=The Rune of Efficiency is shrouded in mystery. It is inert, unobtainable, and its purpose is long forgotten.
|
||||
nei.infopage.rune.sacrifice=The Rune of Sacrifice increases LP gained from sacrifices by 12% per rune, stacking additively. With enough runes, every offering yields rivers of blood.
|
||||
nei.infopage.rune.selfSacrifice=The Rune of Self-Sacrifice empowers offerings of one's own blood, granting 12% more LP per rune, stacking additively. Through pain comes power.
|
||||
nei.infopage.rune.blank=Blood Runes serve as the foundation of every altar. Though plain at first, they may be replaced with specialized runes that amplify the altar's capabilities, such as the Rune of Sacrifice, which grants more essence when blood is spilled with a Dagger of Sacrifice or the Well of Suffering ritual.
|
||||
# Progression Items
|
||||
nei.infopage.bloodShards=Weak Blood Shards, which are required for the Bloodstone Bricks and Master Blood Orb used to progress your altar to Tier 4, are dropped by creatures slain while under the effect of Weakness III or higher. This effect is impossible through traditional means of potion brewing, but a Bound Blade or Potion Flask will be able to apply such an effect.
|
||||
nei.infopage.demonShards.1=Demon Blood Shards are required for the Archmage Blood Orb and Awakened Activation Crystal. To summon the beings that carry them, place a bound Master Blood Orb (or higher) upon an Arcane Plinth, and surround it with six Arcane Pedestals, each holding the same reagent.
|
||||
nei.infopage.demonShards.2=The pedestals must be placed in the outer ring of a 5×5 area, with the Arcane Plinth at the center. This forms a hexagonal pattern. After the ritual has been prepared, lightning will strike each pedestal in turn before the Elemental manifests. The reagent used determines the type of Elemental called forth.
|
||||
nei.infopage.demonShards.3=Elementals are flying, durable creatures with 100 HP that will attack on sight. They can attack from a distance and embody the powers of their element in battle. They need not be slain with a Bound Blade to yield Demon Blood Shards, though drops are not guaranteed. The Looting enchantment increases the chance.
|
||||
nei.infopage.convocationShards=The Soul and Life Shards required for the Crystal Clusters used to upgrade the altar to Tier 6 are dropped by Demon Grunts summoned by the Convocation of the Damned ritual. Only those who command demons may bring an altar to its ultimate perfection.
|
||||
# Blood Orb / Soul Network Explanation
|
||||
nei.infopage.bloodOrbs.1=Blood Orbs are the vessels of your Soul Network. When you create one in the Blood Altar, right-click with it in hand to bind it to yourself.
|
||||
nei.infopage.bloodOrbs.2=Once bound, place your Blood Orb into the altar. Any Life Essence you pour in, whether by self-sacrifice, dagger, or ritual, will be stored in your personal Soul Network as LP, ready for use by mystical items, powerful sigils, alchemic chemistry, and rituals.
|
||||
nei.infopage.bloodOrbs.3=Higher tiers of Blood Orbs unlock new recipes. Each orb also has its own maximum LP that it can insert into your Soul Network, which may temporarily be expanded by placing it in a Blood Altar augmented with Runes of the Orb.
|
||||
nei.infopage.bloodOrbs.4=Your Soul Network is invisible to the eye, but its presence can be felt. Many rituals, sigils, and magical devices will draw directly from your LP. If your network runs dry, the power will be taken from your own life instead. A Divination Sigil may be used to see your current LP.
|
||||
# Rituals
|
||||
nei.infopage.rituals.weak.1=Rituals are the next step on your path to power. Right-clicking the Imperfect Ritual Stone will call down lightning and create the following effects when placed beneath the correct block, at the cost of 5,000 LP.
|
||||
nei.infopage.rituals.weak.2=Water Source: Summon a thunderstorm\nBlock of Coal: Summon an empowered zombie\nLapis Lazuli Block: Shift the time to night\nBedrock: Grant Resistance II for 1 minute
|
||||
nei.infopage.rituals.1=While it has its uses, the Imperfect Ritual Stone is a curiosity of limited power, since it can only draw strength from the block directly above it. The Master Ritual Stone, by contrast, is capable of channeling energy from many surrounding Ritual Stones.
|
||||
nei.infopage.rituals.2=To build a ritual, place a Master Ritual Stone surrounded by Ritual Stones, and inscribe them with Elemental Inscription Tools. A Ritual Diviner may instead be used to automatically place the stones and inscribe them correctly.
|
||||
nei.infopage.rituals.3=Once the ritual is assembled, right-click the Master Ritual Stone with a bound Activation Crystal. If everything is in place and your Soul Network contains sufficient LP, the ritual will commence! Each ritual has a unique effect. Experimentation is encouraged to discover the full potential of the Master Ritual Stone.
|
||||
nei.infopage.reagents.1=Some rituals can be modified by providing reagents to the Master Ritual Stone. However, raw reagents are too impure to be used directly. They must first be refined in an Alchemic Calcinator into AR (Alchemy Reagent), a pure essence usable by the ritual.
|
||||
nei.infopage.reagents.2=To use an Alchemic Calcinator, right-click it with a bound Blood Orb, and then right-click it with the reagent item. Reagents may also be inserted via hoppers or pipes. The reagent will be consumed and converted into AR, which the Calcinator will store internally.
|
||||
nei.infopage.reagents.3=An Alchemic Router is required to transfer AR. Shift-right-click a block containing AR to attune the Router to that reagent. Then right-click the source block, followed by the destination block, to create a link. Shift-right-click in the air to remove the currently saved source.
|
||||
nei.infopage.reagents.4=An Alchemic Cleanser may be used to remove AR links by using it on the source block. An Alchemic Segmenter may be used to limit how many internal AR tanks a single reagent may occupy; it is attuned in the same way as the Router.
|
||||
nei.infopage.reagents.5=The range of AR links is limited to a few blocks. To extend the transfer distance, use Alchemic Relays. Crystal Belljars may be placed to store AR, and they will retain their contents when broken.
|
||||
@@ -1,19 +1,19 @@
|
||||
#Block Localization
|
||||
tile.bloodAltar.name=Altare del Sangue
|
||||
tile.bloodRune.blank.name=Runa del Sangue
|
||||
tile.bloodRune.fill.name=Runa di Capacità Aumentata
|
||||
tile.bloodRune.fill.name=Runa di Capacità Aumentata
|
||||
tile.bloodRune.empty.name=Runa di Dislocazione
|
||||
tile.bloodRune.test.name=Runa del Globo
|
||||
tile.speedRune.name=Runa di Velocità
|
||||
tile.speedRune.name=Runa di Velocità
|
||||
tile.efficiencyRune.name=Runa di Efficienza
|
||||
tile.runeOfSacrifice.name=Runa del Sacrificio
|
||||
tile.runeOfSelfSacrifice.name=Runa di Auto-Sacrificio
|
||||
tile.ritualStone.name=Pietra del Rituale
|
||||
tile.blockMasterStone.name=Pietra Maestra del Rituale
|
||||
tile.bloodSocket.name=Cavità Piena
|
||||
tile.bloodSocket.name=Cavità Piena
|
||||
tile.imperfectRitualStone.name=Pietra del Rituale Imperfetta
|
||||
tile.armourForge.name=Forgia delle Armature dell'Anima
|
||||
tile.emptySocket.name=Cavità Vuota
|
||||
tile.emptySocket.name=Cavità Vuota
|
||||
tile.bloodStoneBrick.name=Mattone di Pietra del Sangue
|
||||
tile.largeBloodStoneBrick.name=Gran Mattone di Pietra del Sangue
|
||||
tile.blockWritingTable.name=Set da Alchimista
|
||||
@@ -67,8 +67,8 @@ item.sacrificialDagger.name=Pugnale Sacrificale
|
||||
item.daggerOfSacrifice.name=Daga Sacrificale
|
||||
item.airSigil.name=Sigillo dell'Aria
|
||||
item.sigilOfTheFastMiner.name=Sigillo del Rapido Minatore
|
||||
item.sigilOfElementalAffinity.name=Sigillo di Affinità Elementale
|
||||
item.sigilOfHaste.name=Sigillo di Rapidità
|
||||
item.sigilOfElementalAffinity.name=Sigillo di Affinità Elementale
|
||||
item.sigilOfHaste.name=Sigillo di Rapidità
|
||||
item.sigilOfHolding.name=Sigillo della Tenacia Egoista
|
||||
item.divinationSigil.name=Sigillo di Divinatione
|
||||
item.waterScribeTool.name=Utensile d'Iscrizione Elementale: Acqua
|
||||
|
||||
@@ -300,11 +300,7 @@ tooltip.alchemy.coords=Координаты:
|
||||
tooltip.alchemy.damage=Урон:
|
||||
tooltip.alchemy.dimension=Связанное измерение:
|
||||
tooltip.alchemy.direction=Направление:
|
||||
tooltip.alchemy.forrecipe=чтобы увидеть рецепт
|
||||
tooltip.alchemy.press=Нажмите
|
||||
tooltip.alchemy.recipe=Рецепт:
|
||||
tooltip.alchemy.ritualid=ID ритуала:
|
||||
tooltip.alchemy.shift=shift,
|
||||
tooltip.alchemy.usedinalchemy=Используется в алхимии
|
||||
tooltip.alchemyflask.caution=ВНИМАНИЕ: Содержимое можно кидать
|
||||
tooltip.alchemyflask.swigsleft=Глотков осталось:
|
||||
@@ -384,7 +380,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,11 +396,7 @@ tooltip.alchemy.coords=坐标:
|
||||
tooltip.alchemy.damage=攻击伤害:
|
||||
tooltip.alchemy.dimension=绑定世界:
|
||||
tooltip.alchemy.direction=方向:
|
||||
tooltip.alchemy.forrecipe=了解配方
|
||||
tooltip.alchemy.press=对着物品按
|
||||
tooltip.alchemy.recipe=材料:
|
||||
tooltip.alchemy.ritualid=仪式ID:
|
||||
tooltip.alchemy.shift=shift
|
||||
tooltip.alchemy.usedinalchemy=用于炼金术
|
||||
tooltip.alchemyflask.caution=警 告: 内部异常
|
||||
tooltip.alchemyflask.swigsleft=药水剩余:
|
||||
@@ -434,6 +430,7 @@ tooltip.divinationsigil.desc1=凝视着灵魂
|
||||
tooltip.divinationsigil.desc2=获取当前生命本质的情况
|
||||
tooltip.energybazooka.desc=Boom.
|
||||
tooltip.energybattery.desc=存储原始的生命本质
|
||||
tooltip.energybattery.capacity=容量: %,d LP
|
||||
tooltip.energyblast.desc1=用于发射
|
||||
tooltip.energyblast.desc2=毁灭性的炮弹.
|
||||
tooltip.enhancedtelepfocus.desc=一个核心在祭坛中进一步加强
|
||||
@@ -481,7 +478,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=在火中呼吸的鱼
|
||||
|
||||
@@ -312,11 +312,7 @@ tooltip.alchemy.coords=Coords:
|
||||
tooltip.alchemy.damage=Damage:
|
||||
tooltip.alchemy.dimension=Bound Dimension:
|
||||
tooltip.alchemy.direction=Direction:
|
||||
tooltip.alchemy.forrecipe=for Recipe
|
||||
tooltip.alchemy.press=Press
|
||||
tooltip.alchemy.recipe=Recipe:
|
||||
tooltip.alchemy.ritualid=RitualID:
|
||||
tooltip.alchemy.shift=shift
|
||||
tooltip.alchemy.usedinalchemy=Used in Alchemy
|
||||
tooltip.alchemyflask.caution=CAUTION: Contents are throwable
|
||||
tooltip.alchemyflask.swigsleft=Swigs Left:
|
||||
@@ -396,7 +392,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
|
||||
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 470 B |
BIN
Binary file not shown.
|
Before Width: | Height: | Size: 394 B After Width: | Height: | Size: 366 B |
File renamed without changes.
File renamed without changes.
File renamed without changes.
Reference in new issue
Block a user