mirror of
https://github.com/GTNewHorizons/Tainted-Magic.git
synced 2026-11-26 06:43:06 +00:00
New focus, texture improvements, text improvements, katana inscription rework, and bug fixes
This commit is contained in:
1 parent
7ab0f6e298
commit
bda9d5056d
49 files changed
+553
-490
No files matched your search
@@ -9,17 +9,19 @@ import net.minecraft.world.World;
|
||||
import net.minecraftforge.client.MinecraftForgeClient;
|
||||
import net.minecraftforge.common.MinecraftForge;
|
||||
import taintedmagic.client.handler.HUDHandler;
|
||||
import taintedmagic.client.renderer.RenderEntityHomingShard;
|
||||
import taintedmagic.client.renderer.RenderEntityTaintBubble;
|
||||
import taintedmagic.client.renderer.RenderItemKatana;
|
||||
import taintedmagic.client.renderer.RenderTaintBubble;
|
||||
import taintedmagic.common.CommonProxy;
|
||||
import taintedmagic.common.entities.EntityEldritchOrbAttack;
|
||||
import taintedmagic.common.entities.EntityHomingShard;
|
||||
import taintedmagic.common.entities.EntityTaintBubble;
|
||||
import taintedmagic.common.helper.TaintedMagicHelper;
|
||||
import taintedmagic.common.helper.Vector3;
|
||||
import taintedmagic.common.registry.ItemRegistry;
|
||||
import thaumcraft.client.fx.ParticleEngine;
|
||||
import thaumcraft.client.fx.particles.FXWisp;
|
||||
import thaumcraft.client.renderers.entity.RenderEldritchOrb;
|
||||
import thaumcraft.codechicken.lib.vec.Vector3;
|
||||
import cpw.mods.fml.client.registry.RenderingRegistry;
|
||||
import cpw.mods.fml.relauncher.ReflectionHelper;
|
||||
|
||||
@@ -29,8 +31,9 @@ public class ClientProxy extends CommonProxy
|
||||
public void initRenders ()
|
||||
{
|
||||
// Entities
|
||||
RenderingRegistry.registerEntityRenderingHandler(EntityTaintBubble.class, new RenderTaintBubble());
|
||||
RenderingRegistry.registerEntityRenderingHandler(EntityTaintBubble.class, new RenderEntityTaintBubble());
|
||||
RenderingRegistry.registerEntityRenderingHandler(EntityEldritchOrbAttack.class, new RenderEldritchOrb());
|
||||
RenderingRegistry.registerEntityRenderingHandler(EntityHomingShard.class, new RenderEntityHomingShard());
|
||||
|
||||
// Items
|
||||
MinecraftForgeClient.registerItemRenderer(ItemRegistry.ItemKatana, new RenderItemKatana());
|
||||
@@ -79,43 +82,4 @@ public class ClientProxy extends CommonProxy
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void spawnWindParticles (World w)
|
||||
{
|
||||
EntityPlayer p = getClientPlayer();
|
||||
Random r = new Random();
|
||||
|
||||
for (int i = 1; i < 200; i++)
|
||||
{
|
||||
double xp = (-Math.random() * 2.0F) + (Math.random() * 2.0F);
|
||||
double zp = (-Math.random() * 2.0F) + (Math.random() * 2.0F);
|
||||
double yp = (-Math.random() * 2.0F) + (Math.random() * 2.0F);
|
||||
double off = Math.random() * 0.1;
|
||||
|
||||
float red = (0.8F + p.worldObj.rand.nextFloat() * 0.5F);
|
||||
float green = (0.8F + p.worldObj.rand.nextFloat() * 0.5F);
|
||||
float blue = (0.6F + p.worldObj.rand.nextFloat() * 0.5F);
|
||||
|
||||
FXWisp ef = new FXWisp(w, p.posX + xp + off, p.posY + yp + off, p.posZ + zp + off, 0.5F + ((float) Math.random() * 0.25F), red, green, blue);
|
||||
ef.setGravity(0.0F);
|
||||
ef.shrink = true;
|
||||
ef.noClip = true;
|
||||
|
||||
int age = 30 + r.nextInt(50);
|
||||
|
||||
try
|
||||
{
|
||||
ReflectionHelper.setPrivateValue(EntityFX.class, ef, age, "particleMaxAge");
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
e.printStackTrace();
|
||||
}
|
||||
Vector3 movement = TaintedMagicHelper.getDistanceBetween(ef, p);
|
||||
ef.addVelocity(movement.x * 0.5, movement.y * 0.5, movement.z * 0.5);
|
||||
|
||||
ParticleEngine.instance.addEffect(w, ef);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,89 @@
|
||||
package taintedmagic.client.renderer;
|
||||
|
||||
import java.util.Random;
|
||||
|
||||
import net.minecraft.client.renderer.Tessellator;
|
||||
import net.minecraft.client.renderer.entity.Render;
|
||||
import net.minecraft.client.renderer.texture.TextureMap;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import taintedmagic.common.entities.EntityHomingShard;
|
||||
import thaumcraft.client.fx.ParticleEngine;
|
||||
|
||||
/**
|
||||
* this class is based off of RenderHomingShard.class created by <Azanor> as
|
||||
* part of Thaumcraft 5
|
||||
*/
|
||||
public class RenderEntityHomingShard extends Render
|
||||
{
|
||||
public RenderEntityHomingShard ()
|
||||
{
|
||||
super();
|
||||
this.shadowSize = 0.0F;
|
||||
}
|
||||
|
||||
public void renderEntityAt (EntityHomingShard e, double x, double y, double z, float fq, float pt)
|
||||
{
|
||||
Tessellator t = Tessellator.instance;
|
||||
|
||||
GL11.glPushMatrix();
|
||||
GL11.glDepthMask(false);
|
||||
GL11.glEnable(3042);
|
||||
GL11.glBlendFunc(770, 771);
|
||||
|
||||
bindTexture(ParticleEngine.particleTexture);
|
||||
|
||||
float f2 = (8 + e.ticksExisted % 8) / 16.0F;
|
||||
float f3 = f2 + 0.0625F;
|
||||
float f4 = 0.25F;
|
||||
float f5 = f4 + 0.0625F;
|
||||
|
||||
float f6 = 1.0F;
|
||||
float f7 = 0.5F;
|
||||
float f8 = 0.5F;
|
||||
|
||||
GL11.glColor4f(0.405F, 0.075F, 0.525F, 1.0F);
|
||||
|
||||
GL11.glPushMatrix();
|
||||
GL11.glTranslated(x, y, z);
|
||||
GL11.glRotatef(180.0F - this.renderManager.playerViewY, 0.0F, 1.0F, 0.0F);
|
||||
GL11.glRotatef(-this.renderManager.playerViewX, 1.0F, 0.0F, 0.0F);
|
||||
GL11.glScalef(0.4F + 0.1F * e.getStrength(), 0.4F + 0.1F * e.getStrength(), 0.4F + 0.1F * e.getStrength());
|
||||
|
||||
t.startDrawingQuads();
|
||||
|
||||
t.setColorRGBA_F(0.405F, 0.075F, 0.525F, 1.0F);
|
||||
t.setNormal(0.0F, 1.0F, 0.0F);
|
||||
t.setBrightness(240);
|
||||
|
||||
t.addVertexWithUV(-f7, -f8, 0.0D, f2, f5);
|
||||
t.addVertexWithUV(f6 - f7, -f8, 0.0D, f3, f5);
|
||||
t.addVertexWithUV(f6 - f7, 1.0F - f8, 0.0D, f3, f4);
|
||||
t.addVertexWithUV(-f7, 1.0F - f8, 0.0D, f2, f4);
|
||||
|
||||
t.draw();
|
||||
|
||||
GL11.glPopMatrix();
|
||||
|
||||
GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
|
||||
GL11.glBlendFunc(770, 771);
|
||||
GL11.glDisable(3042);
|
||||
GL11.glDisable(32826);
|
||||
|
||||
GL11.glDepthMask(true);
|
||||
GL11.glPopMatrix();
|
||||
}
|
||||
|
||||
public void doRender (Entity e, double x, double y, double z, float f, float pt)
|
||||
{
|
||||
renderEntityAt((EntityHomingShard) e, x, y, z, f, pt);
|
||||
}
|
||||
|
||||
protected ResourceLocation getEntityTexture (Entity e)
|
||||
{
|
||||
return TextureMap.locationBlocksTexture;
|
||||
}
|
||||
}
|
||||
+3
-3
@@ -12,12 +12,12 @@ import org.lwjgl.opengl.GL11;
|
||||
|
||||
import taintedmagic.common.entities.EntityTaintBubble;
|
||||
|
||||
public class RenderTaintBubble extends Render
|
||||
public class RenderEntityTaintBubble extends Render
|
||||
{
|
||||
private static final ResourceLocation texture = new ResourceLocation("taintedmagic:textures/entities/EntityTaintBubble.png");
|
||||
private Random random = new Random();
|
||||
|
||||
public RenderTaintBubble ()
|
||||
public RenderEntityTaintBubble ()
|
||||
{
|
||||
this.shadowSize = 0.0F;
|
||||
}
|
||||
@@ -47,7 +47,7 @@ public class RenderTaintBubble extends Render
|
||||
float f7 = 0.5F;
|
||||
float f8 = 0.5F;
|
||||
|
||||
float s = 0.5F;
|
||||
float s = 0.25F;
|
||||
|
||||
GL11.glScalef(s, s, s);
|
||||
|
||||
@@ -30,8 +30,4 @@ public class CommonProxy
|
||||
public void spawnShockwaveParticles (World w)
|
||||
{
|
||||
}
|
||||
|
||||
public void spawnWindParticles (World w)
|
||||
{
|
||||
}
|
||||
}
|
||||
@@ -18,13 +18,13 @@ import taintedmagic.common.handler.ConfigHandler;
|
||||
import taintedmagic.common.handler.TaintedMagicEventHandler;
|
||||
import taintedmagic.common.handler.UpdateHandler;
|
||||
import taintedmagic.common.lib.LibCreativeTab;
|
||||
import taintedmagic.common.lib.LibRecipes;
|
||||
import taintedmagic.common.lib.LibStrings;
|
||||
import taintedmagic.common.network.PacketHandler;
|
||||
import taintedmagic.common.registry.BlockRegistry;
|
||||
import taintedmagic.common.registry.ItemRegistry;
|
||||
import taintedmagic.common.registry.ModEntityRegistry;
|
||||
import taintedmagic.common.registry.OreDictionaryRegistry;
|
||||
import taintedmagic.common.registry.RecipeRegistry;
|
||||
import taintedmagic.common.registry.ResearchRegistry;
|
||||
import thaumcraft.api.aspects.Aspect;
|
||||
import thaumcraft.api.aspects.AspectList;
|
||||
@@ -68,7 +68,9 @@ public class TaintedMagic
|
||||
ItemRegistry.init();
|
||||
BlockRegistry.init();
|
||||
ModEntityRegistry.init();
|
||||
LibRecipes.init();
|
||||
RecipeRegistry.init();
|
||||
|
||||
OreDictionaryRegistry.init();
|
||||
|
||||
if (configHandler.useUpdateHandler) UpdateHandler.init();
|
||||
}
|
||||
@@ -94,7 +96,6 @@ public class TaintedMagic
|
||||
log.info("Almost done... Post-initializing Tainted Magic!");
|
||||
|
||||
ResearchRegistry.initResearch();
|
||||
OreDictionaryRegistry.init();
|
||||
|
||||
log.info("Phew! Tainted Magic has finished loading, enjoy!");
|
||||
}
|
||||
|
||||
@@ -0,0 +1,182 @@
|
||||
package taintedmagic.common.entities;
|
||||
|
||||
import io.netty.buffer.ByteBuf;
|
||||
|
||||
import java.util.ArrayList;
|
||||
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
import net.minecraft.entity.projectile.EntityThrowable;
|
||||
import net.minecraft.util.DamageSource;
|
||||
import net.minecraft.util.MathHelper;
|
||||
import net.minecraft.util.MovingObjectPosition;
|
||||
import net.minecraft.util.Vec3;
|
||||
import net.minecraft.world.World;
|
||||
import thaumcraft.common.Thaumcraft;
|
||||
import thaumcraft.common.lib.utils.EntityUtils;
|
||||
import cpw.mods.fml.common.registry.IEntityAdditionalSpawnData;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
|
||||
/**
|
||||
* this class is based off of EntityHomingShard.class created by <Azanor> as
|
||||
* part of Thaumcraft 5
|
||||
*/
|
||||
public class EntityHomingShard extends EntityThrowable implements IEntityAdditionalSpawnData
|
||||
{
|
||||
Class tClass = null;
|
||||
boolean persistant = false;
|
||||
|
||||
int targetID = 0;
|
||||
EntityLivingBase target;
|
||||
|
||||
public EntityHomingShard (World w)
|
||||
{
|
||||
super(w);
|
||||
}
|
||||
|
||||
public EntityHomingShard (World w, EntityLivingBase p, EntityLivingBase t, int strength, boolean b)
|
||||
{
|
||||
super(w, p);
|
||||
this.target = t;
|
||||
this.tClass = t.getClass();
|
||||
this.persistant = b;
|
||||
setStrength(strength);
|
||||
Vec3 v = p.getLookVec();
|
||||
setLocationAndAngles(p.posX + v.xCoord / 2.0D, p.posY + p.getEyeHeight() + v.yCoord / 2.0D, p.posZ + v.zCoord / 2.0D, p.rotationYaw, p.rotationPitch);
|
||||
float f = 0.5F;
|
||||
float ry = p.rotationYaw + (this.rand.nextFloat() - this.rand.nextFloat()) * 60.0F;
|
||||
float rp = p.rotationPitch + (this.rand.nextFloat() - this.rand.nextFloat()) * 60.0F;
|
||||
this.motionX = (-MathHelper.sin(ry / 180.0F * (float) Math.PI) * MathHelper.cos(rp / 180.0F * (float) Math.PI) * f);
|
||||
this.motionZ = (MathHelper.cos(ry / 180.0F * (float) Math.PI) * MathHelper.cos(rp / 180.0F * (float) Math.PI) * f);
|
||||
this.motionY = (-MathHelper.sin(rp / 180.0F * (float) Math.PI) * f);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void entityInit ()
|
||||
{
|
||||
super.entityInit();
|
||||
this.dataWatcher.addObject(17, (byte) 0);
|
||||
}
|
||||
|
||||
public void setStrength (int str)
|
||||
{
|
||||
this.dataWatcher.updateObject(17, Byte.valueOf((byte) str));
|
||||
}
|
||||
|
||||
public int getStrength ()
|
||||
{
|
||||
return this.dataWatcher.getWatchableObjectByte(17);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected float getGravityVelocity ()
|
||||
{
|
||||
return 0.0F;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void writeSpawnData (ByteBuf buf)
|
||||
{
|
||||
int id = -1;
|
||||
if (this.target != null) id = this.target.getEntityId();
|
||||
buf.writeInt(id);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void readSpawnData (ByteBuf buf)
|
||||
{
|
||||
int id = buf.readInt();
|
||||
try
|
||||
{
|
||||
if (id >= 0) this.target = ((EntityLivingBase) this.worldObj.getEntityByID(id));
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onImpact (MovingObjectPosition mop)
|
||||
{
|
||||
if (!this.worldObj.isRemote && mop.typeOfHit == MovingObjectPosition.MovingObjectType.ENTITY && (getThrower() == null || (getThrower() != null && mop.entityHit != getThrower())))
|
||||
{
|
||||
mop.entityHit.attackEntityFrom(DamageSource.causeIndirectMagicDamage(this, getThrower()), 2.0F + getStrength() * 0.5F);
|
||||
this.worldObj.playSoundAtEntity(this, "thaumcraft:zap", 1.0F, 1.0F + (this.rand.nextFloat() - this.rand.nextFloat()) * 0.2F);
|
||||
this.worldObj.setEntityState(this, (byte) 16);
|
||||
setDead();
|
||||
}
|
||||
|
||||
if (mop.typeOfHit == MovingObjectPosition.MovingObjectType.BLOCK && this.worldObj.getBlock(mop.blockX, mop.blockY, mop.blockZ).isOpaqueCube())
|
||||
{
|
||||
this.motionZ *= -0.5D;
|
||||
this.motionX *= -0.5D;
|
||||
this.motionY *= -0.5D;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly (Side.CLIENT)
|
||||
public void handleHealthUpdate (byte b)
|
||||
{
|
||||
if (b == 16) Thaumcraft.proxy.burst(worldObj, this.posX, this.posY, this.posZ, 0.3F);
|
||||
else super.handleHealthUpdate(b);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onUpdate ()
|
||||
{
|
||||
double motion = Math.abs(this.motionX) + Math.abs(this.motionY) + Math.abs(this.motionZ);
|
||||
if (motion > 0.0D && this.worldObj.isRemote) Thaumcraft.proxy.sparkle((float) this.posX + (this.worldObj.rand.nextFloat() - this.worldObj.rand.nextFloat()) * 0.25F, (float) this.posY + (this.worldObj.rand.nextFloat() - this.worldObj.rand.nextFloat()) * 0.25F, (float) this.posZ + (this.worldObj.rand.nextFloat() - this.worldObj.rand.nextFloat()) * 0.25F, 0.5F, 0, 0.0F);
|
||||
|
||||
super.onUpdate();
|
||||
|
||||
if (!this.worldObj.isRemote)
|
||||
{
|
||||
if (this.persistant && (this.target == null || this.target.isDead || this.target.getDistanceSqToEntity(this) > 1250.0D))
|
||||
{
|
||||
ArrayList<Entity> ents = EntityUtils.getEntitiesInRange(this.worldObj, this.posX, this.posY, this.posZ, this, this.tClass, 16.0D);
|
||||
|
||||
for (Entity e : ents)
|
||||
{
|
||||
if (e instanceof EntityLivingBase && !e.isDead && (getThrower() == null || e.getEntityId() != getThrower().getEntityId()))
|
||||
{
|
||||
this.target = ((EntityLivingBase) e);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (this.target == null || this.target.isDead)
|
||||
{
|
||||
this.worldObj.setEntityState(this, (byte) 16);
|
||||
setDead();
|
||||
}
|
||||
}
|
||||
|
||||
if (this.ticksExisted > 300)
|
||||
{
|
||||
this.worldObj.setEntityState(this, (byte) 16);
|
||||
setDead();
|
||||
}
|
||||
|
||||
if (this.ticksExisted % 20 == 0 && this.target != null && !this.target.isDead)
|
||||
{
|
||||
double d = getDistanceToEntity(this.target);
|
||||
double dx = this.target.posX - this.posX;
|
||||
double dy = this.target.boundingBox.minY + this.target.height * 0.6D - this.posY;
|
||||
double dz = this.target.posZ - this.posZ;
|
||||
dx /= d;
|
||||
dy /= d;
|
||||
dz /= d;
|
||||
|
||||
this.motionX = dx;
|
||||
this.motionY = dy;
|
||||
this.motionZ = dz;
|
||||
|
||||
this.worldObj.playSoundAtEntity(this, "taintedmagic:shard", 0.1F, 2.0F * this.worldObj.rand.nextFloat());
|
||||
}
|
||||
this.motionX *= 0.85D;
|
||||
this.motionY *= 0.85D;
|
||||
this.motionZ *= 0.85D;
|
||||
}
|
||||
}
|
||||
@@ -23,7 +23,7 @@ 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.common.items.wand.ItemFocusMageMace;
|
||||
import taintedmagic.common.items.wand.foci.ItemFocusMageMace;
|
||||
import taintedmagic.common.registry.ItemRegistry;
|
||||
import thaumcraft.api.ThaumcraftApiHelper;
|
||||
import thaumcraft.api.aspects.Aspect;
|
||||
|
||||
@@ -3,9 +3,11 @@ package taintedmagic.common.helper;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.Vec3;
|
||||
import taintedmagic.api.IBloodlust;
|
||||
import thaumcraft.api.aspects.Aspect;
|
||||
import thaumcraft.api.aspects.AspectList;
|
||||
import thaumcraft.codechicken.lib.vec.Vector3;
|
||||
|
||||
public class TaintedMagicHelper
|
||||
{
|
||||
|
||||
@@ -1,297 +0,0 @@
|
||||
/**
|
||||
* This class was created by <ChickenBones>. It's distributed as
|
||||
* part of the the Tainted Magic mod.
|
||||
**/
|
||||
package taintedmagic.common.helper;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.math.MathContext;
|
||||
import java.math.RoundingMode;
|
||||
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.AxisAlignedBB;
|
||||
import net.minecraft.util.Vec3;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
import org.lwjgl.util.vector.Vector3f;
|
||||
import org.lwjgl.util.vector.Vector4f;
|
||||
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
|
||||
public class Vector3
|
||||
{
|
||||
public static Vector3 zero = new Vector3();
|
||||
public static Vector3 one = new Vector3(1, 1, 1);
|
||||
public static Vector3 center = new Vector3(0.5, 0.5, 0.5);
|
||||
|
||||
public double x;
|
||||
public double y;
|
||||
public double z;
|
||||
|
||||
public Vector3() {
|
||||
}
|
||||
|
||||
public Vector3(double d, double d1, double d2) {
|
||||
x = d;
|
||||
y = d1;
|
||||
z = d2;
|
||||
}
|
||||
|
||||
public Vector3(Vector3 vec) {
|
||||
x = vec.x;
|
||||
y = vec.y;
|
||||
z = vec.z;
|
||||
}
|
||||
|
||||
public Vector3(Vec3 vec) {
|
||||
x = vec.xCoord;
|
||||
y = vec.yCoord;
|
||||
z = vec.zCoord;
|
||||
}
|
||||
|
||||
public Vector3 copy() {
|
||||
return new Vector3(this);
|
||||
}
|
||||
|
||||
public static Vector3 fromEntity(Entity e) {
|
||||
return new Vector3(e.posX, e.posY, e.posZ);
|
||||
}
|
||||
|
||||
public static Vector3 fromEntityCenter(Entity e) {
|
||||
return new Vector3(e.posX, e.posY - e.yOffset + e.height / 2, e.posZ);
|
||||
}
|
||||
|
||||
public static Vector3 fromTileEntity(TileEntity e) {
|
||||
return new Vector3(e.xCoord, e.yCoord, e.zCoord);
|
||||
}
|
||||
|
||||
public static Vector3 fromTileEntityCenter(TileEntity e) {
|
||||
return new Vector3(e.xCoord + 0.5, e.yCoord + 0.5, e.zCoord + 0.5);
|
||||
}
|
||||
|
||||
public Vector3 set(double d, double d1, double d2) {
|
||||
x = d;
|
||||
y = d1;
|
||||
z = d2;
|
||||
return this;
|
||||
}
|
||||
|
||||
public Vector3 set(Vector3 vec) {
|
||||
x = vec.x;
|
||||
y = vec.y;
|
||||
z = vec.z;
|
||||
return this;
|
||||
}
|
||||
|
||||
public double dotProduct(Vector3 vec) {
|
||||
double d = vec.x * x + vec.y * y + vec.z * z;
|
||||
|
||||
if(d > 1 && d < 1.00001)
|
||||
d = 1;
|
||||
else if(d < -1 && d > -1.00001)
|
||||
d = -1;
|
||||
return d;
|
||||
}
|
||||
|
||||
public double dotProduct(double d, double d1, double d2) {
|
||||
return d * x + d1 * y + d2 * z;
|
||||
}
|
||||
|
||||
public Vector3 crossProduct(Vector3 vec) {
|
||||
double d = y * vec.z - z * vec.y;
|
||||
double d1 = z * vec.x - x * vec.z;
|
||||
double d2 = x * vec.y - y * vec.x;
|
||||
x = d;
|
||||
y = d1;
|
||||
z = d2;
|
||||
return this;
|
||||
}
|
||||
|
||||
public Vector3 add(double d, double d1, double d2) {
|
||||
x += d;
|
||||
y += d1;
|
||||
z += d2;
|
||||
return this;
|
||||
}
|
||||
|
||||
public Vector3 add(Vector3 vec) {
|
||||
x += vec.x;
|
||||
y += vec.y;
|
||||
z += vec.z;
|
||||
return this;
|
||||
}
|
||||
|
||||
public Vector3 add(double d) {
|
||||
return add(d, d, d);
|
||||
}
|
||||
|
||||
public Vector3 sub(Vector3 vec) {
|
||||
return subtract(vec);
|
||||
}
|
||||
|
||||
public Vector3 subtract(Vector3 vec) {
|
||||
x -= vec.x;
|
||||
y -= vec.y;
|
||||
z -= vec.z;
|
||||
return this;
|
||||
}
|
||||
|
||||
public Vector3 negate(Vector3 vec) {
|
||||
x = -x;
|
||||
y = -y;
|
||||
z = -z;
|
||||
return this;
|
||||
}
|
||||
|
||||
public Vector3 multiply(double d) {
|
||||
x *= d;
|
||||
y *= d;
|
||||
z *= d;
|
||||
return this;
|
||||
}
|
||||
|
||||
public Vector3 multiply(Vector3 f) {
|
||||
x *= f.x;
|
||||
y *= f.y;
|
||||
z *= f.z;
|
||||
return this;
|
||||
}
|
||||
|
||||
public Vector3 multiply(double fx, double fy, double fz) {
|
||||
x *= fx;
|
||||
y *= fy;
|
||||
z *= fz;
|
||||
return this;
|
||||
}
|
||||
|
||||
public double mag() {
|
||||
return Math.sqrt(x * x + y * y + z * z);
|
||||
}
|
||||
|
||||
public double magSquared() {
|
||||
return x * x + y * y + z * z;
|
||||
}
|
||||
|
||||
public Vector3 normalize() {
|
||||
double d = mag();
|
||||
if(d != 0)
|
||||
multiply(1 / d);
|
||||
|
||||
return this;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
MathContext cont = new MathContext(4, RoundingMode.HALF_UP);
|
||||
return "Vector3(" + new BigDecimal(x, cont) + ", " +new BigDecimal(y, cont) + ", " + new BigDecimal(z, cont) + ")";
|
||||
}
|
||||
|
||||
public Vector3 perpendicular() {
|
||||
if(z == 0)
|
||||
return zCrossProduct();
|
||||
return xCrossProduct();
|
||||
}
|
||||
|
||||
public Vector3 xCrossProduct() {
|
||||
double d = z;
|
||||
double d1 = -y;
|
||||
x = 0;
|
||||
y = d;
|
||||
z = d1;
|
||||
return this;
|
||||
}
|
||||
|
||||
public Vector3 zCrossProduct() {
|
||||
double d = y;
|
||||
|
||||
double d1 = -x;
|
||||
x = d;
|
||||
y = d1;
|
||||
z = 0;
|
||||
return this;
|
||||
}
|
||||
|
||||
public Vector3 yCrossProduct() {
|
||||
double d = -z;
|
||||
double d1 = x;
|
||||
x = d;
|
||||
y = 0;
|
||||
z = d1;
|
||||
return this;
|
||||
}
|
||||
|
||||
public Vec3 toVec3D() {
|
||||
return Vec3.createVectorHelper(x, y, z);
|
||||
}
|
||||
|
||||
public double angle(Vector3 vec) {
|
||||
return Math.acos(copy().normalize().dotProduct(vec.copy().normalize()));
|
||||
}
|
||||
|
||||
public boolean isInside(AxisAlignedBB aabb) {
|
||||
return x >= aabb.minX && y >= aabb.maxY && z >= aabb.minZ && x < aabb.maxX && y < aabb.maxY && z < aabb.maxZ;
|
||||
}
|
||||
|
||||
public boolean isZero() {
|
||||
return x == 0 && y == 0 && z == 0;
|
||||
}
|
||||
|
||||
public boolean isAxial() {
|
||||
return x == 0 ? y == 0 || z == 0 : y == 0 && z == 0;
|
||||
}
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
public Vector3f vector3f() {
|
||||
return new Vector3f((float)x, (float)y, (float)z);
|
||||
}
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
public Vector4f vector4f() {
|
||||
return new Vector4f((float)x, (float)y, (float)z, 1);
|
||||
}
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void glVertex() {
|
||||
GL11.glVertex3d(x, y, z);
|
||||
}
|
||||
|
||||
public Vector3 negate() {
|
||||
x = -x;
|
||||
y = -y;
|
||||
z = -z;
|
||||
return this;
|
||||
}
|
||||
|
||||
public double scalarProject(Vector3 b) {
|
||||
double l = b.mag();
|
||||
return l == 0 ? 0 : dotProduct(b)/l;
|
||||
}
|
||||
|
||||
public Vector3 project(Vector3 b) {
|
||||
double l = b.magSquared();
|
||||
if(l == 0) {
|
||||
set(0, 0, 0);
|
||||
return this;
|
||||
}
|
||||
|
||||
double m = dotProduct(b)/l;
|
||||
set(b).multiply(m);
|
||||
return this;
|
||||
}
|
||||
|
||||
/* public Vector3 rotate(double angle, Vector3 axis) {
|
||||
Quat.aroundAxis(axis.copy().normalize(), angle).rotate(this);
|
||||
return this;
|
||||
}
|
||||
*/
|
||||
@Override
|
||||
public boolean equals(Object o) {
|
||||
if(!(o instanceof Vector3))
|
||||
return false;
|
||||
|
||||
Vector3 v = (Vector3)o;
|
||||
return x == v.x && y == v.y && z == v.z;
|
||||
}
|
||||
}
|
||||
@@ -1,6 +1,7 @@
|
||||
package taintedmagic.common.items.tools;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Random;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.client.Minecraft;
|
||||
@@ -8,7 +9,6 @@ import net.minecraft.client.gui.ScaledResolution;
|
||||
import net.minecraft.client.renderer.OpenGlHelper;
|
||||
import net.minecraft.client.renderer.Tessellator;
|
||||
import net.minecraft.creativetab.CreativeTabs;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.EnumAction;
|
||||
@@ -19,7 +19,6 @@ import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.potion.Potion;
|
||||
import net.minecraft.potion.PotionEffect;
|
||||
import net.minecraft.server.MinecraftServer;
|
||||
import net.minecraft.util.AxisAlignedBB;
|
||||
import net.minecraft.util.DamageSource;
|
||||
import net.minecraft.util.EnumChatFormatting;
|
||||
import net.minecraft.util.MathHelper;
|
||||
@@ -37,16 +36,12 @@ import taintedmagic.client.model.ModelKatana;
|
||||
import taintedmagic.client.model.ModelSaya;
|
||||
import taintedmagic.common.TaintedMagic;
|
||||
import taintedmagic.common.entities.EntityTaintBubble;
|
||||
import taintedmagic.common.helper.TaintedMagicHelper;
|
||||
import taintedmagic.common.helper.Vector3;
|
||||
import taintedmagic.common.network.PacketAttackEntityFromClient;
|
||||
import taintedmagic.common.network.PacketKatanaAttack;
|
||||
import taintedmagic.common.network.PacketHandler;
|
||||
import thaumcraft.api.IRepairable;
|
||||
import thaumcraft.api.IWarpingGear;
|
||||
import thaumcraft.api.wands.FocusUpgradeType;
|
||||
import thaumcraft.common.Thaumcraft;
|
||||
import thaumcraft.common.config.Config;
|
||||
import thaumcraft.common.entities.projectile.EntityEmber;
|
||||
import thaumcraft.common.entities.projectile.EntityExplosiveOrb;
|
||||
import cpw.mods.fml.common.eventhandler.SubscribeEvent;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
@@ -123,7 +118,7 @@ public class ItemKatana extends Item implements IWarpingGear, IRepairable
|
||||
}
|
||||
case 2 :
|
||||
{
|
||||
e.attackEntityFrom(new DamageSource("wind").setMagicDamage().setDamageBypassesArmor(), getAttackDamage(s));
|
||||
e.attackEntityFrom(DamageSource.wither.setMagicDamage().setDamageBypassesArmor(), getAttackDamage(s));
|
||||
|
||||
try
|
||||
{
|
||||
@@ -234,36 +229,38 @@ public class ItemKatana extends Item implements IWarpingGear, IRepairable
|
||||
public void onPlayerStoppedUsing (ItemStack s, World w, EntityPlayer p, int i)
|
||||
{
|
||||
super.onPlayerStoppedUsing(s, w, p, i);
|
||||
Random r = new Random();
|
||||
|
||||
if (!hasAnyInscription(s) || castType(p) == 0 || p.isSneaking())
|
||||
if (!hasAnyInscription(s) || !isFullyCharged(p) || p.isSneaking() || getInscription(s) == 2)
|
||||
{
|
||||
boolean leech = (getInscription(s) == 2 && isFullyCharged(p));
|
||||
boolean b = false;
|
||||
|
||||
if (w.isRemote)
|
||||
{
|
||||
MovingObjectPosition mop = Minecraft.getMinecraft().objectMouseOver;
|
||||
float mul = Math.min(1.0F + (float) this.ticksInUse / 40.0F, 2.0F);
|
||||
|
||||
if (mop.entityHit != null) PacketHandler.INSTANCE.sendToServer(new PacketAttackEntityFromClient(mop.entityHit, p, this.getAttackDamage(s) * mul));
|
||||
|
||||
if (mop.entityHit != null)
|
||||
{
|
||||
PacketHandler.INSTANCE.sendToServer(new PacketKatanaAttack(mop.entityHit, p, this.getAttackDamage(s) * mul, leech));
|
||||
}
|
||||
p.swingItem();
|
||||
}
|
||||
p.worldObj.playSoundAtEntity(p, "thaumcraft:swing", 0.5F + (float) Math.random(), 0.5F + (float) Math.random());
|
||||
p.worldObj.playSoundAtEntity(p, ("thaumcraft:swing"), 0.5F + (float) Math.random(), 0.5F + (float) Math.random());
|
||||
}
|
||||
else if (hasAnyInscription(s) && castType(p) == 1 && !p.isSneaking())
|
||||
else if (hasAnyInscription(s) && isFullyCharged(p) && !p.isSneaking())
|
||||
{
|
||||
switch (getInscription(s))
|
||||
{
|
||||
case 0 :
|
||||
{
|
||||
for (int a = 0; a < 50; a++)
|
||||
{
|
||||
EntityEmber proj = new EntityEmber(w, p, 5.0F);
|
||||
proj.posX += proj.motionX;
|
||||
proj.posY += proj.motionY;
|
||||
proj.posZ += proj.motionZ;
|
||||
proj.damage = 10.0F;
|
||||
w.spawnEntityInWorld(proj);
|
||||
p.swingItem();
|
||||
}
|
||||
EntityExplosiveOrb proj = new EntityExplosiveOrb(w, p);
|
||||
proj.posX += proj.motionX;
|
||||
proj.posY += proj.motionY;
|
||||
proj.posZ += proj.motionZ;
|
||||
if (!w.isRemote) w.spawnEntityInWorld(proj);
|
||||
p.swingItem();
|
||||
break;
|
||||
}
|
||||
case 1 :
|
||||
@@ -274,45 +271,24 @@ public class ItemKatana extends Item implements IWarpingGear, IRepairable
|
||||
proj.posX += proj.motionX;
|
||||
proj.posY += proj.motionY;
|
||||
proj.posZ += proj.motionZ;
|
||||
proj.damage = 10.0F;
|
||||
w.spawnEntityInWorld(proj);
|
||||
proj.damage = getAttackDamage(s) * 0.2F;
|
||||
if (!w.isRemote) w.spawnEntityInWorld(proj);
|
||||
p.swingItem();
|
||||
}
|
||||
break;
|
||||
}
|
||||
case 2 :
|
||||
{
|
||||
List<EntityLivingBase> ents = w.getEntitiesWithinAABB(EntityLivingBase.class, AxisAlignedBB.getBoundingBox(p.posX, p.posY, p.posZ, p.posX + 1, p.posY + 1, p.posZ + 1).expand(5.0D, 5.0D, 5.0D));
|
||||
if (ents != null && ents.size() > 0)
|
||||
{
|
||||
for (int a = 0; a < ents.size(); a++)
|
||||
{
|
||||
EntityLivingBase e = ents.get(a);
|
||||
|
||||
if (e != p && e.isEntityAlive() && !e.isEntityInvulnerable())
|
||||
{
|
||||
double dist = TaintedMagicHelper.getDistanceTo(e.posX, e.posY, e.posZ, p);
|
||||
if (dist < 2.0D) e.attackEntityFrom(DamageSource.causePlayerDamage(p).setMagicDamage(), 5.0F);
|
||||
Vector3 movement = TaintedMagicHelper.getDistanceBetween(e, p);
|
||||
e.addVelocity(movement.x * 3, 0.8, movement.z * 3);
|
||||
}
|
||||
}
|
||||
}
|
||||
p.worldObj.playSoundAtEntity(p, "taintedmagic:shockwave", 5.0F, 1.0F * (float) Math.random());
|
||||
TaintedMagic.proxy.spawnWindParticles(p.worldObj);
|
||||
p.swingItem();
|
||||
default :
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public int castType (EntityPlayer p)
|
||||
private boolean isFullyCharged (EntityPlayer p)
|
||||
{
|
||||
float f = Math.min((float) this.ticksInUse / 15.0F, 2.0F);
|
||||
|
||||
if (f == 2.0F) return 1;
|
||||
else return 0;
|
||||
if (f == 2.0F) return true;
|
||||
else return false;
|
||||
}
|
||||
|
||||
@SideOnly (Side.CLIENT)
|
||||
|
||||
@@ -39,7 +39,7 @@ public class ItemPrimordialEdge extends ItemSword implements IWarpingGear, IRepa
|
||||
|
||||
public EnumRarity getRarity (ItemStack s)
|
||||
{
|
||||
return EnumRarity.epic;
|
||||
return TaintedMagic.rarityCreation;
|
||||
}
|
||||
|
||||
public boolean hitEntity (ItemStack s, EntityLivingBase e, EntityLivingBase p)
|
||||
|
||||
+2
-2
@@ -1,4 +1,4 @@
|
||||
package taintedmagic.common.items.wand;
|
||||
package taintedmagic.common.items.wand.foci;
|
||||
|
||||
import java.util.Random;
|
||||
|
||||
@@ -63,7 +63,7 @@ public class ItemFocusEldritch extends ItemFocusBasic
|
||||
|
||||
public String getSortingHelper (ItemStack s)
|
||||
{
|
||||
return "AM" + super.getSortingHelper(s);
|
||||
return "ELDRITCH" + super.getSortingHelper(s);
|
||||
}
|
||||
|
||||
public int getFocusColor (ItemStack s)
|
||||
+2
-2
@@ -1,4 +1,4 @@
|
||||
package taintedmagic.common.items.wand;
|
||||
package taintedmagic.common.items.wand.foci;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@@ -60,7 +60,7 @@ public class ItemFocusMageMace extends ItemFocusBasic
|
||||
|
||||
public String getSortingHelper (ItemStack s)
|
||||
{
|
||||
return "MM" + super.getSortingHelper(s);
|
||||
return "MACE" + super.getSortingHelper(s);
|
||||
}
|
||||
|
||||
public int getFocusColor (ItemStack s)
|
||||
+5
-18
@@ -1,33 +1,20 @@
|
||||
package taintedmagic.common.items.wand;
|
||||
|
||||
import java.util.Random;
|
||||
package taintedmagic.common.items.wand.foci;
|
||||
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
import net.minecraft.command.ICommandManager;
|
||||
import net.minecraft.command.ICommandSender;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.EnumRarity;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.potion.PotionEffect;
|
||||
import net.minecraft.server.MinecraftServer;
|
||||
import net.minecraft.util.ChunkCoordinates;
|
||||
import net.minecraft.util.IChatComponent;
|
||||
import net.minecraft.util.IIcon;
|
||||
import net.minecraft.util.MovingObjectPosition;
|
||||
import net.minecraft.util.Vec3;
|
||||
import net.minecraft.world.World;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import taintedmagic.common.TaintedMagic;
|
||||
import taintedmagic.common.entities.EntityTaintBubble;
|
||||
import thaumcraft.api.aspects.Aspect;
|
||||
import thaumcraft.api.aspects.AspectList;
|
||||
import thaumcraft.api.wands.ItemFocusBasic;
|
||||
import thaumcraft.common.Thaumcraft;
|
||||
import thaumcraft.common.config.Config;
|
||||
import thaumcraft.common.entities.projectile.EntityEmber;
|
||||
import thaumcraft.common.items.wands.ItemWandCasting;
|
||||
import thaumcraft.common.items.wands.WandManager;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
|
||||
public class ItemFocusMeteorology extends ItemFocusBasic
|
||||
{
|
||||
@@ -55,7 +42,7 @@ public class ItemFocusMeteorology extends ItemFocusBasic
|
||||
|
||||
public String getSortingHelper (ItemStack s)
|
||||
{
|
||||
return "WT" + super.getSortingHelper(s);
|
||||
return "RAIN" + super.getSortingHelper(s);
|
||||
}
|
||||
|
||||
public int getFocusColor (ItemStack s)
|
||||
@@ -99,6 +86,6 @@ public class ItemFocusMeteorology extends ItemFocusBasic
|
||||
@SideOnly (Side.CLIENT)
|
||||
public EnumRarity getRarity (ItemStack s)
|
||||
{
|
||||
return EnumRarity.epic;
|
||||
return TaintedMagic.rarityCreation;
|
||||
}
|
||||
}
|
||||
+3
-3
@@ -1,4 +1,4 @@
|
||||
package taintedmagic.common.items.wand;
|
||||
package taintedmagic.common.items.wand.foci;
|
||||
|
||||
import java.util.Random;
|
||||
|
||||
@@ -54,7 +54,7 @@ public class ItemFocusTaint extends ItemFocusBasic
|
||||
|
||||
public String getSortingHelper (ItemStack s)
|
||||
{
|
||||
return "BM" + super.getSortingHelper(s);
|
||||
return "TAINT" + super.getSortingHelper(s);
|
||||
}
|
||||
|
||||
public int getFocusColor (ItemStack s)
|
||||
@@ -100,7 +100,7 @@ public class ItemFocusTaint extends ItemFocusBasic
|
||||
}
|
||||
int range = 8;
|
||||
Vec3 vec3d = p.getLook(range);
|
||||
if (!p.worldObj.isRemote && p.ticksExisted % 5 == 0) p.worldObj.playSoundAtEntity(p, "thaumcraft:bubble", 0.33F, 2F * (float)Math.random());
|
||||
if (!p.worldObj.isRemote && p.ticksExisted % 5 == 0) p.worldObj.playSoundAtEntity(p, "thaumcraft:bubble", 0.33F, 5.0F * (float) Math.random());
|
||||
|
||||
int potency = wand.getFocusPotency(s);
|
||||
if ( (!p.worldObj.isRemote) && (wand.consumeAllVis(s, p, getVisCost(s), true, false)))
|
||||
+3
-4
@@ -1,9 +1,8 @@
|
||||
package taintedmagic.common.items.wand;
|
||||
package taintedmagic.common.items.wand.foci;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.ItemStack;
|
||||
@@ -16,11 +15,11 @@ import net.minecraft.util.StatCollector;
|
||||
import net.minecraft.world.World;
|
||||
import taintedmagic.common.TaintedMagic;
|
||||
import taintedmagic.common.helper.TaintedMagicHelper;
|
||||
import taintedmagic.common.helper.Vector3;
|
||||
import thaumcraft.api.aspects.Aspect;
|
||||
import thaumcraft.api.aspects.AspectList;
|
||||
import thaumcraft.api.wands.FocusUpgradeType;
|
||||
import thaumcraft.api.wands.ItemFocusBasic;
|
||||
import thaumcraft.codechicken.lib.vec.Vector3;
|
||||
import thaumcraft.common.items.wands.ItemWandCasting;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
@@ -58,7 +57,7 @@ public class ItemFocusTaintedBlast extends ItemFocusBasic
|
||||
|
||||
public String getSortingHelper (ItemStack s)
|
||||
{
|
||||
return "TB" + super.getSortingHelper(s);
|
||||
return "SHOCKWAVE" + super.getSortingHelper(s);
|
||||
}
|
||||
|
||||
public int getFocusColor (ItemStack s)
|
||||
+8
-9
@@ -1,4 +1,4 @@
|
||||
package taintedmagic.common.items.wand;
|
||||
package taintedmagic.common.items.wand.foci;
|
||||
|
||||
import java.awt.Color;
|
||||
|
||||
@@ -13,7 +13,6 @@ import taintedmagic.common.TaintedMagic;
|
||||
import thaumcraft.api.aspects.Aspect;
|
||||
import thaumcraft.api.aspects.AspectList;
|
||||
import thaumcraft.api.wands.ItemFocusBasic;
|
||||
import thaumcraft.common.Thaumcraft;
|
||||
import thaumcraft.common.items.wands.ItemWandCasting;
|
||||
import thaumcraft.common.items.wands.WandManager;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
@@ -45,7 +44,7 @@ public class ItemFocusTime extends ItemFocusBasic
|
||||
|
||||
public String getSortingHelper (ItemStack s)
|
||||
{
|
||||
return "TI" + super.getSortingHelper(s);
|
||||
return "TIME" + super.getSortingHelper(s);
|
||||
}
|
||||
|
||||
public int getFocusColor (ItemStack s)
|
||||
@@ -79,11 +78,11 @@ public class ItemFocusTime extends ItemFocusBasic
|
||||
WandManager.setCooldown(p, 30000);
|
||||
ItemWandCasting wand = (ItemWandCasting) s.getItem();
|
||||
|
||||
wand.consumeAllVis(s, p, getVisCost(s), true, false);
|
||||
|
||||
w.setWorldTime(w.isDaytime() ? 14000 : 0);
|
||||
|
||||
p.playSound("thaumcraft:wand", 0.5F, 1.0F);
|
||||
if (wand.consumeAllVis(s, p, getVisCost(s), true, false))
|
||||
{
|
||||
w.setWorldTime(w.isDaytime() ? 14000 : 0);
|
||||
p.playSound("thaumcraft:wand", 0.5F, 1.0F);
|
||||
}
|
||||
return s;
|
||||
}
|
||||
|
||||
@@ -97,6 +96,6 @@ public class ItemFocusTime extends ItemFocusBasic
|
||||
@SideOnly (Side.CLIENT)
|
||||
public EnumRarity getRarity (ItemStack s)
|
||||
{
|
||||
return EnumRarity.epic;
|
||||
return TaintedMagic.rarityCreation;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,116 @@
|
||||
package taintedmagic.common.items.wand.foci;
|
||||
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.MovingObjectPosition;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
import net.minecraft.world.World;
|
||||
import taintedmagic.common.TaintedMagic;
|
||||
import taintedmagic.common.entities.EntityHomingShard;
|
||||
import thaumcraft.api.aspects.Aspect;
|
||||
import thaumcraft.api.aspects.AspectList;
|
||||
import thaumcraft.api.wands.FocusUpgradeType;
|
||||
import thaumcraft.api.wands.ItemFocusBasic;
|
||||
import thaumcraft.common.items.wands.ItemWandCasting;
|
||||
import thaumcraft.common.lib.utils.EntityUtils;
|
||||
|
||||
/**
|
||||
* this class is based off of ItemFocusShard.class created by <Azanor> as part
|
||||
* of Thaumcraft 5
|
||||
*/
|
||||
public class ItemFocusVisShard extends ItemFocusBasic
|
||||
{
|
||||
private static final AspectList cost = new AspectList().add(Aspect.FIRE, 1).add(Aspect.ENTROPY, 1).add(Aspect.AIR, 1);
|
||||
private static final AspectList costPersistant = new AspectList().add(Aspect.FIRE, 1).add(Aspect.ENTROPY, 1).add(Aspect.WATER, 1).add(Aspect.AIR, 1);
|
||||
|
||||
public static FocusUpgradeType persistant = new FocusUpgradeType(69, new ResourceLocation("taintedmagic:textures/foci/IconPersistant.png"), "focus.upgrade.persistant.name", "focus.upgrade.persistant.text", new AspectList().add(Aspect.ARMOR, 1).add(Aspect.MOTION, 1).add(Aspect.ENERGY, 1));
|
||||
|
||||
public ItemFocusVisShard ()
|
||||
{
|
||||
this.setCreativeTab(TaintedMagic.tabTaintedMagic);
|
||||
this.setUnlocalizedName("ItemFocusVisShard");
|
||||
}
|
||||
|
||||
@SideOnly (Side.CLIENT)
|
||||
public void registerIcons (IIconRegister ir)
|
||||
{
|
||||
this.icon = ir.registerIcon("taintedmagic:ItemFocusVisShard");
|
||||
}
|
||||
|
||||
public String getSortingHelper (ItemStack s)
|
||||
{
|
||||
return "SHARD" + super.getSortingHelper(s);
|
||||
}
|
||||
|
||||
public int getFocusColor (ItemStack s)
|
||||
{
|
||||
return 10037693;
|
||||
}
|
||||
|
||||
public int getActivationCooldown (ItemStack s)
|
||||
{
|
||||
return 300;
|
||||
}
|
||||
|
||||
public ItemFocusBasic.WandFocusAnimation getAnimation (ItemStack s)
|
||||
{
|
||||
return ItemFocusBasic.WandFocusAnimation.WAVE;
|
||||
}
|
||||
|
||||
public ItemStack onFocusRightClick (ItemStack s, World w, EntityPlayer p, MovingObjectPosition mop)
|
||||
{
|
||||
ItemWandCasting wand = (ItemWandCasting) s.getItem();
|
||||
|
||||
Entity look = EntityUtils.getPointedEntity(p.worldObj, p, 0.0D, 32.0D, 1.1F);
|
||||
if (look != null && look instanceof EntityLivingBase)
|
||||
{
|
||||
if (!w.isRemote)
|
||||
{
|
||||
EntityHomingShard blast = new EntityHomingShard(w, p, (EntityLivingBase) look, wand.getFocusPotency(s), isUpgradedWith(wand.getFocusItem(s), persistant));
|
||||
w.spawnEntityInWorld(blast);
|
||||
w.playSoundAtEntity(blast, "taintedmagic:shard", 0.3F, 1.1F + w.rand.nextFloat() * 0.1F);
|
||||
}
|
||||
p.swingItem();
|
||||
}
|
||||
return s;
|
||||
}
|
||||
|
||||
public AspectList getVisCost (ItemStack s)
|
||||
{
|
||||
return isUpgradedWith(s, persistant) ? costPersistant : cost;
|
||||
}
|
||||
|
||||
public FocusUpgradeType[] getPossibleUpgradesByRank (ItemStack s, int r)
|
||||
{
|
||||
switch (r)
|
||||
{
|
||||
case 1 :
|
||||
return new FocusUpgradeType[]{
|
||||
FocusUpgradeType.frugal,
|
||||
FocusUpgradeType.potency };
|
||||
case 2 :
|
||||
return new FocusUpgradeType[]{
|
||||
FocusUpgradeType.frugal,
|
||||
FocusUpgradeType.potency };
|
||||
case 3 :
|
||||
return new FocusUpgradeType[]{
|
||||
FocusUpgradeType.frugal,
|
||||
FocusUpgradeType.potency };
|
||||
case 4 :
|
||||
return new FocusUpgradeType[]{
|
||||
FocusUpgradeType.frugal,
|
||||
FocusUpgradeType.potency };
|
||||
case 5 :
|
||||
return new FocusUpgradeType[]{
|
||||
FocusUpgradeType.frugal,
|
||||
FocusUpgradeType.potency,
|
||||
persistant };
|
||||
}
|
||||
return null;
|
||||
}
|
||||
}
|
||||
@@ -4,6 +4,6 @@ public class LibStrings
|
||||
{
|
||||
public static final String MODID = "TaintedMagic";
|
||||
public static final String NAME = "Tainted Magic";
|
||||
public static final String VERSION = "r7.5";
|
||||
public static final String VERSION = "r7.6";
|
||||
public static final String DEPENDENCIES = "required-after:Forge@[10.13.2.1291,);required-after:Thaumcraft@[4.2.3.5,);after:ThaumicTinkerer";
|
||||
}
|
||||
@@ -12,6 +12,6 @@ public class PacketHandler
|
||||
public static void init ()
|
||||
{
|
||||
int i = 0;
|
||||
INSTANCE.registerMessage(PacketAttackEntityFromClient.class, PacketAttackEntityFromClient.class, i++, Side.SERVER);
|
||||
INSTANCE.registerMessage(PacketKatanaAttack.class, PacketKatanaAttack.class, i++, Side.SERVER);
|
||||
}
|
||||
}
|
||||
+14
-4
@@ -11,27 +11,29 @@ import cpw.mods.fml.common.network.simpleimpl.IMessage;
|
||||
import cpw.mods.fml.common.network.simpleimpl.IMessageHandler;
|
||||
import cpw.mods.fml.common.network.simpleimpl.MessageContext;
|
||||
|
||||
public class PacketAttackEntityFromClient implements IMessage, IMessageHandler<PacketAttackEntityFromClient, IMessage>
|
||||
public class PacketKatanaAttack implements IMessage, IMessageHandler<PacketKatanaAttack, IMessage>
|
||||
{
|
||||
private int entityID;
|
||||
private int playerID;
|
||||
private int dimensionID;
|
||||
private float dmg;
|
||||
private boolean leech;
|
||||
|
||||
public PacketAttackEntityFromClient ()
|
||||
public PacketKatanaAttack ()
|
||||
{
|
||||
}
|
||||
|
||||
public PacketAttackEntityFromClient (Entity e, EntityPlayer p, float dmg)
|
||||
public PacketKatanaAttack (Entity e, EntityPlayer p, float dmg, boolean leech)
|
||||
{
|
||||
this.entityID = e.getEntityId();
|
||||
this.playerID = p.getEntityId();
|
||||
this.dimensionID = e.dimension;
|
||||
this.dmg = dmg;
|
||||
this.leech = leech;
|
||||
}
|
||||
|
||||
@Override
|
||||
public IMessage onMessage (PacketAttackEntityFromClient message, MessageContext ctx)
|
||||
public IMessage onMessage (PacketKatanaAttack message, MessageContext ctx)
|
||||
{
|
||||
World w = DimensionManager.getWorld(message.dimensionID);
|
||||
if (w == null) return null;
|
||||
@@ -41,6 +43,12 @@ public class PacketAttackEntityFromClient implements IMessage, IMessageHandler<P
|
||||
|
||||
if (e != null && e instanceof EntityLivingBase && p != null && p instanceof EntityPlayer) e.attackEntityFrom(DamageSource.causeIndirectMagicDamage(p, e), message.dmg);
|
||||
|
||||
if (message.leech && p instanceof EntityPlayer)
|
||||
{
|
||||
((EntityPlayer) p).heal(message.dmg * 0.25F);
|
||||
w.playSoundAtEntity(p, "thaumcraft:wand", 0.5F, 0.5F + ((float) Math.random() * 0.5F));
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
@@ -51,6 +59,7 @@ public class PacketAttackEntityFromClient implements IMessage, IMessageHandler<P
|
||||
this.playerID = buf.readInt();
|
||||
this.dimensionID = buf.readInt();
|
||||
this.dmg = buf.readFloat();
|
||||
this.leech = buf.readBoolean();
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -60,5 +69,6 @@ public class PacketAttackEntityFromClient implements IMessage, IMessageHandler<P
|
||||
buf.writeInt(this.playerID);
|
||||
buf.writeInt(this.dimensionID);
|
||||
buf.writeFloat(this.dmg);
|
||||
buf.writeBoolean(this.leech);
|
||||
}
|
||||
}
|
||||
@@ -28,14 +28,15 @@ import taintedmagic.common.items.tools.ItemShadowmetalPick;
|
||||
import taintedmagic.common.items.tools.ItemShadowmetalSpade;
|
||||
import taintedmagic.common.items.tools.ItemShadowmetalSword;
|
||||
import taintedmagic.common.items.tools.ItemThaumicDisassembler;
|
||||
import taintedmagic.common.items.wand.ItemFocusEldritch;
|
||||
import taintedmagic.common.items.wand.ItemFocusMageMace;
|
||||
import taintedmagic.common.items.wand.ItemFocusMeteorology;
|
||||
import taintedmagic.common.items.wand.ItemFocusTaint;
|
||||
import taintedmagic.common.items.wand.ItemFocusTaintedBlast;
|
||||
import taintedmagic.common.items.wand.ItemFocusTime;
|
||||
import taintedmagic.common.items.wand.ItemWandCap;
|
||||
import taintedmagic.common.items.wand.ItemWandRod;
|
||||
import taintedmagic.common.items.wand.foci.ItemFocusEldritch;
|
||||
import taintedmagic.common.items.wand.foci.ItemFocusMageMace;
|
||||
import taintedmagic.common.items.wand.foci.ItemFocusMeteorology;
|
||||
import taintedmagic.common.items.wand.foci.ItemFocusTaint;
|
||||
import taintedmagic.common.items.wand.foci.ItemFocusTaintedBlast;
|
||||
import taintedmagic.common.items.wand.foci.ItemFocusTime;
|
||||
import taintedmagic.common.items.wand.foci.ItemFocusVisShard;
|
||||
import taintedmagic.common.lib.LibToolMaterials;
|
||||
import thaumcraft.api.wands.StaffRod;
|
||||
import thaumcraft.api.wands.WandCap;
|
||||
@@ -131,6 +132,9 @@ public class ItemRegistry
|
||||
ItemFocusTaintedBlast = new ItemFocusTaintedBlast();
|
||||
GameRegistry.registerItem(ItemFocusTaintedBlast, "ItemFocusTaintedBlast");
|
||||
|
||||
ItemFocusVisShard = new ItemFocusVisShard();
|
||||
GameRegistry.registerItem(ItemFocusVisShard, "ItemFocusVisShard");
|
||||
|
||||
// Tools
|
||||
ItemThaumicDisassembler = new ItemThaumicDisassembler();
|
||||
GameRegistry.registerItem(ItemThaumicDisassembler, "ItemThaumicDisassembler");
|
||||
@@ -184,6 +188,7 @@ public class ItemRegistry
|
||||
public static Item ItemFocusTime;
|
||||
public static Item ItemFocusMageMace;
|
||||
public static Item ItemFocusTaintedBlast;
|
||||
public static Item ItemFocusVisShard;
|
||||
|
||||
// Armor and Baubles
|
||||
public static Item ItemWarpedGoggles;
|
||||
|
||||
@@ -2,6 +2,7 @@ package taintedmagic.common.registry;
|
||||
|
||||
import taintedmagic.common.TaintedMagic;
|
||||
import taintedmagic.common.entities.EntityEldritchOrbAttack;
|
||||
import taintedmagic.common.entities.EntityHomingShard;
|
||||
import taintedmagic.common.entities.EntityTaintBubble;
|
||||
import cpw.mods.fml.common.registry.EntityRegistry;
|
||||
|
||||
@@ -12,5 +13,6 @@ public class ModEntityRegistry
|
||||
int id = 0;
|
||||
EntityRegistry.registerModEntity(EntityTaintBubble.class, "EntityTaintBubble", id++, TaintedMagic.instance, 64, 20, true);
|
||||
EntityRegistry.registerModEntity(EntityEldritchOrbAttack.class, "EntityEldritchOrbAttack", id++, TaintedMagic.instance, 64, 21, true);
|
||||
EntityRegistry.registerModEntity(EntityHomingShard.class, "EntityHomingShard", id++, TaintedMagic.instance, 64, 3, true);
|
||||
}
|
||||
}
|
||||
@@ -12,5 +12,6 @@ public class OreDictionaryRegistry
|
||||
OreDictionary.registerOre("treeSapling", new ItemStack(BlockRegistry.BlockWarpwoodSapling));
|
||||
OreDictionary.registerOre("ingotShadow", new ItemStack(ItemRegistry.ItemMaterial));
|
||||
OreDictionary.registerOre("plankWood", new ItemStack(BlockRegistry.BlockWarpwoodPlanks));
|
||||
OreDictionary.registerOre("blockShadow", new ItemStack(BlockRegistry.BlockShadowmetal));
|
||||
}
|
||||
}
|
||||
+34
-21
@@ -1,4 +1,4 @@
|
||||
package taintedmagic.common.lib;
|
||||
package taintedmagic.common.registry;
|
||||
|
||||
import net.minecraft.init.Blocks;
|
||||
import net.minecraft.init.Items;
|
||||
@@ -10,9 +10,6 @@ import net.minecraft.nbt.NBTTagByte;
|
||||
import net.minecraft.nbt.NBTTagInt;
|
||||
import net.minecraftforge.oredict.OreDictionary;
|
||||
import taintedmagic.common.TaintedMagic;
|
||||
import taintedmagic.common.registry.BlockRegistry;
|
||||
import taintedmagic.common.registry.ItemRegistry;
|
||||
import taintedmagic.common.registry.ResearchRegistry;
|
||||
import thaumcraft.api.ItemApi;
|
||||
import thaumcraft.api.ThaumcraftApi;
|
||||
import thaumcraft.api.aspects.Aspect;
|
||||
@@ -21,7 +18,7 @@ import thaumcraft.common.config.ConfigBlocks;
|
||||
import thaumcraft.common.config.ConfigItems;
|
||||
import cpw.mods.fml.common.registry.GameRegistry;
|
||||
|
||||
public class LibRecipes
|
||||
public class RecipeRegistry
|
||||
{
|
||||
public static void init ()
|
||||
{
|
||||
@@ -444,6 +441,9 @@ public class LibRecipes
|
||||
new ItemStack(Items.iron_ingot),
|
||||
new ItemStack(ItemRegistry.ItemMaterial, 1, 0) }));
|
||||
|
||||
/**
|
||||
* The ItemKatanaThaumium recipes are for the thaumonomicon
|
||||
*/
|
||||
ResearchRegistry.recipes.put("ItemKatanaThaumium:inscription0", ThaumcraftApi.addInfusionCraftingRecipe("INSCRIPTIONFIRE", new Object[]{
|
||||
"inscription",
|
||||
new NBTTagInt(0) }, 8, new AspectList().add(Aspect.FIRE, 64).add(Aspect.LIGHT, 64).add(Aspect.METAL, 16), new ItemStack(ItemRegistry.ItemKatana, 1, 0), new ItemStack[]{
|
||||
@@ -464,15 +464,15 @@ public class LibRecipes
|
||||
ItemApi.getItem("itemBottleTaint", 0),
|
||||
ItemApi.getItem("itemResource", 11) }));
|
||||
|
||||
ResearchRegistry.recipes.put("ItemKatanaThaumium:inscription2", ThaumcraftApi.addInfusionCraftingRecipe("INSCRIPTIONWIND", new Object[]{
|
||||
ResearchRegistry.recipes.put("ItemKatanaThaumium:inscription2", ThaumcraftApi.addInfusionCraftingRecipe("INSCRIPTIONUNDEAD", new Object[]{
|
||||
"inscription",
|
||||
new NBTTagInt(2) }, 8, new AspectList().add(Aspect.AIR, 64).add(Aspect.FLIGHT, 64).add(Aspect.METAL, 16), new ItemStack(ItemRegistry.ItemKatana, 1, 0), new ItemStack[]{
|
||||
ItemApi.getItem("itemShard", 0),
|
||||
ItemApi.getItem("itemResource", 6),
|
||||
new ItemStack(Items.feather),
|
||||
ItemApi.getItem("itemShard", 6),
|
||||
new ItemStack(Blocks.tnt),
|
||||
ItemApi.getItem("itemWispEssence", 0) }));
|
||||
new NBTTagInt(2) }, 8, new AspectList().add(Aspect.HEAL, 64).add(Aspect.UNDEAD, 64).add(Aspect.METAL, 16), new ItemStack(ItemRegistry.ItemKatana, 1, 0), new ItemStack[]{
|
||||
new ItemStack(ConfigItems.itemZombieBrain),
|
||||
new ItemStack(Items.bone),
|
||||
new ItemStack(Items.rotten_flesh),
|
||||
new ItemStack(Items.fermented_spider_eye),
|
||||
new ItemStack(ConfigItems.itemFocusPech),
|
||||
new ItemStack(ConfigItems.itemBathSalts) }));
|
||||
|
||||
ResearchRegistry.recipes.put("ItemKatana:inscription0", ThaumcraftApi.addInfusionCraftingRecipe("INSCRIPTIONFIRE", new Object[]{
|
||||
"inscription",
|
||||
@@ -494,15 +494,15 @@ public class LibRecipes
|
||||
ItemApi.getItem("itemBottleTaint", 0),
|
||||
ItemApi.getItem("itemResource", 11) }));
|
||||
|
||||
ResearchRegistry.recipes.put("ItemKatana:inscription2", ThaumcraftApi.addInfusionCraftingRecipe("INSCRIPTIONWIND", new Object[]{
|
||||
ResearchRegistry.recipes.put("ItemKatana:inscription2", ThaumcraftApi.addInfusionCraftingRecipe("INSCRIPTIONUNDEAD", new Object[]{
|
||||
"inscription",
|
||||
new NBTTagInt(2) }, 8, new AspectList().add(Aspect.AIR, 64).add(Aspect.FLIGHT, 64).add(Aspect.METAL, 16), new ItemStack(ItemRegistry.ItemKatana, 1, 32767), new ItemStack[]{
|
||||
ItemApi.getItem("itemShard", 0),
|
||||
ItemApi.getItem("itemResource", 6),
|
||||
new ItemStack(Items.feather),
|
||||
ItemApi.getItem("itemShard", 6),
|
||||
new ItemStack(Blocks.tnt),
|
||||
ItemApi.getItem("itemWispEssence", 0) }));
|
||||
new NBTTagInt(2) }, 8, new AspectList().add(Aspect.HEAL, 64).add(Aspect.UNDEAD, 64).add(Aspect.METAL, 16), new ItemStack(ItemRegistry.ItemKatana, 1, 32767), new ItemStack[]{
|
||||
new ItemStack(ConfigItems.itemZombieBrain),
|
||||
new ItemStack(Items.bone),
|
||||
new ItemStack(Items.rotten_flesh),
|
||||
new ItemStack(Items.fermented_spider_eye),
|
||||
new ItemStack(ConfigItems.itemFocusPech),
|
||||
new ItemStack(ConfigItems.itemBathSalts) }));
|
||||
|
||||
ResearchRegistry.recipes.put("ItemVoidmetalGoggles", ThaumcraftApi.addInfusionCraftingRecipe("VOIDGOGGLES", new ItemStack(ItemRegistry.ItemVoidmetalGoggles), 5, new AspectList().add(Aspect.VOID, 42).add(Aspect.SENSES, 38).add(Aspect.DARKNESS, 16).add(Aspect.CRYSTAL, 6).add(Aspect.ARMOR, 24), new ItemStack(ItemRegistry.ItemWarpedGoggles, 1, 32767), new ItemStack[]{
|
||||
new ItemStack(ConfigItems.itemResource, 1, 16),
|
||||
@@ -651,6 +651,19 @@ public class LibRecipes
|
||||
new ItemStack(ItemRegistry.ItemMaterial, 1, 1),
|
||||
Character.valueOf('B'),
|
||||
ItemApi.getItem("itemResource", 14) }));
|
||||
|
||||
ResearchRegistry.recipes.put("ItemFocusVisShard", ThaumcraftApi.addArcaneCraftingRecipe("FOCUSSHARD", new ItemStack(ItemRegistry.ItemFocusVisShard), new AspectList().add(Aspect.AIR, 46).add(Aspect.ENTROPY, 38).add(Aspect.ORDER, 22), new Object[]{
|
||||
"BDC",
|
||||
"DAD",
|
||||
"CDB",
|
||||
'A',
|
||||
new ItemStack(ConfigItems.itemResource, 1, 3),
|
||||
'B',
|
||||
new ItemStack(ConfigItems.itemShard, 1, 6),
|
||||
'C',
|
||||
new ItemStack(ItemRegistry.ItemMaterial, 1, 4),
|
||||
'D',
|
||||
new ItemStack(ConfigItems.itemWispEssence, 1, 32767) }));
|
||||
}
|
||||
|
||||
public static void initCrucible ()
|
||||
@@ -14,7 +14,7 @@ import net.minecraft.item.crafting.RecipesWeapons;
|
||||
import net.minecraft.nbt.NBTTagByte;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
import taintedmagic.common.TaintedMagic;
|
||||
import taintedmagic.common.lib.LibRecipes;
|
||||
import taintedmagic.common.helper.TaintedMagicHelper;
|
||||
import taintedmagic.common.research.TaintedMagicResearchItem;
|
||||
import taintedmagic.common.research.ThaumcraftResearchItem;
|
||||
import thaumcraft.api.ItemApi;
|
||||
@@ -182,7 +182,7 @@ public class ResearchRegistry
|
||||
new ResearchPage((InfusionRecipe) recipes.get("ItemVoidwalkerBoots")) }).registerResearchItem();
|
||||
ThaumcraftApi.addWarpToResearch("VOIDWALKERBOOTS", 3);
|
||||
|
||||
new TaintedMagicResearchItem("CREATIONSHARD", TM, new AspectList(), 8, -5, 0, new ItemStack(ItemRegistry.ItemMaterial, 1, 5)).setItemTriggers(new ItemStack[]{ new ItemStack(ConfigItems.itemEldritchObject, 1, 3) }).setLost().setConcealed().setParents(new String[]{ "TMELDRITCHMAJOR" }).setComplexity(3).setPages(new ResearchPage[]{
|
||||
new TaintedMagicResearchItem("CREATIONSHARD", TM, TaintedMagicHelper.getPrimals(16), 8, -5, 0, new ItemStack(ItemRegistry.ItemMaterial, 1, 5)).setConcealed().setParents(new String[]{ "TMELDRITCHMAJOR" }).setPages(new ResearchPage[]{
|
||||
new ResearchPage("1"),
|
||||
new ResearchPage((InfusionRecipe) recipes.get("ItemMaterial:5")) }).setSecondary().registerResearchItem();
|
||||
ThaumcraftApi.addWarpToResearch("CREATIONSHARD", 5);
|
||||
@@ -244,7 +244,7 @@ public class ResearchRegistry
|
||||
new ResearchPage((InfusionRecipe) recipes.get("ItemShadowFortressLeggings")) }).registerResearchItem();
|
||||
ThaumcraftApi.addWarpToResearch("SHADOWFORTRESSARMOR", 3);
|
||||
|
||||
new TaintedMagicResearchItem("CAP_cloth", TM, new AspectList().add(Aspect.MAGIC, 4).add(Aspect.CLOTH, 4), 5, -3, 0, new ItemStack(ItemRegistry.ItemWandCap, 1, 1)).setParentsHidden("CAP_gold", "ENCHFABRIC").setConcealed().setSecondary().setPages(new ResearchPage[]{
|
||||
new TaintedMagicResearchItem("CAP_cloth", TM, new AspectList().add(Aspect.MAGIC, 4).add(Aspect.CLOTH, 4), 7, 5, 0, new ItemStack(ItemRegistry.ItemWandCap, 1, 1)).setParentsHidden("CAP_gold", "ENCHFABRIC").setConcealed().setSecondary().setPages(new ResearchPage[]{
|
||||
new ResearchPage("1"),
|
||||
new ResearchPage((IArcaneRecipe) recipes.get("ItemWandCap:1")) }).registerResearchItem();
|
||||
|
||||
@@ -290,15 +290,20 @@ public class ResearchRegistry
|
||||
new TaintedMagicResearchItem("INSCRIPTIONTAINT", TM, new AspectList().add(Aspect.TAINT, 8).add(Aspect.FLESH, 4).add(Aspect.METAL, 6), 9, 2, 0, new ResourceLocation("taintedmagic:textures/misc/IconINSCRIPTIONTAINT.png")).setParents("THAUMIUMKATANA").setParentsHidden("TAINTFOCUS").setConcealed().setPages(new ResearchPage[]{
|
||||
new ResearchPage("1"),
|
||||
new ResearchPage((InfusionRecipe) recipes.get("ItemKatanaThaumium:inscription1")) }).setSecondary().registerResearchItem();
|
||||
ThaumcraftApi.addWarpToResearch("INSCRIPTIONTAINT", 4);
|
||||
ThaumcraftApi.addWarpToResearch("INSCRIPTIONTAINT", 2);
|
||||
|
||||
new TaintedMagicResearchItem("INSCRIPTIONWIND", TM, new AspectList().add(Aspect.AIR, 8).add(Aspect.MOTION, 4).add(Aspect.METAL, 6), 8, 3, 0, new ResourceLocation("taintedmagic:textures/misc/IconINSCRIPTIONWIND.png")).setParents("THAUMIUMKATANA").setConcealed().setPages(new ResearchPage[]{
|
||||
new TaintedMagicResearchItem("INSCRIPTIONUNDEAD", TM, new AspectList().add(Aspect.HEAL, 8).add(Aspect.UNDEAD, 4).add(Aspect.METAL, 6), 8, 3, 0, new ResourceLocation("taintedmagic:textures/misc/IconINSCRIPTIONUNDEAD.png")).setParents("THAUMIUMKATANA").setParentsHidden("BATHSALTS").setConcealed().setPages(new ResearchPage[]{
|
||||
new ResearchPage("1"),
|
||||
new ResearchPage((InfusionRecipe) recipes.get("ItemKatanaThaumium:inscription2")) }).setSecondary().registerResearchItem();
|
||||
ThaumcraftApi.addWarpToResearch("INSCRIPTIONUNDEAD", 5);
|
||||
|
||||
new TaintedMagicResearchItem("VOIDGOGGLES", TM, new AspectList().add(Aspect.VOID, 8).add(Aspect.DARKNESS, 4).add(Aspect.MAGIC, 6).add(Aspect.SENSES, 12).add(Aspect.CRYSTAL, 2), 3, 5, 0, new ItemStack(ItemRegistry.ItemVoidmetalGoggles)).setParents("WARPEDGOGGLES").setParentsHidden("VOIDMETAL").setConcealed().setPages(new ResearchPage[]{
|
||||
new ResearchPage("1"),
|
||||
new ResearchPage((InfusionRecipe) recipes.get("ItemVoidmetalGoggles")) }).setSecondary().registerResearchItem();
|
||||
ThaumcraftApi.addWarpToResearch("VOIDGOGGLES", 2);
|
||||
|
||||
new TaintedMagicResearchItem("FOCUSSHARD", TM, new AspectList().add(Aspect.CRYSTAL, 2).add(Aspect.MAGIC, 4).add(Aspect.MOTION, 6), 3, 1, 0, new ItemStack(ItemRegistry.ItemFocusVisShard)).setParents("EVILSHARDS").setParentsHidden("FOCUSFIRE").setConcealed().setPages(new ResearchPage[]{
|
||||
new ResearchPage("1"),
|
||||
new ResearchPage((IArcaneRecipe) recipes.get("ItemFocusVisShard")) }).setSecondary().registerResearchItem();
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user