General toying with the enchantments for the Omega armour, tweaked the ritual diviner's functionality, fixed teleposers not teleposing players in certain circumstances.
This commit is contained in:
parent
bab6e576d2
commit
ab0c49f8c7
35 changed files with 360 additions and 69 deletions
|
@ -38,7 +38,7 @@ public class OmegaParadigm
|
|||
this.config = new ReagentRegenConfiguration(20, 10, 1);
|
||||
}
|
||||
|
||||
public boolean convertPlayerArmour(EntityPlayer player, int x, int y, int z, int stability, int affinity)
|
||||
public boolean convertPlayerArmour(EntityPlayer player, int x, int y, int z, int stability, int affinity, int enchantability)
|
||||
{
|
||||
ItemStack[] armours = player.inventory.armorInventory;
|
||||
|
||||
|
@ -50,11 +50,11 @@ public class OmegaParadigm
|
|||
if(helmetStack != null && helmetStack.getItem() == ModItems.boundHelmet && chestStack != null && chestStack.getItem() == ModItems.boundPlate && leggingsStack != null && leggingsStack.getItem() == ModItems.boundLeggings && bootsStack != null && bootsStack.getItem() == ModItems.boundBoots)
|
||||
{
|
||||
long worldSeed = player.worldObj.getSeed();
|
||||
Random rand = new Random(worldSeed + stability * (affinity + 7) * 94 + 84321*x - 17423*y + 76*z);
|
||||
ItemStack omegaHelmetStack = helmet.getSubstituteStack(helmetStack, stability, affinity, rand);
|
||||
ItemStack omegaChestStack = chestPiece.getSubstituteStack(chestStack, stability, affinity, rand);
|
||||
ItemStack omegaLeggingsStack = leggings.getSubstituteStack(leggingsStack, stability, affinity, rand);
|
||||
ItemStack omegaBootsStack = boots.getSubstituteStack(bootsStack, stability, affinity, rand);
|
||||
Random rand = new Random(worldSeed + stability * (affinity + 7) * 94 + 84321*x - 17423*y + 76*z - 1623451*enchantability);
|
||||
ItemStack omegaHelmetStack = helmet.getSubstituteStack(helmetStack, stability, affinity, enchantability, rand);
|
||||
ItemStack omegaChestStack = chestPiece.getSubstituteStack(chestStack, stability, affinity, enchantability, rand);
|
||||
ItemStack omegaLeggingsStack = leggings.getSubstituteStack(leggingsStack, stability, affinity, enchantability, rand);
|
||||
ItemStack omegaBootsStack = boots.getSubstituteStack(bootsStack, stability, affinity, enchantability, rand);
|
||||
|
||||
armours[3] = omegaHelmetStack;
|
||||
armours[2] = omegaChestStack;
|
||||
|
|
|
@ -3,6 +3,7 @@ package WayofTime.alchemicalWizardry.common.omega;
|
|||
import net.minecraft.block.Block;
|
||||
import net.minecraft.world.World;
|
||||
import WayofTime.alchemicalWizardry.ModBlocks;
|
||||
import WayofTime.alchemicalWizardry.api.Int3;
|
||||
|
||||
public class OmegaStructureHandler
|
||||
{
|
||||
|
@ -13,9 +14,9 @@ public class OmegaStructureHandler
|
|||
return true;
|
||||
}
|
||||
|
||||
public static OmegaStructureParameters getStructureStabilityFactor(World world, int x, int y, int z, int expLim)
|
||||
public static OmegaStructureParameters getStructureStabilityFactor(World world, int x, int y, int z, int expLim, Int3 offset)
|
||||
{
|
||||
int range = expLim;
|
||||
int range = expLim;
|
||||
|
||||
int[][][] boolList = new int[range * 2 + 1][range * 2 + 1][range * 2 + 1]; //0 indicates unchecked, 1 indicates checked and is air, -1 indicates checked to be right next to air blocks in question but is NOT air
|
||||
|
||||
|
@ -30,7 +31,7 @@ public class OmegaStructureHandler
|
|||
}
|
||||
}
|
||||
|
||||
boolList[range][range][range] = 1;
|
||||
boolList[range + offset.xCoord][range + offset.yCoord][range + offset.zCoord] = 1;
|
||||
boolean isReady = false;
|
||||
|
||||
while (!isReady)
|
||||
|
@ -208,13 +209,6 @@ public class OmegaStructureHandler
|
|||
{
|
||||
tally += indTally;
|
||||
}
|
||||
|
||||
// Block block = world.getBlock(x + i - range, y + j - range, z + k - range);
|
||||
//
|
||||
// if (block == ModBlocks.blockSpectralContainer)
|
||||
// {
|
||||
// world.setBlockToAir(x + i - range, y + j - range, z + k - range);
|
||||
// }
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -222,4 +216,9 @@ public class OmegaStructureHandler
|
|||
|
||||
return new OmegaStructureParameters(tally, enchantability);
|
||||
}
|
||||
|
||||
public static OmegaStructureParameters getStructureStabilityFactor(World world, int x, int y, int z, int expLim)
|
||||
{
|
||||
return getStructureStabilityFactor(world, x, y, z, expLim, new Int3(0, 0, 0));
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue