Updated the books, worked more on the new self-sacrifice mechanics, allowed the teleposer to telepose entities across dimensions, changed the Focus of the Ellipsoid so that it now places blocks from a chest underneath the MRS.

This commit is contained in:
WayofTime 2015-05-04 14:16:58 -04:00
parent c71edfb937
commit f74e4993cf
15 changed files with 371 additions and 61 deletions

View file

@ -1,13 +1,13 @@
#
#Mon Apr 20 14:42:19 EDT 2015
#Sat May 02 16:08:45 EDT 2015
mod_name=BloodMagic
forge_version=10.13.3.1374-1.7.10
ccc_version=1.0.4.29
nei_version=1.0.3.64
//=Dependency Information
guideapi_version=1.0-14
package_group=com.wayoftime.bloodmagic
mod_version=1.3.2aBeta
minetweaker_version=Dev-1.7.10-3.0.9B
guideapi_version=1.0-13
mc_version=1.7.10
build_number=3
build_number=5

View file

@ -17,4 +17,5 @@ public interface IIncense
public float getRedColour(ItemStack stack);
public float getGreenColour(ItemStack stack);
public float getBlueColour(ItemStack stack);
float getTickRate(ItemStack stack);
}

View file

@ -12,19 +12,19 @@ public class PlayerSacrificeHandler
{
public static float scalingOfSacrifice = 0.0025f;
public static int soulFrayDuration = 400;
public static int getPlayerIncense(EntityPlayer player)
public static float getPlayerIncense(EntityPlayer player)
{
return APISpellHelper.getCurrentIncense(player);
}
public static void setPlayerIncense(EntityPlayer player, int amount)
public static void setPlayerIncense(EntityPlayer player, float amount)
{
APISpellHelper.setCurrentIncense(player, amount);
}
public static boolean incrementIncense(EntityPlayer player, int min, int max)
public static boolean incrementIncense(EntityPlayer player, float min, float max)
{
int amount = getPlayerIncense(player);
float amount = getPlayerIncense(player);
if(amount < min || amount >= max)
{
return false;
@ -43,7 +43,7 @@ public class PlayerSacrificeHandler
return false;
}
int amount = getPlayerIncense(player);
float amount = getPlayerIncense(player);
if(amount >= 0)
{
@ -68,9 +68,9 @@ public class PlayerSacrificeHandler
return false;
}
public static float getModifier(int incense)
public static float getModifier(float amount)
{
return 1 + incense*scalingOfSacrifice;
return 1 + amount*scalingOfSacrifice;
}
public static boolean findAndFillAltar(World world, EntityPlayer player, int amount)

View file

@ -157,7 +157,7 @@ public class SoulNetworkHandler
*
* @param ist Owned itemStack
* @param player Player using the item
* @param damageToBeDone
* @param drain
* @return True if the action should be executed and false if it should not. Always returns false if client-sided.
*/
public static boolean syphonAndDamageFromNetwork(ItemStack ist, EntityPlayer player, int drain)

View file

@ -42,21 +42,21 @@ public class APISpellHelper
return beaconData;
}
public static int getCurrentIncense(EntityPlayer player)
public static float getCurrentIncense(EntityPlayer player)
{
NBTTagCompound data = player.getEntityData();
if(data.hasKey("BM:CurrentIncense"))
{
return data.getInteger("BM:CurrentIncense");
return data.getFloat("BM:CurrentIncense");
}
return 0;
}
public static void setCurrentIncense(EntityPlayer player, int amount)
public static void setCurrentIncense(EntityPlayer player, float amount)
{
NBTTagCompound data = player.getEntityData();
data.setInteger("BM:CurrentIncense", amount);
data.setFloat("BM:CurrentIncense", amount);
}
public static int getPlayerLPTag(EntityPlayer player)

View file

@ -36,7 +36,7 @@ public class ColourThreshold implements Comparable<ColourThreshold>
/**
* Returns the colorCode attached to the first threshold in the list that is
* >= value. Expects that the list has been sorted by threshold ascending.
* greater than or equal to the value. Expects that the list has been sorted by threshold ascending.
*/
public static String getColorCode(List<ColourThreshold> colorList, int value)
{

View file

@ -7,6 +7,7 @@ import java.util.List;
import net.minecraft.item.ItemStack;
import net.minecraft.util.ResourceLocation;
import net.minecraft.util.StatCollector;
import WayofTime.alchemicalWizardry.AlchemicalWizardry;
import WayofTime.alchemicalWizardry.ModItems;
import WayofTime.alchemicalWizardry.api.guide.PageAltarRecipe;
import WayofTime.alchemicalWizardry.api.guide.PageOrbRecipe;
@ -165,6 +166,126 @@ public class BloodMagicGuide
magicianOrbPages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.architect.magicianOrb")));
entries.add(new EntryUniText(magicianOrbPages, "guide.BloodMagic.entryName.architect.magicianOrb"));
ArrayList<IPage> newRunePages = new ArrayList();
newRunePages.add(new PageOrbRecipe(RecipeHolder.capacityRuneRecipe));
newRunePages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.architect.newRune.1")));
newRunePages.add(new PageOrbRecipe(RecipeHolder.dislocationRuneRecipe));
newRunePages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.architect.newRune.2")));
entries.add(new EntryUniText(newRunePages, "guide.BloodMagic.entryName.architect.newRune"));
ArrayList<IPage> magnetismPages = new ArrayList();
magnetismPages.add(new PageOrbRecipe(RecipeHolder.magnetismSigilRecipe));
magnetismPages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.architect.magnetism")));
entries.add(new EntryUniText(magnetismPages, "guide.BloodMagic.entryName.architect.magnetism"));
ArrayList<IPage> phantomBridgePages = new ArrayList();
phantomBridgePages.add(new PageOrbRecipe(RecipeHolder.phantomBridgeRecipe));
phantomBridgePages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.architect.phantomBridge")));
entries.add(new EntryUniText(phantomBridgePages, "guide.BloodMagic.entryName.architect.phantomBridge"));
ArrayList<IPage> holdingPages = new ArrayList();
holdingPages.add(new PageOrbRecipe(RecipeHolder.holdingSigilRecipe));
holdingPages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.architect.holding")));
entries.add(new EntryUniText(holdingPages, "guide.BloodMagic.entryName.architect.holding"));
ArrayList<IPage> elementalAffinityPages = new ArrayList();
elementalAffinityPages.add(new PageOrbRecipe(RecipeHolder.affinitySigilRecipe));
elementalAffinityPages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.architect.elementalAffinity")));
entries.add(new EntryUniText(elementalAffinityPages, "guide.BloodMagic.entryName.architect.elementalAffinity"));
ArrayList<IPage> ritualStonesPages = new ArrayList();
ritualStonesPages.add(new PageOrbRecipe(RecipeHolder.ritualStoneRecipe));
ritualStonesPages.add(new PageOrbRecipe(RecipeHolder.masterStoneRecipe));
ritualStonesPages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.architect.ritualStones")));
entries.add(new EntryUniText(ritualStonesPages, "guide.BloodMagic.entryName.architect.ritualStones"));
ArrayList<IPage> bloodLampPages = new ArrayList();
bloodLampPages.add(new PageOrbRecipe(RecipeHolder.bloodLampRecipe));
bloodLampPages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.architect.bloodLamp")));
entries.add(new EntryUniText(bloodLampPages, "guide.BloodMagic.entryName.architect.bloodLamp"));
ArrayList<IPage> boundArmourPages = new ArrayList();
boundArmourPages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.architect.boundArmour.1")));
boundArmourPages.add(new PageIRecipe(RecipeHolder.emptySocketRecipe));
boundArmourPages.add(new PageAltarRecipe(RecipeHolder.filledSocketRecipe));
boundArmourPages.add(new PageOrbRecipe(RecipeHolder.soulForgeRecipe));
boundArmourPages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.architect.boundArmour.2")));
entries.add(new EntryUniText(boundArmourPages, "guide.BloodMagic.entryName.architect.boundArmour"));
if(AlchemicalWizardry.isThaumcraftLoaded)
{
ArrayList<IPage> sanguineArmourPages = new ArrayList();
sanguineArmourPages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.architect.sanguineArmour"), new ItemStack(ModItems.sanguineRobe)));
entries.add(new EntryUniText(sanguineArmourPages, "guide.BloodMagic.entryName.architect.sanguineArmour"));
}
ArrayList<IPage> soulSuppressPages = new ArrayList();
soulSuppressPages.add(new PageIRecipe(RecipeHolder.inhibitorRecipe));
soulSuppressPages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.architect.soulSuppress")));
entries.add(new EntryUniText(soulSuppressPages, "guide.BloodMagic.entryName.architect.soulSuppress"));
ArrayList<IPage> ritualDivinerPages = new ArrayList();
ritualDivinerPages.add(new PageIRecipe(RecipeHolder.ritualDiviner1Recipe));
ritualDivinerPages.add(new PageIRecipe(RecipeHolder.ritualDiviner2Recipe));
ritualDivinerPages.add(new PageIRecipe(RecipeHolder.ritualDiviner3Recipe));
ritualDivinerPages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.architect.ritualDiviner")));
entries.add(new EntryUniText(ritualDivinerPages, "guide.BloodMagic.entryName.architect.ritualDiviner"));
ArrayList<IPage> bloodShardPages = new ArrayList();
bloodShardPages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.architect.bloodShard"), new ItemStack(ModItems.weakBloodShard)));
entries.add(new EntryUniText(bloodShardPages, "guide.BloodMagic.entryName.architect.bloodShard"));
ArrayList<IPage> tier4AltarPages = new ArrayList();
tier4AltarPages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.architect.tier4Altar.1")));
tier4AltarPages.add(new PageUnlocImage("", new ResourceLocation("alchemicalwizardry:textures/misc/screenshots/altars/T4.png"), true));
tier4AltarPages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.architect.tier4Altar.2")));
entries.add(new EntryUniText(tier4AltarPages, "guide.BloodMagic.entryName.architect.tier4Altar"));
ArrayList<IPage> masterOrbPages = new ArrayList();
masterOrbPages.add(new PageAltarRecipe(RecipeHolder.masterBloodOrbRecipe));
masterOrbPages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.architect.masterOrb")));
entries.add(new EntryUniText(masterOrbPages, "guide.BloodMagic.entryName.architect.masterOrb"));
ArrayList<IPage> whirlwindPages = new ArrayList();
whirlwindPages.add(new PageOrbRecipe(RecipeHolder.whirlwindSigilRecipe));
whirlwindPages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.architect.whirlwind")));
entries.add(new EntryUniText(whirlwindPages, "guide.BloodMagic.entryName.architect.whirlwind"));
ArrayList<IPage> compressionPages = new ArrayList();
compressionPages.add(new PageOrbRecipe(RecipeHolder.compressionSigilRecipe));
compressionPages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.architect.compression")));
entries.add(new EntryUniText(compressionPages, "guide.BloodMagic.entryName.architect.compression"));
ArrayList<IPage> severancePages = new ArrayList();
severancePages.add(new PageOrbRecipe(RecipeHolder.enderSeveranceSigilRecipe));
severancePages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.architect.severance")));
entries.add(new EntryUniText(severancePages, "guide.BloodMagic.entryName.architect.severance"));
ArrayList<IPage> teleposerPages = new ArrayList();
teleposerPages.add(new PageAltarRecipe(RecipeHolder.teleposerFocusRecipe1));
teleposerPages.add(new PageIRecipe(RecipeHolder.teleposerRecipe));
teleposerPages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.architect.teleposer")));
entries.add(new EntryUniText(teleposerPages, "guide.BloodMagic.entryName.architect.teleposer"));
ArrayList<IPage> suppressionPages = new ArrayList();
suppressionPages.add(new PageOrbRecipe(RecipeHolder.suppressionSigilRecipe));
suppressionPages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.architect.suppression")));
entries.add(new EntryUniText(suppressionPages, "guide.BloodMagic.entryName.architect.suppression"));
ArrayList<IPage> superiorCapacityPages = new ArrayList();
superiorCapacityPages.add(new PageOrbRecipe(RecipeHolder.superiorCapacityRecipe));
superiorCapacityPages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.architect.superiorCapacity")));
entries.add(new EntryUniText(superiorCapacityPages, "guide.BloodMagic.entryName.architect.superiorCapacity"));
ArrayList<IPage> orbRunePages = new ArrayList();
orbRunePages.add(new PageOrbRecipe(RecipeHolder.orbRuneRecipe));
orbRunePages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.architect.orbRune")));
entries.add(new EntryUniText(orbRunePages, "guide.BloodMagic.entryName.architect.orbRune"));
ArrayList<IPage> fieldTripPages = new ArrayList();
fieldTripPages.addAll(PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.architect.fieldTrip")));
entries.add(new EntryUniText(fieldTripPages, "guide.BloodMagic.entryName.architect.fieldTrip"));
categories.add(new CategoryItemStack(entries, "guide.BloodMagic.category.architect", new ItemStack(ModItems.divinationSigil)));
}
}

View file

@ -75,7 +75,7 @@ public class RecipeHolder
public static AltarRecipe daggerRecipe;
public static AltarRecipe weakActivationRecipe;
public static AltarRecipe filledSocketRecipe;
public static AltarRecipe teleposerFocusRecipe1;
public static void init()
{
@ -141,6 +141,7 @@ public class RecipeHolder
daggerRecipe = getAltarRecipeForItemStack(new ItemStack(ModItems.daggerOfSacrifice));
weakActivationRecipe = getAltarRecipeForItemStack(new ItemStack(ModItems.activationCrystal, 1, 0));
filledSocketRecipe = getAltarRecipeForItemStack(new ItemStack(ModBlocks.bloodSocket));
teleposerFocusRecipe1 = getAltarRecipeForItemStack(new ItemStack(ModItems.telepositionFocus));
}
private static IRecipe getRecipeForItemStack(ItemStack stack)

View file

@ -94,6 +94,12 @@ public class ItemIncense extends Item implements IIncense
{
return 200;
}
@Override
public float getTickRate(ItemStack stack)
{
return 1.0f;
}
@Override
public float getRedColour(ItemStack stack)

View file

@ -401,6 +401,7 @@ public class ItemRitualDiviner extends EnergyItems implements IRitualDiviner
public void rotateRituals(World world, EntityPlayer player, ItemStack stack, boolean next)
{
this.voidStoredLocation(stack);
int maxRitualID = Rituals.getNumberOfRituals();
String currentRitualID = this.getCurrentRitual(stack);
@ -487,6 +488,7 @@ public class ItemRitualDiviner extends EnergyItems implements IRitualDiviner
@Override
public int cycleDirection(ItemStack itemStack)
{
this.voidStoredLocation(itemStack);
int direction = this.getDirection(itemStack);
if(direction < 4)

View file

@ -91,11 +91,11 @@ public class SacrificialDagger extends Item
@Override
public ItemStack onItemRightClick(ItemStack stack, World world, EntityPlayer player)
{
if (this.canUseForSacrifice(stack))
{
player.setItemInUse(stack, this.getMaxItemUseDuration(stack));
return stack;
}
// if (this.canUseForSacrifice(stack))
// {
// player.setItemInUse(stack, this.getMaxItemUseDuration(stack));
// return stack;
// }
if (!player.capabilities.isCreativeMode)
{

View file

@ -1,22 +1,24 @@
package WayofTime.alchemicalWizardry.common.rituals;
import java.util.ArrayList;
import java.util.List;
import net.minecraft.block.Block;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.inventory.IInventory;
import net.minecraft.item.ItemBlock;
import net.minecraft.item.ItemStack;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.potion.Potion;
import net.minecraft.potion.PotionEffect;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.world.World;
import WayofTime.alchemicalWizardry.api.Int3;
import WayofTime.alchemicalWizardry.api.rituals.IMasterRitualStone;
import WayofTime.alchemicalWizardry.api.rituals.RitualComponent;
import WayofTime.alchemicalWizardry.api.rituals.RitualEffect;
import WayofTime.alchemicalWizardry.api.soulNetwork.SoulNetworkHandler;
import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper;
import WayofTime.alchemicalWizardry.common.tileEntity.TESpectralBlock;
import net.minecraft.block.Block;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.inventory.IInventory;
import net.minecraft.item.ItemStack;
import net.minecraft.potion.Potion;
import net.minecraft.potion.PotionEffect;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.world.World;
import java.util.ArrayList;
import java.util.List;
public class RitualEffectEllipsoid extends RitualEffect
{
@ -60,42 +62,131 @@ public class RitualEffectEllipsoid extends RitualEffect
entityOwner.addPotionEffect(new PotionEffect(Potion.confusion.id, 80));
} else
{
int refresh = 1000;
int j = (int) (world.getWorldTime() % (ySize * 2 + 1)) - ySize;
for (int i = -xSize; i <= xSize; i++)
tile = world.getTileEntity(x, y-1, z);
if(!(tile instanceof IInventory))
{
return;
}
ItemBlock placedBlock = null;
ItemStack stack = null;
int slot = 0;
IInventory inv = (IInventory)tile;
while(slot < inv.getSizeInventory())
{
stack = inv.getStackInSlot(slot);
if(stack == null)
{
slot++;
continue;
}
if(stack.getItem() instanceof ItemBlock)
{
placedBlock = (ItemBlock)stack.getItem();
break;
}
slot++;
}
if(placedBlock == null || stack == null || slot >= inv.getSizeInventory())
{
return;
}
int count = 10;
Int3 lastPos = this.getLastPosition(ritualStone.getCustomRitualTag());
int i = -xSize;
int j = -ySize;
int k = -zSize;
if(lastPos != null)
{
i = Math.min(xSize, Math.max(-xSize, lastPos.xCoord));
j = Math.min(ySize, Math.max(-ySize, lastPos.yCoord));
k = Math.min(zSize, Math.max(-zSize, lastPos.zCoord));
}
boolean incrementNext = false;
while(j <= ySize)
{
if(y + j < 0)
{
j++;
continue;
}
while(i <= xSize)
{
for (int k = -zSize; k <= zSize; k++)
while(k <= zSize)
{
if (Math.pow(i * (ySize - 0.50f) * (zSize - 0.50f), 2) + Math.pow(j * (xSize - 0.50f) * (zSize - 0.50f), 2) + Math.pow(k * (xSize - 0.50f) * (ySize - 0.50f), 2) <= Math.pow((xSize - 1 + 0.50f) * (ySize - 1 + 0.50f) * (zSize - 1 + 0.50f), 2))
{
k++;
continue;
}
if (Math.pow(i * (ySize + 0.50f) * (zSize + 0.50f), 2) + Math.pow(j * (xSize + 0.50f) * (zSize + 0.50f), 2) + Math.pow(k * (xSize + 0.50f) * (ySize + 0.50f), 2) >= Math.pow((xSize + 0.50f) * (ySize + 0.50f) * (zSize + 0.50f), 2))
{
k++;
continue;
}
if(incrementNext || count <= 0)
{
this.setLastPosition(ritualStone.getCustomRitualTag(), new Int3(i, j, k));
return;
}
count--;
Block block = world.getBlock(x + i, y + j, z + k);
if (block.isAir(world, x + i, y + j, z + k))
if (!block.isAir(world, x + i, y + j, z + k))
{
TESpectralBlock.createSpectralBlockAtLocation(world, x + i, y + j, z + k, refresh);
k++;
continue;
} else
{
TileEntity tile1 = world.getTileEntity(x + i, y + j, z + k);
if (tile instanceof TESpectralBlock)
//This is pulled from the ItemBlock's placing calls
int i1 = placedBlock.getMetadata(stack.getItemDamage());
int j1 = placedBlock.field_150939_a.onBlockPlaced(world, x + i, y + j, z + k, 0, 0, 0, 0, i1);
if (placedBlock.placeBlockAt(stack, null, world, x + i, y + j, z + k, 0, 0, 0, 0, j1))
{
((TESpectralBlock) tile1).resetDuration(refresh);
world.playSoundEffect((double)(x + i + 0.5F), (double)(y + j + 0.5F), (double)(z + k + 0.5F), placedBlock.field_150939_a.stepSound.func_150496_b(), (placedBlock.field_150939_a.stepSound.getVolume() + 1.0F) / 2.0F, placedBlock.field_150939_a.stepSound.getPitch() * 0.8F);
--stack.stackSize;
if(stack.stackSize <= 0)
{
inv.setInventorySlotContents(slot, null);
}
this.setLastPosition(ritualStone.getCustomRitualTag(), new Int3(i, j, k));
incrementNext = true;
SoulNetworkHandler.syphonFromNetwork(owner, cost);
}
}
// world.setBlock(x + i, y + j, z + k, Blocks.stone);
k++;
}
}
k = -zSize;
i++;
}
i = -xSize;
j++;
this.setLastPosition(ritualStone.getCustomRitualTag(), new Int3(i, j, k));
return;
}
SoulNetworkHandler.syphonFromNetwork(owner, cost);
this.setLastPosition(ritualStone.getCustomRitualTag(), new Int3(-xSize, -ySize, -zSize));
}
}
@ -153,4 +244,23 @@ public class RitualEffectEllipsoid extends RitualEffect
return ellipsoidRitual;
}
public Int3 getLastPosition(NBTTagCompound tag)
{
if(tag != null && tag.getBoolean("hasWorked"))
{
return Int3.readFromNBT(tag);
}
return null;
}
public void setLastPosition(NBTTagCompound tag, Int3 pos)
{
if(tag != null)
{
pos.writeToNBT(tag);
tag.setBoolean("hasWorked", true);
}
}
}

View file

@ -816,7 +816,7 @@ public class SpellHelper
}
//Adapated from Enhanced Portals 3 code
public static Entity teleportEntityToDim(World oldWorld, int newWorldID, int x, int y, int z, Entity entity)
public static Entity teleportEntityToDim(World oldWorld, int newWorldID, double d, double e, double f, Entity entity)
{
if (entity != null)
{
@ -838,11 +838,11 @@ public class SpellHelper
player.playerNetServerHandler.sendPacket(new S07PacketRespawn(player.dimension, player.worldObj.difficultySetting, newWorldServer.getWorldInfo().getTerrainType(), player.theItemInWorldManager.getGameType()));
oldWorldServer.removeEntity(player);
player.isDead = false;
player.setLocationAndAngles(x, y, z, player.rotationYaw, player.rotationPitch);
player.setLocationAndAngles(d, e, f, player.rotationYaw, player.rotationPitch);
newWorldServer.spawnEntityInWorld(player);
player.setWorld(newWorldServer);
config.func_72375_a(player, oldWorldServer);
player.playerNetServerHandler.setPlayerLocation(x, y, z, entity.rotationYaw, entity.rotationPitch);
player.playerNetServerHandler.setPlayerLocation(d, e, f, entity.rotationYaw, entity.rotationPitch);
player.theItemInWorldManager.setWorld(newWorldServer);
config.updateTimeAndWeatherForPlayer(player, newWorldServer);
config.syncPlayerInventory(player);
@ -859,7 +859,7 @@ public class SpellHelper
player.timeUntilPortal = 150;
}
player.worldObj.theProfiler.endSection();
newWorldServer.playSoundEffect(x, y, z, "mob.endermen.portal", 1.0F, 1.0F);
newWorldServer.playSoundEffect(d, e, f, "mob.endermen.portal", 1.0F, 1.0F);
return player;
} else
{
@ -870,7 +870,7 @@ public class SpellHelper
Entity teleportedEntity = EntityList.createEntityFromNBT(tag, newWorldServer);
if (teleportedEntity != null)
{
teleportedEntity.setLocationAndAngles(x, y, z, entity.rotationYaw, entity.rotationPitch);
teleportedEntity.setLocationAndAngles(d, e, f, entity.rotationYaw, entity.rotationPitch);
teleportedEntity.forceSpawn = true;
newWorldServer.spawnEntityInWorld(teleportedEntity);
teleportedEntity.setWorld(newWorldServer);
@ -878,7 +878,7 @@ public class SpellHelper
}
oldWorldServer.resetUpdateEntityTick();
newWorldServer.resetUpdateEntityTick();
newWorldServer.playSoundEffect(x, y, z, "mob.endermen.portal", 1.0F, 1.0F);
newWorldServer.playSoundEffect(d, e, f, "mob.endermen.portal", 1.0F, 1.0F);
return teleportedEntity;
}
}
@ -896,11 +896,11 @@ public class SpellHelper
*/
public static float applyPotionDamageCalculations(EntityLivingBase entity, DamageSource p_70672_1_, float p_70672_2_)
{
if (p_70672_1_.isDamageAbsolute())
{
return p_70672_2_;
}
else
// if (p_70672_1_.isDamageAbsolute())
// {
// return p_70672_2_;
// }
// else
{
if (entity instanceof EntityZombie)
{

View file

@ -14,6 +14,7 @@ import WayofTime.alchemicalWizardry.common.NewPacketHandler;
import WayofTime.alchemicalWizardry.common.block.BlockTeleposer;
import WayofTime.alchemicalWizardry.common.items.EnergyItems;
import WayofTime.alchemicalWizardry.common.items.TelepositionFocus;
import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper;
public class TETeleposer extends TEInventory
{
@ -166,6 +167,26 @@ public class TETeleposer extends TEInventory
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);
}
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);
}
}
}
}

File diff suppressed because one or more lines are too long