1.7.2 is almost ready!
This commit is contained in:
parent
d5ba110323
commit
fa6ccb83a1
|
@ -247,7 +247,8 @@ public class AlchemicalWizardry
|
|||
|
||||
ModItems.registerItems();
|
||||
|
||||
FMLCommonHandler.instance().bus().register(new AlchemicalWizardryEventHooks());
|
||||
//FMLCommonHandler.instance().bus().register(new AlchemicalWizardryEventHooks());
|
||||
MinecraftForge.EVENT_BUS.register(new AlchemicalWizardryEventHooks());
|
||||
NewPacketHandler.INSTANCE.ordinal();
|
||||
}
|
||||
|
||||
|
@ -262,6 +263,7 @@ public class AlchemicalWizardry
|
|||
|
||||
proxy.registerRenderers();
|
||||
proxy.registerEntities();
|
||||
proxy.registerEntityTrackers();
|
||||
//ItemStacks used for crafting go here
|
||||
ItemStack lavaBucketStack = new ItemStack(Items.lava_bucket);
|
||||
ItemStack cobblestoneStack = new ItemStack(Blocks.cobblestone);
|
||||
|
@ -489,7 +491,7 @@ public class AlchemicalWizardry
|
|||
//Fuel handler
|
||||
GameRegistry.registerFuelHandler(new AlchemicalWizardryFuelHandler());
|
||||
//EntityRegistry.registerModEntity(EnergyBlastProjectile.class, "BlasterProj", 0, this, 128, 5, true);
|
||||
proxy.registerEntityTrackers();
|
||||
|
||||
//Gui registration
|
||||
// NetworkRegistry.instance().registerGuiHandler(this, new GuiHandlerAltar());
|
||||
Rituals.loadRituals();
|
||||
|
@ -502,7 +504,7 @@ public class AlchemicalWizardry
|
|||
//MinecraftForge.setToolClass(ModItems.boundPickaxe, "pickaxe", 5);
|
||||
//MinecraftForge.setToolClass(ModItems.boundAxe, "axe", 5);
|
||||
//MinecraftForge.setToolClass(ModItems.boundShovel, "shovel", 5);
|
||||
FMLCommonHandler.instance().bus().register(new ModLivingDropsEvent());
|
||||
MinecraftForge.EVENT_BUS.register(new ModLivingDropsEvent());
|
||||
proxy.InitRendering();
|
||||
NetworkRegistry.INSTANCE.registerGuiHandler(this, new GuiHandler());
|
||||
// ItemStack[] comp = new ItemStack[5];
|
||||
|
|
|
@ -82,14 +82,14 @@ public class AlchemicalWizardryEventHooks
|
|||
// event.setResult(Result.DEFAULT);
|
||||
// }
|
||||
|
||||
@SubscribeEvent
|
||||
public void onPlayerTickEnd(PlayerTickEvent event)
|
||||
{
|
||||
if(event.type.equals(Type.PLAYER) && event.phase.equals(TickEvent.Phase.END))
|
||||
{
|
||||
ObfuscationReflectionHelper.setPrivateValue(PlayerCapabilities.class, event.player.capabilities, Float.valueOf(0.1f), new String[]{"walkSpeed", "g", "field_75097_g"});
|
||||
}
|
||||
}
|
||||
// @SubscribeEvent
|
||||
// public void onPlayerTickEnd(PlayerTickEvent event)
|
||||
// {
|
||||
// if(event.type.equals(Type.PLAYER) && event.phase.equals(TickEvent.Phase.END))
|
||||
// {
|
||||
// ObfuscationReflectionHelper.setPrivateValue(PlayerCapabilities.class, event.player.capabilities, Float.valueOf(0.1f), new String[]{"walkSpeed", "g", "field_75097_g"});
|
||||
// }
|
||||
// }
|
||||
|
||||
@SubscribeEvent
|
||||
public void onEntityUpdate(LivingUpdateEvent event)
|
||||
|
@ -104,6 +104,11 @@ public class AlchemicalWizardryEventHooks
|
|||
int yPos = (int)(blockVector.yCoord);
|
||||
int zPos = (int)(blockVector.zCoord);
|
||||
|
||||
if(entityLiving instanceof EntityPlayer)
|
||||
{
|
||||
ObfuscationReflectionHelper.setPrivateValue(PlayerCapabilities.class, ((EntityPlayer)event.entityLiving).capabilities, Float.valueOf(0.1f), new String[]{"walkSpeed", "g", "field_75097_g"});
|
||||
}
|
||||
|
||||
if (entityLiving instanceof EntityPlayer && entityLiving.worldObj.isRemote)
|
||||
{
|
||||
EntityPlayer entityPlayer = (EntityPlayer) entityLiving;
|
||||
|
|
|
@ -76,7 +76,7 @@ public class CommonProxy
|
|||
EntityRegistry.registerModEntity(EntityEnergyBazookaMainProjectile.class, "energyBazookaMain", 10, AlchemicalWizardry.instance, 128, 3, true);
|
||||
EntityRegistry.registerModEntity(EntityEnergyBazookaSecondaryProjectile.class, "energyBazookaSecondary", 11, AlchemicalWizardry.instance, 128, 3, true);
|
||||
EntityRegistry.registerModEntity(EntityBloodLightProjectile.class, "bloodLightProjectile", 12, AlchemicalWizardry.instance, 128, 3, true);
|
||||
EntityRegistry.registerModEntity(EntityMeteor.class, "Meteor", 13, AlchemicalWizardry.instance, 128, 3, true);
|
||||
EntityRegistry.registerModEntity(EntityMeteor.class, "meteor", 13, AlchemicalWizardry.instance, 120, 3, true);
|
||||
EntityRegistry.registerModEntity(EntitySpellProjectile.class, "spellProjectile", 14, AlchemicalWizardry.instance, 128, 3, true);
|
||||
}
|
||||
|
||||
|
|
|
@ -70,7 +70,7 @@ public enum NewPacketHandler
|
|||
FMLEmbeddedChannel clientChannel = this.channels.get(Side.CLIENT);
|
||||
|
||||
String tileAltarCodec = clientChannel.findChannelHandlerNameForType(TEAltarCodec.class);
|
||||
clientChannel.pipeline().addAfter(tileAltarCodec, "ClientHandler", new TEAltarMessageHandler());
|
||||
clientChannel.pipeline().addAfter(tileAltarCodec, "TEAltarHandler", new TEAltarMessageHandler());
|
||||
clientChannel.pipeline().addAfter(tileAltarCodec, "TEOrientableHandler", new TEOrientableMessageHandler());
|
||||
clientChannel.pipeline().addAfter(tileAltarCodec, "TEPedestalHandler", new TEPedestalMessageHandler());
|
||||
clientChannel.pipeline().addAfter(tileAltarCodec, "TEPlinthHandler", new TEPlinthMessageHandler());
|
||||
|
@ -101,12 +101,6 @@ public enum NewPacketHandler
|
|||
{
|
||||
TEAltar altar = (TEAltar) te;
|
||||
|
||||
System.out.println("x: " + msg.x + ", y: " + msg.y + ", z: " + msg.z);
|
||||
for(int in : msg.items)
|
||||
{
|
||||
System.out.println("" + in);
|
||||
}
|
||||
|
||||
altar.handlePacketData(msg.items, msg.fluids, msg.capacity);
|
||||
}
|
||||
}
|
||||
|
@ -362,7 +356,6 @@ public enum NewPacketHandler
|
|||
{
|
||||
int i = items[j];
|
||||
target.writeInt(i);
|
||||
System.out.println("" + i);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -17,11 +17,12 @@ import net.minecraft.util.MathHelper;
|
|||
import net.minecraft.util.MovingObjectPosition;
|
||||
import net.minecraft.util.Vec3;
|
||||
import net.minecraft.world.World;
|
||||
import cpw.mods.fml.common.registry.IThrowableEntity;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
|
||||
//Shamelessly ripped off from x3n0ph0b3
|
||||
public class EnergyBlastProjectile extends Entity implements IProjectile
|
||||
public class EnergyBlastProjectile extends Entity implements IProjectile, IThrowableEntity
|
||||
{
|
||||
protected int xTile = -1;
|
||||
protected int yTile = -1;
|
||||
|
@ -43,6 +44,7 @@ public class EnergyBlastProjectile extends Entity implements IProjectile
|
|||
{
|
||||
super(par1World);
|
||||
this.setSize(0.5F, 0.5F);
|
||||
this.maxTicksInAir = 600;
|
||||
}
|
||||
|
||||
public EnergyBlastProjectile(World par1World, double par2, double par4, double par6)
|
||||
|
@ -51,6 +53,7 @@ public class EnergyBlastProjectile extends Entity implements IProjectile
|
|||
this.setSize(0.5F, 0.5F);
|
||||
this.setPosition(par2, par4, par6);
|
||||
yOffset = 0.0F;
|
||||
this.maxTicksInAir = 600;
|
||||
}
|
||||
|
||||
public EnergyBlastProjectile(World par1World, EntityLivingBase par2EntityPlayer, int damage)
|
||||
|
@ -267,7 +270,7 @@ public class EnergyBlastProjectile extends Entity implements IProjectile
|
|||
|
||||
Vec3 var17 = worldObj.getWorldVec3Pool().getVecFromPool(posX, posY, posZ);
|
||||
Vec3 var3 = worldObj.getWorldVec3Pool().getVecFromPool(posX + motionX, posY + motionY, posZ + motionZ);
|
||||
MovingObjectPosition var4 = worldObj.func_147447_a(var17, var3, true, false, true);
|
||||
MovingObjectPosition var4 = worldObj.func_147447_a(var17, var3, true, false, false);
|
||||
var17 = worldObj.getWorldVec3Pool().getVecFromPool(posX, posY, posZ);
|
||||
var3 = worldObj.getWorldVec3Pool().getVecFromPool(posX + motionX, posY + motionY, posZ + motionZ);
|
||||
|
||||
|
@ -505,4 +508,19 @@ public class EnergyBlastProjectile extends Entity implements IProjectile
|
|||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Entity getThrower()
|
||||
{
|
||||
// TODO Auto-generated method stub
|
||||
return this.shootingEntity;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setThrower(Entity entity)
|
||||
{
|
||||
if(entity instanceof EntityLivingBase)
|
||||
this.shootingEntity = (EntityLivingBase)entity;
|
||||
|
||||
}
|
||||
}
|
||||
|
|
|
@ -213,7 +213,7 @@ public class EntityEnergyBazookaSecondaryProjectile extends EnergyBlastProjectil
|
|||
|
||||
Vec3 var17 = worldObj.getWorldVec3Pool().getVecFromPool(posX, posY, posZ);
|
||||
Vec3 var3 = worldObj.getWorldVec3Pool().getVecFromPool(posX + motionX, posY + motionY, posZ + motionZ);
|
||||
MovingObjectPosition var4 = worldObj.func_147447_a(var17, var3, true, false, true);
|
||||
MovingObjectPosition var4 = worldObj.func_147447_a(var17, var3, true, false, false);
|
||||
var17 = worldObj.getWorldVec3Pool().getVecFromPool(posX, posY, posZ);
|
||||
var3 = worldObj.getWorldVec3Pool().getVecFromPool(posX + motionX, posY + motionY, posZ + motionZ);
|
||||
|
||||
|
|
|
@ -16,13 +16,17 @@ import net.minecraft.util.DamageSource;
|
|||
import net.minecraft.util.IIcon;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.common.ISpecialArmor;
|
||||
import net.minecraftforge.common.util.Constants;
|
||||
import WayofTime.alchemicalWizardry.AlchemicalWizardry;
|
||||
import WayofTime.alchemicalWizardry.ModItems;
|
||||
import WayofTime.alchemicalWizardry.common.ArmourUpgrade;
|
||||
import WayofTime.alchemicalWizardry.common.IBindable;
|
||||
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;
|
||||
|
||||
@Optional.InterfaceList(value = {@Interface(iface="IRevealer", modid = "Thaumcraft"), @Interface(iface="IGoggles", modid = "Thaumcraft")})
|
||||
public class BoundArmour extends ItemArmor implements ISpecialArmor,IBindable //,IRevealer, IGoggles
|
||||
{
|
||||
private static int invSize = 9;
|
||||
|
@ -111,7 +115,7 @@ public class BoundArmour extends ItemArmor implements ISpecialArmor,IBindable//,
|
|||
return new ArmorProperties(-1, 0, 0);
|
||||
}
|
||||
|
||||
if (helmet.equals(ModItems.boundHelmet) || plate.equals(ModItems.boundPlate) || leggings.equals(ModItems.boundLeggings) || boots.equals(ModItems.boundBoots))
|
||||
if (helmet.getItem().equals(ModItems.boundHelmet) || plate.getItem().equals(ModItems.boundPlate) || leggings.getItem().equals(ModItems.boundLeggings) || boots.getItem().equals(ModItems.boundBoots))
|
||||
{
|
||||
if (source.isUnblockable())
|
||||
{
|
||||
|
@ -329,12 +333,12 @@ public class BoundArmour extends ItemArmor implements ISpecialArmor,IBindable//,
|
|||
|
||||
if (itemStack != null)
|
||||
{
|
||||
if (itemStack.equals(ModItems.weakBloodShard))
|
||||
if (itemStack.getItem().equals(ModItems.weakBloodShard))
|
||||
{
|
||||
max = Math.max(max, 1);
|
||||
}
|
||||
|
||||
if (itemStack.equals(ModItems.demonBloodShard))
|
||||
if (itemStack.getItem().equals(ModItems.demonBloodShard))
|
||||
{
|
||||
max = Math.max(max, 2);
|
||||
}
|
||||
|
@ -394,11 +398,10 @@ public class BoundArmour extends ItemArmor implements ISpecialArmor,IBindable//,
|
|||
if (itemTag == null)
|
||||
{
|
||||
itemStack.setTagCompound(new NBTTagCompound());
|
||||
return null;
|
||||
}
|
||||
|
||||
ItemStack[] inv = new ItemStack[9];
|
||||
NBTTagList tagList = itemTag.getTagList("Inventory",0);
|
||||
NBTTagList tagList = itemTag.getTagList("Inventory", Constants.NBT.TAG_COMPOUND);
|
||||
|
||||
if (tagList == null)
|
||||
{
|
||||
|
@ -407,14 +410,13 @@ public class BoundArmour extends ItemArmor implements ISpecialArmor,IBindable//,
|
|||
|
||||
for (int i = 0; i < tagList.tagCount(); i++)
|
||||
{
|
||||
NBTTagCompound tag = new NBTTagCompound();
|
||||
NBTTagCompound tag = (NBTTagCompound) tagList.getCompoundTagAt(i);
|
||||
int slot = tag.getByte("Slot");
|
||||
|
||||
if (slot >= 0 && slot < invSize)
|
||||
{
|
||||
inv[slot] = ItemStack.loadItemStackFromNBT(tag);
|
||||
}
|
||||
tagList.appendTag(tag);
|
||||
}
|
||||
|
||||
return inv;
|
||||
|
@ -463,7 +465,7 @@ public class BoundArmour extends ItemArmor implements ISpecialArmor,IBindable//,
|
|||
continue;
|
||||
}
|
||||
|
||||
if (item.equals(ModItems.voidSigil))
|
||||
if (item.getItem().equals(ModItems.voidSigil))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
@ -540,27 +542,27 @@ public class BoundArmour extends ItemArmor implements ISpecialArmor,IBindable//,
|
|||
continue;
|
||||
}
|
||||
|
||||
if (item.equals(ModItems.weakBloodOrb))
|
||||
if (item.getItem().equals(ModItems.weakBloodOrb))
|
||||
{
|
||||
return 0.75f;
|
||||
}
|
||||
|
||||
if (item.equals(ModItems.apprenticeBloodOrb))
|
||||
if (item.getItem().equals(ModItems.apprenticeBloodOrb))
|
||||
{
|
||||
return 0.50f;
|
||||
}
|
||||
|
||||
if (item.equals(ModItems.magicianBloodOrb))
|
||||
if (item.getItem().equals(ModItems.magicianBloodOrb))
|
||||
{
|
||||
return 0.25f;
|
||||
}
|
||||
|
||||
if (item.equals(ModItems.masterBloodOrb))
|
||||
if (item.getItem().equals(ModItems.masterBloodOrb))
|
||||
{
|
||||
return 0.0f;
|
||||
}
|
||||
|
||||
if (item.equals(ModItems.archmageBloodOrb))
|
||||
if (item.getItem().equals(ModItems.archmageBloodOrb))
|
||||
{
|
||||
return 0.0f;
|
||||
}
|
||||
|
|
|
@ -19,10 +19,12 @@ import net.minecraft.item.ItemStack;
|
|||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.nbt.NBTTagList;
|
||||
import net.minecraft.util.IIcon;
|
||||
import net.minecraft.util.Vec3;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.common.ForgeHooks;
|
||||
import WayofTime.alchemicalWizardry.AlchemicalWizardry;
|
||||
import WayofTime.alchemicalWizardry.common.IBindable;
|
||||
import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
|
||||
|
@ -138,9 +140,10 @@ public class BoundAxe extends ItemAxe implements IBindable
|
|||
return par1ItemStack;
|
||||
}
|
||||
|
||||
int posX = (int) par3EntityPlayer.posX;
|
||||
int posY = (int) par3EntityPlayer.posY;
|
||||
int posZ = (int) par3EntityPlayer.posZ;
|
||||
Vec3 blockVec = SpellHelper.getEntityBlockVector(par3EntityPlayer);
|
||||
int posX = (int)(blockVec.xCoord);
|
||||
int posY = (int)(blockVec.xCoord);
|
||||
int posZ = (int)(blockVec.xCoord);
|
||||
boolean silkTouch = false;
|
||||
int so = Enchantment.silkTouch.effectId;
|
||||
int fortune = Enchantment.fortune.effectId;
|
||||
|
|
|
@ -4,23 +4,23 @@ import java.util.ArrayList;
|
|||
import java.util.List;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
import net.minecraft.enchantment.Enchantment;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
import net.minecraft.entity.item.EntityItem;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.init.Blocks;
|
||||
import net.minecraft.item.ItemPickaxe;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.nbt.NBTTagList;
|
||||
import net.minecraft.util.IIcon;
|
||||
import net.minecraft.util.Vec3;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.common.ForgeHooks;
|
||||
import WayofTime.alchemicalWizardry.AlchemicalWizardry;
|
||||
import WayofTime.alchemicalWizardry.common.IBindable;
|
||||
import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
|
||||
|
@ -137,9 +137,10 @@ public class BoundPickaxe extends ItemPickaxe implements IBindable
|
|||
return par1ItemStack;
|
||||
}
|
||||
|
||||
int posX = (int) par3EntityPlayer.posX;
|
||||
int posY = (int) par3EntityPlayer.posY;
|
||||
int posZ = (int) par3EntityPlayer.posZ;
|
||||
Vec3 blockVec = SpellHelper.getEntityBlockVector(par3EntityPlayer);
|
||||
int posX = (int)(blockVec.xCoord);
|
||||
int posY = (int)(blockVec.xCoord);
|
||||
int posZ = (int)(blockVec.xCoord);
|
||||
boolean silkTouch = false;
|
||||
int so = Enchantment.silkTouch.effectId;
|
||||
int fortune = Enchantment.fortune.effectId;
|
||||
|
|
|
@ -17,10 +17,12 @@ import net.minecraft.item.ItemStack;
|
|||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.nbt.NBTTagList;
|
||||
import net.minecraft.util.IIcon;
|
||||
import net.minecraft.util.Vec3;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.common.ForgeHooks;
|
||||
import WayofTime.alchemicalWizardry.AlchemicalWizardry;
|
||||
import WayofTime.alchemicalWizardry.common.IBindable;
|
||||
import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper;
|
||||
|
||||
import com.google.common.collect.Multimap;
|
||||
|
||||
|
@ -139,9 +141,10 @@ public class BoundShovel extends ItemSpade implements IBindable
|
|||
return par1ItemStack;
|
||||
}
|
||||
|
||||
int posX = (int) par3EntityPlayer.posX;
|
||||
int posY = (int) par3EntityPlayer.posY;
|
||||
int posZ = (int) par3EntityPlayer.posZ;
|
||||
Vec3 blockVec = SpellHelper.getEntityBlockVector(par3EntityPlayer);
|
||||
int posX = (int)(blockVec.xCoord);
|
||||
int posY = (int)(blockVec.xCoord);
|
||||
int posZ = (int)(blockVec.xCoord);
|
||||
boolean silkTouch = false;
|
||||
int so = Enchantment.silkTouch.effectId;
|
||||
int fortune = Enchantment.fortune.effectId;
|
||||
|
|
|
@ -1,19 +1,29 @@
|
|||
package WayofTime.alchemicalWizardry.common.renderer.projectile;
|
||||
|
||||
import WayofTime.alchemicalWizardry.common.entity.projectile.*;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import net.minecraft.client.renderer.Tessellator;
|
||||
import net.minecraft.client.renderer.entity.Render;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.entity.IProjectile;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
import org.lwjgl.opengl.GL12;
|
||||
|
||||
import WayofTime.alchemicalWizardry.common.entity.projectile.ExplosionProjectile;
|
||||
import WayofTime.alchemicalWizardry.common.entity.projectile.FireProjectile;
|
||||
import WayofTime.alchemicalWizardry.common.entity.projectile.HolyProjectile;
|
||||
import WayofTime.alchemicalWizardry.common.entity.projectile.IceProjectile;
|
||||
import WayofTime.alchemicalWizardry.common.entity.projectile.LightningBoltProjectile;
|
||||
import WayofTime.alchemicalWizardry.common.entity.projectile.MudProjectile;
|
||||
import WayofTime.alchemicalWizardry.common.entity.projectile.WaterProjectile;
|
||||
import WayofTime.alchemicalWizardry.common.entity.projectile.WindGustProjectile;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
public class RenderEnergyBlastProjectile extends Render
|
||||
{
|
||||
public void doRenderEnergyBlastProjectile(EnergyBlastProjectile entityShot, double par2, double par4, double par6, float par8, float par9)
|
||||
public void doRenderEnergyBlastProjectile(Entity entityShot, double par2, double par4, double par6, float par8, float par9)
|
||||
{
|
||||
GL11.glPushMatrix();
|
||||
GL11.glTranslatef((float) par2, (float) par4, (float) par6);
|
||||
|
@ -37,9 +47,9 @@ public class RenderEnergyBlastProjectile extends Render
|
|||
@Override
|
||||
public void doRender(Entity par1Entity, double par2, double par4, double par6, float par8, float par9)
|
||||
{
|
||||
if (par1Entity instanceof EnergyBlastProjectile)
|
||||
if (par1Entity instanceof IProjectile)
|
||||
{
|
||||
this.doRenderEnergyBlastProjectile((EnergyBlastProjectile) par1Entity, par2, par4, par6, par8, par9);
|
||||
this.doRenderEnergyBlastProjectile(par1Entity, par2, par4, par6, par8, par9);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -67,7 +67,7 @@ public class RitualEffectLeap extends RitualEffect
|
|||
switch (direction)
|
||||
{
|
||||
case 1:
|
||||
SpellHelper.setPlayerSpeedFromServer((EntityPlayer)entityplayer, 0, 1.2, 3.0);
|
||||
SpellHelper.setPlayerSpeedFromServer((EntityPlayer)entityplayer, 0, 1.2, -3.0);
|
||||
break;
|
||||
|
||||
case 2:
|
||||
|
@ -75,7 +75,7 @@ public class RitualEffectLeap extends RitualEffect
|
|||
break;
|
||||
|
||||
case 3:
|
||||
SpellHelper.setPlayerSpeedFromServer((EntityPlayer)entityplayer, 0, 1.2, -3.0);
|
||||
SpellHelper.setPlayerSpeedFromServer((EntityPlayer)entityplayer, 0, 1.2, 3.0);
|
||||
break;
|
||||
|
||||
case 4:
|
||||
|
|
|
@ -152,7 +152,7 @@ public class Rituals
|
|||
case 2:
|
||||
for (RitualComponent rc : ritual)
|
||||
{
|
||||
test = world.getBlock(x + rc.getX(), y + rc.getY(), z + rc.getZ());
|
||||
test = world.getBlock(x - rc.getZ(), y + rc.getY(), z + rc.getX());
|
||||
|
||||
if (!(test instanceof RitualStone))
|
||||
{
|
||||
|
@ -170,7 +170,7 @@ public class Rituals
|
|||
case 3:
|
||||
for (RitualComponent rc : ritual)
|
||||
{
|
||||
test = world.getBlock(x + rc.getX(), y + rc.getY(), z + rc.getZ());
|
||||
test = world.getBlock(x - rc.getX(), y + rc.getY(), z - rc.getZ());
|
||||
|
||||
if (!(test instanceof RitualStone))
|
||||
{
|
||||
|
@ -188,7 +188,7 @@ public class Rituals
|
|||
case 4:
|
||||
for (RitualComponent rc : ritual)
|
||||
{
|
||||
test = world.getBlock(x + rc.getX(), y + rc.getY(), z + rc.getZ());
|
||||
test = world.getBlock(x + rc.getZ(), y + rc.getY(), z - rc.getX());
|
||||
|
||||
if (!(test instanceof RitualStone))
|
||||
{
|
||||
|
|
|
@ -209,7 +209,7 @@ public class EntitySpellProjectile extends Entity implements IProjectile
|
|||
|
||||
Vec3 var17 = worldObj.getWorldVec3Pool().getVecFromPool(posX, posY, posZ);
|
||||
Vec3 var3 = worldObj.getWorldVec3Pool().getVecFromPool(posX + motionX, posY + motionY, posZ + motionZ);
|
||||
MovingObjectPosition var4 = worldObj.func_147447_a(var17, var3, true, false, true);
|
||||
MovingObjectPosition var4 = worldObj.func_147447_a(var17, var3, true, false, false);
|
||||
var17 = worldObj.getWorldVec3Pool().getVecFromPool(posX, posY, posZ);
|
||||
var3 = worldObj.getWorldVec3Pool().getVecFromPool(posX + motionX, posY + motionY, posZ + motionZ);
|
||||
|
||||
|
|
|
@ -3,6 +3,7 @@ package WayofTime.alchemicalWizardry.common.spell.complex.effect;
|
|||
import WayofTime.alchemicalWizardry.common.spell.complex.SpellParadigmMelee;
|
||||
import WayofTime.alchemicalWizardry.common.spell.complex.SpellParadigmProjectile;
|
||||
import WayofTime.alchemicalWizardry.common.spell.complex.SpellParadigmSelf;
|
||||
import WayofTime.alchemicalWizardry.common.spell.complex.effect.impactEffects.earth.ProjectileEnvironmentalEarth;
|
||||
|
||||
public class SpellEffectEarth extends SpellEffect
|
||||
{
|
||||
|
@ -30,7 +31,7 @@ public class SpellEffectEarth extends SpellEffect
|
|||
@Override
|
||||
public void environmentalModificationProjectile(SpellParadigmProjectile parad)
|
||||
{
|
||||
// TODO Auto-generated method stub
|
||||
parad.addUpdateEffect(new ProjectileEnvironmentalEarth(this.powerEnhancement,this.potencyEnhancement,this.costEnhancement));
|
||||
|
||||
}
|
||||
|
||||
|
@ -114,8 +115,7 @@ public class SpellEffectEarth extends SpellEffect
|
|||
@Override
|
||||
protected int getCostForEnvironmentProjectile()
|
||||
{
|
||||
// TODO Auto-generated method stub
|
||||
return 0;
|
||||
return (int)(10*2*(0.1d*(this.potencyEnhancement+1))*Math.pow(3.47,this.potencyEnhancement));
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -3,6 +3,7 @@ package WayofTime.alchemicalWizardry.common.spell.complex.effect;
|
|||
import WayofTime.alchemicalWizardry.common.spell.complex.SpellParadigmMelee;
|
||||
import WayofTime.alchemicalWizardry.common.spell.complex.SpellParadigmProjectile;
|
||||
import WayofTime.alchemicalWizardry.common.spell.complex.SpellParadigmSelf;
|
||||
import WayofTime.alchemicalWizardry.common.spell.complex.effect.impactEffects.wind.ProjectileEnvironmentalWind;
|
||||
|
||||
public class SpellEffectWind extends SpellEffect
|
||||
{
|
||||
|
@ -30,7 +31,7 @@ public class SpellEffectWind extends SpellEffect
|
|||
@Override
|
||||
public void environmentalModificationProjectile(SpellParadigmProjectile parad)
|
||||
{
|
||||
// TODO Auto-generated method stub
|
||||
parad.addUpdateEffect(new ProjectileEnvironmentalWind(this.powerEnhancement,this.potencyEnhancement,this.costEnhancement));
|
||||
|
||||
}
|
||||
|
||||
|
|
|
@ -0,0 +1,72 @@
|
|||
package WayofTime.alchemicalWizardry.common.spell.complex.effect.impactEffects.earth;
|
||||
|
||||
import java.util.ArrayList;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.entity.item.EntityItem;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.Vec3;
|
||||
import net.minecraft.world.World;
|
||||
import WayofTime.alchemicalWizardry.common.spell.complex.EntitySpellProjectile;
|
||||
import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper;
|
||||
import WayofTime.alchemicalWizardry.common.spell.complex.effect.impactEffects.ProjectileUpdateEffect;
|
||||
|
||||
public class ProjectileEnvironmentalEarth extends ProjectileUpdateEffect
|
||||
{
|
||||
public ProjectileEnvironmentalEarth(int power, int potency, int cost)
|
||||
{
|
||||
super(power, potency, cost);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onUpdateEffect(Entity projectile)
|
||||
{
|
||||
Vec3 posVec = SpellHelper.getEntityBlockVector(projectile);
|
||||
|
||||
int horizRange = this.powerUpgrades+1;
|
||||
int vertRange = (int)(0.5*(this.powerUpgrades+1));
|
||||
int maxBlocks = (int)(2*Math.pow(3.47, this.potencyUpgrades));
|
||||
|
||||
int posX = (int)(posVec.xCoord);
|
||||
int posY = (int)(posVec.yCoord);
|
||||
int posZ = (int)(posVec.zCoord);
|
||||
|
||||
World worldObj = projectile.worldObj;
|
||||
|
||||
if(projectile instanceof EntitySpellProjectile)
|
||||
{
|
||||
int blocksBroken = ((EntitySpellProjectile) projectile).getBlocksBroken();
|
||||
|
||||
if(blocksBroken>=maxBlocks)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
for(int i=-horizRange; i<=horizRange; i++)
|
||||
{
|
||||
for(int j=-vertRange; j<=vertRange; j++)
|
||||
{
|
||||
for(int k=-horizRange; k<=horizRange; k++)
|
||||
{
|
||||
if(!worldObj.isAirBlock(posX+i, posY+j, posZ+k)&&blocksBroken<maxBlocks)
|
||||
{
|
||||
Block block = worldObj.getBlock(posX+i, posY+j, posZ+k);
|
||||
if(block == null || block.getBlockHardness(worldObj, posX+i, posY+j, posZ+k)==-1)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
//block.breakBlock(worldObj, posX+i, posY+j, posZ+k, block.blockID, worldObj.getBlockMetadata(posX+i, posY+j, posZ+k));
|
||||
//worldObj.destroyBlock(posX+i, posY+j, posZ+k, true);
|
||||
worldObj.func_147480_a(posX+i, posY+j, posZ+k, true);
|
||||
|
||||
blocksBroken++;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
((EntitySpellProjectile) projectile).setBlocksBroken(blocksBroken);
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,53 @@
|
|||
package WayofTime.alchemicalWizardry.common.spell.complex.effect.impactEffects.wind;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.entity.item.EntityItem;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.util.Vec3;
|
||||
import net.minecraft.world.World;
|
||||
import WayofTime.alchemicalWizardry.common.spell.complex.EntitySpellProjectile;
|
||||
import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper;
|
||||
import WayofTime.alchemicalWizardry.common.spell.complex.effect.impactEffects.ProjectileUpdateEffect;
|
||||
|
||||
public class ProjectileEnvironmentalWind extends ProjectileUpdateEffect
|
||||
{
|
||||
public ProjectileEnvironmentalWind(int power, int potency, int cost)
|
||||
{
|
||||
super(power, potency, cost);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onUpdateEffect(Entity projectile)
|
||||
{
|
||||
Vec3 posVec = SpellHelper.getEntityBlockVector(projectile);
|
||||
|
||||
int horizRange = this.powerUpgrades+1;
|
||||
int vertRange = 1*this.potencyUpgrades+1;
|
||||
|
||||
World worldObj = projectile.worldObj;
|
||||
|
||||
if(projectile instanceof EntitySpellProjectile)
|
||||
{
|
||||
Entity shooter = ((EntitySpellProjectile) projectile).shootingEntity;
|
||||
if(shooter instanceof EntityPlayer)
|
||||
{
|
||||
List<Entity> entitylist = SpellHelper.getEntitiesInRange(worldObj, projectile.posX, projectile.posY, projectile.posZ, horizRange, vertRange);
|
||||
if(entitylist !=null)
|
||||
{
|
||||
for(Entity entity : entitylist)
|
||||
{
|
||||
if(entity instanceof EntityItem)
|
||||
{
|
||||
((EntityItem)entity).delayBeforeCanPickup = 0;
|
||||
entity.onCollideWithPlayer((EntityPlayer)shooter);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
|
@ -45,7 +45,8 @@ public class SpellFireBurst extends HomSpell
|
|||
if (!par2World.isRemote)
|
||||
{
|
||||
//par2World.spawnEntityInWorld(new EnergyBlastProjectile(par2World, par3EntityPlayer, damage));
|
||||
par2World.spawnEntityInWorld(new FireProjectile(par2World, par3EntityPlayer, 7));
|
||||
FireProjectile proj = new FireProjectile(par2World, par3EntityPlayer, 7);
|
||||
par2World.spawnEntityInWorld(proj);
|
||||
}
|
||||
|
||||
return par1ItemStack;
|
||||
|
|
|
@ -685,9 +685,7 @@ public class TEAltar extends TileEntity implements IInventory, IFluidTank, IFlui
|
|||
@Override
|
||||
public Packet getDescriptionPacket()
|
||||
{
|
||||
NBTTagCompound nbttagcompound = new NBTTagCompound();
|
||||
this.writeToNBT(nbttagcompound);
|
||||
return new S35PacketUpdateTileEntity(this.xCoord, this.yCoord, this.zCoord, 2, nbttagcompound);
|
||||
return NewPacketHandler.getPacket(this);
|
||||
}
|
||||
|
||||
public void handlePacketData(int[] intData, int[] fluidData, int capacity)
|
||||
|
|
Binary file not shown.
After Width: | Height: | Size: 923 B |
Loading…
Reference in a new issue