Bug fixes, closes #58 #57 #54 #53

This commit is contained in:
John Yorke committed 2018-01-28 13:15:52 -04:00
1 parent 091eff5b88
commit a6cdb42d64
21 files changed
+128 -107

No files matched your search

@@ -3,7 +3,7 @@ package taintedmagic.api;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.ItemStack;
public interface IEquipmentItemRenderer
public interface IRenderInventoryItem
{
abstract void render (EntityPlayer p, ItemStack s, float partialTicks);
}
@@ -2,13 +2,12 @@ package taintedmagic.client;
import cpw.mods.fml.client.FMLClientHandler;
import cpw.mods.fml.client.registry.RenderingRegistry;
import cpw.mods.fml.common.FMLCommonHandler;
import net.minecraft.client.Minecraft;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.world.World;
import net.minecraftforge.client.MinecraftForgeClient;
import net.minecraftforge.common.MinecraftForge;
import taintedmagic.client.handler.EquipmentItemRenderHandler;
import taintedmagic.client.handler.ClientHandler;
import taintedmagic.client.handler.HUDHandler;
import taintedmagic.client.renderer.RenderEntityDiffusion;
import taintedmagic.client.renderer.RenderEntityGlowpet;
@@ -31,7 +30,7 @@ public class ClientProxy extends CommonProxy
public void registerClientHandlers ()
{
MinecraftForge.EVENT_BUS.register(new HUDHandler());
MinecraftForge.EVENT_BUS.register(new EquipmentItemRenderHandler());
MinecraftForge.EVENT_BUS.register(new ClientHandler());
}
@Override
@@ -13,12 +13,15 @@ import net.minecraft.item.ItemStack;
import net.minecraft.potion.Potion;
import net.minecraftforge.client.event.RenderPlayerEvent;
import net.minecraftforge.event.entity.living.LivingEvent;
import taintedmagic.api.IEquipmentItemRenderer;
import taintedmagic.api.IRenderInventoryItem;
import taintedmagic.common.helper.TaintedMagicHelper;
import taintedmagic.common.items.tools.ItemKatana;
public class EquipmentItemRenderHandler
public class ClientHandler
{
/*
* Render items implementing IRenderInventoryItem
*/
@SubscribeEvent
public void onPlayerRender (RenderPlayerEvent.Specials.Post event)
{
@@ -30,9 +33,9 @@ public class EquipmentItemRenderHandler
for (int i = 0; i < 36; i++)
{
ItemStack s = inv[i];
if (s != null && s.getItem() instanceof IEquipmentItemRenderer && !rendering.contains(s.getItem()))
if (s != null && s.getItem() instanceof IRenderInventoryItem && !rendering.contains(s.getItem()))
{
((IEquipmentItemRenderer) s.getItem()).render(p, s, event.partialRenderTick);
((IRenderInventoryItem) s.getItem()).render(p, s, event.partialRenderTick);
rendering.add(s.getItem());
}
if (i == 36) rendering.clear();
@@ -5,7 +5,7 @@ import net.minecraft.client.multiplayer.WorldClient;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.world.World;
import net.minecraftforge.common.MinecraftForge;
import taintedmagic.client.handler.EquipmentItemRenderHandler;
import taintedmagic.client.handler.ClientHandler;
public class CommonProxy
{
@@ -10,10 +10,11 @@ import net.minecraftforge.common.util.EnumHelper;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
import taintedmagic.client.handler.EquipmentItemRenderHandler;
import taintedmagic.client.handler.ClientHandler;
import taintedmagic.common.handler.ConfigHandler;
import taintedmagic.common.handler.TaintedMagicEventHandler;
import taintedmagic.common.handler.TMEventHandler;
import taintedmagic.common.handler.UpdateHandler;
import taintedmagic.common.items.wand.foci.FocusUpgrades;
import taintedmagic.common.lib.LibInfo;
import taintedmagic.common.network.PacketHandler;
import taintedmagic.common.registry.BlockRegistry;
@@ -40,12 +41,12 @@ public class TaintedMagic
@SidedProxy (clientSide = "taintedmagic.client.ClientProxy", serverSide = "taintedmagic.common.CommonProxy")
public static CommonProxy proxy;
public static TaintedMagicEventHandler taintedMagicEvents;
public static TMEventHandler taintedMagicEvents;
public static CreativeTabs tabTaintedMagic = new TaintedMagicCreativeTab();
public static ConfigHandler configHandler;
public static final Logger log = LogManager.getLogger("TAINTEDMAGIC");
public static EnumRarity rarityCreation = EnumHelper.addRarity("CREATION", EnumChatFormatting.GOLD, "Creation");
// Pre init
@@ -78,12 +79,13 @@ public class TaintedMagic
{
log.info("Things seem to be going smoothly... Initializing Tainted Magic!");
taintedMagicEvents = new TaintedMagicEventHandler();
taintedMagicEvents = new TMEventHandler();
MinecraftForge.EVENT_BUS.register(taintedMagicEvents);
FMLCommonHandler.instance().bus().register(taintedMagicEvents);
proxy.registerRenderers();
FocusUpgrades.init();
}
// Post init
@@ -10,7 +10,7 @@ import net.minecraft.util.AxisAlignedBB;
import net.minecraft.world.IBlockAccess;
import net.minecraft.world.World;
import net.minecraftforge.common.util.ForgeDirection;
import taintedmagic.common.blocks.tile.TileEntityLumos;
import taintedmagic.common.blocks.tile.TileLumos;
import thaumcraft.common.config.Config;
import thaumcraft.common.config.ConfigItems;
import cpw.mods.fml.relauncher.Side;
@@ -123,6 +123,6 @@ public class BlockLumos extends Block implements ITileEntityProvider
@Override
public TileEntity createNewTileEntity (World w, int m)
{
return new TileEntityLumos();
return new TileLumos();
}
}
@@ -16,11 +16,11 @@ import thaumcraft.common.Thaumcraft;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
public class TileEntityLumos extends TileEntity
public class TileLumos extends TileEntity
{
int ticksExisted;
public TileEntityLumos ()
public TileLumos ()
{
}
@@ -10,7 +10,9 @@ import net.minecraft.entity.projectile.EntityThrowable;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.potion.Potion;
import net.minecraft.potion.PotionEffect;
import net.minecraft.util.ChunkCoordinates;
import net.minecraft.util.DamageSource;
import net.minecraft.util.MathHelper;
import net.minecraft.util.MovingObjectPosition;
import net.minecraft.world.World;
import cpw.mods.fml.relauncher.Side;
@@ -66,26 +66,25 @@ public class EntityTaintBubble extends EntityThrowable implements IEntityAdditio
public void onUpdate ()
{
this.motionX *= 0.95D;
this.motionY *= 0.95D;
this.motionZ *= 0.95D;
this.motionX *= 0.85D;
this.motionY *= 0.85D;
this.motionZ *= 0.85D;
// simulated taint swarm motion
ChunkCoordinates c = new ChunkCoordinates((int) this.posX + this.rand.nextInt(7) - this.rand.nextInt(7), (int) this.posY + this.rand.nextInt(6) - 2, (int) this.posZ + this.rand.nextInt(7) - this.rand.nextInt(7));
double varX = c.posX + 0.5D - this.posX;
double varY = c.posY + 0.1D - this.posY;
double varZ = c.posZ + 0.5D - this.posZ;
this.motionX += (Math.signum(varX) * 0.5D - this.motionX) * 0.02D;
this.motionY += (Math.signum(varY) * 0.7D - this.motionY) * 0.05D;
this.motionZ += (Math.signum(varZ) * 0.5D - this.motionZ) * 0.02D;
double x = c.posX + 0.5D - this.posX;
double y = c.posY + 0.1D - this.posY;
double z = c.posZ + 0.5D - this.posZ;
this.motionX += (Math.signum(x) * 0.5D - this.motionX) * 0.015D;
this.motionY += (Math.signum(y) * 0.7D - this.motionY) * 0.1D;
this.motionZ += (Math.signum(z) * 0.5D - this.motionZ) * 0.015D;
float angle = (float) (Math.atan2(this.motionZ, this.motionX) * 180.0D / Math.PI) - 90.0F;
float wrappedAngle = MathHelper.wrapAngleTo180_float(angle - this.rotationYaw);
this.rotationYaw += wrappedAngle;
float angle2 = MathHelper.wrapAngleTo180_float(angle - this.rotationYaw);
this.rotationYaw += angle2;
if (this.ticksExisted > 50) setDead();
if (this.onGround)
{
this.motionX *= 0.65D;
@@ -12,7 +12,6 @@ import net.minecraft.entity.ai.attributes.AttributeModifier;
import net.minecraft.entity.item.EntityItem;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.entity.player.EntityPlayerMP;
import net.minecraft.entity.player.InventoryPlayer;
import net.minecraft.inventory.IInventory;
import net.minecraft.item.ItemStack;
import net.minecraft.nbt.NBTTagCompound;
@@ -26,8 +25,6 @@ import net.minecraftforge.event.entity.living.LivingDropsEvent;
import net.minecraftforge.event.entity.living.LivingEvent;
import net.minecraftforge.event.entity.player.ItemTooltipEvent;
import taintedmagic.api.IBloodlust;
import taintedmagic.api.IEquipmentItemRenderer;
import taintedmagic.common.helper.TaintedMagicHelper;
import taintedmagic.common.items.wand.foci.FocusUpgrades;
import taintedmagic.common.items.wand.foci.ItemFocusMageMace;
import taintedmagic.common.registry.ItemRegistry;
@@ -41,10 +38,9 @@ import thaumcraft.common.Thaumcraft;
import thaumcraft.common.config.Config;
import thaumcraft.common.items.equipment.ItemCrimsonSword;
import thaumcraft.common.items.wands.ItemWandCasting;
import thaumcraft.common.lib.network.PacketHandler;
import thaumcraft.common.lib.network.playerdata.PacketResearchComplete;
public class TaintedMagicEventHandler
public class TMEventHandler
{
Random randy = new Random();
@@ -54,13 +50,14 @@ public class TaintedMagicEventHandler
if (event.entity instanceof EntityPlayer)
{
EntityPlayer p = (EntityPlayer) event.entity;
updateAttackDamage(p);
modifyAttackDamage(p);
for (int i = 0; i < p.inventory.getSizeInventory(); i++)
{
if (p.inventory.getStackInSlot(i) != null && p.inventory.getStackInSlot(i).stackTagCompound != null && p.inventory.getStackInSlot(i).stackTagCompound.getBoolean("voidtouched"))
ItemStack s = p.inventory.getStackInSlot(i);
if (s != null && s.stackTagCompound != null && s.stackTagCompound.getBoolean("voidtouched"))
{
ItemStack s = p.inventory.getStackInSlot(i);
if (!p.worldObj.isRemote && s.isItemDamaged() && p.ticksExisted % 20 == 0) s.damageItem(-1, (EntityLivingBase) p);
}
}
@@ -68,9 +65,9 @@ public class TaintedMagicEventHandler
}
/*
* Used to upate the attack dmg for the Mage'slot Mace focus
* some hacky code to make the mage's mace work
*/
public void updateAttackDamage (EntityPlayer p)
public void modifyAttackDamage (EntityPlayer p)
{
if (!p.worldObj.isRemote)
{
@@ -196,14 +193,14 @@ public class TaintedMagicEventHandler
if (!ThaumcraftApiHelper.isResearchComplete(p.getCommandSenderName(), "CREATION") && ThaumcraftApiHelper.isResearchComplete(p.getCommandSenderName(), "CREATIONSHARD"))
{
Thaumcraft.proxy.getResearchManager().completeResearch(p, "CREATION");
PacketHandler.INSTANCE.sendTo(new PacketResearchComplete("CREATION"), (EntityPlayerMP) p);
thaumcraft.common.lib.network.PacketHandler.INSTANCE.sendTo(new PacketResearchComplete("CREATION"), (EntityPlayerMP) p);
p.addChatMessage(new ChatComponentText("\u00A75" + StatCollector.translateToLocal("text.creation")));
p.playSound("thaumcraft:wind", 1.0F, 5.0F);
if (!ThaumcraftApiHelper.isResearchComplete(p.getCommandSenderName(), "OUTERREV") && ThaumcraftApiHelper.isResearchComplete(p.getCommandSenderName(), "CREATION"))
{
Thaumcraft.proxy.getResearchManager().completeResearch(p, "OUTERREV");
PacketHandler.INSTANCE.sendTo(new PacketResearchComplete("OUTERREV"), (EntityPlayerMP) p);
thaumcraft.common.lib.network.PacketHandler.INSTANCE.sendTo(new PacketResearchComplete("OUTERREV"), (EntityPlayerMP) p);
}
try
@@ -41,7 +41,7 @@ public class TaintedMagicHelper
return false;
}
public static Vector3 getDistanceBetween (Entity e, Entity target)
public static Vector3 getVectorBetweenEntities (Entity e, Entity target)
{
Vector3 fromPosition = new Vector3(e.posX, e.posY, e.posZ);
Vector3 toPosition = new Vector3(target.posX, target.posY, target.posZ);
@@ -19,27 +19,24 @@ import net.minecraft.item.EnumRarity;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.potion.Potion;
import net.minecraft.util.ResourceLocation;
import net.minecraftforge.client.event.RenderPlayerEvent;
import net.minecraftforge.common.MinecraftForge;
import net.minecraftforge.event.entity.living.LivingEvent;
import taintedmagic.api.IEquipmentItemRenderer;
import taintedmagic.api.IRenderInventoryItem;
import taintedmagic.common.TaintedMagic;
import taintedmagic.common.helper.TaintedMagicHelper;
import taintedmagic.common.items.tools.ItemKatana;
import thaumcraft.api.IWarpingGear;
import thaumcraft.api.aspects.Aspect;
import thaumcraft.api.aspects.AspectList;
import thaumcraft.client.lib.UtilsFX;
import thaumcraft.codechicken.lib.vec.Vector3;
public class ItemFlyteCharm extends Item implements IWarpingGear, IEquipmentItemRenderer
public class ItemFlyteCharm extends Item implements IWarpingGear, IRenderInventoryItem
{
boolean isFlying = false;
static final int maxBurstCooldown = 40;
static final AspectList cost = new AspectList().add(Aspect.AIR, 10);
static final AspectList cost = new AspectList().add(Aspect.AIR, 15);
static final String TAG_SPRINTING = "isSprinting";
static final String TAG_COOLDOWN = "cooldown";
@@ -104,7 +101,7 @@ public class ItemFlyteCharm extends Item implements IWarpingGear, IEquipmentItem
for (int i = 0; i < inv.getSizeInventory(); i++)
{
ItemStack stackInSlot = inv.getStackInSlot(i);
if (stackInSlot != null && stackInSlot.getItem() instanceof ItemKatana)
if (stackInSlot != null && stackInSlot.getItem() instanceof ItemFlyteCharm)
{
s = stackInSlot;
break;
@@ -20,6 +20,7 @@ import net.minecraft.item.EnumAction;
import net.minecraft.item.EnumRarity;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.potion.Potion;
import net.minecraft.potion.PotionEffect;
import net.minecraft.server.MinecraftServer;
@@ -30,8 +31,8 @@ import net.minecraft.util.MovingObjectPosition;
import net.minecraft.util.ResourceLocation;
import net.minecraft.util.StatCollector;
import net.minecraft.world.World;
import taintedmagic.api.IEquipmentItemRenderer;
import taintedmagic.api.IHeldItemHUD;
import taintedmagic.api.IRenderInventoryItem;
import taintedmagic.client.model.ModelKatana;
import taintedmagic.client.model.ModelSaya;
import taintedmagic.common.TaintedMagic;
@@ -44,7 +45,7 @@ import thaumcraft.client.lib.UtilsFX;
import thaumcraft.common.config.Config;
import thaumcraft.common.entities.projectile.EntityExplosiveOrb;
public class ItemKatana extends Item implements IWarpingGear, IRepairable, IEquipmentItemRenderer, IHeldItemHUD
public class ItemKatana extends Item implements IWarpingGear, IRepairable, IRenderInventoryItem, IHeldItemHUD
{
public static final int SUBTYPES = 3;
@@ -245,7 +246,7 @@ public class ItemKatana extends Item implements IWarpingGear, IRepairable, IEqui
case 0 :
{
EntityExplosiveOrb proj = new EntityExplosiveOrb(w, p);
proj.strength = getAttackDamage(s) * 2.0F;
proj.strength = getAttackDamage(s) * 0.5F;
proj.posX += proj.motionX;
proj.posY += proj.motionY;
proj.posZ += proj.motionZ;
@@ -270,6 +271,8 @@ public class ItemKatana extends Item implements IWarpingGear, IRepairable, IEqui
break;
}
}
s.stackTagCompound = new NBTTagCompound();
s.getTagCompound().setInteger("inscription", 1);
}
private boolean isFullyCharged (EntityPlayer p)
@@ -7,13 +7,32 @@ import thaumcraft.api.wands.FocusUpgradeType;
public class FocusUpgrades
{
public static int ID = Short.MAX_VALUE;
public static FocusUpgradeType sanity = new FocusUpgradeType(ID--, new ResourceLocation("taintedmagic:textures/foci/IconSanity.png"), "focus.upgrade.sanity.name", "focus.upgrade.sanity.text", new AspectList().add(Aspect.MIND, 1).add(Aspect.HEAL, 1));
public static FocusUpgradeType bloodlust = new FocusUpgradeType(ID--, new ResourceLocation("taintedmagic:textures/foci/IconBloodlust.png"), "focus.upgrade.bloodlust.name", "focus.upgrade.bloodlust.text", new AspectList().add(Aspect.WEAPON, 1).add(Aspect.HEAL, 1));
public static FocusUpgradeType antibody = new FocusUpgradeType(ID--, new ResourceLocation("taintedmagic:textures/foci/IconAntibody.png"), "focus.upgrade.antibody.name", "focus.upgrade.antibody.text", new AspectList().add(Aspect.TAINT, 1).add(Aspect.HEAL, 1));
public static FocusUpgradeType corrosive = new FocusUpgradeType(ID--, new ResourceLocation("taintedmagic:textures/foci/IconCorrosive.png"), "focus.upgrade.corrosive.name", "focus.upgrade.corrosive.text", new AspectList().add(Aspect.TAINT, 1).add(Aspect.POISON, 1));
public static FocusUpgradeType persistent = new FocusUpgradeType(ID--, new ResourceLocation("taintedmagic:textures/foci/IconPersistent.png"), "focus.upgrade.persistent.name", "focus.upgrade.persistent.text", new AspectList().add(Aspect.ARMOR, 1).add(Aspect.MOTION, 1).add(Aspect.ENERGY, 1));
public static FocusUpgradeType maxima = new FocusUpgradeType(ID--, new ResourceLocation("taintedmagic:textures/foci/IconMaxima.png"), "focus.upgrade.maxima.name", "focus.upgrade.maxima.text", new AspectList().add(Aspect.LIGHT, 4).add(Aspect.AURA, 1).add(Aspect.ENERGY, 4));
public static FocusUpgradeType glowpet = new FocusUpgradeType(ID--, new ResourceLocation("taintedmagic:textures/foci/IconGlowpet.png"), "focus.upgrade.glowpet.name", "focus.upgrade.glowpet.text", new AspectList().add(Aspect.MOTION, 1).add(Aspect.LIGHT, 4).add(Aspect.ENERGY, 4));
public static FocusUpgradeType diffusion = new FocusUpgradeType(ID--, new ResourceLocation("taintedmagic:textures/foci/IconDiffusion.png"), "focus.upgrade.diffusion.name", "focus.upgrade.diffusion.text", new AspectList().add(Aspect.DARKNESS, 1).add(Aspect.ELDRITCH, 4).add(Aspect.AURA, 4));
public static FocusUpgradeType sanity;
public static FocusUpgradeType bloodlust;
public static FocusUpgradeType antibody;
public static FocusUpgradeType corrosive;
public static FocusUpgradeType persistent;
public static FocusUpgradeType maxima;
public static FocusUpgradeType glowpet;
public static FocusUpgradeType diffusion;
public static void init ()
{
int ID = 60;
sanity = new FocusUpgradeType(ID--, new ResourceLocation("taintedmagic:textures/foci/IconSanity.png"), "focus.upgrade.sanity.name", "focus.upgrade.sanity.text", new AspectList().add(Aspect.MIND, 1).add(Aspect.HEAL, 1));
bloodlust = new FocusUpgradeType(ID--, new ResourceLocation("taintedmagic:textures/foci/IconBloodlust.png"), "focus.upgrade.bloodlust.name", "focus.upgrade.bloodlust.text", new AspectList().add(Aspect.WEAPON, 1).add(Aspect.HEAL, 1));
antibody = new FocusUpgradeType(ID--, new ResourceLocation("taintedmagic:textures/foci/IconAntibody.png"), "focus.upgrade.antibody.name", "focus.upgrade.antibody.text", new AspectList().add(Aspect.TAINT, 1).add(Aspect.HEAL, 1));
corrosive = new FocusUpgradeType(ID--, new ResourceLocation("taintedmagic:textures/foci/IconCorrosive.png"), "focus.upgrade.corrosive.name", "focus.upgrade.corrosive.text", new AspectList().add(Aspect.TAINT, 1).add(Aspect.POISON, 1));
persistent = new FocusUpgradeType(ID--, new ResourceLocation("taintedmagic:textures/foci/IconPersistent.png"), "focus.upgrade.persistent.name", "focus.upgrade.persistent.text", new AspectList().add(Aspect.ARMOR, 1).add(Aspect.MOTION, 1).add(Aspect.ENERGY, 1));
maxima = new FocusUpgradeType(ID--, new ResourceLocation("taintedmagic:textures/foci/IconMaxima.png"), "focus.upgrade.maxima.name", "focus.upgrade.maxima.text", new AspectList().add(Aspect.LIGHT, 4).add(Aspect.AURA, 1).add(Aspect.ENERGY, 4));
glowpet = new FocusUpgradeType(ID--, new ResourceLocation("taintedmagic:textures/foci/IconGlowpet.png"), "focus.upgrade.glowpet.name", "focus.upgrade.glowpet.text", new AspectList().add(Aspect.MOTION, 1).add(Aspect.LIGHT, 4).add(Aspect.ENERGY, 4));
diffusion = new FocusUpgradeType(ID--, new ResourceLocation("taintedmagic:textures/foci/IconDiffusion.png"), "focus.upgrade.diffusion.name", "focus.upgrade.diffusion.text", new AspectList().add(Aspect.DARKNESS, 1).add(Aspect.ELDRITCH, 4).add(Aspect.AURA, 4));
}
}
@@ -96,38 +96,39 @@ public class ItemFocusLumos extends ItemFocusBasic
if (mop != null && mop.typeOfHit == MovingObjectPosition.MovingObjectType.BLOCK && !p.isSneaking())
{
if (wand.consumeAllVis(s, p, getVisCost(s), true, false))
int x = mop.blockX;
int y = mop.blockY;
int z = mop.blockZ;
if (!w.getBlock(x, y, z).getMaterial().isReplaceable()) switch (mop.sideHit)
{
int x = mop.blockX;
int y = mop.blockY;
int z = mop.blockZ;
switch (mop.sideHit)
case 0 :
y--;
break;
case 1 :
y++;
break;
case 2 :
z--;
break;
case 3 :
z++;
break;
case 4 :
x--;
break;
case 5 :
x++;
}
if (w.getBlock(x, y, z).getMaterial().isReplaceable())
{
if (wand.consumeAllVis(s, p, getVisCost(s), true, false))
{
case 0 :
y--;
break;
case 1 :
y++;
break;
case 2 :
z--;
break;
case 3 :
z++;
break;
case 4 :
x--;
break;
case 5 :
x++;
}
if (!w.isRemote) w.setBlock(x, y, z, BlockRegistry.BlockLumos, 2, 3);
w.playSoundAtEntity(p, "thaumcraft:ice", 0.3F, 1.1F + w.rand.nextFloat() * 0.1F);
if (!w.isRemote) w.setBlock(x, y, z, BlockRegistry.BlockLumos, 2, 3);
w.playSoundAtEntity(p, "thaumcraft:ice", 0.3F, 1.1F + w.rand.nextFloat() * 0.1F);
for (int a = 0; a < 9; a++)
{
if (w.isRemote) spawnLumosParticles(w, x, y, z);
for (int a = 0; a < 9; a++)
if (w.isRemote) spawnLumosParticles(w, x, y, z);
}
}
}
@@ -113,7 +113,7 @@ public class ItemFocusTaintedShockwave extends ItemFocusBasic
{
double dist = TaintedMagicHelper.getDistanceTo(e.posX, e.posY, e.posZ, p);
if (dist < 7.0D) e.attackEntityFrom(DamageSource.magic, 2.0F);
Vector3 movement = TaintedMagicHelper.getDistanceBetween(e, p);
Vector3 movement = TaintedMagicHelper.getVectorBetweenEntities(e, p);
e.addVelocity(movement.x * 3, 0.8, movement.z * 3);
}
}
@@ -1,5 +1,6 @@
package taintedmagic.common.registry;
import cpw.mods.fml.common.registry.GameRegistry;
import net.minecraft.block.Block;
import taintedmagic.common.blocks.BlockLumos;
import taintedmagic.common.blocks.BlockShadowOre;
@@ -8,10 +9,9 @@ import taintedmagic.common.blocks.BlockWarpwoodLeaves;
import taintedmagic.common.blocks.BlockWarpwoodLog;
import taintedmagic.common.blocks.BlockWarpwoodPlanks;
import taintedmagic.common.blocks.BlockWarpwoodSapling;
import taintedmagic.common.blocks.tile.TileEntityLumos;
import taintedmagic.common.blocks.tile.TileLumos;
import taintedmagic.common.items.blocks.ItemBlockShadowOre;
import taintedmagic.common.items.blocks.ItemBlockWarpwoodSapling;
import cpw.mods.fml.common.registry.GameRegistry;
public class BlockRegistry
{
@@ -49,7 +49,7 @@ public class BlockRegistry
public static void initTiles ()
{
// Lumos
GameRegistry.registerTileEntity(TileEntityLumos.class, "TileEntityLumos");
GameRegistry.registerTileEntity(TileLumos.class, "TileLumos");
}
public static Block BlockShadowOre;
@@ -1,5 +1,6 @@
package taintedmagic.common.registry;
import cpw.mods.fml.common.registry.GameRegistry;
import net.minecraft.item.Item;
import net.minecraft.item.ItemArmor.ArmorMaterial;
import net.minecraft.item.ItemAxe;
@@ -43,7 +44,6 @@ import taintedmagic.common.lib.LibToolMaterials;
import thaumcraft.api.wands.StaffRod;
import thaumcraft.api.wands.WandCap;
import thaumcraft.api.wands.WandRod;
import cpw.mods.fml.common.registry.GameRegistry;
public class ItemRegistry
{