mirror of
https://github.com/GTNewHorizons/Tainted-Magic.git
synced 2026-11-20 03:59:36 +00:00
commit source
This commit is contained in:
commit
1381f5b9b4
171 files changed
+7742
No files matched your search
@@ -0,0 +1,8 @@
|
||||
package taintedmagic.api;
|
||||
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
||||
public interface IBloodlust
|
||||
{
|
||||
}
|
||||
@@ -0,0 +1,69 @@
|
||||
package taintedmagic.api;
|
||||
|
||||
import net.minecraft.inventory.InventoryCrafting;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.item.ItemSword;
|
||||
import net.minecraft.item.crafting.IRecipe;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.world.World;
|
||||
import taintedmagic.common.items.ItemVoidsentBlood;
|
||||
import thaumcraft.common.items.armor.ItemCultistLeaderArmor;
|
||||
import thaumcraft.common.items.armor.ItemCultistPlateArmor;
|
||||
import thaumcraft.common.items.armor.ItemCultistRobeArmor;
|
||||
|
||||
public class RecipeVoidsentBlood implements IRecipe
|
||||
{
|
||||
@Override
|
||||
public boolean matches (InventoryCrafting inv, World w)
|
||||
{
|
||||
boolean foundBlood = false;
|
||||
boolean foundArmor = false;
|
||||
|
||||
for (int i = 0; i < inv.getSizeInventory(); i++)
|
||||
{
|
||||
ItemStack s = inv.getStackInSlot(i);
|
||||
|
||||
if (s != null)
|
||||
{
|
||||
if (s.getItem() instanceof ItemVoidsentBlood && !foundBlood) foundBlood = true;
|
||||
else if ( (s.getItem() instanceof ItemCultistRobeArmor || s.getItem() instanceof ItemCultistPlateArmor || s.getItem() instanceof ItemCultistLeaderArmor) && !foundArmor) foundArmor = true;
|
||||
|
||||
else return false;
|
||||
}
|
||||
}
|
||||
return foundBlood && foundArmor;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ItemStack getCraftingResult (InventoryCrafting inv)
|
||||
{
|
||||
ItemStack copy = null;
|
||||
ItemStack armor = null;
|
||||
ItemStack blood = null;
|
||||
|
||||
for (int i = 0; i < inv.getSizeInventory(); i++)
|
||||
{
|
||||
if (inv.getStackInSlot(i) != null && (inv.getStackInSlot(i).getItem() instanceof ItemCultistRobeArmor || inv.getStackInSlot(i).getItem() instanceof ItemCultistPlateArmor || inv.getStackInSlot(i).getItem() instanceof ItemCultistLeaderArmor)) armor = inv.getStackInSlot(i);
|
||||
else if (inv.getStackInSlot(i) != null && inv.getStackInSlot(i).getItem() instanceof ItemVoidsentBlood) blood = inv.getStackInSlot(i);
|
||||
}
|
||||
if (armor != null && blood != null && (armor.getTagCompound() == null || (armor.getTagCompound() != null && !armor.getTagCompound().getBoolean("voidtouched"))))
|
||||
{
|
||||
copy = armor.copy();
|
||||
if (copy.getTagCompound() == null) copy.setTagCompound(new NBTTagCompound());
|
||||
if (copy.getTagCompound() != null) copy.getTagCompound().setBoolean("voidtouched", true);
|
||||
}
|
||||
return copy;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getRecipeSize ()
|
||||
{
|
||||
return 10;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ItemStack getRecipeOutput ()
|
||||
{
|
||||
return null;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,88 @@
|
||||
package taintedmagic.client;
|
||||
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.entity.Entity;
|
||||
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.HUDHandler;
|
||||
import taintedmagic.client.renderer.RenderItemKatana;
|
||||
import taintedmagic.client.renderer.RenderTaintBubble;
|
||||
import taintedmagic.common.CommonProxy;
|
||||
import taintedmagic.common.TaintedMagic;
|
||||
import taintedmagic.common.entities.EntityEldritchOrbAttack;
|
||||
import taintedmagic.common.entities.EntityTaintBubble;
|
||||
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 cpw.mods.fml.client.registry.RenderingRegistry;
|
||||
|
||||
public class ClientProxy extends CommonProxy
|
||||
{
|
||||
@Override
|
||||
public void initRenders ()
|
||||
{
|
||||
// Entities
|
||||
RenderingRegistry.registerEntityRenderingHandler(EntityTaintBubble.class, new RenderTaintBubble());
|
||||
RenderingRegistry.registerEntityRenderingHandler(EntityEldritchOrbAttack.class, new RenderEldritchOrb());
|
||||
|
||||
// Items
|
||||
MinecraftForgeClient.registerItemRenderer(ItemRegistry.ItemKatana, new RenderItemKatana());
|
||||
}
|
||||
|
||||
@Override
|
||||
public EntityPlayer getClientPlayer ()
|
||||
{
|
||||
return Minecraft.getMinecraft().thePlayer;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void registerClientHandlers ()
|
||||
{
|
||||
MinecraftForge.EVENT_BUS.register(new HUDHandler());
|
||||
}
|
||||
|
||||
@Override
|
||||
public void spawnShockwaveParticles (World w)
|
||||
{
|
||||
EntityPlayer p = getClientPlayer();
|
||||
|
||||
double xp = 0;
|
||||
double zp = 0;
|
||||
|
||||
for (int i = 1; i < 360; i++)
|
||||
{
|
||||
for (int j = 0; j < 5; j++)
|
||||
{
|
||||
xp = (Math.cos(i * Math.PI / 180F)) * 1;
|
||||
zp = (Math.sin(i * Math.PI / 180F)) * 1;
|
||||
|
||||
float red = (0.05F + p.worldObj.rand.nextFloat() * 0.1F);
|
||||
float blue = (0.1F + p.worldObj.rand.nextFloat() * 0.1F);
|
||||
|
||||
double off = Math.random() * 0.1;
|
||||
|
||||
FXWisp ef = new FXWisp(w, p.posX + xp + off, p.posY - 1, p.posZ + zp + off, 2.0F * (float) Math.random(), red, 0.0F, blue);
|
||||
ef.setGravity(0.0F);
|
||||
ef.shrink = true;
|
||||
ef.noClip = true;
|
||||
Vector3 movement = getDistanceBetween(ef, p);
|
||||
ef.addVelocity(movement.x * 2.5, 0, movement.z * 2.5);
|
||||
|
||||
ParticleEngine.instance.addEffect(w, ef);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public static Vector3 getDistanceBetween (Entity e, Entity target)
|
||||
{
|
||||
Vector3 fromPosition = new Vector3(e.posX, e.posY, e.posZ);
|
||||
Vector3 toPosition = new Vector3(target.posX, target.posY, target.posZ);
|
||||
Vector3 var3 = fromPosition.sub(toPosition);
|
||||
var3.normalize();
|
||||
return var3;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,20 @@
|
||||
package taintedmagic.client.handler;
|
||||
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraftforge.client.event.RenderGameOverlayEvent;
|
||||
import net.minecraftforge.client.event.RenderGameOverlayEvent.ElementType;
|
||||
import cpw.mods.fml.common.eventhandler.SubscribeEvent;
|
||||
|
||||
public class HUDHandler
|
||||
{
|
||||
@SubscribeEvent
|
||||
public void onDrawScreen (RenderGameOverlayEvent.Post event)
|
||||
{
|
||||
if (event.type == ElementType.ALL)
|
||||
{
|
||||
Minecraft mc = Minecraft.getMinecraft();
|
||||
ItemStack equippedStack = mc.thePlayer.getCurrentEquippedItem();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,48 @@
|
||||
package taintedmagic.client.model;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import net.minecraft.client.model.ModelBase;
|
||||
import net.minecraft.client.model.ModelRenderer;
|
||||
|
||||
/**
|
||||
* katana - wiiv Created using Tabula 4.1.1
|
||||
*/
|
||||
public class ModelKatana extends ModelBase
|
||||
{
|
||||
ModelRenderer blade;
|
||||
ModelRenderer grip1;
|
||||
ModelRenderer grip2;
|
||||
|
||||
public ModelKatana ()
|
||||
{
|
||||
this.textureWidth = 32;
|
||||
this.textureHeight = 64;
|
||||
this.grip2 = new ModelRenderer(this, 22, 0);
|
||||
this.grip2.setRotationPoint(0.0F, 0.0F, 0.0F);
|
||||
this.grip2.addBox(-1.0F, -12.0F, -1.5F, 2, 12, 3, 0.0F);
|
||||
this.blade = new ModelRenderer(this, 0, 0);
|
||||
this.blade.setRotationPoint(0.0F, -40.0F, 0.0F);
|
||||
this.blade.addBox(-0.5F, 0.0F, -2.0F, 1, 48, 4, -0.75F);
|
||||
this.grip1 = new ModelRenderer(this, 0, 52);
|
||||
this.grip1.setRotationPoint(0.0F, -40.0F, 0.0F);
|
||||
this.grip1.addBox(-2.5F, 0.0F, -3.5F, 5, 1, 7, 0.0F);
|
||||
this.grip1.addChild(this.grip2);
|
||||
}
|
||||
|
||||
public void render (float size)
|
||||
{
|
||||
this.blade.render(size);
|
||||
this.grip1.render(size);
|
||||
}
|
||||
|
||||
/**
|
||||
* This is a helper function from Tabula to set the rotation of model parts
|
||||
*/
|
||||
private void setRotation (ModelRenderer m, float x, float y, float z)
|
||||
{
|
||||
m.rotateAngleX = x;
|
||||
m.rotateAngleY = y;
|
||||
m.rotateAngleZ = z;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,36 @@
|
||||
package taintedmagic.client.model;
|
||||
|
||||
import net.minecraft.client.model.ModelBase;
|
||||
import net.minecraft.client.model.ModelRenderer;
|
||||
|
||||
/**
|
||||
* katana - wiiv Created using Tabula 4.1.1
|
||||
*/
|
||||
public class ModelSaya extends ModelBase
|
||||
{
|
||||
public ModelRenderer saya;
|
||||
|
||||
public ModelSaya ()
|
||||
{
|
||||
this.textureWidth = 32;
|
||||
this.textureHeight = 64;
|
||||
this.saya = new ModelRenderer(this, 10, 0);
|
||||
this.saya.setRotationPoint(0.0F, -40.0F, 0.0F);
|
||||
this.saya.addBox(-1.0F, 0.5F, -2.0F, 2, 48, 4, 0.0F);
|
||||
}
|
||||
|
||||
public void render (float size)
|
||||
{
|
||||
this.saya.render(size);
|
||||
}
|
||||
|
||||
/**
|
||||
* This is a helper function from Tabula to set the rotation of model parts
|
||||
*/
|
||||
public void setRotation (ModelRenderer m, float x, float y, float z)
|
||||
{
|
||||
m.rotateAngleX = x;
|
||||
m.rotateAngleY = y;
|
||||
m.rotateAngleZ = z;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,113 @@
|
||||
package taintedmagic.client.renderer;
|
||||
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.renderer.OpenGlHelper;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
import net.minecraftforge.client.IItemRenderer;
|
||||
import net.minecraftforge.client.IItemRenderer.ItemRenderType;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import taintedmagic.client.model.ModelKatana;
|
||||
import taintedmagic.client.model.ModelSaya;
|
||||
import taintedmagic.common.TaintedMagic;
|
||||
import taintedmagic.common.items.tools.ItemKatana;
|
||||
import thaumcraft.common.config.ConfigItems;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
|
||||
@SideOnly (Side.CLIENT)
|
||||
public class RenderItemKatana implements IItemRenderer
|
||||
{
|
||||
@Override
|
||||
public boolean handleRenderType (ItemStack s, ItemRenderType t)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean shouldUseRenderHelper (ItemRenderType t, ItemStack s, ItemRendererHelper h)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void renderItem (ItemRenderType t, ItemStack s, Object... data)
|
||||
{
|
||||
EntityPlayer p = TaintedMagic.proxy.getClientPlayer();
|
||||
|
||||
GL11.glPushMatrix();
|
||||
|
||||
GL11.glDisable(GL11.GL_CULL_FACE);
|
||||
|
||||
GL11.glScalef(1.4F, 1.4F, 1.4F);
|
||||
|
||||
GL11.glPushMatrix();
|
||||
|
||||
if (t == ItemRenderType.ENTITY)
|
||||
{
|
||||
GL11.glScalef(0.5F, 0.5F, 0.5F);
|
||||
GL11.glTranslatef(0F, 0.5F, 0F);
|
||||
GL11.glRotatef(180F, 1.0F, 0.0F, 0.0F);
|
||||
}
|
||||
|
||||
else if (t == ItemRenderType.EQUIPPED_FIRST_PERSON)
|
||||
{
|
||||
GL11.glScalef(2F, 2F, 2F);
|
||||
GL11.glTranslatef(2.25F, 1.75F, -0.2F);
|
||||
GL11.glRotatef(-10F, 0.0F, 1.0F, 0.0F);
|
||||
GL11.glRotatef(-10F, 0.0F, 0.0F, 1.0F);
|
||||
}
|
||||
else if (t == ItemRenderType.INVENTORY)
|
||||
{
|
||||
GL11.glScalef(0.4F, 0.4F, 0.4F);
|
||||
GL11.glRotatef(-65, 1.0F, 0.0F, 0.0F);
|
||||
GL11.glRotatef(-50, 0.0F, 1.0F, 0.0F);
|
||||
GL11.glTranslatef(1F, 1F, 0.0F);
|
||||
}
|
||||
else
|
||||
{
|
||||
GL11.glRotatef(60, 0.0F, 0.0F, 1.0F);
|
||||
GL11.glRotatef(-40, 1.0F, 0.0F, 0.0F);
|
||||
GL11.glRotatef(70, 0.0F, 1.0F, 0.0F);
|
||||
GL11.glTranslatef(0.0F, 2F, 0.65F);
|
||||
}
|
||||
|
||||
Minecraft.getMinecraft().renderEngine.bindTexture(ItemKatana.getTexture(s));
|
||||
ItemKatana.katana.render(0.0625F);
|
||||
GL11.glPopMatrix();
|
||||
|
||||
if (p.getHeldItem() == null || ! (p.getHeldItem() == s))
|
||||
{
|
||||
GL11.glPushMatrix();
|
||||
|
||||
if (t == ItemRenderType.ENTITY)
|
||||
{
|
||||
GL11.glScalef(0.5F, 0.5F, 0.5F);
|
||||
GL11.glTranslatef(0F, 0.5F, 0F);
|
||||
GL11.glRotatef(180F, 1.0F, 0.0F, 0.0F);
|
||||
}
|
||||
else if (t == ItemRenderType.INVENTORY)
|
||||
{
|
||||
GL11.glScalef(0.4F, 0.4F, 0.4F);
|
||||
GL11.glRotatef(-65, 1.0F, 0.0F, 0.0F);
|
||||
GL11.glRotatef(-50, 0.0F, 1.0F, 0.0F);
|
||||
GL11.glTranslatef(1F, 1F, 0.0F);
|
||||
}
|
||||
else
|
||||
{
|
||||
GL11.glTranslatef(0.0F, -0.7F, 0.0F);
|
||||
}
|
||||
Minecraft.getMinecraft().renderEngine.bindTexture(ItemKatana.getTexture(s));
|
||||
ItemKatana.saya.render(0.0625F);
|
||||
GL11.glPopMatrix();
|
||||
}
|
||||
GL11.glScalef(1.0F, 1.0F, 1.0F);
|
||||
|
||||
GL11.glEnable(GL11.GL_CULL_FACE);
|
||||
|
||||
GL11.glPopMatrix();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,80 @@
|
||||
package taintedmagic.client.renderer;
|
||||
|
||||
import java.util.Random;
|
||||
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.renderer.Tessellator;
|
||||
import net.minecraft.client.renderer.entity.Render;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import taintedmagic.common.entities.EntityTaintBubble;
|
||||
|
||||
public class RenderTaintBubble extends Render
|
||||
{
|
||||
private static final ResourceLocation texture = new ResourceLocation("taintedmagic:textures/entities/EntityTaintBubble.png");
|
||||
private Random random = new Random();
|
||||
|
||||
public RenderTaintBubble ()
|
||||
{
|
||||
this.shadowSize = 0.0F;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void doRender (Entity e, double x, double y, double z, float f, float pt)
|
||||
{
|
||||
Tessellator t = Tessellator.instance;
|
||||
EntityTaintBubble bubble = (EntityTaintBubble) e;
|
||||
|
||||
GL11.glPushMatrix();
|
||||
GL11.glTranslated(x, y, z);
|
||||
GL11.glEnable(GL11.GL_BLEND);
|
||||
GL11.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE);
|
||||
GL11.glDepthMask(true);
|
||||
|
||||
Minecraft.getMinecraft().renderEngine.bindTexture(texture);
|
||||
|
||||
int p = (int) (8.0F * (bubble.ticksExisted / bubble.duration));
|
||||
float f2 = 0;
|
||||
float f3 = 1;
|
||||
float f4 = (6 + p) / 16F;
|
||||
float f5 = f4 + 0.125F;
|
||||
|
||||
float f6 = 1.0F;
|
||||
float f7 = 0.5F;
|
||||
float f8 = 0.5F;
|
||||
|
||||
float fc = bubble.ticksExisted / bubble.duration;
|
||||
|
||||
float s = 0.25F + fc;
|
||||
|
||||
GL11.glScalef(s, s, s);
|
||||
|
||||
GL11.glRotatef(180.0F - this.renderManager.playerViewY, 0.0F, 1.0F, 0.0F);
|
||||
GL11.glRotatef(-this.renderManager.playerViewX, 1.0F, 0.0F, 0.0F);
|
||||
|
||||
t.startDrawingQuads();
|
||||
t.setBrightness(220);
|
||||
t.setNormal(0.0F, 1.0F, 0.0F);
|
||||
t.setColorRGBA_F(0.3F, 0.0F, 0.3F, 1F);
|
||||
|
||||
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.glDisable(GL11.GL_BLEND);
|
||||
|
||||
GL11.glPopMatrix();
|
||||
}
|
||||
|
||||
@Override
|
||||
protected ResourceLocation getEntityTexture (Entity e)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,33 @@
|
||||
package taintedmagic.common;
|
||||
|
||||
import taintedmagic.common.registry.ItemRegistry;
|
||||
import thaumcraft.api.aspects.AspectList;
|
||||
import thaumcraft.common.Thaumcraft;
|
||||
import thaumcraft.common.items.wands.WandManager;
|
||||
import net.minecraft.client.model.ModelBiped;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.client.MinecraftForgeClient;
|
||||
import cpw.mods.fml.client.registry.RenderingRegistry;
|
||||
|
||||
public class CommonProxy
|
||||
{
|
||||
public void initRenders ()
|
||||
{
|
||||
}
|
||||
|
||||
public EntityPlayer getClientPlayer ()
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
public void registerClientHandlers ()
|
||||
{
|
||||
}
|
||||
|
||||
public void spawnShockwaveParticles (World w)
|
||||
{
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,99 @@
|
||||
package taintedmagic.common;
|
||||
|
||||
import net.minecraft.creativetab.CreativeTabs;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.EnumRarity;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.EnumChatFormatting;
|
||||
import net.minecraftforge.common.MinecraftForge;
|
||||
import net.minecraftforge.common.config.Configuration;
|
||||
import net.minecraftforge.common.config.Property;
|
||||
import net.minecraftforge.common.util.EnumHelper;
|
||||
|
||||
import org.apache.logging.log4j.LogManager;
|
||||
import org.apache.logging.log4j.Logger;
|
||||
|
||||
import taintedmagic.api.IBloodlust;
|
||||
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.registry.BlockRegistry;
|
||||
import taintedmagic.common.registry.ItemRegistry;
|
||||
import taintedmagic.common.registry.ModEntityRegistry;
|
||||
import taintedmagic.common.registry.OreDictionaryRegistry;
|
||||
import taintedmagic.common.registry.ResearchRegistry;
|
||||
import thaumcraft.api.aspects.Aspect;
|
||||
import thaumcraft.api.aspects.AspectList;
|
||||
import cpw.mods.fml.common.FMLCommonHandler;
|
||||
import cpw.mods.fml.common.Mod;
|
||||
import cpw.mods.fml.common.Mod.EventHandler;
|
||||
import cpw.mods.fml.common.SidedProxy;
|
||||
import cpw.mods.fml.common.event.FMLInitializationEvent;
|
||||
import cpw.mods.fml.common.event.FMLPostInitializationEvent;
|
||||
import cpw.mods.fml.common.event.FMLPreInitializationEvent;
|
||||
|
||||
@Mod (modid = LibStrings.MODID, name = LibStrings.NAME, version = LibStrings.VERSION, dependencies = LibStrings.DEPENDENCIES)
|
||||
public class TaintedMagic
|
||||
{
|
||||
@Mod.Instance ("TaintedMagic")
|
||||
public static TaintedMagic instance;
|
||||
|
||||
// Proxies
|
||||
@SidedProxy (clientSide = "taintedmagic.client.ClientProxy", serverSide = "taintedmagic.common.CommonProxy")
|
||||
public static CommonProxy proxy;
|
||||
|
||||
public static TaintedMagicEventHandler taintedMagicEvents;
|
||||
public static CreativeTabs tabTaintedMagic = new LibCreativeTab();
|
||||
public static ConfigHandler configHandler;
|
||||
public static final Logger log = LogManager.getLogger("TAINTEDMAGIC");
|
||||
public static EnumRarity rarityCreation = EnumHelper.addRarity("CREATION", EnumChatFormatting.GOLD, "Creation");
|
||||
|
||||
// Pre init
|
||||
@EventHandler
|
||||
public static void preInit (FMLPreInitializationEvent event)
|
||||
{
|
||||
log.info("Please stand back... Pre-initializing Tainted Magic!");
|
||||
|
||||
// Config
|
||||
configHandler.config = new Configuration(event.getSuggestedConfigurationFile());
|
||||
configHandler.init();
|
||||
|
||||
proxy.registerClientHandlers();
|
||||
|
||||
ItemRegistry.init();
|
||||
BlockRegistry.init();
|
||||
ModEntityRegistry.init();
|
||||
LibRecipes.init();
|
||||
|
||||
if (configHandler.useUpdateHandler) UpdateHandler.init();
|
||||
}
|
||||
|
||||
// Init
|
||||
@EventHandler
|
||||
public static void init (FMLInitializationEvent event)
|
||||
{
|
||||
log.info("Things seem to be going smoothly... Initializing Tainted Magic!");
|
||||
|
||||
taintedMagicEvents = new TaintedMagicEventHandler();
|
||||
|
||||
MinecraftForge.EVENT_BUS.register(taintedMagicEvents);
|
||||
FMLCommonHandler.instance().bus().register(taintedMagicEvents);
|
||||
|
||||
proxy.initRenders();
|
||||
}
|
||||
|
||||
// Post init
|
||||
@EventHandler
|
||||
public static void postInit (FMLPostInitializationEvent event)
|
||||
{
|
||||
log.info("Almost done... Post-initializing Tainted Magic!");
|
||||
|
||||
ResearchRegistry.initResearch();
|
||||
OreDictionaryRegistry.init();
|
||||
|
||||
log.info("Phew! Tainted Magic has finished loading, enjoy!");
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,17 @@
|
||||
package taintedmagic.common.blocks;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.material.Material;
|
||||
import taintedmagic.common.TaintedMagic;
|
||||
|
||||
public class BlockShadowOre extends Block
|
||||
{
|
||||
public BlockShadowOre ()
|
||||
{
|
||||
super(Material.rock);
|
||||
this.setCreativeTab(TaintedMagic.tabTaintedMagic);
|
||||
this.setBlockTextureName("taintedmagic:BlockShadowOre");
|
||||
this.setBlockName("BlockShadowOre");
|
||||
this.setHardness(5.0F);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,34 @@
|
||||
package taintedmagic.common.blocks;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import taintedmagic.common.TaintedMagic;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.EnumRarity;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.EnumChatFormatting;
|
||||
import net.minecraft.util.StatCollector;
|
||||
import net.minecraft.world.IBlockAccess;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
|
||||
public class BlockShadowmetal extends Block
|
||||
{
|
||||
public BlockShadowmetal ()
|
||||
{
|
||||
super(Material.iron);
|
||||
this.setHardness(5.0F);
|
||||
this.setCreativeTab(TaintedMagic.tabTaintedMagic);
|
||||
this.setBlockTextureName("taintedmagic:BlockShadowmetal");
|
||||
this.setBlockName("BlockShadowmetal");
|
||||
this.setStepSound(soundTypeMetal);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isBeaconBase (IBlockAccess w, int x, int y, int z, int x2, int y2, int z2)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,288 @@
|
||||
package taintedmagic.common.blocks;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Random;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.init.Blocks;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.IIcon;
|
||||
import net.minecraft.util.MovingObjectPosition;
|
||||
import net.minecraft.world.IBlockAccess;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.common.IShearable;
|
||||
import net.minecraftforge.common.util.ForgeDirection;
|
||||
import taintedmagic.common.TaintedMagic;
|
||||
import taintedmagic.common.registry.BlockRegistry;
|
||||
import thaumcraft.common.Thaumcraft;
|
||||
import thaumcraft.common.config.ConfigBlocks;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
|
||||
public class BlockWarpwoodLeaves extends Block implements IShearable
|
||||
{
|
||||
int[] adjacentTreeBlocks;
|
||||
private IIcon opaqueIcon;
|
||||
private IIcon transparentIcon;
|
||||
|
||||
public BlockWarpwoodLeaves ()
|
||||
{
|
||||
super(Material.leaves);
|
||||
this.setCreativeTab(TaintedMagic.tabTaintedMagic);
|
||||
this.setLightOpacity(0);
|
||||
this.setHardness(0.1F);
|
||||
this.setStepSound(ConfigBlocks.blockTaint.stepSound);
|
||||
this.setBlockName("BlockWarpwoodLeaves");
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly (Side.CLIENT)
|
||||
public boolean shouldSideBeRendered (IBlockAccess w, int x, int y, int z, int s)
|
||||
{
|
||||
return !Blocks.leaves.isOpaqueCube() || super.shouldSideBeRendered(w, x, y, z, s);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isOpaqueCube ()
|
||||
{
|
||||
return Blocks.leaves.isOpaqueCube();
|
||||
}
|
||||
|
||||
@Override
|
||||
public IIcon getIcon (int side, int meta)
|
||||
{
|
||||
return !Blocks.leaves.isOpaqueCube() ? transparentIcon : opaqueIcon;
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly (Side.CLIENT)
|
||||
public void registerBlockIcons (IIconRegister ir)
|
||||
{
|
||||
opaqueIcon = ir.registerIcon("taintedmagic:BlockWarpwoodLeaves_opaque");
|
||||
transparentIcon = ir.registerIcon("taintedmagic:BlockWarpwoodLeaves_transparent");
|
||||
}
|
||||
|
||||
public void breakBlock (World w, int x, int y, int z, Block b, int i)
|
||||
{
|
||||
byte var7 = 1;
|
||||
int var8 = var7 + 1;
|
||||
|
||||
if (w.checkChunksExist(x - var8, y - var8, z - var8, x + var8, y + var8, z + var8))
|
||||
{
|
||||
for (int var9 = -var7; var9 <= var7; var9++)
|
||||
{
|
||||
for (int var10 = -var7; var10 <= var7; var10++)
|
||||
{
|
||||
for (int var11 = -var7; var11 <= var7; var11++)
|
||||
{
|
||||
Block var12 = w.getBlock(x + var9, y + var10, z + var11);
|
||||
|
||||
if (var12 == Blocks.air) continue;
|
||||
var12.beginLeavesDecay(w, x + var9, y + var10, z + var11);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public void updateTick (World w, int x, int y, int z, Random r)
|
||||
{
|
||||
if (!w.isRemote)
|
||||
{
|
||||
int var6 = w.getBlockMetadata(x, y, z);
|
||||
|
||||
if ( ( (var6 & 0x8) != 0) && ( (var6 & 0x4) == 0))
|
||||
{
|
||||
byte var7 = 4;
|
||||
int var8 = var7 + 1;
|
||||
byte var9 = 32;
|
||||
int var10 = var9 * var9;
|
||||
int var11 = var9 / 2;
|
||||
|
||||
if (this.adjacentTreeBlocks == null)
|
||||
{
|
||||
this.adjacentTreeBlocks = new int[var9 * var9 * var9];
|
||||
}
|
||||
|
||||
if (w.checkChunksExist(x - var8, y - var8, z - var8, x + var8, y + var8, z + var8))
|
||||
{
|
||||
for (int var12 = -var7; var12 <= var7; var12++)
|
||||
{
|
||||
for (int var13 = -var7; var13 <= var7; var13++)
|
||||
{
|
||||
for (int var14 = -var7; var14 <= var7; var14++)
|
||||
{
|
||||
Block block = w.getBlock(x + var12, y + var13, z + var14);
|
||||
|
||||
if ( (block != null) && (block.canSustainLeaves(w, x + var12, y + var13, z + var14)))
|
||||
{
|
||||
this.adjacentTreeBlocks[ ( (var12 + var11) * var10 + (var13 + var11) * var9 + var14 + var11)] = 0;
|
||||
}
|
||||
else if ( (block != null) && (block.isLeaves(w, x + var12, y + var13, z + var14)))
|
||||
{
|
||||
this.adjacentTreeBlocks[ ( (var12 + var11) * var10 + (var13 + var11) * var9 + var14 + var11)] = -2;
|
||||
}
|
||||
else
|
||||
{
|
||||
this.adjacentTreeBlocks[ ( (var12 + var11) * var10 + (var13 + var11) * var9 + var14 + var11)] = -1;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
int var15 = 0;
|
||||
for (int var12 = 1; var12 <= 4; var12++)
|
||||
{
|
||||
for (int var13 = -var7; var13 <= var7; var13++)
|
||||
{
|
||||
for (int var14 = -var7; var14 <= var7; var14++)
|
||||
{
|
||||
for (var15 = -var7; var15 <= var7; var15++)
|
||||
{
|
||||
if (this.adjacentTreeBlocks[ ( (var13 + var11) * var10 + (var14 + var11) * var9 + var15 + var11)] != var12 - 1) continue;
|
||||
if (this.adjacentTreeBlocks[ ( (var13 + var11 - 1) * var10 + (var14 + var11) * var9 + var15 + var11)] == -2)
|
||||
{
|
||||
this.adjacentTreeBlocks[ ( (var13 + var11 - 1) * var10 + (var14 + var11) * var9 + var15 + var11)] = var12;
|
||||
}
|
||||
|
||||
if (this.adjacentTreeBlocks[ ( (var13 + var11 + 1) * var10 + (var14 + var11) * var9 + var15 + var11)] == -2)
|
||||
{
|
||||
this.adjacentTreeBlocks[ ( (var13 + var11 + 1) * var10 + (var14 + var11) * var9 + var15 + var11)] = var12;
|
||||
}
|
||||
|
||||
if (this.adjacentTreeBlocks[ ( (var13 + var11) * var10 + (var14 + var11 - 1) * var9 + var15 + var11)] == -2)
|
||||
{
|
||||
this.adjacentTreeBlocks[ ( (var13 + var11) * var10 + (var14 + var11 - 1) * var9 + var15 + var11)] = var12;
|
||||
}
|
||||
|
||||
if (this.adjacentTreeBlocks[ ( (var13 + var11) * var10 + (var14 + var11 + 1) * var9 + var15 + var11)] == -2)
|
||||
{
|
||||
this.adjacentTreeBlocks[ ( (var13 + var11) * var10 + (var14 + var11 + 1) * var9 + var15 + var11)] = var12;
|
||||
}
|
||||
|
||||
if (this.adjacentTreeBlocks[ ( (var13 + var11) * var10 + (var14 + var11) * var9 + (var15 + var11 - 1))] == -2)
|
||||
{
|
||||
this.adjacentTreeBlocks[ ( (var13 + var11) * var10 + (var14 + var11) * var9 + (var15 + var11 - 1))] = var12;
|
||||
}
|
||||
|
||||
if (this.adjacentTreeBlocks[ ( (var13 + var11) * var10 + (var14 + var11) * var9 + var15 + var11 + 1)] != -2) continue;
|
||||
this.adjacentTreeBlocks[ ( (var13 + var11) * var10 + (var14 + var11) * var9 + var15 + var11 + 1)] = var12;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
int var12 = this.adjacentTreeBlocks[ (var11 * var10 + var11 * var9 + var11)];
|
||||
|
||||
if (var12 >= 0)
|
||||
{
|
||||
w.setBlock(x, y, z, this, var6 & 0xFFFFFFF7, 3);
|
||||
}
|
||||
else
|
||||
{
|
||||
removeLeaves(w, x, y, z);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void removeLeaves (World w, int x, int y, int z)
|
||||
{
|
||||
dropBlockAsItem(w, x, y, z, w.getBlockMetadata(x, y, z), 0);
|
||||
w.setBlockToAir(x, y, z);
|
||||
}
|
||||
|
||||
public void dropBlockAsItemWithChance (World w, int x, int y, int z, int m, float f, int i)
|
||||
{
|
||||
if ( (!w.isRemote) && ( (m & 0x8) != 0) && ( (m & 0x4) == 0))
|
||||
{
|
||||
if ( ( (m & 0x1) == 0) && (w.rand.nextInt(50) == 0))
|
||||
{
|
||||
dropBlockAsItem(w, x, y, z, new ItemStack(BlockRegistry.BlockWarpwoodSapling));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public void harvestBlock (World w, EntityPlayer p, int x, int y, int z, int i)
|
||||
{
|
||||
super.harvestBlock(w, p, x, y, z, i);
|
||||
}
|
||||
|
||||
public int damageDropped (int i)
|
||||
{
|
||||
return i & 0x1;
|
||||
}
|
||||
|
||||
public int quantityDropped (Random r)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
public Item getItemDropped (int i, Random r, int i2)
|
||||
{
|
||||
return Item.getItemById(0);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isLeaves (IBlockAccess w, int x, int y, int z)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
public void beginLeavesDecay (World w, int x, int y, int z)
|
||||
{
|
||||
w.setBlockMetadataWithNotify(x, y, z, w.getBlockMetadata(x, y, z) | 0x8, 4);
|
||||
}
|
||||
|
||||
@SideOnly (Side.CLIENT)
|
||||
public int getBlockColor ()
|
||||
{
|
||||
return 0xFFFFFF;
|
||||
}
|
||||
|
||||
public ItemStack getPickBlock (MovingObjectPosition t, World w, int x, int y, int z)
|
||||
{
|
||||
int m = w.getBlockMetadata(x, y, z);
|
||||
return new ItemStack(this, 1, m & 0x1);
|
||||
}
|
||||
|
||||
@SideOnly (Side.CLIENT)
|
||||
@Override
|
||||
public int getRenderColor (int m)
|
||||
{
|
||||
return 0xFFFFFF;
|
||||
}
|
||||
|
||||
@SideOnly (Side.CLIENT)
|
||||
public int colorMultiplier (IBlockAccess w, int x, int y, int z)
|
||||
{
|
||||
return 0xFFFFFF;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isShearable (ItemStack s, IBlockAccess w, int x, int y, int z)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
public ArrayList<ItemStack> onSheared (ItemStack s, IBlockAccess w, int x, int y, int z, int fortune)
|
||||
{
|
||||
ArrayList ret = new ArrayList();
|
||||
ret.add(new ItemStack(this, 1, w.getBlockMetadata(x, y, z) & 0x3));
|
||||
return ret;
|
||||
}
|
||||
|
||||
public int getFlammability (IBlockAccess w, int x, int y, int z, ForgeDirection face)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
public int getFireSpreadSpeed (IBlockAccess w, int x, int y, int z, ForgeDirection face)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,71 @@
|
||||
package taintedmagic.common.blocks;
|
||||
|
||||
import java.util.Random;
|
||||
|
||||
import taintedmagic.common.TaintedMagic;
|
||||
import taintedmagic.common.registry.BlockRegistry;
|
||||
import thaumcraft.common.config.ConfigItems;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.BlockRotatedPillar;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.util.IIcon;
|
||||
import net.minecraft.world.IBlockAccess;
|
||||
import net.minecraftforge.common.util.ForgeDirection;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
|
||||
public class BlockWarpwoodLog extends BlockRotatedPillar
|
||||
{
|
||||
private IIcon side;
|
||||
private IIcon top;
|
||||
|
||||
public BlockWarpwoodLog ()
|
||||
{
|
||||
super(Material.wood);
|
||||
this.setCreativeTab(TaintedMagic.tabTaintedMagic);
|
||||
this.setHardness(2.5F);
|
||||
this.setStepSound(soundTypeWood);
|
||||
this.setBlockName("BlockWarpwoodLog");
|
||||
}
|
||||
|
||||
@SideOnly (Side.CLIENT)
|
||||
protected IIcon getTopIcon (int i)
|
||||
{
|
||||
return this.top;
|
||||
}
|
||||
|
||||
@SideOnly (Side.CLIENT)
|
||||
protected IIcon getSideIcon (int i)
|
||||
{
|
||||
return this.side;
|
||||
}
|
||||
|
||||
@SideOnly (Side.CLIENT)
|
||||
public void registerBlockIcons (IIconRegister ir)
|
||||
{
|
||||
this.side = ir.registerIcon("taintedmagic:BlockWarpwoodLog_side");
|
||||
this.top = ir.registerIcon("taintedmagic:BlockWarpwoodLog_top");
|
||||
}
|
||||
|
||||
public boolean canSustainLeaves (IBlockAccess w, int x, int y, int z)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
public boolean isWood (IBlockAccess w, int x, int y, int z)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
public int getFlammability (IBlockAccess w, int x, int y, int z, ForgeDirection face)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
public int getFireSpreadSpeed (IBlockAccess w, int x, int y, int z, ForgeDirection face)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
package taintedmagic.common.blocks;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.material.Material;
|
||||
import taintedmagic.common.TaintedMagic;
|
||||
|
||||
public class BlockWarpwoodPlanks extends Block
|
||||
{
|
||||
public BlockWarpwoodPlanks ()
|
||||
{
|
||||
super(Material.wood);
|
||||
this.setCreativeTab(TaintedMagic.tabTaintedMagic);
|
||||
this.setBlockName("BlockWarpwoodPlanks");
|
||||
this.setBlockTextureName("taintedmagic:BlockWarpwoodPlanks");
|
||||
this.setHardness(0.8F);
|
||||
this.setStepSound(soundTypeWood);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,75 @@
|
||||
package taintedmagic.common.blocks;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Random;
|
||||
|
||||
import net.minecraft.block.BlockSapling;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
import net.minecraft.creativetab.CreativeTabs;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.IIcon;
|
||||
import net.minecraft.util.MathHelper;
|
||||
import net.minecraft.world.World;
|
||||
import taintedmagic.common.TaintedMagic;
|
||||
import taintedmagic.common.registry.BlockRegistry;
|
||||
import taintedmagic.common.world.WorldGenWarpwoodTree;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
|
||||
public class BlockWarpwoodSapling extends BlockSapling
|
||||
{
|
||||
public BlockWarpwoodSapling ()
|
||||
{
|
||||
super();
|
||||
this.setCreativeTab(TaintedMagic.tabTaintedMagic);
|
||||
this.setBlockName("BlockWarpwoodSapling");
|
||||
this.setStepSound(soundTypeGrass);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void func_149878_d (World world, int x, int y, int z, Random rand)
|
||||
{
|
||||
if (!world.isRemote)
|
||||
{
|
||||
int meta = world.getBlockMetadata(x, y, z);
|
||||
|
||||
world.setBlockToAir(x, y, z);
|
||||
|
||||
WorldGenWarpwoodTree tree = new WorldGenWarpwoodTree(true, BlockRegistry.BlockWarpwoodLog, BlockRegistry.BlockWarpwoodLeaves);
|
||||
|
||||
if (!tree.generate(world, rand, x, y, z))
|
||||
{
|
||||
world.setBlock(x, y, z, this, meta, 2);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly (Side.CLIENT)
|
||||
public void getSubBlocks (Item s, CreativeTabs t, List l)
|
||||
{
|
||||
l.add(new ItemStack(this, 1, 0));
|
||||
}
|
||||
|
||||
@Override
|
||||
public Item getItemDropped (int i, Random random, int i2)
|
||||
{
|
||||
return Item.getItemFromBlock(this);
|
||||
}
|
||||
|
||||
@SideOnly (Side.CLIENT)
|
||||
@Override
|
||||
public void registerBlockIcons (IIconRegister ir)
|
||||
{
|
||||
this.blockIcon = ir.registerIcon("taintedmagic:BlockWarpwoodSapling");
|
||||
}
|
||||
|
||||
@SideOnly (Side.CLIENT)
|
||||
@Override
|
||||
public IIcon getIcon (int side, int meta)
|
||||
{
|
||||
return this.blockIcon;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,73 @@
|
||||
package taintedmagic.common.entities;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
import net.minecraft.potion.Potion;
|
||||
import net.minecraft.potion.PotionEffect;
|
||||
import net.minecraft.util.DamageSource;
|
||||
import net.minecraft.util.EntityDamageSourceIndirect;
|
||||
import net.minecraft.util.MovingObjectPosition;
|
||||
import net.minecraft.util.MovingObjectPosition.MovingObjectType;
|
||||
import net.minecraft.world.World;
|
||||
import thaumcraft.common.entities.projectile.EntityEldritchOrb;
|
||||
|
||||
public class EntityEldritchOrbAttack extends EntityEldritchOrb
|
||||
{
|
||||
public float dmg = 10F;
|
||||
public boolean corrosive;
|
||||
|
||||
public EntityEldritchOrbAttack (World w)
|
||||
{
|
||||
super(w);
|
||||
}
|
||||
|
||||
public EntityEldritchOrbAttack (World w, EntityLivingBase e, boolean corrosive)
|
||||
{
|
||||
super(w, e);
|
||||
this.corrosive = corrosive;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onImpact (MovingObjectPosition mop)
|
||||
{
|
||||
if (!this.worldObj.isRemote && getThrower() != null)
|
||||
{
|
||||
if (mop.entityHit != null)
|
||||
{
|
||||
Entity ent = mop.entityHit;
|
||||
if (ent instanceof EntityLivingBase)
|
||||
{
|
||||
((EntityLivingBase) ent).attackEntityFrom(DamageSource.causeIndirectMagicDamage(getThrower(), ent), this.dmg);
|
||||
if (this.corrosive)
|
||||
{
|
||||
try
|
||||
{
|
||||
((EntityLivingBase) ent).addPotionEffect(new PotionEffect(Potion.wither.id, 160, 1));
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
try
|
||||
{
|
||||
((EntityLivingBase) ent).addPotionEffect(new PotionEffect(Potion.weakness.id, 160, 1));
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
this.worldObj.playSoundAtEntity(this, "random.fizz", 0.5F, 2.6F + (this.rand.nextFloat() - this.rand.nextFloat()) * 0.8F);
|
||||
this.ticksExisted = 100;
|
||||
this.worldObj.setEntityState(this, (byte) 16);
|
||||
}
|
||||
setDead();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,171 @@
|
||||
package taintedmagic.common.entities;
|
||||
|
||||
import cpw.mods.fml.common.registry.IEntityAdditionalSpawnData;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import io.netty.buffer.ByteBuf;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Random;
|
||||
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
import net.minecraft.entity.SharedMonsterAttributes;
|
||||
import net.minecraft.entity.projectile.EntityThrowable;
|
||||
import net.minecraft.init.Blocks;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.potion.Potion;
|
||||
import net.minecraft.potion.PotionEffect;
|
||||
import net.minecraft.util.DamageSource;
|
||||
import net.minecraft.util.EntityDamageSourceIndirect;
|
||||
import net.minecraft.util.MovingObjectPosition;
|
||||
import net.minecraft.world.World;
|
||||
import thaumcraft.api.potions.PotionFluxTaint;
|
||||
import thaumcraft.common.Thaumcraft;
|
||||
import thaumcraft.common.config.Config;
|
||||
|
||||
public class EntityTaintBubble extends EntityThrowable implements IEntityAdditionalSpawnData
|
||||
{
|
||||
public static final String TAG_DURATION = "duration";
|
||||
public static final String TAG_DAMAGE = "damage";
|
||||
|
||||
public boolean corrosive = false;
|
||||
public int duration = 20;
|
||||
public float damage = 5F;
|
||||
|
||||
public EntityTaintBubble (World w)
|
||||
{
|
||||
super(w);
|
||||
}
|
||||
|
||||
public EntityTaintBubble (World w, EntityLivingBase e, float scatter, boolean corrosive)
|
||||
{
|
||||
super(w, e);
|
||||
this.corrosive = corrosive;
|
||||
setThrowableHeading(this.motionX, this.motionY, this.motionZ, func_70182_d(), scatter);
|
||||
}
|
||||
|
||||
protected float getGravityVelocity ()
|
||||
{
|
||||
return 0.0F;
|
||||
}
|
||||
|
||||
protected float func_70182_d ()
|
||||
{
|
||||
return 1.0F;
|
||||
}
|
||||
|
||||
public void onUpdate ()
|
||||
{
|
||||
if (this.ticksExisted > this.duration) setDead();
|
||||
|
||||
if (this.duration <= 20)
|
||||
{
|
||||
this.motionX *= 0.95D;
|
||||
this.motionY *= 0.95D;
|
||||
this.motionZ *= 0.95D;
|
||||
}
|
||||
else
|
||||
{
|
||||
this.motionX *= 0.975D;
|
||||
this.motionY *= 0.975D;
|
||||
this.motionZ *= 0.975D;
|
||||
}
|
||||
|
||||
if (this.onGround)
|
||||
{
|
||||
this.motionX *= 0.66D;
|
||||
this.motionY *= 0.66D;
|
||||
this.motionZ *= 0.66D;
|
||||
}
|
||||
super.onUpdate();
|
||||
}
|
||||
|
||||
public void writeSpawnData (ByteBuf data)
|
||||
{
|
||||
data.writeByte(this.duration);
|
||||
}
|
||||
|
||||
public void readSpawnData (ByteBuf data)
|
||||
{
|
||||
this.duration = data.readByte();
|
||||
}
|
||||
|
||||
protected void onImpact (MovingObjectPosition mop)
|
||||
{
|
||||
if ( (!this.worldObj.isRemote) && (getThrower() != null))
|
||||
{
|
||||
List list = this.worldObj.getEntitiesWithinAABBExcludingEntity(getThrower(), this.boundingBox.expand(1.0D, 1.0D, 1.0D));
|
||||
|
||||
for (int i = 0; i < list.size(); i++)
|
||||
{
|
||||
Entity ent = (Entity) list.get(i);
|
||||
if (ent instanceof EntityLivingBase)
|
||||
{
|
||||
if (mop.entityHit != null)
|
||||
{
|
||||
((EntityLivingBase) ent).attackEntityFrom(new EntityDamageSourceIndirect("taint", this, getThrower()).setMagicDamage(), this.damage);
|
||||
if (this.corrosive)
|
||||
{
|
||||
try
|
||||
{
|
||||
((EntityLivingBase) ent).addPotionEffect(new PotionEffect(Potion.wither.id, 100, 1));
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
try
|
||||
{
|
||||
((EntityLivingBase) ent).addPotionEffect(new PotionEffect(Potion.poison.id, 100, 1));
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
setDead();
|
||||
}
|
||||
|
||||
protected boolean canTriggerWalking ()
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
@SideOnly (Side.CLIENT)
|
||||
public float getShadowSize ()
|
||||
{
|
||||
return 0.1F;
|
||||
}
|
||||
|
||||
public void writeEntityToNBT (NBTTagCompound cmp)
|
||||
{
|
||||
super.writeEntityToNBT(cmp);
|
||||
cmp.setFloat(TAG_DAMAGE, this.damage);
|
||||
cmp.setInteger(TAG_DURATION, this.duration);
|
||||
}
|
||||
|
||||
public void readEntityFromNBT (NBTTagCompound cmp)
|
||||
{
|
||||
super.readEntityFromNBT(cmp);
|
||||
this.damage = cmp.getInteger(TAG_DAMAGE);
|
||||
this.duration = cmp.getInteger(TAG_DURATION);
|
||||
}
|
||||
|
||||
public boolean canBeCollidedWith ()
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
public boolean attackEntityFrom (DamageSource s, float f)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,27 @@
|
||||
package taintedmagic.common.handler;
|
||||
|
||||
import net.minecraftforge.common.config.Configuration;
|
||||
import net.minecraftforge.common.config.Property;
|
||||
import taintedmagic.common.TaintedMagic;
|
||||
|
||||
public class ConfigHandler
|
||||
{
|
||||
public static Configuration config;
|
||||
|
||||
public static boolean useUpdateHandler = true;
|
||||
public static boolean researchTags = true;
|
||||
public static boolean useCustomResearchTabBackground = false;
|
||||
|
||||
public static void init ()
|
||||
{
|
||||
TaintedMagic.log.info("Loading config");
|
||||
|
||||
config.load();
|
||||
|
||||
useUpdateHandler = config.getBoolean("use_update_handler", "misc", true, "Should update notifications be enabled?");
|
||||
researchTags = config.getBoolean("research_tags", "research", true, "Setting this to false will disable the '[TaintedMagic]' tag on the research");
|
||||
useCustomResearchTabBackground = config.getBoolean("use_custom_research_tab_background", "research", false, "Setting this to true will enable the old custom tab background");
|
||||
|
||||
config.save();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,274 @@
|
||||
package taintedmagic.common.handler;
|
||||
|
||||
import java.util.Random;
|
||||
import java.util.UUID;
|
||||
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
import net.minecraft.entity.SharedMonsterAttributes;
|
||||
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.inventory.IInventory;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.nbt.NBTTagList;
|
||||
import net.minecraft.potion.Potion;
|
||||
import net.minecraft.potion.PotionEffect;
|
||||
import net.minecraft.util.ChatComponentText;
|
||||
import net.minecraft.util.EnumChatFormatting;
|
||||
import net.minecraft.util.StatCollector;
|
||||
import net.minecraftforge.event.entity.living.LivingAttackEvent;
|
||||
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.registry.ItemRegistry;
|
||||
import thaumcraft.api.ThaumcraftApiHelper;
|
||||
import thaumcraft.api.aspects.Aspect;
|
||||
import thaumcraft.api.aspects.AspectList;
|
||||
import thaumcraft.api.wands.ItemFocusBasic;
|
||||
import thaumcraft.api.wands.StaffRod;
|
||||
import thaumcraft.api.wands.WandRod;
|
||||
import thaumcraft.common.Thaumcraft;
|
||||
import thaumcraft.common.config.Config;
|
||||
import thaumcraft.common.config.ConfigItems;
|
||||
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;
|
||||
import cpw.mods.fml.common.eventhandler.SubscribeEvent;
|
||||
import cpw.mods.fml.common.gameevent.PlayerEvent;
|
||||
import cpw.mods.fml.common.gameevent.PlayerEvent.ItemCraftedEvent;
|
||||
|
||||
public class TaintedMagicEventHandler
|
||||
{
|
||||
Random randy = new Random();
|
||||
|
||||
@SubscribeEvent
|
||||
public void livingTick (LivingEvent.LivingUpdateEvent event)
|
||||
{
|
||||
if (event.entity instanceof EntityPlayer)
|
||||
{
|
||||
EntityPlayer p = (EntityPlayer) event.entity;
|
||||
updateAttackDamage(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 (!p.worldObj.isRemote && s.isItemDamaged() && p.ticksExisted % 20 == 0) s.damageItem(-1, (EntityLivingBase) p);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* Used to upate the attack damage for the Mage's Mace focus
|
||||
*/
|
||||
public void updateAttackDamage (EntityPlayer p)
|
||||
{
|
||||
if (!p.worldObj.isRemote)
|
||||
{
|
||||
IInventory inv = p.inventory;
|
||||
|
||||
for (int i = 0; i < inv.getSizeInventory(); i++)
|
||||
{
|
||||
if (inv.getStackInSlot(i) != null && inv.getStackInSlot(i).getItem() instanceof ItemWandCasting)
|
||||
{
|
||||
ItemStack s = inv.getStackInSlot(i);
|
||||
ItemWandCasting wand = (ItemWandCasting) inv.getStackInSlot(i).getItem();
|
||||
|
||||
if (wand.getFocus(s) != null && wand.getFocus(s) == ItemRegistry.ItemFocusMageMace && wand.getRod(s) instanceof WandRod)
|
||||
{
|
||||
NBTTagList tags = new NBTTagList();
|
||||
NBTTagCompound tag = new NBTTagCompound();
|
||||
tag.setString("AttributeName", SharedMonsterAttributes.attackDamage.getAttributeUnlocalizedName());
|
||||
|
||||
UUID u = UUID.fromString("CB3F55D3-645C-4F38-A497-9C13A33DB5CF");
|
||||
AttributeModifier am = new AttributeModifier(u, "Weapon modifier", 15.0D + wand.getFocusPotency(s), 0);
|
||||
|
||||
tag.setString("Name", am.getName());
|
||||
tag.setDouble("Amount", am.getAmount());
|
||||
tag.setInteger("Operation", am.getOperation());
|
||||
tag.setLong("UUIDMost", am.getID().getMostSignificantBits());
|
||||
tag.setLong("UUIDLeast", am.getID().getLeastSignificantBits());
|
||||
|
||||
tags.appendTag(tag);
|
||||
s.stackTagCompound.setTag("AttributeModifiers", tags);
|
||||
}
|
||||
else if (wand.getRod(s) instanceof WandRod)
|
||||
{
|
||||
if (!s.hasTagCompound())
|
||||
{
|
||||
s.setTagCompound(new NBTTagCompound());
|
||||
}
|
||||
s.stackTagCompound.removeTag("AttributeModifiers");
|
||||
}
|
||||
if (wand.getFocus(s) != null && wand.getFocus(s) == ItemRegistry.ItemFocusMageMace && wand.getRod(s) instanceof StaffRod)
|
||||
{
|
||||
NBTTagList tags = new NBTTagList();
|
||||
NBTTagCompound tag = new NBTTagCompound();
|
||||
tag.setString("AttributeName", SharedMonsterAttributes.attackDamage.getAttributeUnlocalizedName());
|
||||
|
||||
UUID u = UUID.fromString("CB3F55D3-645C-4F38-A497-9C13A33DB5CF");
|
||||
AttributeModifier am = new AttributeModifier(u, "Weapon modifier", 21.0D + wand.getFocusPotency(s), 0);
|
||||
|
||||
tag.setString("Name", am.getName());
|
||||
tag.setDouble("Amount", am.getAmount());
|
||||
tag.setInteger("Operation", am.getOperation());
|
||||
tag.setLong("UUIDMost", am.getID().getMostSignificantBits());
|
||||
tag.setLong("UUIDLeast", am.getID().getLeastSignificantBits());
|
||||
|
||||
tags.appendTag(tag);
|
||||
s.stackTagCompound.setTag("AttributeModifiers", tags);
|
||||
}
|
||||
else if (wand.getRod(s) instanceof StaffRod)
|
||||
{
|
||||
NBTTagList tags = new NBTTagList();
|
||||
NBTTagCompound tag = new NBTTagCompound();
|
||||
tag.setString("AttributeName", SharedMonsterAttributes.attackDamage.getAttributeUnlocalizedName());
|
||||
|
||||
UUID u = UUID.fromString("CB3F55D3-645C-4F38-A497-9C13A33DB5CF");
|
||||
AttributeModifier am = new AttributeModifier(u, "Weapon modifier", 6.0D, 0);
|
||||
|
||||
tag.setString("Name", am.getName());
|
||||
tag.setDouble("Amount", am.getAmount());
|
||||
tag.setInteger("Operation", am.getOperation());
|
||||
tag.setLong("UUIDMost", am.getID().getMostSignificantBits());
|
||||
tag.setLong("UUIDLeast", am.getID().getLeastSignificantBits());
|
||||
|
||||
tags.appendTag(tag);
|
||||
s.stackTagCompound.setTag("AttributeModifiers", tags);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@SubscribeEvent
|
||||
public void entityAttacked (LivingAttackEvent event)
|
||||
{
|
||||
if (event.source.getEntity() instanceof EntityPlayer)
|
||||
{
|
||||
EntityPlayer p = (EntityPlayer) event.source.getEntity();
|
||||
if (p.getHeldItem() != null && p.getHeldItem().getItem() instanceof ItemWandCasting)
|
||||
{
|
||||
ItemStack s = p.getHeldItem();
|
||||
ItemWandCasting wand = (ItemWandCasting) s.getItem();
|
||||
|
||||
if (wand.getFocus(s) != null && wand.getFocus(s) instanceof ItemFocusMageMace)
|
||||
{
|
||||
final AspectList aspects = new AspectList().add(Aspect.EARTH, 20).add(Aspect.ENTROPY, 20).add(Aspect.ORDER, 20);
|
||||
if (wand.consumeAllVis(s, p, aspects, true, false))
|
||||
{
|
||||
wand.consumeAllVis(s, p, aspects, true, false);
|
||||
}
|
||||
else
|
||||
{
|
||||
event.setCanceled(true);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@SubscribeEvent
|
||||
public void onPlayerLogin (PlayerEvent.PlayerLoggedInEvent event)
|
||||
{
|
||||
if (UpdateHandler.show) event.player.addChatMessage(new ChatComponentText(UpdateHandler.updateStatus));
|
||||
}
|
||||
|
||||
@SubscribeEvent
|
||||
public void onCrafting (ItemCraftedEvent event)
|
||||
{
|
||||
if (event.crafting == new ItemStack(ItemRegistry.ItemWandCap, 1, 0))
|
||||
{
|
||||
EntityItem ent = event.player.entityDropItem(new ItemStack(ConfigItems.itemEldritchObject, 1, 3), 0);
|
||||
ent.motionY += randy.nextFloat() * 0.05F;
|
||||
ent.motionX += (randy.nextFloat() - randy.nextFloat()) * 0.1F;
|
||||
ent.motionZ += (randy.nextFloat() - randy.nextFloat()) * 0.1F;
|
||||
}
|
||||
if (event.crafting == new ItemStack(ItemRegistry.ItemWandRod, 1, 0))
|
||||
{
|
||||
EntityItem ent = event.player.entityDropItem(new ItemStack(ConfigItems.itemEldritchObject, 1, 3), 0);
|
||||
ent.motionY += randy.nextFloat() * 0.05F;
|
||||
ent.motionX += (randy.nextFloat() - randy.nextFloat()) * 0.1F;
|
||||
ent.motionZ += (randy.nextFloat() - randy.nextFloat()) * 0.1F;
|
||||
}
|
||||
if (event.crafting.getItem() == ItemRegistry.ItemMaterial && event.crafting.getItemDamage() == 5) giveResearch(event.player);
|
||||
}
|
||||
|
||||
public void giveResearch (EntityPlayer player)
|
||||
{
|
||||
if ( (!ThaumcraftApiHelper.isResearchComplete(player.getCommandSenderName(), "CREATION") && (ThaumcraftApiHelper.isResearchComplete(player.getCommandSenderName(), "CREATIONSHARD") && !player.worldObj.isRemote)))
|
||||
{
|
||||
Thaumcraft.proxy.getResearchManager().completeResearch(player, "CREATION");
|
||||
PacketHandler.INSTANCE.sendTo(new PacketResearchComplete("CREATION"), (EntityPlayerMP) player);
|
||||
player.addChatMessage(new ChatComponentText(StatCollector.translateToLocal("text.1")));
|
||||
player.playSound("thaumcraft:wind", 1.0F, 5.0F);
|
||||
try
|
||||
{
|
||||
player.addPotionEffect(new PotionEffect(Potion.blindness.id, 80, 0));
|
||||
player.addPotionEffect(new PotionEffect(Config.potionBlurredID, 200, 0));
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
e.printStackTrace();
|
||||
}
|
||||
if ( (!ThaumcraftApiHelper.isResearchComplete(player.getCommandSenderName(), "OUTERREV") && (ThaumcraftApiHelper.isResearchComplete(player.getCommandSenderName(), "CREATION") && !player.worldObj.isRemote)))
|
||||
{
|
||||
Thaumcraft.proxy.getResearchManager().completeResearch(player, "OUTERREV");
|
||||
PacketHandler.INSTANCE.sendTo(new PacketResearchComplete("OUTERREV"), (EntityPlayerMP) player);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@SubscribeEvent
|
||||
public void livingDrop (LivingDropsEvent event)
|
||||
{
|
||||
if (event.source.getEntity() instanceof EntityPlayer)
|
||||
{
|
||||
EntityPlayer p = (EntityPlayer) event.source.getEntity();
|
||||
if (p.getHeldItem() != null && (p.getHeldItem().getItem() instanceof IBloodlust || p.getHeldItem().getItem() instanceof ItemCrimsonSword))
|
||||
{
|
||||
Random r = new Random();
|
||||
ItemStack drops = new ItemStack(ItemRegistry.ItemMaterial, r.nextInt(5), 7);
|
||||
addDropItem(event, drops);
|
||||
}
|
||||
else if (p.getHeldItem() != null && p.getHeldItem().getItem() instanceof ItemWandCasting && ((ItemWandCasting) p.getHeldItem().getItem()).getFocus(p.getHeldItem()) != null && ((ItemWandCasting) p.getHeldItem().getItem()).getFocus(p.getHeldItem()).isUpgradedWith( ((ItemWandCasting) p.getHeldItem().getItem()).getFocusItem(p.getHeldItem()), ItemFocusMageMace.bloodlust))
|
||||
{
|
||||
Random r = new Random();
|
||||
ItemStack drops = new ItemStack(ItemRegistry.ItemMaterial, r.nextInt(5), 7);
|
||||
addDropItem(event, drops);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public void addDropItem (LivingDropsEvent event, ItemStack drop)
|
||||
{
|
||||
EntityItem entityitem = new EntityItem(event.entityLiving.worldObj, event.entityLiving.posX, event.entityLiving.posY, event.entityLiving.posZ, drop);
|
||||
entityitem.delayBeforeCanPickup = 10;
|
||||
event.drops.add(entityitem);
|
||||
}
|
||||
|
||||
@SubscribeEvent
|
||||
public void tooltipEvent (ItemTooltipEvent event)
|
||||
{
|
||||
if (event.itemStack.getItem() instanceof ItemFocusMageMace)
|
||||
{
|
||||
if (event.toolTip.contains(StatCollector.translateToLocal("item.Focus.cost1")))
|
||||
{
|
||||
event.toolTip.remove(StatCollector.translateToLocal("item.Focus.cost1"));
|
||||
event.toolTip.add(1, StatCollector.translateToLocal("item.Focus.cost3"));
|
||||
}
|
||||
}
|
||||
if (event.itemStack.getItem() instanceof IBloodlust) event.toolTip.add("\u00A74" + StatCollector.translateToLocal("text.bloodlust"));
|
||||
if (event.itemStack.getItem() instanceof ItemCrimsonSword) event.toolTip.add("\u00A74" + StatCollector.translateToLocal("text.bloodlust"));
|
||||
if ( (event.itemStack.getItem() instanceof ItemFocusMageMace && ((ItemFocusBasic) event.itemStack.getItem()).isUpgradedWith(event.itemStack, ItemFocusMageMace.bloodlust)) || (event.itemStack.getItem() instanceof ItemWandCasting && ((ItemWandCasting) event.itemStack.getItem()).getFocus(event.itemStack) != null && ((ItemWandCasting) event.itemStack.getItem()).getFocus(event.itemStack) instanceof ItemFocusMageMace && ((ItemWandCasting) event.itemStack.getItem()).getFocus(event.itemStack).isUpgradedWith( ((ItemWandCasting) event.itemStack.getItem()).getFocusItem(event.itemStack), ItemFocusMageMace.bloodlust))) event.toolTip.add("\u00A74" + StatCollector.translateToLocal("text.bloodlust"));
|
||||
|
||||
if (event.itemStack.stackTagCompound != null && event.itemStack.stackTagCompound.getBoolean("voidtouched")) event.toolTip.add("\u00A75" + StatCollector.translateToLocal("text.voidtouched"));
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,60 @@
|
||||
package taintedmagic.common.handler;
|
||||
|
||||
import java.io.BufferedReader;
|
||||
import java.io.IOException;
|
||||
import java.io.InputStreamReader;
|
||||
import java.net.URL;
|
||||
import java.util.Scanner;
|
||||
|
||||
import taintedmagic.common.TaintedMagic;
|
||||
import taintedmagic.common.lib.LibStrings;
|
||||
import net.minecraft.util.EnumChatFormatting;
|
||||
|
||||
public class UpdateHandler
|
||||
{
|
||||
private static String currentVersion = LibStrings.VERSION;
|
||||
private static String newestVersion;
|
||||
public static String updateStatus = null;
|
||||
public static boolean show = false;
|
||||
|
||||
public static void init ()
|
||||
{
|
||||
getNewestVersion();
|
||||
|
||||
if (newestVersion != null)
|
||||
{
|
||||
if (newestVersion.equalsIgnoreCase(currentVersion))
|
||||
{
|
||||
show = false;
|
||||
}
|
||||
else if (!newestVersion.equalsIgnoreCase(currentVersion))
|
||||
{
|
||||
show = true;
|
||||
updateStatus = (EnumChatFormatting.RED + "Tainted Magic is out of date! The latest version is " + EnumChatFormatting.GREEN + newestVersion);
|
||||
TaintedMagic.log.info("Mod out of date! You're still running: " + currentVersion + ", Latest Version: " + newestVersion);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
show = true;
|
||||
updateStatus = (EnumChatFormatting.RED + "Tainted Magic failed to connect to update server!");
|
||||
TaintedMagic.log.info("Failed to connect to update server...");
|
||||
}
|
||||
}
|
||||
|
||||
private static void getNewestVersion ()
|
||||
{
|
||||
try
|
||||
{
|
||||
URL url = new URL("https://raw.githubusercontent.com/yorkeJohn/Tainted-Magic/master/version.txt");
|
||||
Scanner s = new Scanner(url.openStream());
|
||||
newestVersion = s.next();
|
||||
s.close();
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
ex.printStackTrace();
|
||||
TaintedMagic.log.info("Could not connect to GitHub repository!");
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,45 @@
|
||||
package taintedmagic.common.handler;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Random;
|
||||
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.potion.Potion;
|
||||
import net.minecraft.potion.PotionEffect;
|
||||
import net.minecraft.world.World;
|
||||
import taintedmagic.common.TaintedMagic;
|
||||
import thaumcraft.api.aspects.Aspect;
|
||||
import thaumcraft.api.wands.IWandRodOnUpdate;
|
||||
import thaumcraft.common.Thaumcraft;
|
||||
import thaumcraft.common.config.Config;
|
||||
import thaumcraft.common.items.wands.ItemWandCasting;
|
||||
import thaumcraft.common.lib.potions.PotionWarpWard;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
|
||||
public class WandUpdateHandler implements IWandRodOnUpdate
|
||||
{
|
||||
Aspect aspect;
|
||||
Aspect primals[] = Aspect.getPrimalAspects().toArray(new Aspect[0]);
|
||||
|
||||
public void onUpdate (ItemStack itemstack, EntityPlayer player)
|
||||
{
|
||||
if (!player.isPotionActive(Config.potionWarpWardID))
|
||||
{
|
||||
int permwarp = Thaumcraft.proxy.getPlayerKnowledge().getWarpPerm(player.getCommandSenderName());
|
||||
|
||||
int x = permwarp;
|
||||
if (x == 0) x++;
|
||||
|
||||
int y = Math.max( (200 - x), 50);
|
||||
|
||||
if (player.ticksExisted % y == 0)
|
||||
{
|
||||
for (int i = 0; i < primals.length; i++)
|
||||
{
|
||||
((ItemWandCasting) itemstack.getItem()).addVis(itemstack, this.primals[i], 1, true);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
package taintedmagic.common.helper;
|
||||
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import taintedmagic.api.IBloodlust;
|
||||
import thaumcraft.api.aspects.Aspect;
|
||||
import thaumcraft.api.aspects.AspectList;
|
||||
|
||||
public class TaintedMagicHelper
|
||||
{
|
||||
public static AspectList getPrimals (int amount)
|
||||
{
|
||||
return new AspectList().add(Aspect.FIRE, amount).add(Aspect.WATER, amount).add(Aspect.EARTH, amount).add(Aspect.AIR, amount).add(Aspect.ORDER, amount).add(Aspect.ENTROPY, amount);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,297 @@
|
||||
/**
|
||||
* 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;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,73 @@
|
||||
package taintedmagic.common.items;
|
||||
|
||||
import java.util.Random;
|
||||
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.entity.player.EntityPlayerMP;
|
||||
import net.minecraft.item.EnumRarity;
|
||||
import net.minecraft.item.ItemFood;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.potion.Potion;
|
||||
import net.minecraft.potion.PotionEffect;
|
||||
import net.minecraft.world.World;
|
||||
import taintedmagic.common.TaintedMagic;
|
||||
import thaumcraft.api.aspects.Aspect;
|
||||
import thaumcraft.common.Thaumcraft;
|
||||
import thaumcraft.common.lib.network.PacketHandler;
|
||||
import thaumcraft.common.lib.network.playerdata.PacketAspectPool;
|
||||
import thaumcraft.common.lib.research.ResearchManager;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
|
||||
public class ItemMagicFunguar extends ItemFood
|
||||
{
|
||||
Aspect[] aspects = new Aspect[]{
|
||||
Aspect.AIR,
|
||||
Aspect.EARTH,
|
||||
Aspect.FIRE,
|
||||
Aspect.WATER,
|
||||
Aspect.ORDER,
|
||||
Aspect.ENTROPY };
|
||||
|
||||
public ItemMagicFunguar (int i, float j, boolean k)
|
||||
{
|
||||
super(i, j, k);
|
||||
this.setCreativeTab(TaintedMagic.tabTaintedMagic);
|
||||
this.setTextureName("taintedmagic:ItemMagicFunguar");
|
||||
this.setAlwaysEdible();
|
||||
this.setUnlocalizedName("ItemMagicFunguar");
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onFoodEaten (ItemStack s, World w, EntityPlayer p)
|
||||
{
|
||||
super.onFoodEaten(s, w, p);
|
||||
|
||||
Random r = new Random();
|
||||
try
|
||||
{
|
||||
p.addPotionEffect(new PotionEffect(Potion.regeneration.id, 200, 2));
|
||||
p.addPotionEffect(new PotionEffect(Potion.digSpeed.id, 100, 2));
|
||||
p.addPotionEffect(new PotionEffect(Potion.moveSpeed.id, 100, 2));
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
e.printStackTrace();
|
||||
}
|
||||
|
||||
int i = r.nextInt(aspects.length);
|
||||
|
||||
if (!w.isRemote)
|
||||
{
|
||||
Thaumcraft.proxy.playerKnowledge.addAspectPool(p.getCommandSenderName(), aspects[i], Short.valueOf((short) (1)));
|
||||
ResearchManager.scheduleSave(p);
|
||||
PacketHandler.INSTANCE.sendTo(new PacketAspectPool(aspects[i].getTag(), Short.valueOf((short) 1), Short.valueOf(Thaumcraft.proxy.playerKnowledge.getAspectPoolFor(p.getCommandSenderName(), aspects[i]))), (EntityPlayerMP) p);
|
||||
}
|
||||
}
|
||||
|
||||
@SideOnly (Side.CLIENT)
|
||||
public EnumRarity getRarity (ItemStack itemstack)
|
||||
{
|
||||
return EnumRarity.uncommon;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,81 @@
|
||||
package taintedmagic.common.items;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import taintedmagic.common.TaintedMagic;
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
import net.minecraft.creativetab.CreativeTabs;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.EnumRarity;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.EnumChatFormatting;
|
||||
import net.minecraft.util.IIcon;
|
||||
import net.minecraft.util.StatCollector;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
|
||||
public class ItemMaterial extends Item
|
||||
{
|
||||
public int SUBTYPES = 9;
|
||||
public IIcon[] icons = new IIcon[SUBTYPES];
|
||||
|
||||
public ItemMaterial ()
|
||||
{
|
||||
this.setCreativeTab(TaintedMagic.tabTaintedMagic);
|
||||
this.setUnlocalizedName("ItemMaterial");
|
||||
this.setHasSubtypes(true);
|
||||
}
|
||||
|
||||
public EnumRarity getRarity (ItemStack s)
|
||||
{
|
||||
int m = s.getItemDamage();
|
||||
switch (m)
|
||||
{
|
||||
case 0 :
|
||||
return EnumRarity.uncommon;
|
||||
case 1 :
|
||||
return EnumRarity.uncommon;
|
||||
case 2 :
|
||||
return EnumRarity.uncommon;
|
||||
case 3 :
|
||||
return EnumRarity.common;
|
||||
case 4 :
|
||||
return EnumRarity.common;
|
||||
case 5 :
|
||||
return TaintedMagic.rarityCreation;
|
||||
case 6 :
|
||||
return EnumRarity.uncommon;
|
||||
case 7 :
|
||||
return EnumRarity.uncommon;
|
||||
case 8 :
|
||||
return EnumRarity.uncommon;
|
||||
}
|
||||
return EnumRarity.common;
|
||||
}
|
||||
|
||||
@SideOnly (Side.CLIENT)
|
||||
public void registerIcons (IIconRegister ir)
|
||||
{
|
||||
for (int i = 0; i < icons.length; i++)
|
||||
this.icons[i] = ir.registerIcon("taintedmagic:ItemMaterial" + i);
|
||||
}
|
||||
|
||||
@SideOnly (Side.CLIENT)
|
||||
public IIcon getIconFromDamage (int i)
|
||||
{
|
||||
return this.icons[i];
|
||||
}
|
||||
|
||||
@SideOnly (Side.CLIENT)
|
||||
public void getSubItems (Item item, CreativeTabs c, List l)
|
||||
{
|
||||
for (int i = 0; i < SUBTYPES; i++)
|
||||
l.add(new ItemStack(this, 1, i));
|
||||
}
|
||||
|
||||
public String getUnlocalizedName (ItemStack s)
|
||||
{
|
||||
return super.getUnlocalizedName() + "." + s.getItemDamage();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,36 @@
|
||||
package taintedmagic.common.items;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import net.minecraft.client.gui.GuiScreen;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.EnumRarity;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.StatCollector;
|
||||
import net.minecraftforge.oredict.RecipeSorter;
|
||||
import net.minecraftforge.oredict.RecipeSorter.Category;
|
||||
import taintedmagic.api.RecipeVoidsentBlood;
|
||||
import taintedmagic.common.TaintedMagic;
|
||||
import cpw.mods.fml.common.registry.GameRegistry;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
|
||||
public class ItemVoidsentBlood extends Item
|
||||
{
|
||||
public ItemVoidsentBlood ()
|
||||
{
|
||||
this.setCreativeTab(TaintedMagic.tabTaintedMagic);
|
||||
this.setTextureName("taintedmagic:ItemVoidsentBlood");
|
||||
this.setUnlocalizedName("ItemVoidsentBlood");
|
||||
|
||||
GameRegistry.addRecipe(new RecipeVoidsentBlood());
|
||||
RecipeSorter.register("taintedmagic:ItemVoidsentBlood", RecipeVoidsentBlood.class, Category.SHAPELESS, "");
|
||||
}
|
||||
|
||||
@SideOnly (Side.CLIENT)
|
||||
public EnumRarity getRarity (ItemStack s)
|
||||
{
|
||||
return EnumRarity.uncommon;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,22 @@
|
||||
package taintedmagic.common.items.blocks;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.item.EnumRarity;
|
||||
import net.minecraft.item.ItemBlock;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
|
||||
public class ItemBlockShadowOre extends ItemBlock
|
||||
{
|
||||
public ItemBlockShadowOre (Block b)
|
||||
{
|
||||
super(b);
|
||||
}
|
||||
|
||||
@SideOnly (Side.CLIENT)
|
||||
public EnumRarity getRarity (ItemStack s)
|
||||
{
|
||||
return EnumRarity.uncommon;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,22 @@
|
||||
package taintedmagic.common.items.blocks;
|
||||
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.item.EnumRarity;
|
||||
import net.minecraft.item.ItemBlock;
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
||||
public class ItemBlockWarpwoodSapling extends ItemBlock
|
||||
{
|
||||
public ItemBlockWarpwoodSapling (Block b)
|
||||
{
|
||||
super(b);
|
||||
}
|
||||
|
||||
@SideOnly (Side.CLIENT)
|
||||
public EnumRarity getRarity (ItemStack s)
|
||||
{
|
||||
return EnumRarity.uncommon;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,126 @@
|
||||
package taintedmagic.common.items.equipment;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
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.EnumRarity;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.DamageSource;
|
||||
import net.minecraft.util.EnumChatFormatting;
|
||||
import net.minecraft.util.StatCollector;
|
||||
import net.minecraftforge.common.ISpecialArmor;
|
||||
import taintedmagic.common.TaintedMagic;
|
||||
import taintedmagic.common.registry.ItemRegistry;
|
||||
import thaumcraft.api.IVisDiscountGear;
|
||||
import thaumcraft.api.IWarpingGear;
|
||||
import thaumcraft.api.ItemApi;
|
||||
import thaumcraft.api.aspects.Aspect;
|
||||
import thaumcraft.common.items.armor.ItemFortressArmor;
|
||||
|
||||
public class ItemShadowFortressArmor extends ItemFortressArmor implements IWarpingGear, IVisDiscountGear, ISpecialArmor
|
||||
{
|
||||
public ItemShadowFortressArmor (ArmorMaterial m, int j, int k)
|
||||
{
|
||||
super(m, j, k);
|
||||
this.setCreativeTab(TaintedMagic.tabTaintedMagic);
|
||||
}
|
||||
|
||||
@SideOnly (Side.CLIENT)
|
||||
public void registerIcons (IIconRegister ir)
|
||||
{
|
||||
this.iconHelm = ir.registerIcon("taintedmagic:ItemShadowFortressHelmet");
|
||||
this.iconChest = ir.registerIcon("taintedmagic:ItemShadowFortressChestplate");
|
||||
this.iconLegs = ir.registerIcon("taintedmagic:ItemShadowFortressLeggings");
|
||||
}
|
||||
|
||||
public void addInformation (ItemStack s, EntityPlayer p, List l, boolean b)
|
||||
{
|
||||
l.add(EnumChatFormatting.DARK_PURPLE + StatCollector.translateToLocal("tc.visdiscount") + ": " + getVisDiscount(s, p, null) + "%");
|
||||
super.addInformation(s, p, l, b);
|
||||
}
|
||||
|
||||
public String getArmorTexture (ItemStack s, Entity e, int slot, String t)
|
||||
{
|
||||
return "taintedmagic:textures/models/ModelShadowFortressArmor.png";
|
||||
}
|
||||
|
||||
public EnumRarity getRarity (ItemStack s)
|
||||
{
|
||||
return EnumRarity.epic;
|
||||
}
|
||||
|
||||
public boolean getIsRepairable (ItemStack s, ItemStack s2)
|
||||
{
|
||||
return (s2.isItemEqual(new ItemStack(ItemRegistry.ItemMaterial)) && s2.getItemDamage() == 0) ? true : super.getIsRepairable(s, s2);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getVisDiscount (ItemStack s, EntityPlayer p, Aspect a)
|
||||
{
|
||||
return 5;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getWarp (ItemStack s, EntityPlayer p)
|
||||
{
|
||||
return 5;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ISpecialArmor.ArmorProperties getProperties (EntityLivingBase p, ItemStack s, DamageSource source, double dmg, int slot)
|
||||
{
|
||||
int priority = 0;
|
||||
double ratio = this.damageReduceAmount / 25.0D;
|
||||
|
||||
if (source.isMagicDamage() == true)
|
||||
{
|
||||
priority = 1;
|
||||
ratio = this.damageReduceAmount / 35.0D;
|
||||
}
|
||||
else if ( (source.isFireDamage() == true) || (source.isExplosion()))
|
||||
{
|
||||
priority = 1;
|
||||
ratio = this.damageReduceAmount / 20.0D;
|
||||
}
|
||||
else if (source.isUnblockable())
|
||||
{
|
||||
priority = 0;
|
||||
ratio = 0.0D;
|
||||
}
|
||||
|
||||
if ( (p instanceof EntityPlayer))
|
||||
{
|
||||
double set = 0.875D;
|
||||
for (int a = 1; a < 4; a++)
|
||||
{
|
||||
ItemStack piece = ((EntityPlayer) p).inventory.armorInventory[a];
|
||||
if ( (piece != null) && ( (piece.getItem() instanceof ItemFortressArmor)))
|
||||
{
|
||||
set += 0.250D;
|
||||
if ( (piece.hasTagCompound()) && (piece.stackTagCompound.hasKey("mask")))
|
||||
{
|
||||
set += 0.05D;
|
||||
}
|
||||
}
|
||||
}
|
||||
ratio *= set;
|
||||
}
|
||||
|
||||
return new ISpecialArmor.ArmorProperties(priority, ratio, s.getMaxDamage() + 1 - s.getItemDamage());
|
||||
}
|
||||
|
||||
public int getArmorDisplay (EntityPlayer p, ItemStack s, int slot)
|
||||
{
|
||||
return this.damageReduceAmount;
|
||||
}
|
||||
|
||||
public void damageArmor (EntityLivingBase e, ItemStack s, DamageSource source, int dmg, int slot)
|
||||
{
|
||||
if (source != DamageSource.fall) s.damageItem(dmg, e);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,82 @@
|
||||
package taintedmagic.common.items.equipment;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import taintedmagic.common.TaintedMagic;
|
||||
import thaumcraft.api.IVisDiscountGear;
|
||||
import thaumcraft.api.IWarpingGear;
|
||||
import thaumcraft.api.ItemApi;
|
||||
import thaumcraft.api.aspects.Aspect;
|
||||
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.init.Items;
|
||||
import net.minecraft.item.EnumRarity;
|
||||
import net.minecraft.item.ItemArmor;
|
||||
import net.minecraft.item.ItemArmor.ArmorMaterial;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.EnumChatFormatting;
|
||||
import net.minecraft.util.StatCollector;
|
||||
import net.minecraft.world.World;
|
||||
import thaumcraft.common.items.armor.ItemFortressArmor;
|
||||
|
||||
public class ItemVoidFortressArmor extends ItemFortressArmor implements IWarpingGear, IVisDiscountGear
|
||||
{
|
||||
public ItemVoidFortressArmor (ArmorMaterial m, int j, int k)
|
||||
{
|
||||
super(m, j, k);
|
||||
this.setCreativeTab(TaintedMagic.tabTaintedMagic);
|
||||
}
|
||||
|
||||
@SideOnly (Side.CLIENT)
|
||||
public void registerIcons (IIconRegister ir)
|
||||
{
|
||||
this.iconHelm = ir.registerIcon("taintedmagic:ItemVoidFortressHelmet");
|
||||
this.iconChest = ir.registerIcon("taintedmagic:ItemVoidFortressChestplate");
|
||||
this.iconLegs = ir.registerIcon("taintedmagic:ItemVoidFortressLeggings");
|
||||
}
|
||||
|
||||
public void addInformation (ItemStack s, EntityPlayer p, List l, boolean b)
|
||||
{
|
||||
l.add(EnumChatFormatting.DARK_PURPLE + StatCollector.translateToLocal("tc.visdiscount") + ": " + getVisDiscount(s, p, null) + "%");
|
||||
super.addInformation(s, p, l, b);
|
||||
}
|
||||
|
||||
public String getArmorTexture (ItemStack s, Entity e, int slot, String t)
|
||||
{
|
||||
return "taintedmagic:textures/models/ModelVoidFortressArmor.png";
|
||||
}
|
||||
|
||||
public boolean getIsRepairable (ItemStack s, ItemStack s2)
|
||||
{
|
||||
return s2.isItemEqual(ItemApi.getItem("itemResource", 16)) ? true : super.getIsRepairable(s, s2);
|
||||
}
|
||||
|
||||
public void onUpdate (ItemStack s, World w, Entity e, int j, boolean k)
|
||||
{
|
||||
super.onUpdate(s, w, e, j, k);
|
||||
|
||||
if ( (!w.isRemote) && (s.isItemDamaged()) && (e.ticksExisted % 20 == 0) && ( (e instanceof EntityLivingBase))) s.damageItem(-1, (EntityLivingBase) e);
|
||||
}
|
||||
|
||||
public void onArmorTick (World w, EntityPlayer p, ItemStack s)
|
||||
{
|
||||
super.onArmorTick(w, p, s);
|
||||
if ( (!w.isRemote) && (s.getItemDamage() > 0) && (p.ticksExisted % 20 == 0)) s.damageItem(-1, p);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getWarp (ItemStack s, EntityPlayer p)
|
||||
{
|
||||
return 3;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getVisDiscount (ItemStack s, EntityPlayer p, Aspect a)
|
||||
{
|
||||
return 5;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,165 @@
|
||||
package taintedmagic.common.items.equipment;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.EnumRarity;
|
||||
import net.minecraft.item.ItemArmor;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.util.DamageSource;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.common.ISpecialArmor;
|
||||
import net.minecraftforge.common.MinecraftForge;
|
||||
import net.minecraftforge.common.util.ForgeDirection;
|
||||
import net.minecraftforge.event.entity.living.LivingEvent;
|
||||
import taintedmagic.common.TaintedMagic;
|
||||
import taintedmagic.common.registry.ItemRegistry;
|
||||
import thaumcraft.api.IRepairable;
|
||||
import thaumcraft.api.IRunicArmor;
|
||||
import thaumcraft.api.IVisDiscountGear;
|
||||
import thaumcraft.api.IWarpingGear;
|
||||
import thaumcraft.api.aspects.Aspect;
|
||||
import thaumcraft.common.Thaumcraft;
|
||||
import thaumcraft.common.items.armor.Hover;
|
||||
import cpw.mods.fml.common.eventhandler.SubscribeEvent;
|
||||
|
||||
public class ItemVoidwalkerBoots extends ItemArmor implements IVisDiscountGear, IWarpingGear, IRunicArmor, IRepairable, ISpecialArmor
|
||||
{
|
||||
public ItemVoidwalkerBoots (ArmorMaterial m, int j, int k)
|
||||
{
|
||||
super(m, j, k);
|
||||
this.setCreativeTab(TaintedMagic.tabTaintedMagic);
|
||||
this.setUnlocalizedName("ItemVoidwalkerBoots");
|
||||
this.setTextureName("taintedmagic:ItemVoidwalkerBoots");
|
||||
|
||||
MinecraftForge.EVENT_BUS.register(this);
|
||||
}
|
||||
|
||||
public String getArmorTexture (ItemStack s, Entity e, int slot, String t)
|
||||
{
|
||||
return "taintedmagic:textures/models/ModelVoidwalkerBoots.png";
|
||||
}
|
||||
|
||||
public EnumRarity getRarity (ItemStack s)
|
||||
{
|
||||
return EnumRarity.epic;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getRunicCharge (ItemStack s)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getWarp (ItemStack s, EntityPlayer p)
|
||||
{
|
||||
return 5;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getVisDiscount (ItemStack s, EntityPlayer p, Aspect a)
|
||||
{
|
||||
return 5;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ISpecialArmor.ArmorProperties getProperties (EntityLivingBase e, ItemStack s, DamageSource source, double dmg, int slot)
|
||||
{
|
||||
int priority = 0;
|
||||
double ratio = this.damageReduceAmount / 90.0D;
|
||||
|
||||
if (source.isMagicDamage() == true)
|
||||
{
|
||||
priority = 1;
|
||||
ratio = this.damageReduceAmount / 80.0D;
|
||||
}
|
||||
else if ( (source.isFireDamage() == true) || (source.isExplosion()))
|
||||
{
|
||||
priority = 1;
|
||||
ratio = this.damageReduceAmount / 80.0D;
|
||||
}
|
||||
else if (source.isUnblockable())
|
||||
{
|
||||
priority = 0;
|
||||
ratio = 0.0D;
|
||||
}
|
||||
return new ISpecialArmor.ArmorProperties(priority, ratio, s.getMaxDamage() + 1 - s.getItemDamage());
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getArmorDisplay (EntityPlayer p, ItemStack s, int slot)
|
||||
{
|
||||
return this.damageReduceAmount;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void damageArmor (EntityLivingBase e, ItemStack s, DamageSource source, int dmg, int slot)
|
||||
{
|
||||
if (source != DamageSource.fall) s.damageItem(dmg, e);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void addInformation (ItemStack s, EntityPlayer p, List l, boolean b)
|
||||
{
|
||||
}
|
||||
|
||||
public void onUpdate (ItemStack s, World w, Entity e, int j, boolean k)
|
||||
{
|
||||
super.onUpdate(s, w, e, j, k);
|
||||
|
||||
if ( (!w.isRemote) && (s.isItemDamaged()) && (e.ticksExisted % 20 == 0) && ( (e instanceof EntityLivingBase))) s.damageItem(-1, (EntityLivingBase) e);
|
||||
}
|
||||
|
||||
public void onArmorTick (World w, EntityPlayer p, ItemStack s)
|
||||
{
|
||||
super.onArmorTick(w, p, s);
|
||||
if ( (!w.isRemote) && (s.getItemDamage() > 0) && (p.ticksExisted % 20 == 0)) s.damageItem(-1, p);
|
||||
|
||||
if (p.moveForward > 0.0F)
|
||||
{
|
||||
if ( (p.worldObj.isRemote) && (!p.isSneaking()))
|
||||
{
|
||||
if (!Thaumcraft.instance.entityEventHandler.prevStep.containsKey(Integer.valueOf(p.getEntityId())))
|
||||
{
|
||||
Thaumcraft.instance.entityEventHandler.prevStep.put(Integer.valueOf(p.getEntityId()), Float.valueOf(p.stepHeight));
|
||||
}
|
||||
p.stepHeight = 1.0F;
|
||||
}
|
||||
|
||||
if (p.onGround || p.capabilities.isFlying)
|
||||
{
|
||||
float bonus = 0.20F;
|
||||
p.moveFlying(0.0F, 1.0F, p.capabilities.isFlying ? (bonus - 0.075F) : bonus);
|
||||
p.jumpMovementFactor = 0.00002F;
|
||||
}
|
||||
else if (Hover.getHover(p.getEntityId()))
|
||||
{
|
||||
p.jumpMovementFactor = 0.03F;
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
p.jumpMovementFactor = 0.05F;
|
||||
}
|
||||
}
|
||||
if (p.fallDistance > 0.0F) p.fallDistance = 0.0F;
|
||||
}
|
||||
|
||||
@SubscribeEvent
|
||||
public void playerJumps (LivingEvent.LivingJumpEvent event)
|
||||
{
|
||||
if (event.entity instanceof EntityPlayer)
|
||||
{
|
||||
EntityPlayer player = (EntityPlayer) event.entity;
|
||||
|
||||
if (player.inventory.armorItemInSlot(0) != null && player.inventory.armorItemInSlot(0).getItem() == ItemRegistry.ItemVoidwalkerBoots)
|
||||
{
|
||||
event.entityLiving.motionY += 0.35D;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,180 @@
|
||||
package taintedmagic.common.items.equipment;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.EnumRarity;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.util.EnumChatFormatting;
|
||||
import net.minecraft.util.StatCollector;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.common.MinecraftForge;
|
||||
import net.minecraftforge.event.entity.living.LivingEvent;
|
||||
import net.minecraftforge.event.entity.living.LivingHurtEvent;
|
||||
import taintedmagic.common.TaintedMagic;
|
||||
import thaumcraft.api.IRunicArmor;
|
||||
import thaumcraft.api.IWarpingGear;
|
||||
import thaumcraft.api.ItemRunic;
|
||||
import thaumcraft.common.Thaumcraft;
|
||||
import thaumcraft.common.items.armor.Hover;
|
||||
import baubles.api.BaubleType;
|
||||
import baubles.api.IBauble;
|
||||
import baubles.common.lib.PlayerHandler;
|
||||
import cpw.mods.fml.common.FMLCommonHandler;
|
||||
import cpw.mods.fml.common.eventhandler.SubscribeEvent;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
|
||||
public class ItemVoidwalkerSash extends ItemRunic implements IRunicArmor, IWarpingGear, IBauble
|
||||
{
|
||||
public static final String TAG_MODE = "mode";
|
||||
|
||||
public ItemVoidwalkerSash ()
|
||||
{
|
||||
super(20);
|
||||
this.setCreativeTab(TaintedMagic.tabTaintedMagic);
|
||||
this.setTextureName("taintedmagic:ItemVoidwalkerSash");
|
||||
this.setMaxDamage(-1);
|
||||
this.setMaxStackSize(1);
|
||||
this.setUnlocalizedName("ItemVoidwalkerSash");
|
||||
|
||||
MinecraftForge.EVENT_BUS.register(this);
|
||||
FMLCommonHandler.instance().bus().register(this);
|
||||
}
|
||||
|
||||
public EnumRarity getRarity (ItemStack s)
|
||||
{
|
||||
return EnumRarity.epic;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getWarp (ItemStack s, EntityPlayer p)
|
||||
{
|
||||
return 2;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getRunicCharge (ItemStack s)
|
||||
{
|
||||
return 20;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canEquip (ItemStack s, EntityLivingBase e)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canUnequip (ItemStack s, EntityLivingBase e)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public BaubleType getBaubleType (ItemStack s)
|
||||
{
|
||||
return BaubleType.BELT;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onEquipped (ItemStack s, EntityLivingBase e)
|
||||
{
|
||||
Thaumcraft.instance.runicEventHandler.isDirty = true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onUnequipped (ItemStack s, EntityLivingBase e)
|
||||
{
|
||||
Thaumcraft.instance.runicEventHandler.isDirty = true;
|
||||
}
|
||||
|
||||
public void addInformation (ItemStack s, EntityPlayer p, List l, boolean b)
|
||||
{
|
||||
l.add("\u00A78" + StatCollector.translateToLocal("text.sash.mode") + (hasSpeedBoost(s) ? " \u00A7a" : " \u00A7c") + StatCollector.translateToLocal(hasSpeedBoost(s) ? "text.sash.on" : "text.sash.off"));
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onWornTick (ItemStack s, EntityLivingBase e)
|
||||
{
|
||||
EntityPlayer p = (EntityPlayer) e;
|
||||
if ( (p.inventory.armorItemInSlot(0) != null) && (p.inventory.armorItemInSlot(0).getItem() instanceof ItemVoidwalkerBoots))
|
||||
{
|
||||
if (hasSpeedBoost(s))
|
||||
{
|
||||
if (p.moveForward > 0.0F)
|
||||
{
|
||||
if ( (p.worldObj.isRemote) && (!p.isSneaking()))
|
||||
{
|
||||
if (!Thaumcraft.instance.entityEventHandler.prevStep.containsKey(Integer.valueOf(p.getEntityId())))
|
||||
{
|
||||
Thaumcraft.instance.entityEventHandler.prevStep.put(Integer.valueOf(p.getEntityId()), Float.valueOf(p.stepHeight));
|
||||
}
|
||||
p.stepHeight = 1.0F;
|
||||
}
|
||||
|
||||
if (p.onGround || p.capabilities.isFlying)
|
||||
{
|
||||
float bonus = 0.4F;
|
||||
p.moveFlying(0.0F, 1.0F, p.capabilities.isFlying ? (bonus - 0.050F) : bonus);
|
||||
}
|
||||
else if (Hover.getHover(p.getEntityId()))
|
||||
{
|
||||
p.jumpMovementFactor = 0.015F;
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
p.jumpMovementFactor = 0.025F;
|
||||
}
|
||||
}
|
||||
if (p.fallDistance > 0.0F) p.fallDistance = 0.0F;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@SubscribeEvent
|
||||
public void onPlayerJump (LivingEvent.LivingJumpEvent event)
|
||||
{
|
||||
if ( (event.entityLiving instanceof EntityPlayer))
|
||||
{
|
||||
EntityPlayer player = (EntityPlayer) event.entityLiving;
|
||||
ItemStack sash = PlayerHandler.getPlayerBaubles(player).getStackInSlot(3);
|
||||
ItemStack boots = player.inventory.armorItemInSlot(0);
|
||||
if ( (sash != null) && ( (sash.getItem() instanceof ItemVoidwalkerSash)))
|
||||
{
|
||||
if ( (boots != null) && ( (boots.getItem() instanceof ItemVoidwalkerBoots)))
|
||||
{
|
||||
if (hasSpeedBoost(sash))
|
||||
{
|
||||
player.motionY += 0.15F;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public ItemStack onItemRightClick (ItemStack s, World w, EntityPlayer p)
|
||||
{
|
||||
if (!w.isRemote && p.isSneaking())
|
||||
{
|
||||
if (s.stackTagCompound == null)
|
||||
{
|
||||
s.setTagCompound(new NBTTagCompound());
|
||||
s.stackTagCompound.setBoolean(TAG_MODE, false);
|
||||
}
|
||||
if (s.stackTagCompound != null) s.stackTagCompound.setBoolean(TAG_MODE, !s.stackTagCompound.getBoolean(TAG_MODE));
|
||||
}
|
||||
return s;
|
||||
}
|
||||
|
||||
public boolean hasSpeedBoost (ItemStack s)
|
||||
{
|
||||
if (s.stackTagCompound == null) return true;
|
||||
|
||||
else return s.stackTagCompound.getBoolean(TAG_MODE);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,58 @@
|
||||
package taintedmagic.common.items.equipment;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
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.EnumRarity;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemArmor;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.EnumChatFormatting;
|
||||
import net.minecraft.util.IIcon;
|
||||
import net.minecraft.util.StatCollector;
|
||||
import taintedmagic.common.TaintedMagic;
|
||||
import thaumcraft.api.IGoggles;
|
||||
import thaumcraft.api.IRepairable;
|
||||
import thaumcraft.api.IVisDiscountGear;
|
||||
import thaumcraft.api.IWarpingGear;
|
||||
import thaumcraft.api.aspects.Aspect;
|
||||
import thaumcraft.api.nodes.IRevealer;
|
||||
import thaumcraft.common.items.armor.ItemGoggles;
|
||||
|
||||
public class ItemWarpedGoggles extends ItemGoggles implements IWarpingGear
|
||||
{
|
||||
public ItemWarpedGoggles (ArmorMaterial m, int j, int k)
|
||||
{
|
||||
super(m, j, k);
|
||||
this.setMaxDamage(500);
|
||||
this.setCreativeTab(TaintedMagic.tabTaintedMagic);
|
||||
this.setUnlocalizedName("ItemWarpedGoggles");
|
||||
}
|
||||
|
||||
@SideOnly (Side.CLIENT)
|
||||
public void registerIcons (IIconRegister ir)
|
||||
{
|
||||
this.icon = ir.registerIcon("taintedmagic:ItemWarpedGoggles");
|
||||
}
|
||||
|
||||
public String getArmorTexture (ItemStack s, Entity e, int slot, String type)
|
||||
{
|
||||
return "taintedmagic:textures/models/ModelWarpedGoggles.png";
|
||||
}
|
||||
|
||||
public EnumRarity getRarity (ItemStack s)
|
||||
{
|
||||
return EnumRarity.uncommon;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getWarp (ItemStack s, EntityPlayer p)
|
||||
{
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,27 @@
|
||||
package taintedmagic.common.items.tools;
|
||||
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.EnumRarity;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.item.ItemSword;
|
||||
import taintedmagic.api.IBloodlust;
|
||||
import taintedmagic.common.TaintedMagic;
|
||||
import thaumcraft.api.IRepairable;
|
||||
|
||||
public class ItemCrystalDagger extends ItemSword implements IBloodlust, IRepairable
|
||||
{
|
||||
public ItemCrystalDagger (ToolMaterial m)
|
||||
{
|
||||
super(m);
|
||||
this.setCreativeTab(TaintedMagic.tabTaintedMagic);
|
||||
this.setUnlocalizedName("ItemCrystalDagger");
|
||||
this.setMaxStackSize(1);
|
||||
this.setTextureName("taintedmagic:ItemCrystalDagger");
|
||||
}
|
||||
|
||||
@Override
|
||||
public EnumRarity getRarity (ItemStack s)
|
||||
{
|
||||
return EnumRarity.uncommon;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,203 @@
|
||||
package taintedmagic.common.items.tools;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import net.minecraft.client.Minecraft;
|
||||
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;
|
||||
import net.minecraft.item.EnumRarity;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.potion.Potion;
|
||||
import net.minecraft.potion.PotionEffect;
|
||||
import net.minecraft.server.MinecraftServer;
|
||||
import net.minecraft.util.DamageSource;
|
||||
import net.minecraft.util.EnumChatFormatting;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
import net.minecraft.util.StatCollector;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.client.event.RenderPlayerEvent;
|
||||
import net.minecraftforge.common.MinecraftForge;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import taintedmagic.client.model.ModelKatana;
|
||||
import taintedmagic.client.model.ModelSaya;
|
||||
import taintedmagic.common.TaintedMagic;
|
||||
import thaumcraft.api.IRepairable;
|
||||
import thaumcraft.api.IWarpingGear;
|
||||
import thaumcraft.common.config.Config;
|
||||
import cpw.mods.fml.common.eventhandler.SubscribeEvent;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
|
||||
public class ItemKatana extends Item implements IWarpingGear, IRepairable
|
||||
{
|
||||
public static final int SUBTYPES = 3;
|
||||
|
||||
public static final ResourceLocation textureThaumium = new ResourceLocation("taintedmagic:textures/models/ModelKatanaThaumium.png");
|
||||
public static final ResourceLocation textureVoidmetal = new ResourceLocation("taintedmagic:textures/models/ModelKatanaVoidmetal.png");
|
||||
public static final ResourceLocation textureShadowmetal = new ResourceLocation("taintedmagic:textures/models/ModelKatanaShadowmetal.png");
|
||||
|
||||
public static final ModelKatana katana = new ModelKatana();
|
||||
public static final ModelSaya saya = new ModelSaya();
|
||||
|
||||
public ItemKatana ()
|
||||
{
|
||||
this.setCreativeTab(TaintedMagic.tabTaintedMagic);
|
||||
this.setUnlocalizedName("ItemKatana");
|
||||
this.setHasSubtypes(true);
|
||||
|
||||
MinecraftForge.EVENT_BUS.register(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean hitEntity (ItemStack s, EntityLivingBase e, EntityLivingBase p)
|
||||
{
|
||||
if (!e.worldObj.isRemote && (! (e instanceof EntityPlayer) || ! (p instanceof EntityPlayer) || MinecraftServer.getServer().isPVPEnabled()))
|
||||
{
|
||||
try
|
||||
{
|
||||
if (s.getItemDamage() == 1)
|
||||
{
|
||||
e.addPotionEffect(new PotionEffect(Potion.weakness.getId(), 60));
|
||||
e.addPotionEffect(new PotionEffect(Potion.hunger.getId(), 120));
|
||||
}
|
||||
if (s.getItemDamage() == 2)
|
||||
{
|
||||
e.addPotionEffect(new PotionEffect(Potion.wither.getId(), 60));
|
||||
e.addPotionEffect(new PotionEffect(Config.potionBlurredID, 120));
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
}
|
||||
e.attackEntityFrom(DamageSource.causePlayerDamage((EntityPlayer) p), getAttackDamage(s));
|
||||
}
|
||||
p.worldObj.playSoundAtEntity(p, "thaumcraft:swing", 1.0F, 1.0F);
|
||||
|
||||
return super.hitEntity(s, e, p);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isFull3D ()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
@SideOnly (Side.CLIENT)
|
||||
public void getSubItems (Item item, CreativeTabs c, List l)
|
||||
{
|
||||
for (int i = 0; i < SUBTYPES; i++)
|
||||
l.add(new ItemStack(this, 1, i));
|
||||
}
|
||||
|
||||
public String getUnlocalizedName (ItemStack s)
|
||||
{
|
||||
return super.getUnlocalizedName() + "." + s.getItemDamage();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void addInformation (ItemStack s, EntityPlayer p, List l, boolean b)
|
||||
{
|
||||
if (s.getItemDamage() == 1) l.add(EnumChatFormatting.GOLD + StatCollector.translateToLocal("enchantment.special.sapgreat"));
|
||||
l.add(" ");
|
||||
l.add("\u00A79+" + getAttackDamage(s) + " " + StatCollector.translateToLocal("text.attackdamage"));
|
||||
}
|
||||
|
||||
@Override
|
||||
public EnumAction getItemUseAction (ItemStack s)
|
||||
{
|
||||
return EnumAction.block;
|
||||
}
|
||||
|
||||
@Override
|
||||
public EnumRarity getRarity (ItemStack s)
|
||||
{
|
||||
return EnumRarity.uncommon;
|
||||
}
|
||||
|
||||
public float getAttackDamage (ItemStack s)
|
||||
{
|
||||
switch (s.getItemDamage())
|
||||
{
|
||||
case 0 :
|
||||
return 14.25F;
|
||||
case 1 :
|
||||
return 17.75F;
|
||||
case 2 :
|
||||
return 20.5F;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
@SubscribeEvent
|
||||
public void onPlayerRender (RenderPlayerEvent.Specials.Post event)
|
||||
{
|
||||
EntityPlayer p = event.entityPlayer;
|
||||
|
||||
if (event.entityLiving.getActivePotionEffect(Potion.invisibility) != null) return;
|
||||
|
||||
for (int i = 0; i < p.inventory.getSizeInventory(); i++)
|
||||
{
|
||||
if (p.inventory.getStackInSlot(i) != null && p.inventory.getStackInSlot(i).getItem() == this)
|
||||
{
|
||||
ItemStack s = p.inventory.getStackInSlot(i);
|
||||
|
||||
if (p.getHeldItem() == null || p.getHeldItem().getItem() != this)
|
||||
{
|
||||
GL11.glPushMatrix();
|
||||
|
||||
GL11.glScalef(0.5F, 0.5F, 0.5F);
|
||||
GL11.glRotatef(55, 1.0F, 0.0F, 0.0F);
|
||||
GL11.glRotatef(180, 0.0F, 1.0F, 0.0F);
|
||||
|
||||
GL11.glTranslatef(-0.6F, 2.25F, 1.25F);
|
||||
|
||||
Minecraft.getMinecraft().renderEngine.bindTexture(getTexture(s));
|
||||
katana.render(0.0625F);
|
||||
|
||||
GL11.glPopMatrix();
|
||||
}
|
||||
|
||||
GL11.glPushMatrix();
|
||||
|
||||
GL11.glScalef(0.5F, 0.5F, 0.5F);
|
||||
GL11.glRotatef(55, 1.0F, 0.0F, 0.0F);
|
||||
GL11.glRotatef(180, 0.0F, 1.0F, 0.0F);
|
||||
|
||||
GL11.glTranslatef(-0.6F, 2.25F, 1.25F);
|
||||
|
||||
Minecraft.getMinecraft().renderEngine.bindTexture(getTexture(s));
|
||||
saya.render(0.0625F);
|
||||
|
||||
GL11.glPopMatrix();
|
||||
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public static ResourceLocation getTexture (ItemStack s)
|
||||
{
|
||||
switch (s.getItemDamage())
|
||||
{
|
||||
case 0 :
|
||||
return textureThaumium;
|
||||
case 1 :
|
||||
return textureVoidmetal;
|
||||
case 2 :
|
||||
return textureShadowmetal;
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getWarp (ItemStack s, EntityPlayer p)
|
||||
{
|
||||
return s.getItemDamage() == 0 ? 0 : s.getItemDamage() == 1 ? 3 : 7;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,138 @@
|
||||
package taintedmagic.common.items.tools;
|
||||
|
||||
import java.util.Iterator;
|
||||
import java.util.List;
|
||||
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.EnumAction;
|
||||
import net.minecraft.item.EnumRarity;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.item.ItemSword;
|
||||
import net.minecraft.potion.Potion;
|
||||
import net.minecraft.potion.PotionEffect;
|
||||
import net.minecraft.util.AxisAlignedBB;
|
||||
import net.minecraft.util.DamageSource;
|
||||
import net.minecraft.util.EnumChatFormatting;
|
||||
import net.minecraft.util.StatCollector;
|
||||
import net.minecraft.world.World;
|
||||
import taintedmagic.api.IBloodlust;
|
||||
import taintedmagic.common.TaintedMagic;
|
||||
import thaumcraft.api.IRepairable;
|
||||
import thaumcraft.api.IWarpingGear;
|
||||
|
||||
public class ItemPrimordialEdge extends ItemSword implements IWarpingGear, IRepairable
|
||||
{
|
||||
public ItemPrimordialEdge (ToolMaterial m)
|
||||
{
|
||||
super(m);
|
||||
this.setTextureName("taintedmagic:ItemPrimordialEdge");
|
||||
this.setUnlocalizedName("ItemPrimordialEdge");
|
||||
this.setCreativeTab(TaintedMagic.tabTaintedMagic);
|
||||
}
|
||||
|
||||
public EnumAction getItemUseAction (ItemStack s)
|
||||
{
|
||||
return EnumAction.block;
|
||||
}
|
||||
|
||||
public EnumRarity getRarity (ItemStack s)
|
||||
{
|
||||
return EnumRarity.epic;
|
||||
}
|
||||
|
||||
public boolean hitEntity (ItemStack s, EntityLivingBase e, EntityLivingBase p)
|
||||
{
|
||||
super.hitEntity(s, e, p);
|
||||
|
||||
try
|
||||
{
|
||||
e.addPotionEffect(new PotionEffect(Potion.wither.id, 5, 1));
|
||||
e.addPotionEffect(new PotionEffect(Potion.weakness.id, 5, 1));
|
||||
p.worldObj.playSoundAtEntity(p, "thaumcraft:swing", 1.0F, 1.0F);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
ex.printStackTrace();
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ItemStack onItemRightClick (ItemStack s, World w, EntityPlayer p)
|
||||
{
|
||||
p.setItemInUse(s, this.getMaxItemUseDuration(s));
|
||||
return s;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onUsingTick (ItemStack s, EntityPlayer p, int count)
|
||||
{
|
||||
Iterator i$;
|
||||
|
||||
List ents = p.worldObj.getEntitiesWithinAABB(Entity.class, AxisAlignedBB.getBoundingBox(p.posX, p.posY, p.posZ, p.posX + 1, p.posY + 1, p.posZ + 1).expand(15.0D, 15.0D, 15.0D));
|
||||
|
||||
p.worldObj.playSoundAtEntity(p, "thaumcraft:brain", 0.05F, 0.5F);
|
||||
if ( (ents != null) && (ents.size() > 0)) for (i$ = ents.iterator(); i$.hasNext();)
|
||||
{
|
||||
Object ent = i$.next();
|
||||
Entity eo = (Entity) ent;
|
||||
|
||||
if (eo != p)
|
||||
{
|
||||
if ( (eo.isEntityAlive()) && (!eo.isEntityInvulnerable()))
|
||||
{
|
||||
double d = pointDistanceSpace(eo.posX, eo.posY, eo.posZ, p);
|
||||
if (d < 2.0D)
|
||||
{
|
||||
eo.attackEntityFrom(DamageSource.magic, 1.0F);
|
||||
}
|
||||
|
||||
}
|
||||
double var3 = (p.posX + 0.5D - eo.posX) / 20.0D;
|
||||
double var5 = (p.posY + 0.5D - eo.posY) / 20.0D;
|
||||
double var7 = (p.posZ + 0.5D - eo.posZ) / 20.0D;
|
||||
double var9 = Math.sqrt(var3 * var3 + var5 * var5 + var7 * var7);
|
||||
double var11 = 1.0D - var9;
|
||||
|
||||
if (var11 > 0.0D)
|
||||
{
|
||||
var11 *= var11;
|
||||
eo.motionX += var3 / var9 * var11 * 0.20D;
|
||||
eo.motionY += var5 / var9 * var11 * 0.30D;
|
||||
eo.motionZ += var7 / var9 * var11 * 0.20D;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onUpdate (ItemStack s, World w, Entity e, int i, boolean b)
|
||||
{
|
||||
if ( (!w.isRemote) && (s.isItemDamaged()) && (e.ticksExisted % 20 == 0))
|
||||
{
|
||||
s.damageItem(-1, (EntityLivingBase) e);
|
||||
}
|
||||
}
|
||||
|
||||
public double pointDistanceSpace (double x, double y, double z, EntityPlayer p)
|
||||
{
|
||||
double xvar = p.posX + 0.5D - x;
|
||||
double yvar = p.posY + 0.5D - y;
|
||||
double zvar = p.posZ + 0.5D - z;
|
||||
return xvar * xvar + yvar * yvar + zvar * zvar;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void addInformation (ItemStack s, EntityPlayer p, List l, boolean b)
|
||||
{
|
||||
l.add(EnumChatFormatting.GOLD + StatCollector.translateToLocal("text.eldritchsapping"));
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getWarp (ItemStack s, EntityPlayer p)
|
||||
{
|
||||
return 5;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,30 @@
|
||||
package taintedmagic.common.items.tools;
|
||||
|
||||
import taintedmagic.common.TaintedMagic;
|
||||
import taintedmagic.common.registry.ItemRegistry;
|
||||
import thaumcraft.api.IRepairable;
|
||||
import net.minecraft.item.EnumRarity;
|
||||
import net.minecraft.item.ItemAxe;
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
||||
public class ItemShadowmetalAxe extends ItemAxe implements IRepairable
|
||||
{
|
||||
public ItemShadowmetalAxe (ToolMaterial m)
|
||||
{
|
||||
super(m);
|
||||
this.setCreativeTab(TaintedMagic.tabTaintedMagic);
|
||||
this.setTextureName("taintedmagic:ItemShadowmetalAxe");
|
||||
this.setUnlocalizedName("ItemShadowmetalAxe");
|
||||
}
|
||||
|
||||
public boolean getIsRepairable (ItemStack s, ItemStack s2)
|
||||
{
|
||||
return (s2.isItemEqual(new ItemStack(ItemRegistry.ItemMaterial)) && s2.getItemDamage() == 0) ? true : super.getIsRepairable(s, s2);
|
||||
}
|
||||
|
||||
@Override
|
||||
public EnumRarity getRarity (ItemStack s)
|
||||
{
|
||||
return EnumRarity.uncommon;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,74 @@
|
||||
package taintedmagic.common.items.tools;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.init.Blocks;
|
||||
import net.minecraft.item.EnumRarity;
|
||||
import net.minecraft.item.ItemHoe;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.common.MinecraftForge;
|
||||
import net.minecraftforge.event.entity.player.UseHoeEvent;
|
||||
import taintedmagic.common.TaintedMagic;
|
||||
import taintedmagic.common.registry.ItemRegistry;
|
||||
import thaumcraft.api.IRepairable;
|
||||
import cpw.mods.fml.common.FMLCommonHandler;
|
||||
import cpw.mods.fml.common.eventhandler.SubscribeEvent;
|
||||
|
||||
public class ItemShadowmetalHoe extends ItemHoe implements IRepairable
|
||||
{
|
||||
public ItemShadowmetalHoe (ToolMaterial m)
|
||||
{
|
||||
super(m);
|
||||
this.setCreativeTab(TaintedMagic.tabTaintedMagic);
|
||||
this.setTextureName("taintedmagic:ItemShadowmetalHoe");
|
||||
this.setUnlocalizedName("ItemShadowmetalHoe");
|
||||
MinecraftForge.EVENT_BUS.register(this);
|
||||
FMLCommonHandler.instance().bus().register(this);
|
||||
}
|
||||
|
||||
public boolean getIsRepairable (ItemStack s, ItemStack s2)
|
||||
{
|
||||
return (s2.isItemEqual(new ItemStack(ItemRegistry.ItemMaterial)) && s2.getItemDamage() == 0) ? true : super.getIsRepairable(s, s2);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onItemUse (ItemStack s, EntityPlayer p, World w, int x, int y, int z, int i, float a, float b, float c)
|
||||
{
|
||||
super.onItemUse(s, p, w, x, y, z, i, a, b, c);
|
||||
if (!p.worldObj.isRemote)
|
||||
{
|
||||
Block block = Blocks.dirt;
|
||||
|
||||
if (p.worldObj.getBlock(x, y, z) == Blocks.farmland)
|
||||
{
|
||||
p.worldObj.setBlock(x, y, z, Blocks.dirt);
|
||||
s.damageItem(1, p);
|
||||
w.playSoundEffect((double) ((float) x + 0.5F), (double) ((float) y + 0.5F), (double) ((float) z + 0.5F), block.stepSound.getStepResourcePath(), (block.stepSound.getVolume() + 1.0F) / 2.0F, block.stepSound.getPitch() * 0.8F);
|
||||
}
|
||||
else if (p.worldObj.getBlock(x, y, z) == Blocks.dirt || p.worldObj.getBlock(x, y, z) == Blocks.grass)
|
||||
{
|
||||
p.worldObj.setBlock(x, y, z, Blocks.farmland);
|
||||
s.damageItem(1, p);
|
||||
w.playSoundEffect((double) ((float) x + 0.5F), (double) ((float) y + 0.5F), (double) ((float) z + 0.5F), block.stepSound.getStepResourcePath(), (block.stepSound.getVolume() + 1.0F) / 2.0F, block.stepSound.getPitch() * 0.8F);
|
||||
}
|
||||
}
|
||||
if (p.worldObj.getBlock(x, y, z) == Blocks.dirt || p.worldObj.getBlock(x, y, z) == Blocks.grass || p.worldObj.getBlock(x, y, z) == Blocks.farmland) p.swingItem();
|
||||
return false;
|
||||
}
|
||||
|
||||
@SubscribeEvent
|
||||
public void useHoe (UseHoeEvent event)
|
||||
{
|
||||
if (event.current.getItem() == ItemRegistry.ItemShadowmetalHoe)
|
||||
{
|
||||
event.setCanceled(true);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public EnumRarity getRarity (ItemStack s)
|
||||
{
|
||||
return EnumRarity.uncommon;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,30 @@
|
||||
package taintedmagic.common.items.tools;
|
||||
|
||||
import net.minecraft.item.EnumRarity;
|
||||
import net.minecraft.item.ItemPickaxe;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import taintedmagic.common.TaintedMagic;
|
||||
import taintedmagic.common.registry.ItemRegistry;
|
||||
import thaumcraft.api.IRepairable;
|
||||
|
||||
public class ItemShadowmetalPick extends ItemPickaxe implements IRepairable
|
||||
{
|
||||
public ItemShadowmetalPick (ToolMaterial m)
|
||||
{
|
||||
super(m);
|
||||
this.setCreativeTab(TaintedMagic.tabTaintedMagic);
|
||||
this.setTextureName("taintedmagic:ItemShadowmetalPick");
|
||||
this.setUnlocalizedName("ItemShadowmetalPick");
|
||||
}
|
||||
|
||||
public boolean getIsRepairable (ItemStack s, ItemStack s2)
|
||||
{
|
||||
return (s2.isItemEqual(new ItemStack(ItemRegistry.ItemMaterial)) && s2.getItemDamage() == 0) ? true : super.getIsRepairable(s, s2);
|
||||
}
|
||||
|
||||
@Override
|
||||
public EnumRarity getRarity (ItemStack s)
|
||||
{
|
||||
return EnumRarity.uncommon;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,30 @@
|
||||
package taintedmagic.common.items.tools;
|
||||
|
||||
import taintedmagic.common.TaintedMagic;
|
||||
import taintedmagic.common.registry.ItemRegistry;
|
||||
import thaumcraft.api.IRepairable;
|
||||
import net.minecraft.item.EnumRarity;
|
||||
import net.minecraft.item.ItemSpade;
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
||||
public class ItemShadowmetalSpade extends ItemSpade implements IRepairable
|
||||
{
|
||||
public ItemShadowmetalSpade (ToolMaterial m)
|
||||
{
|
||||
super(m);
|
||||
this.setCreativeTab(TaintedMagic.tabTaintedMagic);
|
||||
this.setTextureName("taintedmagic:ItemShadowmetalSpade");
|
||||
this.setUnlocalizedName("ItemShadowmetalSpade");
|
||||
}
|
||||
|
||||
public boolean getIsRepairable (ItemStack s, ItemStack s2)
|
||||
{
|
||||
return (s2.isItemEqual(new ItemStack(ItemRegistry.ItemMaterial)) && s2.getItemDamage() == 0) ? true : super.getIsRepairable(s, s2);
|
||||
}
|
||||
|
||||
@Override
|
||||
public EnumRarity getRarity (ItemStack s)
|
||||
{
|
||||
return EnumRarity.uncommon;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,30 @@
|
||||
package taintedmagic.common.items.tools;
|
||||
|
||||
import taintedmagic.common.TaintedMagic;
|
||||
import taintedmagic.common.registry.ItemRegistry;
|
||||
import thaumcraft.api.IRepairable;
|
||||
import net.minecraft.item.EnumRarity;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.item.ItemSword;
|
||||
|
||||
public class ItemShadowmetalSword extends ItemSword implements IRepairable
|
||||
{
|
||||
public ItemShadowmetalSword (ToolMaterial m)
|
||||
{
|
||||
super(m);
|
||||
this.setCreativeTab(TaintedMagic.tabTaintedMagic);
|
||||
this.setTextureName("taintedmagic:ItemShadowmetalSword");
|
||||
this.setUnlocalizedName("ItemShadowmetalSword");
|
||||
}
|
||||
|
||||
public boolean getIsRepairable (ItemStack s, ItemStack s2)
|
||||
{
|
||||
return (s2.isItemEqual(new ItemStack(ItemRegistry.ItemMaterial)) && s2.getItemDamage() == 0) ? true : super.getIsRepairable(s, s2);
|
||||
}
|
||||
|
||||
@Override
|
||||
public EnumRarity getRarity (ItemStack s)
|
||||
{
|
||||
return EnumRarity.uncommon;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,180 @@
|
||||
package taintedmagic.common.items.tools;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.init.Blocks;
|
||||
import net.minecraft.item.EnumRarity;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.util.ChatComponentText;
|
||||
import net.minecraft.util.DamageSource;
|
||||
import net.minecraft.util.EnumChatFormatting;
|
||||
import net.minecraft.util.StatCollector;
|
||||
import net.minecraft.world.World;
|
||||
import taintedmagic.common.TaintedMagic;
|
||||
import thaumcraft.api.aspects.Aspect;
|
||||
import thaumcraft.api.aspects.AspectList;
|
||||
import thaumcraft.common.items.wands.WandManager;
|
||||
|
||||
public class ItemThaumicDisassembler extends Item
|
||||
{
|
||||
public static final String TAG_MODE = "mode";
|
||||
|
||||
public ItemThaumicDisassembler ()
|
||||
{
|
||||
this.setCreativeTab(TaintedMagic.tabTaintedMagic);
|
||||
this.setMaxDamage(500);
|
||||
this.setMaxStackSize(1);
|
||||
this.setUnlocalizedName("ItemThaumicDisassembler");
|
||||
this.setTextureName("taintedmagic:ItemThaumicDisassembler");
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canHarvestBlock (Block b, ItemStack s)
|
||||
{
|
||||
return b != Blocks.bedrock;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void addInformation (ItemStack s, EntityPlayer p, List l, boolean b)
|
||||
{
|
||||
super.addInformation(s, p, l, b);
|
||||
|
||||
l.add(StatCollector.translateToLocal("text.mode") + ": " + EnumChatFormatting.BLUE + getModeName(s));
|
||||
l.add(StatCollector.translateToLocal("text.efficiency") + ": " + EnumChatFormatting.BLUE + getEfficiency(s));
|
||||
l.add(" ");
|
||||
l.add(EnumChatFormatting.BLUE + "+20 " + StatCollector.translateToLocal("text.attackdamage"));
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean hitEntity (ItemStack s, EntityLivingBase e, EntityLivingBase p)
|
||||
{
|
||||
e.attackEntityFrom(DamageSource.causePlayerDamage((EntityPlayer) p), 20);
|
||||
s.damageItem(2, p);
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public float getDigSpeed (ItemStack s, Block b, int meta)
|
||||
{
|
||||
return getEfficiency(s);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onBlockDestroyed (ItemStack s, World w, Block b, int x, int y, int z, EntityLivingBase e)
|
||||
{
|
||||
if (b.getBlockHardness(w, x, y, z) != 0.0D) s.damageItem(1, e);
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onBlockStartBreak (ItemStack s, int x, int y, int z, EntityPlayer p)
|
||||
{
|
||||
super.onBlockStartBreak(s, x, y, z, p);
|
||||
|
||||
if (!p.worldObj.isRemote)
|
||||
{
|
||||
Block block = p.worldObj.getBlock(x, y, z);
|
||||
int meta = p.worldObj.getBlockMetadata(x, y, z);
|
||||
|
||||
if (block == Blocks.lit_redstone_ore)
|
||||
{
|
||||
block = Blocks.redstone_ore;
|
||||
}
|
||||
|
||||
ItemStack stack = new ItemStack(block, 1, meta);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public EnumRarity getRarity (ItemStack s)
|
||||
{
|
||||
return EnumRarity.uncommon;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isFull3D ()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ItemStack onItemRightClick (ItemStack s, World w, EntityPlayer p)
|
||||
{
|
||||
if (!w.isRemote && p.isSneaking()) toggleMode(s);
|
||||
|
||||
return s;
|
||||
}
|
||||
|
||||
public int getEfficiency (ItemStack s)
|
||||
{
|
||||
switch (getMode(s))
|
||||
{
|
||||
case 0 :
|
||||
return 20;
|
||||
case 1 :
|
||||
return 8;
|
||||
case 2 :
|
||||
return 128;
|
||||
case 3 :
|
||||
return 0;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
public int getMode (ItemStack s)
|
||||
{
|
||||
if (s.stackTagCompound == null)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
return s.stackTagCompound.getInteger(TAG_MODE);
|
||||
}
|
||||
|
||||
public String getModeName (ItemStack s)
|
||||
{
|
||||
int mode = getMode(s);
|
||||
|
||||
switch (mode)
|
||||
{
|
||||
case 0 :
|
||||
return StatCollector.translateToLocal("text.disassembler.normal");
|
||||
case 1 :
|
||||
return StatCollector.translateToLocal("text.disassembler.slow");
|
||||
case 2 :
|
||||
return StatCollector.translateToLocal("text.disassembler.fast");
|
||||
case 3 :
|
||||
return StatCollector.translateToLocal("text.disassembler.off");
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
public void toggleMode (ItemStack s)
|
||||
{
|
||||
if (s.stackTagCompound == null) s.setTagCompound(new NBTTagCompound());
|
||||
|
||||
s.stackTagCompound.setInteger(TAG_MODE, getMode(s) < 3 ? getMode(s) + 1 : 0);
|
||||
}
|
||||
|
||||
public void onUpdate (ItemStack s, World w, Entity e, int i, boolean b)
|
||||
{
|
||||
super.onUpdate(s, w, e, i, b);
|
||||
if (e instanceof EntityPlayer)
|
||||
{
|
||||
EntityPlayer p = (EntityPlayer) e;
|
||||
if ( (!w.isRemote) && (s.isItemDamaged()) && (e.ticksExisted % 20 == 0))
|
||||
{
|
||||
if (WandManager.consumeVisFromInventory(p, new AspectList().add(Aspect.ENTROPY, 5)))
|
||||
{
|
||||
s.damageItem(-1, (EntityLivingBase) e);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,152 @@
|
||||
package taintedmagic.common.items.wand;
|
||||
|
||||
import java.util.Random;
|
||||
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.entity.player.EntityPlayerMP;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.ChatComponentText;
|
||||
import net.minecraft.util.IIcon;
|
||||
import net.minecraft.util.MathHelper;
|
||||
import net.minecraft.util.MovingObjectPosition;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
import net.minecraft.util.StatCollector;
|
||||
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.EntityEldritchOrbAttack;
|
||||
import taintedmagic.common.entities.EntityTaintBubble;
|
||||
import thaumcraft.api.aspects.Aspect;
|
||||
import thaumcraft.api.aspects.AspectList;
|
||||
import thaumcraft.api.wands.FocusUpgradeType;
|
||||
import thaumcraft.api.wands.ItemFocusBasic;
|
||||
import thaumcraft.common.Thaumcraft;
|
||||
import thaumcraft.common.entities.monster.EntityEldritchGuardian;
|
||||
import thaumcraft.common.entities.projectile.EntityEldritchOrb;
|
||||
import thaumcraft.common.entities.projectile.EntityEmber;
|
||||
import thaumcraft.common.items.wands.ItemWandCasting;
|
||||
import thaumcraft.common.items.wands.WandManager;
|
||||
import thaumcraft.common.lib.network.PacketHandler;
|
||||
import thaumcraft.common.lib.network.misc.PacketMiscEvent;
|
||||
|
||||
public class ItemFocusEldritch extends ItemFocusBasic
|
||||
{
|
||||
public static FocusUpgradeType sanity = new FocusUpgradeType(57, 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));
|
||||
IIcon depthIcon = null;
|
||||
|
||||
private static final AspectList costBase = new AspectList().add(Aspect.ENTROPY, 20).add(Aspect.FIRE, 20);
|
||||
private static final AspectList costSane = new AspectList().add(Aspect.ENTROPY, 20).add(Aspect.FIRE, 50).add(Aspect.ORDER, 20);
|
||||
private static final AspectList costCorrosive = new AspectList().add(Aspect.ENTROPY, 50).add(Aspect.FIRE, 20).add(Aspect.WATER, 20);
|
||||
|
||||
long soundDelay = 0L;
|
||||
|
||||
public ItemFocusEldritch ()
|
||||
{
|
||||
this.setCreativeTab(TaintedMagic.tabTaintedMagic);
|
||||
this.setUnlocalizedName("ItemFocusEldritch");
|
||||
}
|
||||
|
||||
@SideOnly (Side.CLIENT)
|
||||
public void registerIcons (IIconRegister ir)
|
||||
{
|
||||
this.icon = ir.registerIcon("taintedmagic:ItemFocusEldritch");
|
||||
this.depthIcon = ir.registerIcon("taintedmagic:ItemFocusEldritch_depth");
|
||||
}
|
||||
|
||||
public IIcon getFocusDepthLayerIcon (ItemStack s)
|
||||
{
|
||||
return this.depthIcon;
|
||||
}
|
||||
|
||||
public String getSortingHelper (ItemStack s)
|
||||
{
|
||||
return "AM" + super.getSortingHelper(s);
|
||||
}
|
||||
|
||||
public int getFocusColor (ItemStack s)
|
||||
{
|
||||
return 0x000018;
|
||||
}
|
||||
|
||||
public AspectList getVisCost (ItemStack s)
|
||||
{
|
||||
return isUpgradedWith(s, ItemFocusTaint.corrosive) ? costCorrosive : isUpgradedWith(s, sanity) ? costSane : costBase;
|
||||
}
|
||||
|
||||
public int getActivationCooldown (ItemStack s)
|
||||
{
|
||||
return 600;
|
||||
}
|
||||
|
||||
public boolean isVisCostPerTick (ItemStack s)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
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();
|
||||
|
||||
if (!w.isRemote)
|
||||
{
|
||||
int potency = wand.getFocusPotency(s);
|
||||
if (wand.consumeAllVis(s, p, getVisCost(s), true, false))
|
||||
{
|
||||
EntityEldritchOrbAttack orb = null;
|
||||
orb = new EntityEldritchOrbAttack(w, p, isUpgradedWith(wand.getFocusItem(s), ItemFocusTaint.corrosive));
|
||||
orb.dmg = (10F + potency);
|
||||
w.spawnEntityInWorld(orb);
|
||||
if (!isUpgradedWith(wand.getFocusItem(s), sanity))
|
||||
{
|
||||
Random rand = new Random();
|
||||
int randomInt = rand.nextInt(10);
|
||||
if (randomInt == 5)
|
||||
{
|
||||
Thaumcraft.addStickyWarpToPlayer(p, 1);
|
||||
}
|
||||
}
|
||||
}
|
||||
w.playSoundAtEntity(p, "thaumcraft:egattack", 0.4F, 1.0F + w.rand.nextFloat() * 0.1F);
|
||||
}
|
||||
p.swingItem();
|
||||
return s;
|
||||
}
|
||||
|
||||
public FocusUpgradeType[] getPossibleUpgradesByRank (ItemStack s, int rank)
|
||||
{
|
||||
switch (rank)
|
||||
{
|
||||
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,
|
||||
ItemFocusTaint.corrosive };
|
||||
case 4 :
|
||||
return new FocusUpgradeType[]{
|
||||
FocusUpgradeType.frugal,
|
||||
FocusUpgradeType.potency };
|
||||
case 5 :
|
||||
return new FocusUpgradeType[]{
|
||||
FocusUpgradeType.frugal,
|
||||
FocusUpgradeType.potency,
|
||||
this.sanity };
|
||||
}
|
||||
return null;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,137 @@
|
||||
package taintedmagic.common.items.wand;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.EnumChatFormatting;
|
||||
import net.minecraft.util.IIcon;
|
||||
import net.minecraft.util.MovingObjectPosition;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
import net.minecraft.util.StatCollector;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.event.entity.living.LivingEvent;
|
||||
import taintedmagic.common.TaintedMagic;
|
||||
import taintedmagic.common.registry.ItemRegistry;
|
||||
import thaumcraft.api.ThaumcraftApiHelper;
|
||||
import thaumcraft.api.aspects.Aspect;
|
||||
import thaumcraft.api.aspects.AspectList;
|
||||
import thaumcraft.api.wands.FocusUpgradeType;
|
||||
import thaumcraft.api.wands.ItemFocusBasic;
|
||||
import cpw.mods.fml.common.eventhandler.SubscribeEvent;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
|
||||
public class ItemFocusMageMace extends ItemFocusBasic
|
||||
{
|
||||
public IIcon depthIcon = null;
|
||||
public IIcon ornIcon = null;
|
||||
|
||||
public int dmg;
|
||||
|
||||
public static FocusUpgradeType bloodlust = new FocusUpgradeType(58, new ResourceLocation("taintedmagic", "textures/misc/IconBloodlust.png"), "focus.upgrade.bloodlust.name", "focus.upgrade.bloodlust.text", new AspectList().add(Aspect.WEAPON, 1).add(Aspect.HEAL, 1));
|
||||
public static final AspectList costBase = new AspectList().add(Aspect.ENTROPY, 50);
|
||||
public static final AspectList costBloodlust = new AspectList().add(Aspect.ENTROPY, 50).add(Aspect.ORDER, 20).add(Aspect.FIRE, 50);
|
||||
|
||||
public ItemFocusMageMace ()
|
||||
{
|
||||
this.setCreativeTab(TaintedMagic.tabTaintedMagic);
|
||||
this.setUnlocalizedName("ItemFocusMageMace");
|
||||
}
|
||||
|
||||
@SideOnly (Side.CLIENT)
|
||||
public void registerIcons (IIconRegister ir)
|
||||
{
|
||||
this.icon = ir.registerIcon("taintedmagic:ItemFocusMageMace");
|
||||
this.depthIcon = ir.registerIcon("taintedmagic:ItemFocusMageMace_depth");
|
||||
this.ornIcon = ir.registerIcon("taintedmagic:ItemFocusMageMace_orn");
|
||||
}
|
||||
|
||||
public IIcon getFocusDepthLayerIcon (ItemStack s)
|
||||
{
|
||||
return this.depthIcon;
|
||||
}
|
||||
|
||||
public IIcon getOrnament (ItemStack s)
|
||||
{
|
||||
return this.ornIcon;
|
||||
}
|
||||
|
||||
public String getSortingHelper (ItemStack s)
|
||||
{
|
||||
return "MM" + super.getSortingHelper(s);
|
||||
}
|
||||
|
||||
public int getFocusColor (ItemStack s)
|
||||
{
|
||||
return 3289650;
|
||||
}
|
||||
|
||||
public AspectList getVisCost (ItemStack s)
|
||||
{
|
||||
return this.isUpgradedWith(s, bloodlust) ? this.costBloodlust : this.costBase;
|
||||
}
|
||||
|
||||
public int getActivationCooldown (ItemStack s)
|
||||
{
|
||||
return -1;
|
||||
}
|
||||
|
||||
public boolean isVisCostPerTick (ItemStack s)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
public ItemFocusBasic.WandFocusAnimation getAnimation (ItemStack s)
|
||||
{
|
||||
return WandFocusAnimation.WAVE;
|
||||
}
|
||||
|
||||
public ItemStack onFocusRightClick (ItemStack s, World w, EntityPlayer p, MovingObjectPosition mop)
|
||||
{
|
||||
return s;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void addInformation (ItemStack s, EntityPlayer p, List l, boolean b)
|
||||
{
|
||||
super.addInformation(s, p, l, b);
|
||||
l.add(" ");
|
||||
l.add(EnumChatFormatting.BLUE + "+" + new String(this.isUpgradedWith(s, FocusUpgradeType.potency) ? Integer.toString(15 + this.getUpgradeLevel(s, FocusUpgradeType.potency)) : "15") + " " + StatCollector.translateToLocal("text.attackdamageequipped"));
|
||||
}
|
||||
|
||||
public FocusUpgradeType[] getPossibleUpgradesByRank (ItemStack s, int rank)
|
||||
{
|
||||
switch (rank)
|
||||
{
|
||||
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,
|
||||
this.bloodlust };
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
public boolean canApplyUpgrade (ItemStack s, EntityPlayer p, FocusUpgradeType t, int rank)
|
||||
{
|
||||
return (!t.equals(this.bloodlust)) || (ThaumcraftApiHelper.isResearchComplete(p.getCommandSenderName(), "BLOODLUSTUPGRADE"));
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,104 @@
|
||||
package taintedmagic.common.items.wand;
|
||||
|
||||
import java.util.Random;
|
||||
|
||||
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;
|
||||
|
||||
public class ItemFocusMeteorology extends ItemFocusBasic
|
||||
{
|
||||
IIcon depthIcon = null;
|
||||
|
||||
private static final AspectList costBase = new AspectList().add(Aspect.AIR, 1000).add(Aspect.WATER, 1000).add(Aspect.FIRE, 1000).add(Aspect.EARTH, 1000).add(Aspect.ORDER, 1000).add(Aspect.ENTROPY, 1000);
|
||||
|
||||
public ItemFocusMeteorology ()
|
||||
{
|
||||
this.setCreativeTab(TaintedMagic.tabTaintedMagic);
|
||||
this.setUnlocalizedName("ItemFocusMeteorology");
|
||||
}
|
||||
|
||||
@SideOnly (Side.CLIENT)
|
||||
public void registerIcons (IIconRegister ir)
|
||||
{
|
||||
this.icon = ir.registerIcon("taintedmagic:ItemFocusMeteorology");
|
||||
this.depthIcon = ir.registerIcon("taintedmagic:ItemFocusMeteorology_depth");
|
||||
}
|
||||
|
||||
public IIcon getFocusDepthLayerIcon (ItemStack s)
|
||||
{
|
||||
return this.depthIcon;
|
||||
}
|
||||
|
||||
public String getSortingHelper (ItemStack s)
|
||||
{
|
||||
return "WT" + super.getSortingHelper(s);
|
||||
}
|
||||
|
||||
public int getFocusColor (ItemStack s)
|
||||
{
|
||||
return 0x23D9EA;
|
||||
}
|
||||
|
||||
public AspectList getVisCost (ItemStack s)
|
||||
{
|
||||
return new AspectList().add(Aspect.AIR, 1000).add(Aspect.WATER, 1000).add(Aspect.FIRE, 1000).add(Aspect.EARTH, 1000).add(Aspect.ORDER, 1000).add(Aspect.ENTROPY, 1000);
|
||||
}
|
||||
|
||||
public int getActivationCooldown (ItemStack s)
|
||||
{
|
||||
return 1;
|
||||
}
|
||||
|
||||
public boolean isVisCostPerTick (ItemStack s)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
public ItemFocusBasic.WandFocusAnimation getAnimation (ItemStack s)
|
||||
{
|
||||
return ItemFocusBasic.WandFocusAnimation.WAVE;
|
||||
}
|
||||
|
||||
public ItemStack onFocusRightClick (ItemStack s, World w, EntityPlayer p, MovingObjectPosition mop)
|
||||
{
|
||||
WandManager.setCooldown(p, 30000);
|
||||
ItemWandCasting wand = (ItemWandCasting) s.getItem();
|
||||
wand.consumeAllVis(s, p, getVisCost(s), true, false);
|
||||
|
||||
w.getWorldInfo().setRainTime(w.isRaining() ? 24000 : 0);
|
||||
w.getWorldInfo().setRaining(!w.isRaining());
|
||||
|
||||
p.playSound("thaumcraft:wand", 0.5F, 1.0F);
|
||||
return s;
|
||||
}
|
||||
|
||||
@SideOnly (Side.CLIENT)
|
||||
public EnumRarity getRarity (ItemStack s)
|
||||
{
|
||||
return EnumRarity.epic;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,167 @@
|
||||
package taintedmagic.common.items.wand;
|
||||
|
||||
import java.util.Random;
|
||||
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.potion.PotionEffect;
|
||||
import net.minecraft.util.IIcon;
|
||||
import net.minecraft.util.MovingObjectPosition;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
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.FocusUpgradeType;
|
||||
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;
|
||||
|
||||
public class ItemFocusTaint extends ItemFocusBasic
|
||||
{
|
||||
public static FocusUpgradeType tainturgy = new FocusUpgradeType(55, new ResourceLocation("taintedmagic", "textures/foci/IconTainturgy.png"), "focus.upgrade.tainturgy.name", "focus.upgrade.tainturgy.text", new AspectList().add(Aspect.TAINT, 1).add(Aspect.HEAL, 1));
|
||||
public static FocusUpgradeType corrosive = new FocusUpgradeType(56, 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));
|
||||
IIcon depthIcon = null;
|
||||
|
||||
private static final AspectList costBase = new AspectList().add(Aspect.EARTH, 10).add(Aspect.WATER, 10);
|
||||
private static final AspectList costTainturgist = new AspectList().add(Aspect.EARTH, 10).add(Aspect.WATER, 10).add(Aspect.ORDER, 10);
|
||||
|
||||
public ItemFocusTaint ()
|
||||
{
|
||||
this.setCreativeTab(TaintedMagic.tabTaintedMagic);
|
||||
this.setUnlocalizedName("ItemFocusTaint");
|
||||
}
|
||||
|
||||
@SideOnly (Side.CLIENT)
|
||||
public void registerIcons (IIconRegister ir)
|
||||
{
|
||||
this.icon = ir.registerIcon("taintedmagic:ItemFocusTaint");
|
||||
this.depthIcon = ir.registerIcon("taintedmagic:ItemFocusTaint_depth");
|
||||
}
|
||||
|
||||
public IIcon getFocusDepthLayerIcon (ItemStack s)
|
||||
{
|
||||
return this.depthIcon;
|
||||
}
|
||||
|
||||
public String getSortingHelper (ItemStack s)
|
||||
{
|
||||
return "BM" + super.getSortingHelper(s);
|
||||
}
|
||||
|
||||
public int getFocusColor (ItemStack s)
|
||||
{
|
||||
return 8073200;
|
||||
}
|
||||
|
||||
public AspectList getVisCost (ItemStack s)
|
||||
{
|
||||
return isUpgradedWith(s, tainturgy) ? costTainturgist : costBase;
|
||||
}
|
||||
|
||||
public int getActivationCooldown (ItemStack s)
|
||||
{
|
||||
return -1;
|
||||
}
|
||||
|
||||
public boolean isVisCostPerTick (ItemStack s)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
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();
|
||||
p.setItemInUse(s, 2147483647);
|
||||
WandManager.setCooldown(p, -1);
|
||||
return s;
|
||||
}
|
||||
|
||||
public void onUsingFocusTick (ItemStack s, EntityPlayer p, int count)
|
||||
{
|
||||
ItemWandCasting wand = (ItemWandCasting) s.getItem();
|
||||
if (!wand.consumeAllVis(s, p, getVisCost(s), false, false))
|
||||
{
|
||||
p.stopUsingItem();
|
||||
return;
|
||||
}
|
||||
int range = 8;
|
||||
Vec3 vec3d = p.getLook(range);
|
||||
if (!p.worldObj.isRemote && p.ticksExisted % 20 == 0) p.worldObj.playSoundAtEntity(p, "thaumcraft:bubble", 0.33F, 2.0F);
|
||||
|
||||
int potency = wand.getFocusPotency(s);
|
||||
if ( (!p.worldObj.isRemote) && (wand.consumeAllVis(s, p, getVisCost(s), true, false)))
|
||||
{
|
||||
float scatter = isUpgradedWith(wand.getFocusItem(s), FocusUpgradeType.enlarge) ? 15.0F : 8.0F;
|
||||
for (int a = 0; a < 2 + wand.getFocusPotency(s); a++)
|
||||
{
|
||||
EntityTaintBubble orb = new EntityTaintBubble(p.worldObj, p, scatter, isUpgradedWith(wand.getFocusItem(s), this.corrosive));
|
||||
orb.posX += orb.motionX;
|
||||
orb.posY += orb.motionY;
|
||||
orb.posZ += orb.motionZ;
|
||||
orb.damage = 5F + potency;
|
||||
p.worldObj.spawnEntityInWorld(orb);
|
||||
if (!isUpgradedWith(wand.getFocusItem(s), tainturgy))
|
||||
{
|
||||
Random rand = new Random();
|
||||
int randomInt = rand.nextInt(150);
|
||||
if (randomInt == 9)
|
||||
{
|
||||
try
|
||||
{
|
||||
p.addPotionEffect(new PotionEffect(Config.potionVisExhaustID, 1000, 2));
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public FocusUpgradeType[] getPossibleUpgradesByRank (ItemStack s, int rank)
|
||||
{
|
||||
switch (rank)
|
||||
{
|
||||
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,
|
||||
tainturgy };
|
||||
case 4 :
|
||||
return new FocusUpgradeType[]{
|
||||
FocusUpgradeType.frugal,
|
||||
FocusUpgradeType.potency,
|
||||
FocusUpgradeType.enlarge };
|
||||
case 5 :
|
||||
return new FocusUpgradeType[]{
|
||||
FocusUpgradeType.frugal,
|
||||
FocusUpgradeType.potency,
|
||||
corrosive };
|
||||
}
|
||||
return null;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,190 @@
|
||||
package taintedmagic.common.items.wand;
|
||||
|
||||
import java.util.Iterator;
|
||||
import java.util.List;
|
||||
import java.util.Random;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import net.minecraft.client.particle.EntityFX;
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.AxisAlignedBB;
|
||||
import net.minecraft.util.DamageSource;
|
||||
import net.minecraft.util.EnumChatFormatting;
|
||||
import net.minecraft.util.IIcon;
|
||||
import net.minecraft.util.MathHelper;
|
||||
import net.minecraft.util.MovingObjectPosition;
|
||||
import net.minecraft.util.StatCollector;
|
||||
import net.minecraft.world.World;
|
||||
import cpw.mods.fml.common.network.NetworkRegistry;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import taintedmagic.common.TaintedMagic;
|
||||
import taintedmagic.common.entities.EntityEldritchOrbAttack;
|
||||
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.client.fx.ParticleEngine;
|
||||
import thaumcraft.client.fx.particles.FXWisp;
|
||||
import thaumcraft.common.Thaumcraft;
|
||||
import thaumcraft.common.entities.projectile.EntityPrimalOrb;
|
||||
import thaumcraft.common.items.wands.ItemWandCasting;
|
||||
import thaumcraft.common.items.wands.WandManager;
|
||||
import thaumcraft.common.lib.network.PacketHandler;
|
||||
import thaumcraft.common.lib.network.fx.PacketFXSonic;
|
||||
|
||||
public class ItemFocusTaintedBlast extends ItemFocusBasic
|
||||
{
|
||||
private static final AspectList costBase = new AspectList().add(Aspect.ENTROPY, 500).add(Aspect.EARTH, 500).add(Aspect.WATER, 500);
|
||||
|
||||
public static IIcon depthIcon;
|
||||
public static IIcon ornIcon;
|
||||
|
||||
public ItemFocusTaintedBlast ()
|
||||
{
|
||||
this.setCreativeTab(TaintedMagic.tabTaintedMagic);
|
||||
this.setUnlocalizedName("ItemFocusTaintedBlast");
|
||||
}
|
||||
|
||||
@SideOnly (Side.CLIENT)
|
||||
public void registerIcons (IIconRegister ir)
|
||||
{
|
||||
this.icon = ir.registerIcon("taintedmagic:ItemFocusTaintedBlast");
|
||||
this.depthIcon = ir.registerIcon("taintedmagic:ItemFocusTaint_depth");
|
||||
this.ornIcon = ir.registerIcon("taintedmagic:ItemFocusTaintedBlast_orn");
|
||||
}
|
||||
|
||||
public IIcon getFocusDepthLayerIcon (ItemStack s)
|
||||
{
|
||||
return this.depthIcon;
|
||||
}
|
||||
|
||||
public IIcon getOrnament (ItemStack s)
|
||||
{
|
||||
return this.ornIcon;
|
||||
}
|
||||
|
||||
public String getSortingHelper (ItemStack s)
|
||||
{
|
||||
return "TB" + super.getSortingHelper(s);
|
||||
}
|
||||
|
||||
public int getFocusColor (ItemStack s)
|
||||
{
|
||||
return 13107455;
|
||||
}
|
||||
|
||||
public AspectList getVisCost (ItemStack s)
|
||||
{
|
||||
return costBase;
|
||||
}
|
||||
|
||||
public int getActivationCooldown (ItemStack s)
|
||||
{
|
||||
return 15000;
|
||||
}
|
||||
|
||||
public boolean isVisCostPerTick (ItemStack s)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
public ItemFocusBasic.WandFocusAnimation getAnimation (ItemStack s)
|
||||
{
|
||||
return ItemFocusBasic.WandFocusAnimation.WAVE;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void addInformation (ItemStack s, EntityPlayer p, List l, boolean b)
|
||||
{
|
||||
super.addInformation(s, p, l, b);
|
||||
l.add(" ");
|
||||
l.add(EnumChatFormatting.BLUE + "+" + new String(this.isUpgradedWith(s, FocusUpgradeType.enlarge) ? Integer.toString(15 + this.getUpgradeLevel(s, FocusUpgradeType.enlarge)) : "15") + " " + StatCollector.translateToLocal("text.radius"));
|
||||
}
|
||||
|
||||
public ItemStack onFocusRightClick (ItemStack s, World w, EntityPlayer p, MovingObjectPosition mop)
|
||||
{
|
||||
Iterator i$;
|
||||
ItemWandCasting wand = (ItemWandCasting) s.getItem();
|
||||
|
||||
int potency = wand.getFocusPotency(s);
|
||||
if (wand.consumeAllVis(s, p, getVisCost(s), true, false))
|
||||
{
|
||||
List entities = p.worldObj.getEntitiesWithinAABB(Entity.class, AxisAlignedBB.getBoundingBox(p.posX, p.posY, p.posZ, p.posX + 1, p.posY + 1, p.posZ + 1).expand(15.0D + this.getUpgradeLevel(s, FocusUpgradeType.enlarge), 15.0D + this.getUpgradeLevel(s, FocusUpgradeType.enlarge), 15.0D + this.getUpgradeLevel(s, FocusUpgradeType.enlarge)));
|
||||
if ( (entities != null) && (entities.size() > 0)) for (i$ = entities.iterator(); i$.hasNext();)
|
||||
{
|
||||
Object ent = i$.next();
|
||||
Entity eo = (Entity) ent;
|
||||
|
||||
if (eo != p)
|
||||
{
|
||||
if (eo.isEntityAlive() && !eo.isEntityInvulnerable())
|
||||
{
|
||||
double d = getDistanceTo(eo.posX, eo.posY, eo.posZ, p);
|
||||
if (d < 7.0D)
|
||||
{
|
||||
eo.attackEntityFrom(DamageSource.magic, 2.0F);
|
||||
}
|
||||
}
|
||||
Vector3 movement = getDistanceBetween(eo, p);
|
||||
eo.addVelocity(movement.x * 3, 0.8, movement.z * 3);
|
||||
}
|
||||
}
|
||||
w.playSoundAtEntity(p, "taintedmagic:shockwave", 5.0F, 1.0F * (float) Math.random());
|
||||
TaintedMagic.proxy.spawnShockwaveParticles(p.worldObj);
|
||||
return s;
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
public static Vector3 getDistanceBetween (Entity e, Entity e2)
|
||||
{
|
||||
Vector3 fromPosition = new Vector3(e.posX, e.posY, e.posZ);
|
||||
Vector3 toPosition = new Vector3(e2.posX, e2.posY, e2.posZ);
|
||||
Vector3 dist = fromPosition.sub(toPosition);
|
||||
dist.normalize();
|
||||
return dist;
|
||||
|
||||
}
|
||||
|
||||
public static double getDistanceTo (double x, double y, double z, EntityPlayer p)
|
||||
{
|
||||
double var7 = p.posX + 0.5D - x;
|
||||
double var9 = p.posY + 0.5D - y;
|
||||
double var11 = p.posZ + 0.5D - z;
|
||||
return var7 * var7 + var9 * var9 + var11 * var11;
|
||||
}
|
||||
|
||||
public FocusUpgradeType[] getPossibleUpgradesByRank (ItemStack s, int rank)
|
||||
{
|
||||
switch (rank)
|
||||
{
|
||||
case 1 :
|
||||
return new FocusUpgradeType[]{
|
||||
FocusUpgradeType.frugal,
|
||||
FocusUpgradeType.enlarge };
|
||||
case 2 :
|
||||
return new FocusUpgradeType[]{
|
||||
FocusUpgradeType.frugal,
|
||||
FocusUpgradeType.enlarge };
|
||||
case 3 :
|
||||
return new FocusUpgradeType[]{
|
||||
FocusUpgradeType.frugal,
|
||||
FocusUpgradeType.enlarge };
|
||||
case 4 :
|
||||
return new FocusUpgradeType[]{
|
||||
FocusUpgradeType.frugal,
|
||||
FocusUpgradeType.enlarge };
|
||||
case 5 :
|
||||
return new FocusUpgradeType[]{
|
||||
FocusUpgradeType.frugal,
|
||||
FocusUpgradeType.enlarge };
|
||||
}
|
||||
return null;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,102 @@
|
||||
package taintedmagic.common.items.wand;
|
||||
|
||||
import java.awt.Color;
|
||||
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.EnumRarity;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.IIcon;
|
||||
import net.minecraft.util.MovingObjectPosition;
|
||||
import net.minecraft.world.World;
|
||||
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;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
|
||||
public class ItemFocusTime extends ItemFocusBasic
|
||||
{
|
||||
IIcon depthIcon = null;
|
||||
|
||||
private static final AspectList costBase = new AspectList().add(Aspect.AIR, 1000).add(Aspect.WATER, 1000).add(Aspect.FIRE, 1000).add(Aspect.EARTH, 1000).add(Aspect.ORDER, 1000).add(Aspect.ENTROPY, 1000);
|
||||
|
||||
public ItemFocusTime ()
|
||||
{
|
||||
this.setCreativeTab(TaintedMagic.tabTaintedMagic);
|
||||
this.setUnlocalizedName("ItemFocusTime");
|
||||
}
|
||||
|
||||
@SideOnly (Side.CLIENT)
|
||||
public void registerIcons (IIconRegister ir)
|
||||
{
|
||||
this.icon = ir.registerIcon("taintedmagic:ItemFocusTime");
|
||||
this.depthIcon = ir.registerIcon("taintedmagic:ItemFocusMeteorology_depth");
|
||||
}
|
||||
|
||||
public IIcon getFocusDepthLayerIcon (ItemStack s)
|
||||
{
|
||||
return this.depthIcon;
|
||||
}
|
||||
|
||||
public String getSortingHelper (ItemStack s)
|
||||
{
|
||||
return "TI" + super.getSortingHelper(s);
|
||||
}
|
||||
|
||||
public int getFocusColor (ItemStack s)
|
||||
{
|
||||
EntityPlayer player = TaintedMagic.proxy.getClientPlayer();
|
||||
return player == null ? 0xFFFFFF : Color.HSBtoRGB(player.ticksExisted * 16 % 360 / 360F, 1F, 1F);
|
||||
}
|
||||
|
||||
public AspectList getVisCost (ItemStack s)
|
||||
{
|
||||
return new AspectList().add(Aspect.AIR, 1000).add(Aspect.WATER, 1000).add(Aspect.FIRE, 1000).add(Aspect.EARTH, 1000).add(Aspect.ORDER, 1000).add(Aspect.ENTROPY, 1000);
|
||||
}
|
||||
|
||||
public int getActivationCooldown (ItemStack s)
|
||||
{
|
||||
return 1;
|
||||
}
|
||||
|
||||
public boolean isVisCostPerTick (ItemStack s)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
public ItemFocusBasic.WandFocusAnimation getAnimation (ItemStack s)
|
||||
{
|
||||
return ItemFocusBasic.WandFocusAnimation.WAVE;
|
||||
}
|
||||
|
||||
public ItemStack onFocusRightClick (ItemStack s, World w, EntityPlayer p, MovingObjectPosition mop)
|
||||
{
|
||||
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);
|
||||
return s;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getColorFromItemStack (ItemStack s, int i)
|
||||
{
|
||||
EntityPlayer p = TaintedMagic.proxy.getClientPlayer();
|
||||
return p == null ? 0xFFFFFF : Color.HSBtoRGB(p.ticksExisted * 16 % 360 / 360F, 1F, 1F);
|
||||
}
|
||||
|
||||
@SideOnly (Side.CLIENT)
|
||||
public EnumRarity getRarity (ItemStack s)
|
||||
{
|
||||
return EnumRarity.epic;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,56 @@
|
||||
package taintedmagic.common.items.wand;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
import net.minecraft.creativetab.CreativeTabs;
|
||||
import net.minecraft.item.EnumRarity;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.IIcon;
|
||||
import taintedmagic.common.TaintedMagic;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
|
||||
public class ItemWandCap extends Item
|
||||
{
|
||||
public int SUBTYPES = 4;
|
||||
public IIcon[] icons = new IIcon[SUBTYPES];
|
||||
|
||||
public ItemWandCap ()
|
||||
{
|
||||
this.setCreativeTab(TaintedMagic.tabTaintedMagic);
|
||||
this.setUnlocalizedName("ItemWandCap");
|
||||
this.setHasSubtypes(true);
|
||||
}
|
||||
|
||||
public EnumRarity getRarity (ItemStack s)
|
||||
{
|
||||
return EnumRarity.uncommon;
|
||||
}
|
||||
|
||||
@SideOnly (Side.CLIENT)
|
||||
public void registerIcons (IIconRegister ir)
|
||||
{
|
||||
for (int i = 0; i < icons.length; i++)
|
||||
this.icons[i] = ir.registerIcon("taintedmagic:ItemWandCap" + i);
|
||||
}
|
||||
|
||||
@SideOnly (Side.CLIENT)
|
||||
public IIcon getIconFromDamage (int i)
|
||||
{
|
||||
return this.icons[i];
|
||||
}
|
||||
|
||||
@SideOnly (Side.CLIENT)
|
||||
public void getSubItems (Item item, CreativeTabs c, List l)
|
||||
{
|
||||
for (int i = 0; i < SUBTYPES; i++)
|
||||
l.add(new ItemStack(this, 1, i));
|
||||
}
|
||||
|
||||
public String getUnlocalizedName (ItemStack s)
|
||||
{
|
||||
return super.getUnlocalizedName() + "." + s.getItemDamage();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,59 @@
|
||||
package taintedmagic.common.items.wand;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import taintedmagic.common.TaintedMagic;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
import net.minecraft.creativetab.CreativeTabs;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.EnumRarity;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.EnumChatFormatting;
|
||||
import net.minecraft.util.IIcon;
|
||||
import net.minecraft.util.StatCollector;
|
||||
|
||||
public class ItemWandRod extends Item
|
||||
{
|
||||
public int SUBTYPES = 2;
|
||||
public IIcon[] icons = new IIcon[SUBTYPES];
|
||||
|
||||
public ItemWandRod ()
|
||||
{
|
||||
this.setCreativeTab(TaintedMagic.tabTaintedMagic);
|
||||
this.setUnlocalizedName("ItemWandRod");
|
||||
this.setHasSubtypes(true);
|
||||
}
|
||||
|
||||
public EnumRarity getRarity (ItemStack s)
|
||||
{
|
||||
return EnumRarity.uncommon;
|
||||
}
|
||||
|
||||
@SideOnly (Side.CLIENT)
|
||||
public void registerIcons (IIconRegister ir)
|
||||
{
|
||||
for (int i = 0; i < icons.length; i++)
|
||||
this.icons[i] = ir.registerIcon("taintedmagic:ItemWandRod" + i);
|
||||
}
|
||||
|
||||
@SideOnly (Side.CLIENT)
|
||||
public IIcon getIconFromDamage (int i)
|
||||
{
|
||||
return this.icons[i];
|
||||
}
|
||||
|
||||
@SideOnly (Side.CLIENT)
|
||||
public void getSubItems (Item item, CreativeTabs c, List l)
|
||||
{
|
||||
for (int i = 0; i < SUBTYPES; i++)
|
||||
l.add(new ItemStack(this, 1, i));
|
||||
}
|
||||
|
||||
public String getUnlocalizedName (ItemStack s)
|
||||
{
|
||||
return super.getUnlocalizedName() + "." + s.getItemDamage();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,64 @@
|
||||
package taintedmagic.common.lib;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import net.minecraft.creativetab.CreativeTabs;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import taintedmagic.common.TaintedMagic;
|
||||
import taintedmagic.common.helper.TaintedMagicHelper;
|
||||
import taintedmagic.common.registry.ItemRegistry;
|
||||
import thaumcraft.common.config.ConfigItems;
|
||||
import thaumcraft.common.items.wands.ItemWandCasting;
|
||||
|
||||
public class LibCreativeTab extends CreativeTabs
|
||||
{
|
||||
public List list = new ArrayList();
|
||||
|
||||
public LibCreativeTab ()
|
||||
{
|
||||
super(LibStrings.MODID);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void displayAllReleventItems (List l)
|
||||
{
|
||||
super.displayAllReleventItems(l);
|
||||
ItemStack wand = new ItemStack(ConfigItems.itemWandCasting);
|
||||
ItemWandCasting wand2 = (ItemWandCasting) wand.getItem();
|
||||
|
||||
wand2.setCap(wand, ItemRegistry.WAND_CAP_SHADOWMETAL);
|
||||
wand2.setRod(wand, ItemRegistry.STAFF_ROD_WARPWOOD);
|
||||
wand2.storeAllVis(wand, TaintedMagicHelper.getPrimals(50000));
|
||||
|
||||
if (l != null) l.add(0, wand);
|
||||
|
||||
ItemStack wand3 = new ItemStack(ConfigItems.itemWandCasting);
|
||||
ItemWandCasting wand4 = (ItemWandCasting) wand.getItem();
|
||||
|
||||
wand4.setCap(wand3, ItemRegistry.WAND_CAP_SHADOWMETAL);
|
||||
wand4.setRod(wand3, ItemRegistry.WAND_ROD_WARPWOOD);
|
||||
wand4.storeAllVis(wand3, TaintedMagicHelper.getPrimals(25000));
|
||||
|
||||
if (l != null) l.add(1, wand3);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ItemStack getIconItemStack ()
|
||||
{
|
||||
ItemStack wand = new ItemStack(ConfigItems.itemWandCasting);
|
||||
ItemWandCasting wand2 = (ItemWandCasting) wand.getItem();
|
||||
|
||||
wand2.setCap(wand, ItemRegistry.WAND_CAP_SHADOWMETAL);
|
||||
wand2.setRod(wand, ItemRegistry.WAND_ROD_WARPWOOD);
|
||||
|
||||
return wand;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Item getTabIconItem ()
|
||||
{
|
||||
return null;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
package taintedmagic.common.lib;
|
||||
|
||||
import net.minecraft.client.settings.KeyBinding;
|
||||
|
||||
import org.lwjgl.input.Keyboard;
|
||||
|
||||
import cpw.mods.fml.client.registry.ClientRegistry;
|
||||
|
||||
public class LibKeyBindings
|
||||
{
|
||||
public LibKeyBindings ()
|
||||
{
|
||||
// this is legacy and will probably never be used again
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,597 @@
|
||||
package taintedmagic.common.lib;
|
||||
|
||||
import net.minecraft.init.Blocks;
|
||||
import net.minecraft.init.Items;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.item.crafting.CraftingManager;
|
||||
import net.minecraft.item.crafting.FurnaceRecipes;
|
||||
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;
|
||||
import thaumcraft.api.aspects.AspectList;
|
||||
import thaumcraft.common.config.ConfigBlocks;
|
||||
import thaumcraft.common.config.ConfigItems;
|
||||
import cpw.mods.fml.common.registry.GameRegistry;
|
||||
|
||||
public class LibRecipes
|
||||
{
|
||||
public static void init ()
|
||||
{
|
||||
initCrafting();
|
||||
initSmelting();
|
||||
initCrucible();
|
||||
initInfusion();
|
||||
initArcane();
|
||||
}
|
||||
|
||||
public static void initCrafting ()
|
||||
{
|
||||
ResearchRegistry.recipes.put("BlockShadowmetal", GameRegistry.addShapedRecipe(new ItemStack(Item.getItemFromBlock(BlockRegistry.BlockShadowmetal)), new Object[]{
|
||||
"AAA",
|
||||
"AAA",
|
||||
"AAA",
|
||||
Character.valueOf('A'),
|
||||
new ItemStack(ItemRegistry.ItemMaterial) }));
|
||||
|
||||
ResearchRegistry.recipes.put("ItemShadowmetalPick", GameRegistry.addShapedRecipe(new ItemStack(ItemRegistry.ItemShadowmetalPick), new Object[]{
|
||||
"AAA",
|
||||
" B ",
|
||||
" B ",
|
||||
Character.valueOf('A'),
|
||||
new ItemStack(ItemRegistry.ItemMaterial),
|
||||
Character.valueOf('B'),
|
||||
new ItemStack(Items.stick) }));
|
||||
|
||||
ResearchRegistry.recipes.put("ItemShadowmetalAxe", CraftingManager.getInstance().addRecipe(new ItemStack(ItemRegistry.ItemShadowmetalAxe), new Object[]{
|
||||
"AA",
|
||||
"BA",
|
||||
"B ",
|
||||
Character.valueOf('A'),
|
||||
new ItemStack(ItemRegistry.ItemMaterial),
|
||||
Character.valueOf('B'),
|
||||
new ItemStack(Items.stick) }));
|
||||
|
||||
ResearchRegistry.recipes.put("ItemShadowmetalSpade", CraftingManager.getInstance().addRecipe(new ItemStack(ItemRegistry.ItemShadowmetalSpade), new Object[]{
|
||||
"A",
|
||||
"B",
|
||||
"B",
|
||||
Character.valueOf('A'),
|
||||
new ItemStack(ItemRegistry.ItemMaterial),
|
||||
Character.valueOf('B'),
|
||||
new ItemStack(Items.stick) }));
|
||||
|
||||
ResearchRegistry.recipes.put("ItemShadowmetalHoe", CraftingManager.getInstance().addRecipe(new ItemStack(ItemRegistry.ItemShadowmetalHoe), new Object[]{
|
||||
"AA",
|
||||
"B ",
|
||||
"B ",
|
||||
Character.valueOf('A'),
|
||||
new ItemStack(ItemRegistry.ItemMaterial),
|
||||
Character.valueOf('B'),
|
||||
new ItemStack(Items.stick) }));
|
||||
|
||||
ResearchRegistry.recipes.put("ItemShadowmetalSword", GameRegistry.addShapedRecipe(new ItemStack(ItemRegistry.ItemShadowmetalSword), new Object[]{
|
||||
"A",
|
||||
"A",
|
||||
"B",
|
||||
Character.valueOf('A'),
|
||||
new ItemStack(ItemRegistry.ItemMaterial),
|
||||
Character.valueOf('B'),
|
||||
new ItemStack(Items.stick) }));
|
||||
|
||||
GameRegistry.addRecipe(new ItemStack(ItemRegistry.ItemMaterial, 9), new Object[]{
|
||||
"A",
|
||||
Character.valueOf('A'),
|
||||
new ItemStack(BlockRegistry.BlockShadowmetal) });
|
||||
|
||||
ResearchRegistry.recipes.put("BlockWarpwoodPlanks", CraftingManager.getInstance().addRecipe(new ItemStack(BlockRegistry.BlockWarpwoodPlanks, 4), new Object[]{
|
||||
"A",
|
||||
Character.valueOf('A'),
|
||||
new ItemStack(BlockRegistry.BlockWarpwoodLog) }));
|
||||
}
|
||||
|
||||
public static void initSmelting ()
|
||||
{
|
||||
GameRegistry.addSmelting(BlockRegistry.BlockShadowOre, new ItemStack(ItemRegistry.ItemMaterial), 2.0F);
|
||||
}
|
||||
|
||||
public static void initInfusion ()
|
||||
{
|
||||
ResearchRegistry.recipes.put("ItemFocusTaintedBlast", ThaumcraftApi.addInfusionCraftingRecipe("FOCUSTAINTEDBLAST", new ItemStack(ItemRegistry.ItemFocusTaintedBlast), 6, new AspectList().add(Aspect.WEAPON, 30).add(Aspect.MOTION, 24).add(Aspect.TAINT, 42).add(Aspect.MAGIC, 38), new ItemStack(ItemRegistry.ItemFocusTaint), new ItemStack[]{
|
||||
new ItemStack(Blocks.tnt),
|
||||
ItemApi.getItem("itemBottleTaint", 0),
|
||||
ItemApi.getItem("itemResource", 11),
|
||||
ItemApi.getItem("itemResource", 15),
|
||||
ItemApi.getItem("itemBottleTaint", 0),
|
||||
new ItemStack(Blocks.tnt),
|
||||
ItemApi.getItem("itemBottleTaint", 0),
|
||||
ItemApi.getItem("itemResource", 11),
|
||||
ItemApi.getItem("itemResource", 15),
|
||||
ItemApi.getItem("itemBottleTaint", 0) }));
|
||||
|
||||
ResearchRegistry.recipes.put("ItemPrimordialEdge", ThaumcraftApi.addInfusionCraftingRecipe("PRIMALBLADE", new ItemStack(ItemRegistry.ItemPrimordialEdge), 8, new AspectList().add(Aspect.WEAPON, 65).add(Aspect.ELDRITCH, 46).add(Aspect.DARKNESS, 16).add(Aspect.METAL, 60).add(Aspect.VOID, 56), ItemApi.getItem("itemSwordVoid", 0), new ItemStack[]{
|
||||
ItemApi.getItem("itemPrimalCrusher", 0),
|
||||
ItemApi.getBlock("blockCrystal", 0),
|
||||
ItemApi.getBlock("blockCrystal", 1),
|
||||
ItemApi.getBlock("blockCrystal", 2),
|
||||
ItemApi.getBlock("blockCrystal", 3),
|
||||
ItemApi.getBlock("blockCrystal", 4),
|
||||
ItemApi.getBlock("blockCrystal", 5) }));
|
||||
|
||||
ResearchRegistry.recipes.put("ItemFocusMageMace", ThaumcraftApi.addInfusionCraftingRecipe("MACEFOCUS", new ItemStack(ItemRegistry.ItemFocusMageMace), 3, new AspectList().add(Aspect.WEAPON, 32).add(Aspect.METAL, 8).add(Aspect.ENTROPY, 18).add(Aspect.MAGIC, 26), new ItemStack(BlockRegistry.BlockShadowmetal), new ItemStack[]{
|
||||
new ItemStack(Items.gold_ingot),
|
||||
new ItemStack(Items.quartz),
|
||||
ItemApi.getItem("itemShard", 5),
|
||||
new ItemStack(Items.quartz),
|
||||
new ItemStack(Items.diamond_sword),
|
||||
new ItemStack(Items.quartz),
|
||||
ItemApi.getItem("itemShard", 5),
|
||||
new ItemStack(Items.quartz) }));
|
||||
|
||||
ResearchRegistry.recipes.put("ItemSwordCrimson", ThaumcraftApi.addInfusionCraftingRecipe("CRIMSONBLADE", new ItemStack(ConfigItems.itemSwordCrimson), 7, new AspectList().add(Aspect.WEAPON, 32).add(Aspect.METAL, 16).add(Aspect.ENTROPY, 8).add(Aspect.ELDRITCH, 18).add(Aspect.VOID, 32), ItemApi.getItem("itemSwordVoid", 0), new ItemStack[]{
|
||||
new ItemStack(ItemRegistry.ItemCrystalDagger),
|
||||
new ItemStack(ItemRegistry.ItemMaterial, 1, 7),
|
||||
new ItemStack(ItemRegistry.ItemMaterial, 1, 8),
|
||||
new ItemStack(ItemRegistry.ItemMaterial, 1, 7),
|
||||
new ItemStack(ItemRegistry.ItemMaterial, 1, 2),
|
||||
new ItemStack(ItemRegistry.ItemMaterial, 1, 7),
|
||||
new ItemStack(ItemRegistry.ItemMaterial, 1, 8),
|
||||
new ItemStack(ItemRegistry.ItemMaterial, 1, 7) }));
|
||||
|
||||
ResearchRegistry.recipes.put("ItemVoidwalkerSash", ThaumcraftApi.addInfusionCraftingRecipe("VOIDSASH", new ItemStack(ItemRegistry.ItemVoidwalkerSash, 1), 7, new AspectList().add(Aspect.VOID, 56).add(Aspect.MAGIC, 40).add(Aspect.ARMOR, 64).add(Aspect.TRAVEL, 16).add(Aspect.FLIGHT, 10), ItemApi.getItem("itemGirdleRunic", 0), new ItemStack[]{
|
||||
ItemApi.getItem("itemEldritchObject", 3),
|
||||
ItemApi.getItem("itemResource", 16),
|
||||
new ItemStack(ItemRegistry.ItemMaterial),
|
||||
ItemApi.getItem("itemResource", 16),
|
||||
new ItemStack(ItemRegistry.ItemMaterial, 1, 1),
|
||||
ItemApi.getItem("itemResource", 16),
|
||||
new ItemStack(ItemRegistry.ItemMaterial),
|
||||
ItemApi.getItem("itemResource", 16), }));
|
||||
|
||||
ResearchRegistry.recipes.put("ItemMaterial:5", ThaumcraftApi.addInfusionCraftingRecipe("CREATIONSHARD", new ItemStack(ItemRegistry.ItemMaterial, 2, 5), 8, new AspectList().add(Aspect.ELDRITCH, 64).add(Aspect.VOID, 64).add(Aspect.MAGIC, 64), ItemApi.getItem("itemEldritchObject", 3), new ItemStack[]{
|
||||
new ItemStack(Items.nether_star),
|
||||
ItemApi.getBlock("blockCrystal", 0),
|
||||
ItemApi.getBlock("blockCrystal", 1),
|
||||
ItemApi.getBlock("blockCrystal", 2),
|
||||
ItemApi.getBlock("blockCrystal", 3),
|
||||
ItemApi.getBlock("blockCrystal", 4),
|
||||
ItemApi.getBlock("blockCrystal", 5) }));
|
||||
|
||||
ResearchRegistry.recipes.put("BlockWarpwoodSapling", ThaumcraftApi.addInfusionCraftingRecipe("WARPTREE", new ItemStack(BlockRegistry.BlockWarpwoodSapling), 3, new AspectList().add(Aspect.ELDRITCH, 8).add(Aspect.TREE, 8).add(Aspect.DARKNESS, 8), new ItemStack(Blocks.sapling, 1, Short.MAX_VALUE), new ItemStack[]{
|
||||
new ItemStack(ItemRegistry.ItemMaterial, 1, 3),
|
||||
ItemApi.getItem("itemZombieBrain", 0),
|
||||
new ItemStack(ItemRegistry.ItemMaterial, 1, 3),
|
||||
ItemApi.getItem("itemZombieBrain", 0) }));
|
||||
|
||||
ResearchRegistry.recipes.put("ItemWandRod:0", ThaumcraftApi.addInfusionCraftingRecipe("ROD_warpwood", new ItemStack(ItemRegistry.ItemWandRod), 8, new AspectList().add(Aspect.ELDRITCH, 64).add(Aspect.DARKNESS, 32).add(Aspect.TREE, 32).add(Aspect.MAGIC, 64), new ItemStack(BlockRegistry.BlockWarpwoodLog), new ItemStack[]{
|
||||
ItemApi.getItem("itemEldritchObject", 3),
|
||||
new ItemStack(ItemRegistry.ItemMaterial),
|
||||
new ItemStack(ItemRegistry.ItemMaterial, 1, 3),
|
||||
ItemApi.getItem("itemResource", 16),
|
||||
ItemApi.getItem("itemZombieBrain", 0),
|
||||
new ItemStack(ItemRegistry.ItemMaterial),
|
||||
new ItemStack(ItemRegistry.ItemMaterial, 1, 3),
|
||||
ItemApi.getItem("itemResource", 16) }));
|
||||
|
||||
ResearchRegistry.recipes.put("ItemVoidFortressHelmet:goggles", ThaumcraftApi.addInfusionCraftingRecipe("HELMGOGGLES", new Object[]{
|
||||
"goggles",
|
||||
new NBTTagByte((byte) 1) }, 5, new AspectList().add(Aspect.SENSES, 32).add(Aspect.AURA, 16).add(Aspect.ARMOR, 16), new ItemStack(ItemRegistry.ItemVoidFortressHelmet, 1, 32767), new ItemStack[]{
|
||||
new ItemStack(Items.slime_ball),
|
||||
ItemApi.getItem("itemGoggles", 0) }));
|
||||
|
||||
ResearchRegistry.recipes.put("ItemVoidFortressHelmet:mask0", ThaumcraftApi.addInfusionCraftingRecipe("MASKGRINNINGDEVIL", new Object[]{
|
||||
"mask",
|
||||
new NBTTagInt(0) }, 8, new AspectList().add(Aspect.MIND, 64).add(Aspect.HEAL, 64).add(Aspect.ARMOR, 16), new ItemStack(ItemRegistry.ItemVoidFortressHelmet, 1, 32767), new ItemStack[]{
|
||||
new ItemStack(Items.dye, 1, 0),
|
||||
new ItemStack(Items.iron_ingot),
|
||||
new ItemStack(Items.leather),
|
||||
ItemApi.getBlock("blockCustomPlant", 2),
|
||||
ItemApi.getItem("itemZombieBrain", 0),
|
||||
new ItemStack(Items.iron_ingot) }));
|
||||
|
||||
ResearchRegistry.recipes.put("ItemVoidFortressHelmet:mask1", ThaumcraftApi.addInfusionCraftingRecipe("MASKANGRYGHOST", new Object[]{
|
||||
"mask",
|
||||
new NBTTagInt(1) }, 8, new AspectList().add(Aspect.ENTROPY, 64).add(Aspect.DEATH, 64).add(Aspect.ARMOR, 16), new ItemStack(ItemRegistry.ItemVoidFortressHelmet, 1, 32767), new ItemStack[]{
|
||||
new ItemStack(Items.dye, 1, 15),
|
||||
new ItemStack(Items.iron_ingot),
|
||||
new ItemStack(Items.leather),
|
||||
new ItemStack(Items.poisonous_potato),
|
||||
new ItemStack(Items.skull, 1, 1),
|
||||
new ItemStack(Items.iron_ingot) }));
|
||||
|
||||
ResearchRegistry.recipes.put("ItemVoidFortressHelmet:mask2", ThaumcraftApi.addInfusionCraftingRecipe("MASKSIPPINGFIEND", new Object[]{
|
||||
"mask",
|
||||
new NBTTagInt(2) }, 8, new AspectList().add(Aspect.UNDEAD, 64).add(Aspect.LIFE, 64).add(Aspect.ARMOR, 16), new ItemStack(ItemRegistry.ItemVoidFortressHelmet, 1, 32767), new ItemStack[]{
|
||||
new ItemStack(Items.dye, 1, 1),
|
||||
new ItemStack(Items.iron_ingot),
|
||||
new ItemStack(Items.leather),
|
||||
new ItemStack(Items.ghast_tear),
|
||||
new ItemStack(Items.milk_bucket),
|
||||
new ItemStack(Items.iron_ingot) }));
|
||||
|
||||
ResearchRegistry.recipes.put("ItemVoidFortressHelmet", ThaumcraftApi.addInfusionCraftingRecipe("VOIDFORTRESS", new ItemStack(ItemRegistry.ItemVoidFortressHelmet), 6, new AspectList().add(Aspect.METAL, 24).add(Aspect.ARMOR, 16).add(Aspect.MAGIC, 8).add(Aspect.ELDRITCH, 16).add(Aspect.VOID, 16), ItemApi.getItem("itemHelmetVoid", 0), new ItemStack[]{
|
||||
ItemApi.getItem("itemResource", 16),
|
||||
ItemApi.getItem("itemResource", 16),
|
||||
new ItemStack(Items.gold_ingot),
|
||||
new ItemStack(Items.gold_ingot),
|
||||
new ItemStack(Items.emerald) }));
|
||||
|
||||
ResearchRegistry.recipes.put("ItemVoidFortressChestplate", ThaumcraftApi.addInfusionCraftingRecipe("VOIDFORTRESS", new ItemStack(ItemRegistry.ItemVoidFortressChestplate), 6, new AspectList().add(Aspect.METAL, 24).add(Aspect.ARMOR, 24).add(Aspect.MAGIC, 8).add(Aspect.ELDRITCH, 16).add(Aspect.VOID, 24), ItemApi.getItem("itemChestVoid", 0), new ItemStack[]{
|
||||
ItemApi.getItem("itemResource", 16),
|
||||
ItemApi.getItem("itemResource", 16),
|
||||
ItemApi.getItem("itemResource", 16),
|
||||
ItemApi.getItem("itemResource", 16),
|
||||
new ItemStack(Items.gold_ingot),
|
||||
new ItemStack(Items.leather) }));
|
||||
|
||||
ResearchRegistry.recipes.put("ItemVoidFortressLeggings", ThaumcraftApi.addInfusionCraftingRecipe("VOIDFORTRESS", new ItemStack(ItemRegistry.ItemVoidFortressLeggings), 6, new AspectList().add(Aspect.METAL, 24).add(Aspect.ARMOR, 20).add(Aspect.MAGIC, 8).add(Aspect.ELDRITCH, 16).add(Aspect.VOID, 20), ItemApi.getItem("itemLegsVoid", 0), new ItemStack[]{
|
||||
ItemApi.getItem("itemResource", 16),
|
||||
ItemApi.getItem("itemResource", 16),
|
||||
ItemApi.getItem("itemResource", 16),
|
||||
new ItemStack(Items.gold_ingot),
|
||||
new ItemStack(Items.leather) }));
|
||||
|
||||
ResearchRegistry.recipes.put("ItemWarpedGoggles", ThaumcraftApi.addInfusionCraftingRecipe("WARPEDGOGGLES", new ItemStack(ItemRegistry.ItemWarpedGoggles), 3, new AspectList().add(Aspect.ELDRITCH, 32).add(Aspect.DARKNESS, 16).add(Aspect.MAGIC, 16).add(Aspect.ARMOR, 8), ItemApi.getItem("itemGoggles", 0), new ItemStack[]{
|
||||
new ItemStack(ItemRegistry.ItemMaterial, 1, 0),
|
||||
new ItemStack(ItemRegistry.ItemMaterial, 1, 0) }));
|
||||
|
||||
ResearchRegistry.recipes.put("ItemWandCap:0", ThaumcraftApi.addInfusionCraftingRecipe("CAP_shadowmetal", new ItemStack(ItemRegistry.ItemWandCap), 8, new AspectList().add(Aspect.ELDRITCH, 64).add(Aspect.DARKNESS, 64).add(Aspect.MAGIC, 64).add(Aspect.METAL, 64).add(Aspect.VOID, 64), ItemApi.getItem("itemWandCap", 7), new ItemStack[]{
|
||||
new ItemStack(ItemRegistry.ItemMaterial, 1, 3),
|
||||
new ItemStack(ItemRegistry.ItemMaterial),
|
||||
ItemApi.getItem("itemResource", 16),
|
||||
new ItemStack(ItemRegistry.ItemMaterial),
|
||||
ItemApi.getItem("itemEldritchObject", 3),
|
||||
new ItemStack(ItemRegistry.ItemMaterial),
|
||||
ItemApi.getItem("itemResource", 16),
|
||||
new ItemStack(ItemRegistry.ItemMaterial) }));
|
||||
|
||||
ResearchRegistry.recipes.put("ItemFocusTaint", ThaumcraftApi.addInfusionCraftingRecipe("TAINTFOCUS", new ItemStack(ItemRegistry.ItemFocusTaint), 4, new AspectList().add(Aspect.TAINT, 64).add(Aspect.WATER, 64).add(Aspect.MAGIC, 64).add(Aspect.SLIME, 64), ItemApi.getItem("itemFocusPech", 0), new ItemStack[]{
|
||||
ItemApi.getItem("itemResource", 11),
|
||||
new ItemStack(ItemRegistry.ItemMaterial, 1, 4),
|
||||
ItemApi.getItem("itemBottleTaint", 0),
|
||||
new ItemStack(ItemRegistry.ItemMaterial, 1, 4),
|
||||
ItemApi.getItem("itemResource", 11),
|
||||
new ItemStack(ItemRegistry.ItemMaterial, 1, 4),
|
||||
ItemApi.getItem("itemBottleTaint", 0),
|
||||
new ItemStack(ItemRegistry.ItemMaterial, 1, 4) }));
|
||||
|
||||
ResearchRegistry.recipes.put("ItemFocusEldritch", ThaumcraftApi.addInfusionCraftingRecipe("ELDRITCHFOCUS", new ItemStack(ItemRegistry.ItemFocusEldritch), 6, new AspectList().add(Aspect.ELDRITCH, 64).add(Aspect.DARKNESS, 64).add(Aspect.MAGIC, 64).add(Aspect.AIR, 64), new ItemStack(ItemRegistry.ItemMaterial, 1, 5), new ItemStack[]{
|
||||
ItemApi.getItem("itemFocusPortableHole", 0),
|
||||
ItemApi.getItem("itemResource", 16),
|
||||
ItemApi.getItem("itemEldritchObject", 0),
|
||||
ItemApi.getItem("itemResource", 16),
|
||||
ItemApi.getItem("itemResource", 15),
|
||||
ItemApi.getItem("itemResource", 16),
|
||||
ItemApi.getItem("itemEldritchObject", 0),
|
||||
ItemApi.getItem("itemResource", 16) }));
|
||||
|
||||
ResearchRegistry.recipes.put("ItemMaterial:8", ThaumcraftApi.addInfusionCraftingRecipe("KNIGHTROBES", new ItemStack(ItemRegistry.ItemMaterial, 1, 8), 2, new AspectList().add(Aspect.DARKNESS, 8).add(Aspect.METAL, 8).add(Aspect.MAGIC, 8), new ItemStack(Items.iron_ingot), new ItemStack[]{
|
||||
new ItemStack(ItemRegistry.ItemMaterial, 1, 7),
|
||||
new ItemStack(ItemRegistry.ItemMaterial, 1, 7),
|
||||
new ItemStack(ItemRegistry.ItemMaterial, 1, 7),
|
||||
new ItemStack(ItemRegistry.ItemMaterial, 1, 7) }));
|
||||
|
||||
ResearchRegistry.recipes.put("ItemHelmetCultistLeaderPlate", ThaumcraftApi.addInfusionCraftingRecipe("PRAETORARMOR", ItemApi.getItem("itemHelmetCultistLeaderPlate", 0), 6, new AspectList().add(Aspect.DARKNESS, 64).add(Aspect.METAL, 64).add(Aspect.MAGIC, 64).add(Aspect.ELDRITCH, 4), ItemApi.getItem("itemHelmetCultistPlate", 0), new ItemStack[]{
|
||||
new ItemStack(Items.gold_ingot),
|
||||
new ItemStack(ItemRegistry.ItemMaterial, 1, 8),
|
||||
new ItemStack(ItemRegistry.ItemMaterial, 1, 2),
|
||||
new ItemStack(ItemRegistry.ItemMaterial, 1, 8),
|
||||
new ItemStack(Items.gold_ingot),
|
||||
new ItemStack(ItemRegistry.ItemMaterial, 1, 8),
|
||||
new ItemStack(ItemRegistry.ItemMaterial, 1, 2),
|
||||
new ItemStack(ItemRegistry.ItemMaterial, 1, 8) }));
|
||||
|
||||
ResearchRegistry.recipes.put("ItemChestCultistLeaderPlate", ThaumcraftApi.addInfusionCraftingRecipe("PRAETORARMOR", ItemApi.getItem("itemChestCultistLeaderPlate", 0), 6, new AspectList().add(Aspect.DARKNESS, 64).add(Aspect.METAL, 64).add(Aspect.MAGIC, 64).add(Aspect.ELDRITCH, 4), ItemApi.getItem("itemChestCultistPlate", 0), new ItemStack[]{
|
||||
new ItemStack(Items.gold_ingot),
|
||||
new ItemStack(ItemRegistry.ItemMaterial, 1, 8),
|
||||
new ItemStack(ItemRegistry.ItemMaterial, 1, 2),
|
||||
new ItemStack(ItemRegistry.ItemMaterial, 1, 8),
|
||||
new ItemStack(Items.gold_ingot),
|
||||
new ItemStack(ItemRegistry.ItemMaterial, 1, 8),
|
||||
new ItemStack(ItemRegistry.ItemMaterial, 1, 2),
|
||||
new ItemStack(ItemRegistry.ItemMaterial, 1, 8) }));
|
||||
|
||||
ResearchRegistry.recipes.put("ItemLegsCultistLeaderPlate", ThaumcraftApi.addInfusionCraftingRecipe("PRAETORARMOR", ItemApi.getItem("itemLegsCultistLeaderPlate", 0), 6, new AspectList().add(Aspect.DARKNESS, 64).add(Aspect.METAL, 64).add(Aspect.MAGIC, 64).add(Aspect.ELDRITCH, 4), ItemApi.getItem("itemLegsCultistPlate", 0), new ItemStack[]{
|
||||
new ItemStack(Items.gold_ingot),
|
||||
new ItemStack(ItemRegistry.ItemMaterial, 1, 8),
|
||||
new ItemStack(ItemRegistry.ItemMaterial, 1, 2),
|
||||
new ItemStack(ItemRegistry.ItemMaterial, 1, 8),
|
||||
new ItemStack(Items.gold_ingot),
|
||||
new ItemStack(ItemRegistry.ItemMaterial, 1, 8),
|
||||
new ItemStack(ItemRegistry.ItemMaterial, 1, 2),
|
||||
new ItemStack(ItemRegistry.ItemMaterial, 1, 8) }));
|
||||
|
||||
ResearchRegistry.recipes.put("ItemVoidwalkerBoots", ThaumcraftApi.addInfusionCraftingRecipe("VOIDWALKERBOOTS", new ItemStack(ItemRegistry.ItemVoidwalkerBoots), 8, new AspectList().add(Aspect.DARKNESS, 64).add(Aspect.VOID, 64).add(Aspect.ELDRITCH, 64).add(Aspect.ARMOR, 64).add(Aspect.TRAVEL, 64), ItemApi.getItem("itemBootsTraveller", 0), new ItemStack[]{
|
||||
ItemApi.getItem("itemEldritchObject", 0),
|
||||
ItemApi.getItem("itemResource", 16),
|
||||
new ItemStack(ItemRegistry.ItemMaterial, 1, 1),
|
||||
new ItemStack(ItemRegistry.ItemMaterial),
|
||||
new ItemStack(ItemRegistry.ItemMaterial, 1, 1),
|
||||
ItemApi.getItem("itemResource", 16),
|
||||
ItemApi.getItem("itemEldritchObject", 0),
|
||||
ItemApi.getItem("itemResource", 16),
|
||||
new ItemStack(ItemRegistry.ItemMaterial, 1, 1),
|
||||
new ItemStack(ItemRegistry.ItemMaterial),
|
||||
new ItemStack(ItemRegistry.ItemMaterial, 1, 1),
|
||||
ItemApi.getItem("itemResource", 16) }));
|
||||
|
||||
ResearchRegistry.recipes.put("ItemFocusTime", ThaumcraftApi.addInfusionCraftingRecipe("FOCUSTIME", new ItemStack(ItemRegistry.ItemFocusTime), 7, new AspectList().add(Aspect.VOID, 32).add(Aspect.ELDRITCH, 32).add(Aspect.LIGHT, 32).add(Aspect.DARKNESS, 32), new ItemStack(ItemRegistry.ItemMaterial, 1, 5), new ItemStack[]{
|
||||
new ItemStack(Items.clock),
|
||||
ItemApi.getBlock("blockCrystal", 0),
|
||||
ItemApi.getItem("itemFocusPortableHole", 0),
|
||||
ItemApi.getBlock("blockCrystal", 0) }));
|
||||
|
||||
ResearchRegistry.recipes.put("ItemFocusMeteorology", ThaumcraftApi.addInfusionCraftingRecipe("FOCUSWEATHER", new ItemStack(ItemRegistry.ItemFocusMeteorology), 7, new AspectList().add(Aspect.VOID, 32).add(Aspect.ELDRITCH, 32).add(Aspect.WATER, 32).add(Aspect.WEATHER, 32), new ItemStack(ItemRegistry.ItemMaterial, 1, 5), new ItemStack[]{
|
||||
ItemApi.getItem("itemFocusShock", 0),
|
||||
ItemApi.getBlock("blockCrystal", 2),
|
||||
ItemApi.getItem("itemFocusFrost", 0),
|
||||
ItemApi.getBlock("blockCrystal", 2) }));
|
||||
|
||||
ResearchRegistry.recipes.put("ItemThaumicDisassembler", ThaumcraftApi.addInfusionCraftingRecipe("THAUMICDISASSEMBLER", new ItemStack(ItemRegistry.ItemThaumicDisassembler), 3, new AspectList().add(Aspect.METAL, 16).add(Aspect.TOOL, 16).add(Aspect.WEAPON, 16).add(Aspect.VOID, 16), new ItemStack(ItemRegistry.ItemMaterial, 1, 6), new ItemStack[]{
|
||||
ItemApi.getItem("itemPickVoid", 0),
|
||||
ItemApi.getItem("itemResource", 2),
|
||||
ItemApi.getItem("itemShovelVoid", 0),
|
||||
ItemApi.getItem("itemResource", 2),
|
||||
ItemApi.getItem("itemSwordVoid", 0),
|
||||
ItemApi.getItem("itemResource", 2),
|
||||
ItemApi.getItem("itemAxeVoid", 0),
|
||||
ItemApi.getItem("itemResource", 2) }));
|
||||
|
||||
ResearchRegistry.recipes.put("ItemShadowFortressHelmet:goggles", ThaumcraftApi.addInfusionCraftingRecipe("HELMGOGGLES", new Object[]{
|
||||
"goggles",
|
||||
new NBTTagByte((byte) 1) }, 5, new AspectList().add(Aspect.SENSES, 32).add(Aspect.AURA, 16).add(Aspect.ARMOR, 16), new ItemStack(ItemRegistry.ItemShadowFortressHelmet, 1, 32767), new ItemStack[]{
|
||||
new ItemStack(Items.slime_ball),
|
||||
ItemApi.getItem("itemGoggles", 0) }));
|
||||
|
||||
ResearchRegistry.recipes.put("ItemShadowFortressHelmet:mask0", ThaumcraftApi.addInfusionCraftingRecipe("MASKGRINNINGDEVIL", new Object[]{
|
||||
"mask",
|
||||
new NBTTagInt(0) }, 8, new AspectList().add(Aspect.MIND, 64).add(Aspect.HEAL, 64).add(Aspect.ARMOR, 16), new ItemStack(ItemRegistry.ItemShadowFortressHelmet, 1, 32767), new ItemStack[]{
|
||||
new ItemStack(Items.dye, 1, 0),
|
||||
new ItemStack(Items.iron_ingot),
|
||||
new ItemStack(Items.leather),
|
||||
ItemApi.getBlock("blockCustomPlant", 2),
|
||||
ItemApi.getItem("itemZombieBrain", 0),
|
||||
new ItemStack(Items.iron_ingot) }));
|
||||
|
||||
ResearchRegistry.recipes.put("ItemShadowFortressHelmet:mask1", ThaumcraftApi.addInfusionCraftingRecipe("MASKANGRYGHOST", new Object[]{
|
||||
"mask",
|
||||
new NBTTagInt(1) }, 8, new AspectList().add(Aspect.ENTROPY, 64).add(Aspect.DEATH, 64).add(Aspect.ARMOR, 16), new ItemStack(ItemRegistry.ItemShadowFortressHelmet, 1, 32767), new ItemStack[]{
|
||||
new ItemStack(Items.dye, 1, 15),
|
||||
new ItemStack(Items.iron_ingot),
|
||||
new ItemStack(Items.leather),
|
||||
new ItemStack(Items.poisonous_potato),
|
||||
new ItemStack(Items.skull, 1, 1),
|
||||
new ItemStack(Items.iron_ingot) }));
|
||||
|
||||
ResearchRegistry.recipes.put("ItemShadowFortressHelmet:mask2", ThaumcraftApi.addInfusionCraftingRecipe("MASKSIPPINGFIEND", new Object[]{
|
||||
"mask",
|
||||
new NBTTagInt(2) }, 8, new AspectList().add(Aspect.UNDEAD, 64).add(Aspect.LIFE, 64).add(Aspect.ARMOR, 16), new ItemStack(ItemRegistry.ItemShadowFortressHelmet, 1, 32767), new ItemStack[]{
|
||||
new ItemStack(Items.dye, 1, 1),
|
||||
new ItemStack(Items.iron_ingot),
|
||||
new ItemStack(Items.leather),
|
||||
new ItemStack(Items.ghast_tear),
|
||||
new ItemStack(Items.milk_bucket),
|
||||
new ItemStack(Items.iron_ingot) }));
|
||||
|
||||
ResearchRegistry.recipes.put("ItemShadowFortressHelmet", ThaumcraftApi.addInfusionCraftingRecipe("SHADOWFORTRESSARMOR", new ItemStack(ItemRegistry.ItemShadowFortressHelmet), 7, new AspectList().add(Aspect.METAL, 28).add(Aspect.ARMOR, 20).add(Aspect.MAGIC, 12).add(Aspect.DARKNESS, 30).add(Aspect.VOID, 22), ItemApi.getItem("itemHelmetVoid", 0), new ItemStack[]{
|
||||
new ItemStack(BlockRegistry.BlockShadowmetal),
|
||||
new ItemStack(BlockRegistry.BlockShadowmetal),
|
||||
new ItemStack(Items.gold_ingot),
|
||||
new ItemStack(Items.gold_ingot),
|
||||
new ItemStack(Items.emerald) }));
|
||||
|
||||
ResearchRegistry.recipes.put("ItemShadowFortressChestplate", ThaumcraftApi.addInfusionCraftingRecipe("SHADOWFORTRESSARMOR", new ItemStack(ItemRegistry.ItemShadowFortressChestplate), 7, new AspectList().add(Aspect.METAL, 38).add(Aspect.ARMOR, 26).add(Aspect.MAGIC, 18).add(Aspect.DARKNESS, 34).add(Aspect.VOID, 26), ItemApi.getItem("itemChestVoid", 0), new ItemStack[]{
|
||||
new ItemStack(BlockRegistry.BlockShadowmetal),
|
||||
new ItemStack(BlockRegistry.BlockShadowmetal),
|
||||
new ItemStack(BlockRegistry.BlockShadowmetal),
|
||||
new ItemStack(BlockRegistry.BlockShadowmetal),
|
||||
new ItemStack(Items.gold_ingot),
|
||||
new ItemStack(Items.leather) }));
|
||||
|
||||
ResearchRegistry.recipes.put("ItemShadowFortressLeggings", ThaumcraftApi.addInfusionCraftingRecipe("SHADOWFORTRESSARMOR", new ItemStack(ItemRegistry.ItemShadowFortressLeggings), 7, new AspectList().add(Aspect.METAL, 32).add(Aspect.ARMOR, 24).add(Aspect.MAGIC, 16).add(Aspect.DARKNESS, 32).add(Aspect.VOID, 24), ItemApi.getItem("itemLegsVoid", 0), new ItemStack[]{
|
||||
new ItemStack(BlockRegistry.BlockShadowmetal),
|
||||
new ItemStack(BlockRegistry.BlockShadowmetal),
|
||||
new ItemStack(BlockRegistry.BlockShadowmetal),
|
||||
new ItemStack(Items.gold_ingot),
|
||||
new ItemStack(Items.leather) }));
|
||||
|
||||
ResearchRegistry.recipes.put("ItemKatana:0", ThaumcraftApi.addInfusionCraftingRecipe("THAUMIUMKATANA", new ItemStack(ItemRegistry.ItemKatana, 1, 0), 3, new AspectList().add(Aspect.METAL, 48).add(Aspect.WEAPON, 48).add(Aspect.MAGIC, 32), new ItemStack(ConfigItems.itemSwordThaumium), new ItemStack[]{
|
||||
new ItemStack(Blocks.obsidian),
|
||||
new ItemStack(ConfigItems.itemResource, 1, 2),
|
||||
new ItemStack(Items.gold_ingot),
|
||||
new ItemStack(Items.emerald),
|
||||
new ItemStack(Items.iron_ingot),
|
||||
new ItemStack(ConfigItems.itemResource, 1, 2),
|
||||
new ItemStack(Blocks.obsidian),
|
||||
new ItemStack(ConfigItems.itemResource, 1, 2),
|
||||
new ItemStack(Items.gold_ingot),
|
||||
new ItemStack(Items.emerald),
|
||||
new ItemStack(Items.iron_ingot),
|
||||
new ItemStack(ConfigItems.itemResource, 1, 2) }));
|
||||
|
||||
ResearchRegistry.recipes.put("ItemKatana:1", ThaumcraftApi.addInfusionCraftingRecipe("VOIDMETALKATANA", new ItemStack(ItemRegistry.ItemKatana, 1, 1), 6, new AspectList().add(Aspect.METAL, 48).add(Aspect.WEAPON, 48).add(Aspect.MAGIC, 42).add(Aspect.VOID, 46).add(Aspect.ELDRITCH, 12), new ItemStack(ConfigItems.itemSwordVoid), new ItemStack[]{
|
||||
new ItemStack(Blocks.obsidian),
|
||||
new ItemStack(ConfigItems.itemResource, 1, 16),
|
||||
new ItemStack(Items.gold_ingot),
|
||||
new ItemStack(Items.emerald),
|
||||
new ItemStack(Items.iron_ingot),
|
||||
new ItemStack(ConfigItems.itemResource, 1, 16),
|
||||
new ItemStack(Blocks.obsidian),
|
||||
new ItemStack(ConfigItems.itemResource, 1, 16),
|
||||
new ItemStack(Items.gold_ingot),
|
||||
new ItemStack(Items.emerald),
|
||||
new ItemStack(Items.iron_ingot),
|
||||
new ItemStack(ConfigItems.itemResource, 1, 16) }));
|
||||
|
||||
ResearchRegistry.recipes.put("ItemKatana:2", ThaumcraftApi.addInfusionCraftingRecipe("SHADOWMETALKATANA", new ItemStack(ItemRegistry.ItemKatana, 1, 2), 7, new AspectList().add(Aspect.METAL, 48).add(Aspect.WEAPON, 48).add(Aspect.MAGIC, 32).add(Aspect.VOID, 16).add(Aspect.DARKNESS, 46), new ItemStack(ItemRegistry.ItemShadowmetalSword), new ItemStack[]{
|
||||
new ItemStack(Blocks.obsidian),
|
||||
new ItemStack(ItemRegistry.ItemMaterial, 1, 0),
|
||||
new ItemStack(Items.iron_ingot),
|
||||
new ItemStack(Items.emerald),
|
||||
new ItemStack(Items.iron_ingot),
|
||||
new ItemStack(ItemRegistry.ItemMaterial, 1, 0),
|
||||
new ItemStack(Blocks.obsidian),
|
||||
new ItemStack(ItemRegistry.ItemMaterial, 1, 0),
|
||||
new ItemStack(Items.iron_ingot),
|
||||
new ItemStack(Items.emerald),
|
||||
new ItemStack(Items.iron_ingot),
|
||||
new ItemStack(ItemRegistry.ItemMaterial, 1, 0) }));
|
||||
}
|
||||
|
||||
public static void initArcane ()
|
||||
{
|
||||
ResearchRegistry.recipes.put("ItemMaterial:2", ThaumcraftApi.addArcaneCraftingRecipe("CRIMSONROBES", new ItemStack(ItemRegistry.ItemMaterial, 1, 2), new AspectList().add(Aspect.ORDER, 5).add(Aspect.WATER, 5).add(Aspect.EARTH, 5).add(Aspect.AIR, 5).add(Aspect.FIRE, 5).add(Aspect.ENTROPY, 5), new Object[]{
|
||||
" A ",
|
||||
"ABA",
|
||||
" A ",
|
||||
Character.valueOf('A'),
|
||||
new ItemStack(ItemRegistry.ItemMaterial, 1, 7),
|
||||
Character.valueOf('B'),
|
||||
ItemApi.getItem("itemResource", 7) }));
|
||||
|
||||
ResearchRegistry.recipes.put("ItemMaterial:6", ThaumcraftApi.addArcaneCraftingRecipe("THAUMICDISASSEMBLER", new ItemStack(ItemRegistry.ItemMaterial, 1, 6), new AspectList().add(Aspect.ORDER, 50).add(Aspect.ENTROPY, 50), new Object[]{
|
||||
"BAB",
|
||||
"ACA",
|
||||
"BAB",
|
||||
Character.valueOf('A'),
|
||||
ItemApi.getItem("itemResource", 2),
|
||||
Character.valueOf('B'),
|
||||
ItemApi.getItem("itemResource", 16),
|
||||
Character.valueOf('C'),
|
||||
new ItemStack(Items.diamond) }));
|
||||
|
||||
ResearchRegistry.recipes.put("ItemHelmetCultistRobe", ThaumcraftApi.addArcaneCraftingRecipe("CRIMSONROBES", ItemApi.getItem("itemHelmetCultistRobe", 0), new AspectList().add(Aspect.ORDER, 5).add(Aspect.WATER, 5).add(Aspect.EARTH, 5).add(Aspect.AIR, 5).add(Aspect.FIRE, 5).add(Aspect.ENTROPY, 5), new Object[]{
|
||||
"AAA",
|
||||
"ABA",
|
||||
" ",
|
||||
Character.valueOf('A'),
|
||||
new ItemStack(ItemRegistry.ItemMaterial, 1, 2),
|
||||
Character.valueOf('B'),
|
||||
new ItemStack(Items.iron_ingot) }));
|
||||
|
||||
ResearchRegistry.recipes.put("ItemChestCultistRobe", ThaumcraftApi.addArcaneCraftingRecipe("CRIMSONROBES", ItemApi.getItem("itemChestCultistRobe", 0), new AspectList().add(Aspect.ORDER, 5).add(Aspect.WATER, 5).add(Aspect.EARTH, 5).add(Aspect.AIR, 5).add(Aspect.FIRE, 5).add(Aspect.ENTROPY, 5), new Object[]{
|
||||
"A A",
|
||||
"AAA",
|
||||
"ABA",
|
||||
Character.valueOf('A'),
|
||||
new ItemStack(ItemRegistry.ItemMaterial, 1, 2),
|
||||
Character.valueOf('B'),
|
||||
new ItemStack(Items.gold_ingot) }));
|
||||
|
||||
ResearchRegistry.recipes.put("ItemLegsCultistRobe", ThaumcraftApi.addArcaneCraftingRecipe("CRIMSONROBES", ItemApi.getItem("itemLegsCultistRobe", 0), new AspectList().add(Aspect.ORDER, 5).add(Aspect.WATER, 5).add(Aspect.EARTH, 5).add(Aspect.AIR, 5).add(Aspect.FIRE, 5).add(Aspect.ENTROPY, 5), new Object[]{
|
||||
"ABA",
|
||||
"ACA",
|
||||
"A A",
|
||||
Character.valueOf('A'),
|
||||
new ItemStack(ItemRegistry.ItemMaterial, 1, 2),
|
||||
Character.valueOf('B'),
|
||||
new ItemStack(Items.gold_ingot),
|
||||
Character.valueOf('C'),
|
||||
new ItemStack(Items.iron_ingot) }));
|
||||
|
||||
ResearchRegistry.recipes.put("ItemBootsCultist", ThaumcraftApi.addArcaneCraftingRecipe("CRIMSONROBES", ItemApi.getItem("itemBootsCultist", 0), new AspectList().add(Aspect.ORDER, 5).add(Aspect.WATER, 5).add(Aspect.EARTH, 5).add(Aspect.AIR, 5).add(Aspect.FIRE, 5).add(Aspect.ENTROPY, 5), new Object[]{
|
||||
"A A",
|
||||
"A A",
|
||||
Character.valueOf('A'),
|
||||
new ItemStack(ItemRegistry.ItemMaterial, 1, 2) }));
|
||||
|
||||
ResearchRegistry.recipes.put("ItemWandRod:1", ThaumcraftApi.addArcaneCraftingRecipe("ROD_warpwood_staff", new ItemStack(ItemRegistry.ItemWandRod, 1, 1), new AspectList().add(Aspect.ORDER, 120).add(Aspect.WATER, 120).add(Aspect.EARTH, 120).add(Aspect.AIR, 120).add(Aspect.FIRE, 120).add(Aspect.ENTROPY, 120), new Object[]{
|
||||
" A",
|
||||
" B ",
|
||||
"B ",
|
||||
Character.valueOf('A'),
|
||||
new ItemStack(ConfigItems.itemEldritchObject, 1, 3),
|
||||
Character.valueOf('B'),
|
||||
new ItemStack(ItemRegistry.ItemWandRod, 1, 0) }));
|
||||
|
||||
ResearchRegistry.recipes.put("ItemHelmetCultistPlate", ThaumcraftApi.addArcaneCraftingRecipe("KNIGHTROBES", ItemApi.getItem("itemHelmetCultistPlate", 0), new AspectList().add(Aspect.ORDER, 5).add(Aspect.WATER, 5).add(Aspect.EARTH, 5).add(Aspect.AIR, 5).add(Aspect.FIRE, 5).add(Aspect.ENTROPY, 5), new Object[]{
|
||||
"ABA",
|
||||
"A A",
|
||||
Character.valueOf('A'),
|
||||
new ItemStack(ItemRegistry.ItemMaterial, 1, 8),
|
||||
Character.valueOf('B'),
|
||||
new ItemStack(ItemRegistry.ItemMaterial, 1, 2) }));
|
||||
|
||||
ResearchRegistry.recipes.put("ItemChestCultistPlate", ThaumcraftApi.addArcaneCraftingRecipe("KNIGHTROBES", ItemApi.getItem("itemChestCultistPlate", 0), new AspectList().add(Aspect.ORDER, 5).add(Aspect.WATER, 5).add(Aspect.EARTH, 5).add(Aspect.AIR, 5).add(Aspect.FIRE, 5).add(Aspect.ENTROPY, 5), new Object[]{
|
||||
"A A",
|
||||
"ABA",
|
||||
"ABA",
|
||||
Character.valueOf('A'),
|
||||
new ItemStack(ItemRegistry.ItemMaterial, 1, 8),
|
||||
Character.valueOf('B'),
|
||||
new ItemStack(ItemRegistry.ItemMaterial, 1, 2) }));
|
||||
|
||||
ResearchRegistry.recipes.put("ItemLegsCultistPlate", ThaumcraftApi.addArcaneCraftingRecipe("KNIGHTROBES", ItemApi.getItem("itemLegsCultistPlate", 0), new AspectList().add(Aspect.ORDER, 5).add(Aspect.WATER, 5).add(Aspect.EARTH, 5).add(Aspect.AIR, 5).add(Aspect.FIRE, 5).add(Aspect.ENTROPY, 5), new Object[]{
|
||||
"AAA",
|
||||
"A A",
|
||||
"B B",
|
||||
Character.valueOf('A'),
|
||||
new ItemStack(ItemRegistry.ItemMaterial, 1, 8),
|
||||
Character.valueOf('B'),
|
||||
new ItemStack(ItemRegistry.ItemMaterial, 1, 2) }));
|
||||
|
||||
ResearchRegistry.recipes.put("ItemMaterial:1", ThaumcraftApi.addArcaneCraftingRecipe("SHADOWCLOTH", new ItemStack(ItemRegistry.ItemMaterial, 1, 1), new AspectList().add(Aspect.ORDER, 1).add(Aspect.WATER, 1).add(Aspect.EARTH, 1).add(Aspect.AIR, 1).add(Aspect.FIRE, 1).add(Aspect.ENTROPY, 1), new Object[]{
|
||||
" A ",
|
||||
"BBB",
|
||||
" A ",
|
||||
Character.valueOf('A'),
|
||||
new ItemStack(ItemRegistry.ItemMaterial),
|
||||
Character.valueOf('B'),
|
||||
ItemApi.getItem("itemResource", 7) }));
|
||||
|
||||
ResearchRegistry.recipes.put("ItemMagicFunguar", ThaumcraftApi.addShapelessArcaneCraftingRecipe("MAGICFUNGUAR", new ItemStack(ItemRegistry.ItemMagicFunguar), new AspectList().add(Aspect.ORDER, 1).add(Aspect.WATER, 1).add(Aspect.EARTH, 1).add(Aspect.AIR, 1).add(Aspect.FIRE, 1).add(Aspect.ENTROPY, 1), new Object[]{
|
||||
new ItemStack(ConfigBlocks.blockCustomPlant, 1, 5),
|
||||
ItemApi.getItem("itemShard", 32767),
|
||||
new ItemStack(Blocks.brown_mushroom),
|
||||
new ItemStack(Blocks.red_mushroom),
|
||||
new ItemStack(Items.blaze_powder) }));
|
||||
|
||||
ResearchRegistry.recipes.put("ItemCrystalDagger", ThaumcraftApi.addArcaneCraftingRecipe("CRIMSONROBES", new ItemStack(ItemRegistry.ItemCrystalDagger), new AspectList().add(Aspect.EARTH, 85).add(Aspect.FIRE, 85).add(Aspect.ENTROPY, 85), new Object[]{
|
||||
" A",
|
||||
" B ",
|
||||
"C ",
|
||||
Character.valueOf('A'),
|
||||
ItemApi.getItem("itemResource", 16),
|
||||
Character.valueOf('B'),
|
||||
ItemApi.getBlock("blockTube", 7),
|
||||
Character.valueOf('C'),
|
||||
"logWood" }));
|
||||
|
||||
ResearchRegistry.recipes.put("ItemWandCap:1", ThaumcraftApi.addArcaneCraftingRecipe("CAP_cloth", new ItemStack(ItemRegistry.ItemWandCap, 1, 1), new AspectList().add(Aspect.EARTH, 10).add(Aspect.FIRE, 10).add(Aspect.ENTROPY, 10).add(Aspect.ORDER, 10), new Object[]{
|
||||
"AAA",
|
||||
"A A",
|
||||
Character.valueOf('A'),
|
||||
ItemApi.getItem("itemResource", 7) }));
|
||||
|
||||
ResearchRegistry.recipes.put("ItemWandCap:2", ThaumcraftApi.addArcaneCraftingRecipe("CAP_crimsoncloth", new ItemStack(ItemRegistry.ItemWandCap, 1, 2), new AspectList().add(Aspect.EARTH, 25).add(Aspect.FIRE, 25).add(Aspect.ENTROPY, 25).add(Aspect.ORDER, 25), new Object[]{
|
||||
"AAA",
|
||||
"ABA",
|
||||
Character.valueOf('A'),
|
||||
new ItemStack(ItemRegistry.ItemMaterial, 1, 2),
|
||||
Character.valueOf('B'),
|
||||
ItemApi.getItem("itemResource", 14) }));
|
||||
|
||||
ResearchRegistry.recipes.put("ItemWandCap:3", ThaumcraftApi.addArcaneCraftingRecipe("CAP_shadowcloth", new ItemStack(ItemRegistry.ItemWandCap, 1, 3), new AspectList().add(Aspect.EARTH, 55).add(Aspect.FIRE, 55).add(Aspect.ENTROPY, 55).add(Aspect.ORDER, 55), new Object[]{
|
||||
"AAA",
|
||||
"ABA",
|
||||
Character.valueOf('A'),
|
||||
new ItemStack(ItemRegistry.ItemMaterial, 1, 1),
|
||||
Character.valueOf('B'),
|
||||
ItemApi.getItem("itemResource", 14) }));
|
||||
}
|
||||
|
||||
public static void initCrucible ()
|
||||
{
|
||||
ResearchRegistry.recipes.put("ItemMaterial:3", ThaumcraftApi.addCrucibleRecipe("EVILSHARDS", new ItemStack(ItemRegistry.ItemMaterial, 1, 3), ItemApi.getItem("itemShard", 6), new AspectList().merge(Aspect.ELDRITCH, 4)));
|
||||
ResearchRegistry.recipes.put("ItemMaterial:4", ThaumcraftApi.addCrucibleRecipe("EVILSHARDS", new ItemStack(ItemRegistry.ItemMaterial, 1, 4), ItemApi.getItem("itemShard", 6), new AspectList().merge(Aspect.TAINT, 4)));
|
||||
ResearchRegistry.recipes.put("BlockShadowOre", ThaumcraftApi.addCrucibleRecipe("SHADOWMETAL", new ItemStack(BlockRegistry.BlockShadowOre), new ItemStack(Blocks.stone), new AspectList().merge(Aspect.VOID, 2).merge(Aspect.DARKNESS, 4).merge(Aspect.METAL, 6).merge(Aspect.MAGIC, 8)));
|
||||
ResearchRegistry.recipes.put("ItemVoidsentBlood", ThaumcraftApi.addCrucibleRecipe("VOIDSENTBLOOD", new ItemStack(ItemRegistry.ItemVoidsentBlood), new ItemStack(ItemRegistry.ItemMaterial, 1, 7), new AspectList().merge(Aspect.VOID, 12).merge(Aspect.DARKNESS, 4).merge(Aspect.AURA, 6).merge(Aspect.ARMOR, 8)));
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
package taintedmagic.common.lib;
|
||||
|
||||
public class LibStrings
|
||||
{
|
||||
// LibStrings
|
||||
public static final String MODID = "TaintedMagic";
|
||||
public static final String NAME = "Tainted Magic";
|
||||
public static final String VERSION = "r7.0";
|
||||
public static final String DEPENDENCIES = "required-after:Forge@[10.13.2.1291,);required-after:Thaumcraft@[4.2.3.5,);after:ThaumicTinkerer";
|
||||
}
|
||||
@@ -0,0 +1,34 @@
|
||||
package taintedmagic.common.lib;
|
||||
|
||||
import net.minecraft.item.Item.ToolMaterial;
|
||||
import net.minecraft.item.ItemArmor.ArmorMaterial;
|
||||
import net.minecraftforge.common.util.EnumHelper;
|
||||
|
||||
public class LibToolMaterials
|
||||
{
|
||||
public static ToolMaterial toolMatCrystal = EnumHelper.addToolMaterial("CRYSTAL", 3, 2000, 16.0F, 2.0F, 30);
|
||||
public static ToolMaterial toolMatShadow = EnumHelper.addToolMaterial("SHADOW", 3, 2200, 17.0F, 6.0F, 30);
|
||||
public static ToolMaterial toolMatPrimal = EnumHelper.addToolMaterial("PRIMAL", 3, 512, 16.0F, 14.5F, 28);
|
||||
|
||||
public static ArmorMaterial armorMatShadow = EnumHelper.addArmorMaterial("SHADOW", 800, new int[]{
|
||||
4,
|
||||
8,
|
||||
6,
|
||||
2 }, 25);
|
||||
public static ArmorMaterial armorMatSpecial = EnumHelper.addArmorMaterial("SPECIAL", 250, new int[]{
|
||||
4,
|
||||
6,
|
||||
6,
|
||||
4 }, 25);
|
||||
public static ArmorMaterial armorMatVoidFortress = EnumHelper.addArmorMaterial("VOIDFORTRESS", 300, new int[]{
|
||||
4,
|
||||
8,
|
||||
6,
|
||||
0 }, 20);
|
||||
|
||||
public static ArmorMaterial armorMatShadowFortress = EnumHelper.addArmorMaterial("SHADOWFORTRESS", 2500, new int[]{
|
||||
4,
|
||||
10,
|
||||
6,
|
||||
0 }, 30);
|
||||
}
|
||||
@@ -0,0 +1,49 @@
|
||||
package taintedmagic.common.registry;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
import taintedmagic.common.blocks.BlockShadowOre;
|
||||
import taintedmagic.common.blocks.BlockShadowmetal;
|
||||
import taintedmagic.common.blocks.BlockWarpwoodLeaves;
|
||||
import taintedmagic.common.blocks.BlockWarpwoodLog;
|
||||
import taintedmagic.common.blocks.BlockWarpwoodPlanks;
|
||||
import taintedmagic.common.blocks.BlockWarpwoodSapling;
|
||||
import taintedmagic.common.items.blocks.ItemBlockShadowOre;
|
||||
import taintedmagic.common.items.blocks.ItemBlockWarpwoodSapling;
|
||||
import cpw.mods.fml.common.registry.GameRegistry;
|
||||
|
||||
public class BlockRegistry
|
||||
{
|
||||
public static void init ()
|
||||
{
|
||||
// Shadow Ore
|
||||
BlockShadowOre = new BlockShadowOre();
|
||||
GameRegistry.registerBlock(BlockShadowOre, ItemBlockShadowOre.class, "BlockShadowOre");
|
||||
|
||||
// Warpwood Log
|
||||
BlockWarpwoodLog = new BlockWarpwoodLog();
|
||||
GameRegistry.registerBlock(BlockWarpwoodLog, "BlockWarpwoodLog");
|
||||
|
||||
// Block of Shadowmetal
|
||||
BlockShadowmetal = new BlockShadowmetal();
|
||||
GameRegistry.registerBlock(BlockShadowmetal, "BlockShadowmetal");
|
||||
|
||||
// Warpwood Planks
|
||||
BlockWarpwoodPlanks = new BlockWarpwoodPlanks();
|
||||
GameRegistry.registerBlock(BlockWarpwoodPlanks, "BlockWarpwoodPlanks");
|
||||
|
||||
// Warpwood Leaves
|
||||
BlockWarpwoodLeaves = new BlockWarpwoodLeaves();
|
||||
GameRegistry.registerBlock(BlockWarpwoodLeaves, "BlockWarpwoodLeaves");
|
||||
|
||||
// Warpwood Sapling
|
||||
BlockWarpwoodSapling = new BlockWarpwoodSapling();
|
||||
GameRegistry.registerBlock(BlockWarpwoodSapling, ItemBlockWarpwoodSapling.class, "BlockWarpwoodSapling");
|
||||
}
|
||||
|
||||
public static Block BlockShadowOre;
|
||||
public static Block BlockWarpwoodLog;
|
||||
public static Block BlockWarpwoodLeaves;
|
||||
public static Block BlockWarpwoodSapling;
|
||||
public static Block BlockShadowmetal;
|
||||
public static Block BlockWarpwoodPlanks;
|
||||
}
|
||||
@@ -0,0 +1,223 @@
|
||||
package taintedmagic.common.registry;
|
||||
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemAxe;
|
||||
import net.minecraft.item.ItemHoe;
|
||||
import net.minecraft.item.ItemPickaxe;
|
||||
import net.minecraft.item.ItemSpade;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.item.ItemSword;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
import taintedmagic.common.handler.WandUpdateHandler;
|
||||
import taintedmagic.common.items.ItemMagicFunguar;
|
||||
import taintedmagic.common.items.ItemMaterial;
|
||||
import taintedmagic.common.items.ItemVoidsentBlood;
|
||||
import taintedmagic.common.items.equipment.ItemShadowFortressArmor;
|
||||
import taintedmagic.common.items.equipment.ItemVoidFortressArmor;
|
||||
import taintedmagic.common.items.equipment.ItemVoidwalkerBoots;
|
||||
import taintedmagic.common.items.equipment.ItemVoidwalkerSash;
|
||||
import taintedmagic.common.items.equipment.ItemWarpedGoggles;
|
||||
import taintedmagic.common.items.tools.ItemCrystalDagger;
|
||||
import taintedmagic.common.items.tools.ItemKatana;
|
||||
import taintedmagic.common.items.tools.ItemPrimordialEdge;
|
||||
import taintedmagic.common.items.tools.ItemShadowmetalAxe;
|
||||
import taintedmagic.common.items.tools.ItemShadowmetalHoe;
|
||||
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.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
|
||||
{
|
||||
public static void init ()
|
||||
{
|
||||
ItemMaterial = new ItemMaterial();
|
||||
GameRegistry.registerItem(ItemMaterial, "ItemMaterial");
|
||||
|
||||
ItemVoidsentBlood = new ItemVoidsentBlood();
|
||||
GameRegistry.registerItem(ItemVoidsentBlood, "ItemVoidsentBlood");
|
||||
|
||||
ItemMagicFunguar = new ItemMagicFunguar(5, 1.0F, false);
|
||||
GameRegistry.registerItem(ItemMagicFunguar, "ItemMagicFunguar");
|
||||
|
||||
// Armor
|
||||
ItemWarpedGoggles = new ItemWarpedGoggles(LibToolMaterials.armorMatSpecial, 4, 0);
|
||||
GameRegistry.registerItem(ItemWarpedGoggles, "ItemWarpedGoggles");
|
||||
|
||||
ItemVoidFortressHelmet = new ItemVoidFortressArmor(LibToolMaterials.armorMatVoidFortress, 4, 0).setUnlocalizedName("ItemVoidFortressHelmet");
|
||||
GameRegistry.registerItem(ItemVoidFortressHelmet, "ItemVoidFortressHelmet");
|
||||
|
||||
ItemVoidFortressChestplate = new ItemVoidFortressArmor(LibToolMaterials.armorMatVoidFortress, 4, 1).setUnlocalizedName("ItemVoidFortressChestplate");
|
||||
GameRegistry.registerItem(ItemVoidFortressChestplate, "ItemVoidFortressChestplate");
|
||||
|
||||
ItemVoidFortressLeggings = new ItemVoidFortressArmor(LibToolMaterials.armorMatVoidFortress, 4, 2).setUnlocalizedName("ItemVoidFortressLeggings");
|
||||
GameRegistry.registerItem(ItemVoidFortressLeggings, "ItemVoidFortressLeggings");
|
||||
|
||||
ItemVoidwalkerBoots = new ItemVoidwalkerBoots(LibToolMaterials.armorMatSpecial, 4, 3).setUnlocalizedName("ItemVoidwalkerBoots");
|
||||
GameRegistry.registerItem(ItemVoidwalkerBoots, "ItemVoidwalkerBoots");
|
||||
|
||||
ItemVoidwalkerSash = new ItemVoidwalkerSash();
|
||||
GameRegistry.registerItem(ItemVoidwalkerSash, "ItemVoidwalkerSash");
|
||||
|
||||
ItemShadowFortressHelmet = new ItemShadowFortressArmor(LibToolMaterials.armorMatShadowFortress, 4, 0).setUnlocalizedName("ItemShadowFortressHelmet");
|
||||
GameRegistry.registerItem(ItemShadowFortressHelmet, "ItemShadowFortressHelmet");
|
||||
|
||||
ItemShadowFortressChestplate = new ItemShadowFortressArmor(LibToolMaterials.armorMatShadowFortress, 4, 1).setUnlocalizedName("ItemShadowFortressChestplate");
|
||||
GameRegistry.registerItem(ItemShadowFortressChestplate, "ItemShadowFortressChestplate");
|
||||
|
||||
ItemShadowFortressLeggings = new ItemShadowFortressArmor(LibToolMaterials.armorMatShadowFortress, 4, 2).setUnlocalizedName("ItemShadowFortressLeggings");
|
||||
GameRegistry.registerItem(ItemShadowFortressLeggings, "ItemShadowFortressLeggings");
|
||||
|
||||
// Wands and Staves
|
||||
ItemWandRod = new ItemWandRod();
|
||||
GameRegistry.registerItem(ItemWandRod, "ItemWandRod");
|
||||
|
||||
WAND_ROD_WARPWOOD = new WandRod("warpwood", 250, new ItemStack(ItemWandRod, 1, 0), 16, new WandUpdateHandler(), new ResourceLocation("taintedmagic:textures/models/ModelWAND_ROD_WARPWOOD.png"));
|
||||
WAND_ROD_WARPWOOD.setGlowing(true);
|
||||
|
||||
STAFF_ROD_WARPWOOD = new StaffRod("warpwood", 500, new ItemStack(ItemWandRod, 1, 1), 20, new WandUpdateHandler(), new ResourceLocation("taintedmagic:textures/models/ModelWAND_ROD_WARPWOOD.png"));
|
||||
STAFF_ROD_WARPWOOD.setRunes(true);
|
||||
STAFF_ROD_WARPWOOD.setGlowing(true);
|
||||
|
||||
ItemWandCap = new ItemWandCap();
|
||||
GameRegistry.registerItem(ItemWandCap, "ItemWandCap");
|
||||
|
||||
WAND_CAP_SHADOWMETAL = new WandCap("shadowmetal", 0.70F, new ItemStack(ItemWandCap, 1, 0), 12);
|
||||
WAND_CAP_SHADOWMETAL.setTexture(new ResourceLocation("taintedmagic:textures/models/ModelWAND_CAP_SHADOWMETAL.png"));
|
||||
|
||||
WAND_CAP_CLOTH = new WandCap("cloth", 0.95F, new ItemStack(ItemWandCap, 1, 1), 3);
|
||||
WAND_CAP_CLOTH.setTexture(new ResourceLocation("taintedmagic:textures/models/ModelWAND_CAP_CLOTH.png"));
|
||||
|
||||
WAND_CAP_CRIMSON_CLOTH = new WandCap("crimsoncloth", 0.85F, new ItemStack(ItemWandCap, 1, 2), 5);
|
||||
WAND_CAP_CRIMSON_CLOTH.setTexture(new ResourceLocation("taintedmagic:textures/models/ModelWAND_CAP_CRIMSON_CLOTH.png"));
|
||||
|
||||
WAND_CAP_SHADOW_CLOTH = new WandCap("shadowcloth", 0.90F, new ItemStack(ItemWandCap, 1, 3), 3);
|
||||
WAND_CAP_SHADOW_CLOTH.setTexture(new ResourceLocation("taintedmagic:textures/models/ModelWAND_CAP_SHADOW_CLOTH.png"));
|
||||
|
||||
// Foci
|
||||
ItemFocusTaint = new ItemFocusTaint();
|
||||
GameRegistry.registerItem(ItemFocusTaint, "ItemFocusTaint");
|
||||
|
||||
ItemFocusEldritch = new ItemFocusEldritch();
|
||||
GameRegistry.registerItem(ItemFocusEldritch, "ItemFocusEldritch");
|
||||
|
||||
ItemFocusMeteorology = new ItemFocusMeteorology();
|
||||
GameRegistry.registerItem(ItemFocusMeteorology, "ItemFocusMeteorology");
|
||||
|
||||
ItemFocusTime = new ItemFocusTime();
|
||||
GameRegistry.registerItem(ItemFocusTime, "ItemFocusTime");
|
||||
|
||||
ItemFocusMageMace = new ItemFocusMageMace();
|
||||
GameRegistry.registerItem(ItemFocusMageMace, "ItemFocusMageMace");
|
||||
|
||||
ItemFocusTaintedBlast = new ItemFocusTaintedBlast();
|
||||
GameRegistry.registerItem(ItemFocusTaintedBlast, "ItemFocusTaintedBlast");
|
||||
|
||||
// Tools
|
||||
ItemThaumicDisassembler = new ItemThaumicDisassembler();
|
||||
GameRegistry.registerItem(ItemThaumicDisassembler, "ItemThaumicDisassembler");
|
||||
|
||||
ItemCrystalDagger = new ItemCrystalDagger(LibToolMaterials.toolMatCrystal);
|
||||
GameRegistry.registerItem(ItemCrystalDagger, "ItemCrystalDagger");
|
||||
|
||||
ItemShadowmetalHoe = new ItemShadowmetalHoe(LibToolMaterials.toolMatShadow);
|
||||
GameRegistry.registerItem(ItemShadowmetalHoe, "ItemShadowmetalHoe");
|
||||
|
||||
ItemShadowmetalPick = new ItemShadowmetalPick(LibToolMaterials.toolMatShadow);
|
||||
GameRegistry.registerItem(ItemShadowmetalPick, "ItemShadowmetalPick");
|
||||
|
||||
ItemShadowmetalAxe = new ItemShadowmetalAxe(LibToolMaterials.toolMatShadow);
|
||||
GameRegistry.registerItem(ItemShadowmetalAxe, "ItemShadowmetalAxe");
|
||||
|
||||
ItemShadowmetalSpade = new ItemShadowmetalSpade(LibToolMaterials.toolMatShadow);
|
||||
GameRegistry.registerItem(ItemShadowmetalSpade, "ItemShadowmetalSpade");
|
||||
|
||||
ItemShadowmetalSword = new ItemShadowmetalSword(LibToolMaterials.toolMatShadow);
|
||||
GameRegistry.registerItem(ItemShadowmetalSword, "ItemShadowmetalSword");
|
||||
|
||||
ItemPrimordialEdge = new ItemPrimordialEdge(LibToolMaterials.toolMatPrimal);
|
||||
GameRegistry.registerItem(ItemPrimordialEdge, "ItemPrimordialEdge");
|
||||
|
||||
ItemKatana = new ItemKatana();
|
||||
GameRegistry.registerItem(ItemKatana, "ItemKatana");
|
||||
}
|
||||
|
||||
public static Item ItemMagicFunguar;
|
||||
/**
|
||||
* Metadata:
|
||||
*
|
||||
* @param 0: Shadowmetal
|
||||
* @param 1: Shadow Cloth
|
||||
* @param 2: Crimson Cloth
|
||||
* @param 3: Warped Shard
|
||||
* @param 4: Fluxed Shard
|
||||
* @param 5: Creation Shard
|
||||
* @param 6: Thaumic Alloy
|
||||
* @param 7: Crystal Blood
|
||||
* @param 8: Crimson Plating
|
||||
*/
|
||||
public static Item ItemMaterial;
|
||||
public static Item ItemVoidsentBlood;
|
||||
|
||||
// Wand
|
||||
public static Item ItemWandRod;
|
||||
|
||||
public static WandRod WAND_ROD_WARPWOOD;
|
||||
public static StaffRod STAFF_ROD_WARPWOOD;
|
||||
|
||||
public static Item ItemWandCap;
|
||||
|
||||
public static WandCap WAND_CAP_SHADOWMETAL;
|
||||
public static WandCap WAND_CAP_CLOTH;
|
||||
public static WandCap WAND_CAP_CRIMSON_CLOTH;
|
||||
public static WandCap WAND_CAP_SHADOW_CLOTH;
|
||||
|
||||
// Foci
|
||||
public static Item ItemFocusTaint;
|
||||
public static Item ItemFocusEldritch;
|
||||
public static Item ItemFocusMeteorology;
|
||||
public static Item ItemFocusTime;
|
||||
public static Item ItemFocusMageMace;
|
||||
public static Item ItemFocusTaintedBlast;
|
||||
|
||||
// Armor and Baubles
|
||||
public static Item ItemWarpedGoggles;
|
||||
|
||||
public static Item ItemVoidwalkerBoots;
|
||||
public static Item ItemVoidwalkerSash;
|
||||
|
||||
public static Item ItemVoidFortressHelmet;
|
||||
public static Item ItemVoidFortressChestplate;
|
||||
public static Item ItemVoidFortressLeggings;
|
||||
|
||||
public static Item ItemShadowFortressHelmet;
|
||||
public static Item ItemShadowFortressChestplate;
|
||||
public static Item ItemShadowFortressLeggings;
|
||||
|
||||
// Tools
|
||||
public static Item ItemThaumicDisassembler;
|
||||
public static Item ItemCrystalDagger;
|
||||
|
||||
public static ItemHoe ItemShadowmetalHoe;
|
||||
public static ItemPickaxe ItemShadowmetalPick;
|
||||
public static ItemSpade ItemShadowmetalSpade;
|
||||
public static ItemAxe ItemShadowmetalAxe;
|
||||
public static ItemSword ItemShadowmetalSword;
|
||||
|
||||
public static ItemSword ItemPrimordialEdge;
|
||||
|
||||
public static Item ItemKatana;
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
package taintedmagic.common.registry;
|
||||
|
||||
import taintedmagic.common.TaintedMagic;
|
||||
import taintedmagic.common.entities.EntityEldritchOrbAttack;
|
||||
import taintedmagic.common.entities.EntityTaintBubble;
|
||||
import cpw.mods.fml.common.registry.EntityRegistry;
|
||||
|
||||
public class ModEntityRegistry
|
||||
{
|
||||
public static void init ()
|
||||
{
|
||||
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);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
package taintedmagic.common.registry;
|
||||
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraftforge.oredict.OreDictionary;
|
||||
|
||||
public class OreDictionaryRegistry
|
||||
{
|
||||
public static void init ()
|
||||
{
|
||||
OreDictionary.registerOre("oreShadow", new ItemStack(BlockRegistry.BlockShadowOre));
|
||||
OreDictionary.registerOre("logWood", new ItemStack(BlockRegistry.BlockWarpwoodLog));
|
||||
OreDictionary.registerOre("treeSapling", new ItemStack(BlockRegistry.BlockWarpwoodSapling));
|
||||
OreDictionary.registerOre("ingotShadow", new ItemStack(ItemRegistry.ItemMaterial));
|
||||
OreDictionary.registerOre("plankWood", new ItemStack(BlockRegistry.BlockWarpwoodPlanks));
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,286 @@
|
||||
package taintedmagic.common.registry;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.init.Items;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.item.crafting.IRecipe;
|
||||
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.research.TaintedMagicResearchItem;
|
||||
import taintedmagic.common.research.ThaumcraftResearchItem;
|
||||
import thaumcraft.api.ItemApi;
|
||||
import thaumcraft.api.ThaumcraftApi;
|
||||
import thaumcraft.api.aspects.Aspect;
|
||||
import thaumcraft.api.aspects.AspectList;
|
||||
import thaumcraft.api.crafting.CrucibleRecipe;
|
||||
import thaumcraft.api.crafting.IArcaneRecipe;
|
||||
import thaumcraft.api.crafting.InfusionEnchantmentRecipe;
|
||||
import thaumcraft.api.crafting.InfusionRecipe;
|
||||
import thaumcraft.api.research.ResearchPage.PageType;
|
||||
import thaumcraft.api.research.*;
|
||||
import thaumcraft.client.lib.UtilsFX;
|
||||
import thaumcraft.common.Thaumcraft;
|
||||
import thaumcraft.common.config.ConfigItems;
|
||||
|
||||
public class ResearchRegistry
|
||||
{
|
||||
public static final String TM = "TM";
|
||||
public static HashMap recipes = new HashMap();
|
||||
|
||||
public static ItemStack getOriginalItem (String name, String category)
|
||||
{
|
||||
return ((ResearchCategoryList) ResearchCategories.researchCategories.get(category)).research.get(name).icon_item;
|
||||
}
|
||||
|
||||
public static void initResearch ()
|
||||
{
|
||||
ResearchCategories.registerCategory(TM, new ResourceLocation("taintedmagic:textures/misc/IconThaumonomiconTab.png"), TaintedMagic.configHandler.useCustomResearchTabBackground ? new ResourceLocation("taintedmagic:textures/gui/GUIThaumonomiconTab.png") : new ResourceLocation("thaumcraft:textures/gui/gui_researchback.png"));
|
||||
|
||||
/**
|
||||
* Thaumcraft research items
|
||||
*/
|
||||
new ThaumcraftResearchItem("TMELDRITCHMAJOR", TM, "ELDRITCHMAJOR", "ELDRITCH", 6, -7, new ResourceLocation("thaumcraft:textures/misc/r_eldritchmajor.png")).setSpecial().setConcealed().setRound().registerResearchItem();
|
||||
|
||||
/**
|
||||
* Tainted Magic research items
|
||||
*/
|
||||
new TaintedMagicResearchItem("TAINTEDMAGIC", TM, new AspectList(), 2, -1, 0, new ItemStack(ConfigItems.itemResource, 1, 13)).setRound().setAutoUnlock().setPages(new ResearchPage[]{
|
||||
new ResearchPage("1"),
|
||||
new ResearchPage("2") }).registerResearchItem();
|
||||
|
||||
new TaintedMagicResearchItem("SHADOWMETAL", TM, new AspectList().add(Aspect.METAL, 1).add(Aspect.DARKNESS, 1).add(Aspect.MAGIC, 1), 0, 1, 0, new ItemStack(BlockRegistry.BlockShadowOre)).setParents("TAINTEDMAGIC").setConcealed().setPages(new ResearchPage[]{
|
||||
new ResearchPage("1"),
|
||||
new ResearchPage((CrucibleRecipe) recipes.get("BlockShadowOre")),
|
||||
new ResearchPage(new ItemStack(BlockRegistry.BlockShadowOre)),
|
||||
new ResearchPage((IRecipe) recipes.get("BlockShadowmetal")),
|
||||
new ResearchPage((IRecipe) recipes.get("ItemShadowmetalPick")),
|
||||
new ResearchPage((IRecipe) recipes.get("ItemShadowmetalSpade")),
|
||||
new ResearchPage((IRecipe) recipes.get("ItemShadowmetalAxe")),
|
||||
new ResearchPage((IRecipe) recipes.get("ItemShadowmetalHoe")),
|
||||
new ResearchPage((IRecipe) recipes.get("ItemShadowmetalSword")) }).registerResearchItem();
|
||||
|
||||
ThaumcraftApi.addWarpToResearch("SHADOWMETAL", 2);
|
||||
|
||||
new TaintedMagicResearchItem("CAP_shadowmetal", TM, new AspectList().add(Aspect.METAL, 4).add(Aspect.DARKNESS, 4).add(Aspect.ELDRITCH, 4).add(Aspect.MAGIC, 4), -2, -2, 0, new ItemStack(ItemRegistry.ItemWandCap, 1, 0)).setParents(new String[]{
|
||||
"SHADOWMETAL",
|
||||
"CAP_void",
|
||||
"PRIMPEARL" }).setComplexity(2).setParentsHidden("SHADOWCLOTH").setPages(new ResearchPage[]{
|
||||
new ResearchPage("1"),
|
||||
new ResearchPage((InfusionRecipe) recipes.get("ItemWandCap:0")) }).setConcealed().registerResearchItem();
|
||||
|
||||
ThaumcraftApi.addWarpToResearch("CAPSHADOWMETAL", 5);
|
||||
|
||||
new TaintedMagicResearchItem("SHADOWCLOTH", TM, new AspectList().add(Aspect.CLOTH, 1).add(Aspect.DARKNESS, 1), -1, 2, 0, new ItemStack(ItemRegistry.ItemMaterial, 1, 1)).setConcealed().setSecondary().setParents(new String[]{
|
||||
"ENCHFABRIC",
|
||||
"SHADOWMETAL" }).setPages(new ResearchPage[]{
|
||||
new ResearchPage("1"),
|
||||
new ResearchPage((IArcaneRecipe) recipes.get("ItemMaterial:1")) }).registerResearchItem();
|
||||
|
||||
new TaintedMagicResearchItem("ROD_warpwood", TM, new AspectList().add(Aspect.TREE, 4).add(Aspect.DARKNESS, 4).add(Aspect.ELDRITCH, 4), 8, -2, 0, new ItemStack(ItemRegistry.ItemWandRod, 1, 0)).setParents(new String[]{
|
||||
"WARPTREE",
|
||||
"VOIDMETAL",
|
||||
"PRIMPEARL",
|
||||
"ROD_primal_staff" }).setParentsHidden("SHADOWMETAL").setConcealed().setComplexity(3).setPages(new ResearchPage[]{
|
||||
new ResearchPage("1"),
|
||||
new ResearchPage((InfusionRecipe) recipes.get("ItemWandRod:0")),
|
||||
new ResearchPage("2") }).registerResearchItem();
|
||||
ThaumcraftApi.addWarpToResearch("WANDRODWARP", 3);
|
||||
|
||||
new TaintedMagicResearchItem("ROD_warpwood_staff", TM, new AspectList().add(Aspect.TREE, 4).add(Aspect.DARKNESS, 4).add(Aspect.ELDRITCH, 4), 9, -2, 0, new ItemStack(ItemRegistry.ItemWandRod, 1, 1)).setConcealed().setParents("ROD_warpwood").setPages(new ResearchPage[]{
|
||||
new ResearchPage("1"),
|
||||
new ResearchPage((IArcaneRecipe) recipes.get("ItemWandRod:1")) }).setSecondary().registerResearchItem();
|
||||
|
||||
new TaintedMagicResearchItem("EVILSHARDS", TM, new AspectList().add(Aspect.CRYSTAL, 4).add(Aspect.DARKNESS, 4), 4, 0, 0, new ItemStack(ItemRegistry.ItemMaterial, 1, 4)).setParents("TAINTEDMAGIC").setConcealed().setSecondary().setPages(new ResearchPage[]{
|
||||
new ResearchPage("1"),
|
||||
new ResearchPage((CrucibleRecipe) recipes.get("ItemMaterial:3")),
|
||||
new ResearchPage((CrucibleRecipe) recipes.get("ItemMaterial:4")) }).registerResearchItem();
|
||||
|
||||
new TaintedMagicResearchItem("WARPTREE", TM, new AspectList().add(Aspect.ELDRITCH, 4).add(Aspect.DARKNESS, 4).add(Aspect.TAINT, 4).add(Aspect.TREE, 4), 6, -1, 0, new ItemStack(BlockRegistry.BlockWarpwoodSapling)).setParentsHidden("SHADOWMETAL").setParents("EVILSHARDS").setConcealed().setPages(new ResearchPage[]{
|
||||
new ResearchPage("1"),
|
||||
new ResearchPage((InfusionRecipe) recipes.get("BlockWarpwoodSapling")),
|
||||
new ResearchPage((IRecipe) recipes.get("BlockWarpwoodPlanks")) }).registerResearchItem();
|
||||
ThaumcraftApi.addWarpToResearch("WARPTREE", 3);
|
||||
|
||||
new TaintedMagicResearchItem("CRIMSONROBES", TM, new AspectList().add(Aspect.CLOTH, 4).add(Aspect.EXCHANGE, 4).add(Aspect.ARMOR, 4), -2, -5, 0, new ItemStack(ItemRegistry.ItemMaterial, 1, 2)).setParents("CRYSTALDAGGER").setPages(new ResearchPage[]{
|
||||
new ResearchPage("1"),
|
||||
new ResearchPage((IArcaneRecipe) recipes.get("ItemMaterial:2")),
|
||||
new ResearchPage((IArcaneRecipe) recipes.get("ItemHelmetCultistRobe")),
|
||||
new ResearchPage((IArcaneRecipe) recipes.get("ItemChestCultistRobe")),
|
||||
new ResearchPage((IArcaneRecipe) recipes.get("ItemLegsCultistRobe")),
|
||||
new ResearchPage((IArcaneRecipe) recipes.get("ItemBootsCultist")) }).setConcealed().registerResearchItem();
|
||||
|
||||
new TaintedMagicResearchItem("VOIDFORTRESS", TM, new AspectList().add(Aspect.ARMOR, 5).add(Aspect.ELDRITCH, 3).add(Aspect.DARKNESS, 3).add(Aspect.VOID, 5), 7, -8, 0, new ItemStack(ItemRegistry.ItemVoidFortressHelmet)).setParentsHidden(new String[]{
|
||||
"ARMORVOIDFORTRESS",
|
||||
"ARMORFORTRESS", }).setParents(new String[]{ "TMELDRITCHMAJOR" }).setConcealed().setSecondary().setPages(new ResearchPage[]{
|
||||
new ResearchPage("1"),
|
||||
new ResearchPage((InfusionRecipe) recipes.get("ItemVoidFortressHelmet")),
|
||||
new ResearchPage((InfusionRecipe) recipes.get("ItemVoidFortressChestplate")),
|
||||
new ResearchPage((InfusionRecipe) recipes.get("ItemVoidFortressLeggings")) }).registerResearchItem();
|
||||
|
||||
new TaintedMagicResearchItem("WARPEDGOGGLES", TM, new AspectList().add(Aspect.ARMOR, 4).add(Aspect.ELDRITCH, 4).add(Aspect.DARKNESS, 4).add(Aspect.ARMOR, 4), 2, 3, 0, new ItemStack(ItemRegistry.ItemWarpedGoggles)).setParentsHidden(new String[]{
|
||||
"TAINTEDMAGIC",
|
||||
"GOGGLES", }).setConcealed().setSecondary().setParents("SHADOWMETAL").setPages(new ResearchPage[]{
|
||||
new ResearchPage("1"),
|
||||
new ResearchPage((InfusionRecipe) recipes.get("ItemWarpedGoggles")) }).registerResearchItem();
|
||||
|
||||
new TaintedMagicResearchItem("TAINTFOCUS", TM, new AspectList().add(Aspect.TAINT, 4).add(Aspect.WATER, 4).add(Aspect.SLIME, 4).add(Aspect.AIR, 4), 5, 2, 0, new ItemStack(ItemRegistry.ItemFocusTaint)).setParentsHidden(new String[]{
|
||||
"SHADOWMETAL",
|
||||
"TAINTEDMAGIC",
|
||||
"INFUSION",
|
||||
"BOTTLETAINT",
|
||||
"FOCUSFIRE" }).setParents(new String[]{ "EVILSHARDS" }).setConcealed().setPages(new ResearchPage[]{
|
||||
new ResearchPage("1"),
|
||||
new ResearchPage((InfusionRecipe) recipes.get("ItemFocusTaint")) }).registerResearchItem();
|
||||
ThaumcraftApi.addWarpToResearch("TAINTFOCUS", 4);
|
||||
|
||||
new TaintedMagicResearchItem("ELDRITCHFOCUS", TM, new AspectList().add(Aspect.ELDRITCH, 22).add(Aspect.ENTROPY, 14).add(Aspect.AIR, 4).add(Aspect.DARKNESS, 6), 8, -4, 0, new ItemStack(ItemRegistry.ItemFocusEldritch)).setParentsHidden(new String[]{
|
||||
"SHADOWMETAL",
|
||||
"EVILSHARDS",
|
||||
"FOCUSFIRE",
|
||||
"INFUSION" }).setParents("CREATIONSHARD").setConcealed().setSecondary().setPages(new ResearchPage[]{
|
||||
new ResearchPage("1"),
|
||||
new ResearchPage((InfusionRecipe) recipes.get("ItemFocusEldritch")),
|
||||
new ResearchPage("2") }).registerResearchItem();
|
||||
ThaumcraftApi.addWarpToResearch("ELDRITCHFOCUS", 2);
|
||||
|
||||
new TaintedMagicResearchItem("KNIGHTROBES", TM, new AspectList().add(Aspect.CLOTH, 4).add(Aspect.DARKNESS, 4).add(Aspect.ARMOR, 4), -4, -4, 0, new ItemStack(ItemRegistry.ItemMaterial, 1, 8)).setParentsHidden("ELDRITCHMINOR").setParents("CRIMSONROBES").setConcealed().setPages(new ResearchPage[]{
|
||||
new ResearchPage("1"),
|
||||
new ResearchPage((InfusionRecipe) recipes.get("ItemMaterial:8")),
|
||||
new ResearchPage((IArcaneRecipe) recipes.get("ItemHelmetCultistPlate")),
|
||||
new ResearchPage((IArcaneRecipe) recipes.get("ItemChestCultistPlate")),
|
||||
new ResearchPage((IArcaneRecipe) recipes.get("ItemLegsCultistPlate")) }).registerResearchItem();
|
||||
|
||||
new TaintedMagicResearchItem("PRAETORARMOR", TM, new AspectList().add(Aspect.CLOTH, 4).add(Aspect.DARKNESS, 4).add(Aspect.ARMOR, 4).add(Aspect.ELDRITCH, 4), -6, -4, 0, ItemApi.getItem("itemHelmetCultistLeaderPlate", 0)).setParents("KNIGHTROBES").setParentsHidden(new String[]{
|
||||
"CRIMSONROBES",
|
||||
"TMELDRITCHMAJOR",
|
||||
"VOIDMETAL" }).setPages(new ResearchPage[]{
|
||||
new ResearchPage("1"),
|
||||
new ResearchPage((InfusionRecipe) recipes.get("ItemHelmetCultistLeaderPlate")),
|
||||
new ResearchPage((InfusionRecipe) recipes.get("ItemChestCultistLeaderPlate")),
|
||||
new ResearchPage((InfusionRecipe) recipes.get("ItemLegsCultistLeaderPlate")) }).setConcealed().registerResearchItem();
|
||||
|
||||
new TaintedMagicResearchItem("VOIDSENTBLOOD", TM, new AspectList().add(Aspect.VOID, 14).add(Aspect.DARKNESS, 8).add(Aspect.ARMOR, 18).add(Aspect.AURA, 4), -7, -5, 0, new ItemStack(ItemRegistry.ItemVoidsentBlood)).setSecondary().setParents("PRAETORARMOR").setPages(new ResearchPage[]{
|
||||
new ResearchPage("1"),
|
||||
new ResearchPage((CrucibleRecipe) recipes.get("ItemVoidsentBlood")) }).registerResearchItem();
|
||||
|
||||
new TaintedMagicResearchItem("VOIDWALKERBOOTS", TM, new AspectList().add(Aspect.MAGIC, 4).add(Aspect.DARKNESS, 8).add(Aspect.ARMOR, 8).add(Aspect.ELDRITCH, 8), 4, -8, 0, new ItemStack(ItemRegistry.ItemVoidwalkerBoots)).setParentsHidden(new String[]{
|
||||
"TMELDRITCHMAJOR",
|
||||
"BOOTSTRAVELLER",
|
||||
"EVILSHARDS",
|
||||
"SHADOWCLOTH",
|
||||
"ARMORVOIDFORTRESS" }).setConcealed().setParents(new String[]{ "TMELDRITCHMAJOR" }).setPages(new ResearchPage[]{
|
||||
new ResearchPage("1"),
|
||||
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 ResearchPage("1"),
|
||||
new ResearchPage((InfusionRecipe) recipes.get("ItemMaterial:5")) }).setSecondary().registerResearchItem();
|
||||
ThaumcraftApi.addWarpToResearch("CREATIONSHARD", 5);
|
||||
|
||||
new TaintedMagicResearchItem("CREATION", TM, new AspectList().add(Aspect.MAGIC, 4), 10, -6, 0, new ResourceLocation("taintedmagic:textures/misc/IconCREATION.png")).setParents("CREATIONSHARD").setConcealed().setRound().setSpecial().setHidden().setPages(new ResearchPage[]{
|
||||
new ResearchPage("1"),
|
||||
new ResearchPage("2"),
|
||||
new ResearchPage("3"),
|
||||
new ResearchPage("4"),
|
||||
new ResearchPage("5") }).registerResearchItem();
|
||||
ThaumcraftApi.addWarpToResearch("CREATION", 5);
|
||||
|
||||
new TaintedMagicResearchItem("FOCUSTIME", TM, new AspectList().add(Aspect.FIRE, 4).add(Aspect.WATER, 8).add(Aspect.EARTH, 4).add(Aspect.AIR, 4).add(Aspect.ORDER, 4).add(Aspect.ENTROPY, 4).add(Aspect.EXCHANGE, 4), 11, -8, 0, new ItemStack(ItemRegistry.ItemFocusTime)).setConcealed().setParents("CREATION").setParentsHidden("FOCUSPORTABLEHOLE", "FOCUSFIRE").setComplexity(3).setPages(new ResearchPage[]{
|
||||
new ResearchPage("1"),
|
||||
new ResearchPage((InfusionRecipe) recipes.get("ItemFocusTime")) }).registerResearchItem();
|
||||
ThaumcraftApi.addWarpToResearch("FOCUSTIME", 3);
|
||||
|
||||
new TaintedMagicResearchItem("FOCUSWEATHER", TM, new AspectList().add(Aspect.FIRE, 4).add(Aspect.WATER, 8).add(Aspect.EARTH, 4).add(Aspect.AIR, 4).add(Aspect.ORDER, 4).add(Aspect.ENTROPY, 4).add(Aspect.WEATHER, 4), 12, -7, 0, new ItemStack(ItemRegistry.ItemFocusMeteorology)).setParentsHidden(new String[]{
|
||||
"FOCUSFROST",
|
||||
"FOCUSSHOCK" }).setConcealed().setParents("CREATION").setComplexity(3).setPages(new ResearchPage[]{
|
||||
new ResearchPage("1"),
|
||||
new ResearchPage((InfusionRecipe) recipes.get("ItemFocusMeteorology")) }).registerResearchItem();
|
||||
ThaumcraftApi.addWarpToResearch("FOCUSWEATHER", 3);
|
||||
|
||||
new TaintedMagicResearchItem("THAUMICDISASSEMBLER", TM, new AspectList().add(Aspect.METAL, 4).add(Aspect.WEAPON, 8).add(Aspect.TOOL, 4), 5, -6, 0, new ItemStack(ItemRegistry.ItemThaumicDisassembler)).setParentsHidden(new String[]{
|
||||
"THAUMIUM",
|
||||
"VOIDMETAL" }).setConcealed().setParents("TMELDRITCHMAJOR").setComplexity(2).setPages(new ResearchPage[]{
|
||||
new ResearchPage("1"),
|
||||
new ResearchPage((InfusionRecipe) recipes.get("ItemThaumicDisassembler")),
|
||||
new ResearchPage((IArcaneRecipe) recipes.get("ItemMaterial:6")),
|
||||
new ResearchPage("2") }).registerResearchItem();
|
||||
|
||||
new TaintedMagicResearchItem("VOIDSASH", TM, new AspectList().add(Aspect.VOID, 4).add(Aspect.METAL, 8).add(Aspect.ARMOR, 4), 3, -8, 0, new ItemStack(ItemRegistry.ItemVoidwalkerSash)).setParentsHidden("PRIMPEARL").setParents("VOIDWALKERBOOTS").setPages(new ResearchPage[]{
|
||||
new ResearchPage("1"),
|
||||
new ResearchPage((InfusionRecipe) recipes.get("ItemVoidwalkerSash")) }).setConcealed().setSecondary().registerResearchItem();
|
||||
|
||||
new TaintedMagicResearchItem("MAGICFUNGUAR", TM, new AspectList().add(Aspect.MAGIC, 2).add(Aspect.HUNGER, 4).add(Aspect.PLANT, 2), 3, -2, 0, new ItemStack(ItemRegistry.ItemMagicFunguar)).setSecondary().setParents("TAINTEDMAGIC").setPages(new ResearchPage[]{
|
||||
new ResearchPage("1"),
|
||||
new ResearchPage((IArcaneRecipe) recipes.get("ItemMagicFunguar")) }).setConcealed().registerResearchItem();
|
||||
|
||||
new TaintedMagicResearchItem("CRYSTALDAGGER", TM, new AspectList().add(Aspect.WEAPON, 4).add(Aspect.FIRE, 4).add(Aspect.HEAL, 4), 0, -3, 0, new ItemStack(ItemRegistry.ItemCrystalDagger, 1, 7)).setParentsHidden("ENCHFABRIC", "ESSENTIACRYSTAL", "VOIDMETAL").setParents("TAINTEDMAGIC").setComplexity(2).setPages(new ResearchPage[]{
|
||||
new ResearchPage("1"),
|
||||
new ResearchPage((IArcaneRecipe) recipes.get("ItemCrystalDagger")) }).registerResearchItem();
|
||||
ThaumcraftApi.addWarpToResearch("CRYSTALDAGGER", 2);
|
||||
|
||||
new TaintedMagicResearchItem("MACEFOCUS", TM, new AspectList().add(Aspect.ENTROPY, 1).add(Aspect.EARTH, 1).add(Aspect.WEAPON, 1).add(Aspect.MAGIC, 1), 0, 4, 0, new ItemStack(ItemRegistry.ItemFocusMageMace)).setParents("SHADOWMETAL").setConcealed().setComplexity(2).setParentsHidden("FOCUSFIRE").setPages(new ResearchPage[]{
|
||||
new ResearchPage("1"),
|
||||
new ResearchPage((InfusionRecipe) recipes.get("ItemFocusMageMace")) }).registerResearchItem();
|
||||
|
||||
new TaintedMagicResearchItem("CRIMSONBLADE", TM, new AspectList().add(Aspect.ENTROPY, 8).add(Aspect.ELDRITCH, 2).add(Aspect.WEAPON, 16).add(Aspect.VOID, 6), -7, -3, 0, ItemApi.getItem("itemSwordCrimson", 0)).setParents("PRAETORARMOR").setConcealed().setComplexity(3).setPages(new ResearchPage[]{
|
||||
new ResearchPage("1"),
|
||||
new ResearchPage((InfusionRecipe) recipes.get("ItemSwordCrimson")) }).setSecondary().registerResearchItem();
|
||||
ThaumcraftApi.addWarpToResearch("CRIMSONBLADE", 3);
|
||||
|
||||
new TaintedMagicResearchItem("SHADOWFORTRESSARMOR", TM, new AspectList().add(Aspect.METAL, 4).add(Aspect.DARKNESS, 8).add(Aspect.ARMOR, 8).add(Aspect.VOID, 2), -3, -1, 0, new ItemStack(ItemRegistry.ItemShadowFortressHelmet)).setParents("SHADOWMETAL").setConcealed().setComplexity(3).setParentsHidden("VOIDFORTRESS", "TMELDRITCHMAJOR", "EVILSHARDS").setSecondary().setPages(new ResearchPage[]{
|
||||
new ResearchPage("1"),
|
||||
new ResearchPage((InfusionRecipe) recipes.get("ItemShadowFortressHelmet")),
|
||||
new ResearchPage((InfusionRecipe) recipes.get("ItemShadowFortressChestplate")),
|
||||
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), 7, 1, 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();
|
||||
|
||||
new TaintedMagicResearchItem("CAP_crimsoncloth", TM, new AspectList().add(Aspect.MAGIC, 8).add(Aspect.CLOTH, 4).add(Aspect.HEAL, 8), -1, -6, 0, new ItemStack(ItemRegistry.ItemWandCap, 1, 2)).setParentsHidden("CAP_cloth").setSecondary().setConcealed().setParents("CRIMSONROBES").setPages(new ResearchPage[]{
|
||||
new ResearchPage("1"),
|
||||
new ResearchPage((IArcaneRecipe) recipes.get("ItemWandCap:2")) }).registerResearchItem();
|
||||
|
||||
new TaintedMagicResearchItem("CAP_shadowcloth", TM, new AspectList().add(Aspect.MAGIC, 16).add(Aspect.CLOTH, 8).add(Aspect.VOID, 16).add(Aspect.DARKNESS, 8), -2, 3, 0, new ItemStack(ItemRegistry.ItemWandCap, 1, 3)).setParentsHidden("CAP_cloth", "CAP_thaumium").setSecondary().setConcealed().setParents("SHADOWCLOTH").setPages(new ResearchPage[]{
|
||||
new ResearchPage("1"),
|
||||
new ResearchPage((IArcaneRecipe) recipes.get("ItemWandCap:3")) }).registerResearchItem();
|
||||
ThaumcraftApi.addWarpToResearch("CAPSHADOWCLOTH", 1);
|
||||
|
||||
new TaintedMagicResearchItem("FOCUSTAINTEDBLAST", TM, new AspectList().add(Aspect.MAGIC, 20).add(Aspect.TAINT, 12).add(Aspect.AIR, 6).add(Aspect.MOTION, 12), 5, 3, 0, new ItemStack(ItemRegistry.ItemFocusTaintedBlast)).setParentsHidden("FOCUSFIRE", "ELDRITCHMINOR", "FOCUSSHOCK").setConcealed().setParents("TAINTFOCUS").setPages(new ResearchPage[]{
|
||||
new ResearchPage("1"),
|
||||
new ResearchPage((InfusionRecipe) recipes.get("ItemFocusTaintedBlast")) }).setSecondary().registerResearchItem();
|
||||
ThaumcraftApi.addWarpToResearch("FOCUSTAINTEDBLAST", 2);
|
||||
|
||||
new TaintedMagicResearchItem("PRIMALBLADE", TM, new AspectList().add(Aspect.MAGIC, 1).add(Aspect.ELDRITCH, 1).add(Aspect.WEAPON, 1).add(Aspect.VOID, 1).add(Aspect.AURA, 1), 11, -5, 0, new ItemStack(ItemRegistry.ItemPrimordialEdge)).setParentsHidden("VOIDMETAL", "PRIMALCRUSHER", "EVILSHARDS", "CRYSTALDAGGER").setConcealed().setParents("CREATION").setPages(new ResearchPage[]{
|
||||
new ResearchPage("1"),
|
||||
new ResearchPage((InfusionRecipe) recipes.get("ItemPrimordialEdge")) }).registerResearchItem();
|
||||
ThaumcraftApi.addWarpToResearch("PRIMALBLADE", 4);
|
||||
|
||||
new TaintedMagicResearchItem("BLOODLUSTUPGRADE", TM, new AspectList().add(Aspect.MAGIC, 4).add(Aspect.HEAL, 8).add(Aspect.WEAPON, 8), 1, -4, 0, new ResourceLocation("taintedmagic:textures/foci/IconBloodlust.png")).setParentsHidden("MACEFOCUS", "FOCALMANIPULATION").setConcealed().setParents("CRYSTALDAGGER").setSecondary().setPages(new ResearchPage[]{ new ResearchPage("1") }).registerResearchItem();
|
||||
|
||||
new TaintedMagicResearchItem("THAUMIUMKATANA", TM, new AspectList().add(Aspect.METAL, 8).add(Aspect.MAGIC, 4).add(Aspect.WEAPON, 6), 8, 1, 0, new ItemStack(ItemRegistry.ItemKatana, 1, 0)).setParentsHidden("ARMORFORTRESS").setConcealed().setSecondary().setPages(new ResearchPage[]{
|
||||
new ResearchPage("1"),
|
||||
new ResearchPage((InfusionRecipe) recipes.get("ItemKatana:0")) }).registerResearchItem();
|
||||
|
||||
new TaintedMagicResearchItem("VOIDMETALKATANA", TM, new AspectList().add(Aspect.METAL, 16).add(Aspect.MAGIC, 8).add(Aspect.WEAPON, 12).add(Aspect.VOID, 12), 7, -9, 0, new ItemStack(ItemRegistry.ItemKatana, 1, 1)).setParentsHidden("THAUMIUMKATANA").setParents("VOIDFORTRESS").setConcealed().setSecondary().setPages(new ResearchPage[]{
|
||||
new ResearchPage("1"),
|
||||
new ResearchPage((InfusionRecipe) recipes.get("ItemKatana:1")) }).registerResearchItem();
|
||||
ThaumcraftApi.addWarpToResearch("VOIDMETALKATANA", 4);
|
||||
|
||||
new TaintedMagicResearchItem("SHADOWMETALKATANA", TM, new AspectList().add(Aspect.METAL, 16).add(Aspect.MAGIC, 8).add(Aspect.WEAPON, 12).add(Aspect.VOID, 12).add(Aspect.DARKNESS, 14), -4, -1, 0, new ItemStack(ItemRegistry.ItemKatana, 1, 2)).setParentsHidden("VOIDMETALKATANA").setParents("SHADOWFORTRESSARMOR").setConcealed().setSecondary().setPages(new ResearchPage[]{
|
||||
new ResearchPage("1"),
|
||||
new ResearchPage((InfusionRecipe) recipes.get("ItemKatana:2")) }).registerResearchItem();
|
||||
ThaumcraftApi.addWarpToResearch("SHADOWMETALKATANA", 6);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,67 @@
|
||||
package taintedmagic.common.research;
|
||||
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
import net.minecraft.util.StatCollector;
|
||||
import taintedmagic.common.TaintedMagic;
|
||||
import thaumcraft.api.aspects.AspectList;
|
||||
import thaumcraft.api.research.ResearchItem;
|
||||
import thaumcraft.api.research.ResearchPage;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
|
||||
public class TaintedMagicResearchItem extends ResearchItem
|
||||
{
|
||||
public TaintedMagicResearchItem (String key, String category)
|
||||
{
|
||||
super(key, category);
|
||||
}
|
||||
|
||||
public TaintedMagicResearchItem (String key, String category, AspectList tags, int col, int row, int complex, ItemStack icon)
|
||||
{
|
||||
super(key, category, tags, col, row, complex, icon);
|
||||
}
|
||||
|
||||
public TaintedMagicResearchItem (String key, String category, AspectList tags, int col, int row, int complex, ResourceLocation icon)
|
||||
{
|
||||
super(key, category, tags, col, row, complex, icon);
|
||||
}
|
||||
|
||||
@SideOnly (Side.CLIENT)
|
||||
public String getName ()
|
||||
{
|
||||
return StatCollector.translateToLocal("tm.name." + this.key);
|
||||
}
|
||||
|
||||
@SideOnly (Side.CLIENT)
|
||||
public String getText ()
|
||||
{
|
||||
return (TaintedMagic.configHandler.researchTags ? "[TM] " : "") + StatCollector.translateToLocal(new StringBuilder("tm.tag.").append(this.key).toString());
|
||||
}
|
||||
|
||||
@Override
|
||||
public ResearchItem setPages (ResearchPage... par)
|
||||
{
|
||||
for (ResearchPage page : par)
|
||||
{
|
||||
if (page.type == ResearchPage.PageType.TEXT)
|
||||
{
|
||||
page.text = ("tm.text." + this.key + "." + page.text);
|
||||
}
|
||||
if (page.type != ResearchPage.PageType.INFUSION_CRAFTING) continue;
|
||||
if ( (this.parentsHidden == null) || (this.parentsHidden.length == 0))
|
||||
{
|
||||
this.parentsHidden = new String[]{ "INFUSION" };
|
||||
}
|
||||
else
|
||||
{
|
||||
String[] newParents = new String[this.parentsHidden.length + 1];
|
||||
newParents[0] = "INFUSION";
|
||||
for (int i = 0; i < this.parentsHidden.length; i++)
|
||||
newParents[ (i + 1)] = this.parentsHidden[i];
|
||||
this.parentsHidden = newParents;
|
||||
}
|
||||
}
|
||||
return super.setPages(par);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,91 @@
|
||||
package taintedmagic.common.research;
|
||||
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
import thaumcraft.api.aspects.AspectList;
|
||||
import thaumcraft.api.research.ResearchCategories;
|
||||
import thaumcraft.api.research.ResearchItem;
|
||||
import thaumcraft.api.research.ResearchPage;
|
||||
import thaumcraft.api.research.ResearchCategoryList;
|
||||
|
||||
/**
|
||||
* This class was created by <flaxbeard> as part of the Thaumic Exploration mod.
|
||||
* It is being distributed as part of Tainted Magic
|
||||
*/
|
||||
public class ThaumcraftResearchItem extends ResearchItem
|
||||
{
|
||||
public ResearchItem original;
|
||||
|
||||
public ThaumcraftResearchItem (String tag, String category, String origin, String originCategory, int col, int row, ResourceLocation icon)
|
||||
{
|
||||
super(tag, category, new AspectList(), col, row, 1, icon);
|
||||
original = ((ResearchCategoryList) ResearchCategories.researchCategories.get(originCategory)).research.get(origin);
|
||||
bindToOriginal();
|
||||
setStub();
|
||||
setHidden();
|
||||
|
||||
}
|
||||
|
||||
public ThaumcraftResearchItem (String tag, String category, String origin, String originCategory, int col, int row, ItemStack icon)
|
||||
{
|
||||
super(tag, category, new AspectList(), col, row, 1, icon);
|
||||
original = ((ResearchCategoryList) ResearchCategories.researchCategories.get(originCategory)).research.get(origin);
|
||||
bindToOriginal();
|
||||
setStub();
|
||||
setHidden();
|
||||
}
|
||||
|
||||
private void bindToOriginal ()
|
||||
{
|
||||
if (original.siblings == null) original.setSiblings(new String[]{ key });
|
||||
else
|
||||
{
|
||||
String[] family = original.siblings;
|
||||
String[] newFamily = new String[family.length + 1];
|
||||
for (int x = 0; x < family.length; x++)
|
||||
{
|
||||
newFamily[x] = family[x];
|
||||
}
|
||||
newFamily[family.length] = key;
|
||||
original.setSiblings(newFamily);
|
||||
}
|
||||
if (original.isSecondary())
|
||||
{
|
||||
this.setSecondary();
|
||||
}
|
||||
}
|
||||
|
||||
public ResearchPage[] getPages ()
|
||||
{
|
||||
return original.getPages();
|
||||
}
|
||||
|
||||
@SideOnly (Side.CLIENT)
|
||||
public String getName ()
|
||||
{
|
||||
return original.getName();
|
||||
}
|
||||
|
||||
@SideOnly (Side.CLIENT)
|
||||
public String getText ()
|
||||
{
|
||||
return original.getText();
|
||||
}
|
||||
|
||||
public boolean isStub ()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
public boolean isHidden ()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
public int getComplexity ()
|
||||
{
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,585 @@
|
||||
package taintedmagic.common.world;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.BlockSapling;
|
||||
import net.minecraft.init.Blocks;
|
||||
import net.minecraft.util.Direction;
|
||||
import net.minecraft.util.MathHelper;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraft.world.gen.feature.WorldGenAbstractTree;
|
||||
import net.minecraft.world.gen.feature.WorldGenBigTree;
|
||||
import net.minecraftforge.common.IPlantable;
|
||||
import net.minecraftforge.common.util.ForgeDirection;
|
||||
|
||||
import java.util.Random;
|
||||
|
||||
import taintedmagic.common.registry.BlockRegistry;
|
||||
|
||||
/**
|
||||
* Copy of <Mojang> WorldGenBigTree.class
|
||||
*/
|
||||
public class WorldGenWarpwoodTree extends WorldGenAbstractTree
|
||||
{
|
||||
public Block trunk;
|
||||
public Block leaves;
|
||||
|
||||
/**
|
||||
* Contains three sets of two values that provide complimentary indices for
|
||||
* a given 'major' index - 1 and 2 for 0, 0 and 2 for 1, and 0 and 1 for 2.
|
||||
*/
|
||||
static final byte[] otherCoordPairs = new byte[]{
|
||||
(byte) 2,
|
||||
(byte) 0,
|
||||
(byte) 0,
|
||||
(byte) 1,
|
||||
(byte) 2,
|
||||
(byte) 1 };
|
||||
/** random seed for GenBigTree */
|
||||
Random rand = new Random();
|
||||
/** Reference to the World object. */
|
||||
World worldObj;
|
||||
int[] basePos = new int[]{
|
||||
0,
|
||||
0,
|
||||
0 };
|
||||
int heightLimit;
|
||||
int height;
|
||||
double heightAttenuation = 0.618D;
|
||||
double branchDensity = 1.0D;
|
||||
double branchSlope = 0.381D;
|
||||
double scaleWidth = 1.0D;
|
||||
double leafDensity = 1.0D;
|
||||
/**
|
||||
* Currently always 1, can be set to 2 in the class constructor to generate
|
||||
* a double-sized tree trunk for big trees.
|
||||
*/
|
||||
int trunkSize = 1;
|
||||
/** Sets the limit of the random value used to initialize the height limit. */
|
||||
int heightLimitLimit = 12;
|
||||
/**
|
||||
* Sets the distance limit for how far away the generator will populate
|
||||
* leaves from the base leaf node.
|
||||
*/
|
||||
int leafDistanceLimit = 4;
|
||||
/** Contains a list of a points at which to generate groups of leaves. */
|
||||
int[][] leafNodes;
|
||||
private static final String __OBFID = "CL_00000400";
|
||||
|
||||
public WorldGenWarpwoodTree (boolean b, Block trunk, Block leaves)
|
||||
{
|
||||
super(b);
|
||||
this.trunk = trunk;
|
||||
this.leaves = leaves;
|
||||
}
|
||||
|
||||
/**
|
||||
* Generates a list of leaf nodes for the tree, to be populated by
|
||||
* generateLeaves.
|
||||
*/
|
||||
void generateLeafNodeList ()
|
||||
{
|
||||
this.height = (int) ((double) this.heightLimit * this.heightAttenuation);
|
||||
|
||||
if (this.height >= this.heightLimit)
|
||||
{
|
||||
this.height = this.heightLimit - 1;
|
||||
}
|
||||
|
||||
int i = (int) (1.382D + Math.pow(this.leafDensity * (double) this.heightLimit / 13.0D, 2.0D));
|
||||
|
||||
if (i < 1)
|
||||
{
|
||||
i = 1;
|
||||
}
|
||||
|
||||
int[][] aint = new int[i * this.heightLimit][4];
|
||||
int j = this.basePos[1] + this.heightLimit - this.leafDistanceLimit;
|
||||
int k = 1;
|
||||
int l = this.basePos[1] + this.height;
|
||||
int i1 = j - this.basePos[1];
|
||||
aint[0][0] = this.basePos[0];
|
||||
aint[0][1] = j;
|
||||
aint[0][2] = this.basePos[2];
|
||||
aint[0][3] = l;
|
||||
--j;
|
||||
|
||||
while (i1 >= 0)
|
||||
{
|
||||
int j1 = 0;
|
||||
float f = this.layerSize(i1);
|
||||
|
||||
if (f < 0.0F)
|
||||
{
|
||||
--j;
|
||||
--i1;
|
||||
}
|
||||
else
|
||||
{
|
||||
for (double d0 = 0.5D; j1 < i; ++j1)
|
||||
{
|
||||
double d1 = this.scaleWidth * (double) f * ((double) this.rand.nextFloat() + 0.328D);
|
||||
double d2 = (double) this.rand.nextFloat() * 2.0D * Math.PI;
|
||||
int k1 = MathHelper.floor_double(d1 * Math.sin(d2) + (double) this.basePos[0] + d0);
|
||||
int l1 = MathHelper.floor_double(d1 * Math.cos(d2) + (double) this.basePos[2] + d0);
|
||||
int[] aint1 = new int[]{
|
||||
k1,
|
||||
j,
|
||||
l1 };
|
||||
int[] aint2 = new int[]{
|
||||
k1,
|
||||
j + this.leafDistanceLimit,
|
||||
l1 };
|
||||
|
||||
if (this.checkBlockLine(aint1, aint2) == -1)
|
||||
{
|
||||
int[] aint3 = new int[]{
|
||||
this.basePos[0],
|
||||
this.basePos[1],
|
||||
this.basePos[2] };
|
||||
double d3 = Math.sqrt(Math.pow((double) Math.abs(this.basePos[0] - aint1[0]), 2.0D) + Math.pow((double) Math.abs(this.basePos[2] - aint1[2]), 2.0D));
|
||||
double d4 = d3 * this.branchSlope;
|
||||
|
||||
if ((double) aint1[1] - d4 > (double) l)
|
||||
{
|
||||
aint3[1] = l;
|
||||
}
|
||||
else
|
||||
{
|
||||
aint3[1] = (int) ((double) aint1[1] - d4);
|
||||
}
|
||||
|
||||
if (this.checkBlockLine(aint3, aint1) == -1)
|
||||
{
|
||||
aint[k][0] = k1;
|
||||
aint[k][1] = j;
|
||||
aint[k][2] = l1;
|
||||
aint[k][3] = aint3[1];
|
||||
++k;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
--j;
|
||||
--i1;
|
||||
}
|
||||
}
|
||||
|
||||
this.leafNodes = new int[k][4];
|
||||
System.arraycopy(aint, 0, this.leafNodes, 0, k);
|
||||
}
|
||||
|
||||
void func_150529_a (int p_150529_1_, int p_150529_2_, int p_150529_3_, float p_150529_4_, byte p_150529_5_, Block p_150529_6_)
|
||||
{
|
||||
int l = (int) ((double) p_150529_4_ + 0.618D);
|
||||
byte b1 = otherCoordPairs[p_150529_5_];
|
||||
byte b2 = otherCoordPairs[p_150529_5_ + 3];
|
||||
int[] aint = new int[]{
|
||||
p_150529_1_,
|
||||
p_150529_2_,
|
||||
p_150529_3_ };
|
||||
int[] aint1 = new int[]{
|
||||
0,
|
||||
0,
|
||||
0 };
|
||||
int i1 = -l;
|
||||
int j1 = -l;
|
||||
|
||||
for (aint1[p_150529_5_] = aint[p_150529_5_]; i1 <= l; ++i1)
|
||||
{
|
||||
aint1[b1] = aint[b1] + i1;
|
||||
j1 = -l;
|
||||
|
||||
while (j1 <= l)
|
||||
{
|
||||
double d0 = Math.pow((double) Math.abs(i1) + 0.5D, 2.0D) + Math.pow((double) Math.abs(j1) + 0.5D, 2.0D);
|
||||
|
||||
if (d0 > (double) (p_150529_4_ * p_150529_4_))
|
||||
{
|
||||
++j1;
|
||||
}
|
||||
else
|
||||
{
|
||||
aint1[b2] = aint[b2] + j1;
|
||||
Block block1 = this.worldObj.getBlock(aint1[0], aint1[1], aint1[2]);
|
||||
|
||||
if (!block1.isAir(worldObj, aint1[0], aint1[1], aint1[2]) && !block1.isLeaves(worldObj, aint1[0], aint1[1], aint1[2]))
|
||||
{
|
||||
++j1;
|
||||
}
|
||||
else
|
||||
{
|
||||
this.setBlockAndNotifyAdequately(this.worldObj, aint1[0], aint1[1], aint1[2], p_150529_6_, 0);
|
||||
++j1;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the rough size of a layer of the tree.
|
||||
*/
|
||||
float layerSize (int p_76490_1_)
|
||||
{
|
||||
if ((double) p_76490_1_ < (double) ((float) this.heightLimit) * 0.3D)
|
||||
{
|
||||
return -1.618F;
|
||||
}
|
||||
else
|
||||
{
|
||||
float f = (float) this.heightLimit / 2.0F;
|
||||
float f1 = (float) this.heightLimit / 2.0F - (float) p_76490_1_;
|
||||
float f2;
|
||||
|
||||
if (f1 == 0.0F)
|
||||
{
|
||||
f2 = f;
|
||||
}
|
||||
else if (Math.abs(f1) >= f)
|
||||
{
|
||||
f2 = 0.0F;
|
||||
}
|
||||
else
|
||||
{
|
||||
f2 = (float) Math.sqrt(Math.pow((double) Math.abs(f), 2.0D) - Math.pow((double) Math.abs(f1), 2.0D));
|
||||
}
|
||||
|
||||
f2 *= 0.5F;
|
||||
return f2;
|
||||
}
|
||||
}
|
||||
|
||||
float leafSize (int p_76495_1_)
|
||||
{
|
||||
return p_76495_1_ >= 0 && p_76495_1_ < this.leafDistanceLimit ? (p_76495_1_ != 0 && p_76495_1_ != this.leafDistanceLimit - 1 ? 3.0F : 2.0F) : -1.0F;
|
||||
}
|
||||
|
||||
/**
|
||||
* Generates the leaves surrounding an individual entry in the leafNodes
|
||||
* list.
|
||||
*/
|
||||
void generateLeafNode (int p_76491_1_, int p_76491_2_, int p_76491_3_)
|
||||
{
|
||||
int l = p_76491_2_;
|
||||
|
||||
for (int i1 = p_76491_2_ + this.leafDistanceLimit; l < i1; ++l)
|
||||
{
|
||||
float f = this.leafSize(l - p_76491_2_);
|
||||
this.func_150529_a(p_76491_1_, l, p_76491_3_, f, (byte) 1, leaves);
|
||||
}
|
||||
}
|
||||
|
||||
void func_150530_a (int[] p_150530_1_, int[] p_150530_2_, Block p_150530_3_)
|
||||
{
|
||||
int[] aint2 = new int[]{
|
||||
0,
|
||||
0,
|
||||
0 };
|
||||
byte b0 = 0;
|
||||
byte b1;
|
||||
|
||||
for (b1 = 0; b0 < 3; ++b0)
|
||||
{
|
||||
aint2[b0] = p_150530_2_[b0] - p_150530_1_[b0];
|
||||
|
||||
if (Math.abs(aint2[b0]) > Math.abs(aint2[b1]))
|
||||
{
|
||||
b1 = b0;
|
||||
}
|
||||
}
|
||||
|
||||
if (aint2[b1] != 0)
|
||||
{
|
||||
byte b2 = otherCoordPairs[b1];
|
||||
byte b3 = otherCoordPairs[b1 + 3];
|
||||
byte b4;
|
||||
|
||||
if (aint2[b1] > 0)
|
||||
{
|
||||
b4 = 1;
|
||||
}
|
||||
else
|
||||
{
|
||||
b4 = -1;
|
||||
}
|
||||
|
||||
double d0 = (double) aint2[b2] / (double) aint2[b1];
|
||||
double d1 = (double) aint2[b3] / (double) aint2[b1];
|
||||
int[] aint3 = new int[]{
|
||||
0,
|
||||
0,
|
||||
0 };
|
||||
int i = 0;
|
||||
|
||||
for (int j = aint2[b1] + b4; i != j; i += b4)
|
||||
{
|
||||
aint3[b1] = MathHelper.floor_double((double) (p_150530_1_[b1] + i) + 0.5D);
|
||||
aint3[b2] = MathHelper.floor_double((double) p_150530_1_[b2] + (double) i * d0 + 0.5D);
|
||||
aint3[b3] = MathHelper.floor_double((double) p_150530_1_[b3] + (double) i * d1 + 0.5D);
|
||||
byte b5 = 0;
|
||||
int k = Math.abs(aint3[0] - p_150530_1_[0]);
|
||||
int l = Math.abs(aint3[2] - p_150530_1_[2]);
|
||||
int i1 = Math.max(k, l);
|
||||
|
||||
if (i1 > 0)
|
||||
{
|
||||
if (k == i1)
|
||||
{
|
||||
b5 = 4;
|
||||
}
|
||||
else if (l == i1)
|
||||
{
|
||||
b5 = 8;
|
||||
}
|
||||
}
|
||||
|
||||
this.setBlockAndNotifyAdequately(this.worldObj, aint3[0], aint3[1], aint3[2], p_150530_3_, b5);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Generates the leaf portion of the tree as specified by the leafNodes
|
||||
* list.
|
||||
*/
|
||||
void generateLeaves ()
|
||||
{
|
||||
int i = 0;
|
||||
|
||||
for (int j = this.leafNodes.length; i < j; ++i)
|
||||
{
|
||||
int k = this.leafNodes[i][0];
|
||||
int l = this.leafNodes[i][1];
|
||||
int i1 = this.leafNodes[i][2];
|
||||
this.generateLeafNode(k, l, i1);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Indicates whether or not a leaf node requires additional wood to be added
|
||||
* to preserve integrity.
|
||||
*/
|
||||
boolean leafNodeNeedsBase (int p_76493_1_)
|
||||
{
|
||||
return (double) p_76493_1_ >= (double) this.heightLimit * 0.2D;
|
||||
}
|
||||
|
||||
/**
|
||||
* Places the trunk for the big tree that is being generated. Able to
|
||||
* generate double-sized trunks by changing a field that is always 1 to 2.
|
||||
*/
|
||||
void generateTrunk ()
|
||||
{
|
||||
int i = this.basePos[0];
|
||||
int j = this.basePos[1];
|
||||
int k = this.basePos[1] + this.height;
|
||||
int l = this.basePos[2];
|
||||
int[] aint = new int[]{
|
||||
i,
|
||||
j,
|
||||
l };
|
||||
int[] aint1 = new int[]{
|
||||
i,
|
||||
k,
|
||||
l };
|
||||
this.func_150530_a(aint, aint1, trunk);
|
||||
|
||||
if (this.trunkSize == 2)
|
||||
{
|
||||
++aint[0];
|
||||
++aint1[0];
|
||||
this.func_150530_a(aint, aint1, trunk);
|
||||
++aint[2];
|
||||
++aint1[2];
|
||||
this.func_150530_a(aint, aint1, trunk);
|
||||
aint[0] += -1;
|
||||
aint1[0] += -1;
|
||||
this.func_150530_a(aint, aint1, trunk);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Generates additional wood blocks to fill out the bases of different leaf
|
||||
* nodes that would otherwise degrade.
|
||||
*/
|
||||
void generateLeafNodeBases ()
|
||||
{
|
||||
int i = 0;
|
||||
int j = this.leafNodes.length;
|
||||
|
||||
for (int[] aint = new int[]{
|
||||
this.basePos[0],
|
||||
this.basePos[1],
|
||||
this.basePos[2] }; i < j; ++i)
|
||||
{
|
||||
int[] aint1 = this.leafNodes[i];
|
||||
int[] aint2 = new int[]{
|
||||
aint1[0],
|
||||
aint1[1],
|
||||
aint1[2] };
|
||||
aint[1] = aint1[3];
|
||||
int k = aint[1] - this.basePos[1];
|
||||
|
||||
if (this.leafNodeNeedsBase(k))
|
||||
{
|
||||
this.func_150530_a(aint, aint2, trunk);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Checks a line of blocks in the world from the first coordinate to triplet
|
||||
* to the second, returning the distance (in blocks) before a non-air,
|
||||
* non-leaf block is encountered and/or the end is encountered.
|
||||
*/
|
||||
int checkBlockLine (int[] p_76496_1_, int[] p_76496_2_)
|
||||
{
|
||||
int[] aint2 = new int[]{
|
||||
0,
|
||||
0,
|
||||
0 };
|
||||
byte b0 = 0;
|
||||
byte b1;
|
||||
|
||||
for (b1 = 0; b0 < 3; ++b0)
|
||||
{
|
||||
aint2[b0] = p_76496_2_[b0] - p_76496_1_[b0];
|
||||
|
||||
if (Math.abs(aint2[b0]) > Math.abs(aint2[b1]))
|
||||
{
|
||||
b1 = b0;
|
||||
}
|
||||
}
|
||||
|
||||
if (aint2[b1] == 0)
|
||||
{
|
||||
return -1;
|
||||
}
|
||||
else
|
||||
{
|
||||
byte b2 = otherCoordPairs[b1];
|
||||
byte b3 = otherCoordPairs[b1 + 3];
|
||||
byte b4;
|
||||
|
||||
if (aint2[b1] > 0)
|
||||
{
|
||||
b4 = 1;
|
||||
}
|
||||
else
|
||||
{
|
||||
b4 = -1;
|
||||
}
|
||||
|
||||
double d0 = (double) aint2[b2] / (double) aint2[b1];
|
||||
double d1 = (double) aint2[b3] / (double) aint2[b1];
|
||||
int[] aint3 = new int[]{
|
||||
0,
|
||||
0,
|
||||
0 };
|
||||
int i = 0;
|
||||
int j;
|
||||
|
||||
for (j = aint2[b1] + b4; i != j; i += b4)
|
||||
{
|
||||
aint3[b1] = p_76496_1_[b1] + i;
|
||||
aint3[b2] = MathHelper.floor_double((double) p_76496_1_[b2] + (double) i * d0);
|
||||
aint3[b3] = MathHelper.floor_double((double) p_76496_1_[b3] + (double) i * d1);
|
||||
Block block = this.worldObj.getBlock(aint3[0], aint3[1], aint3[2]);
|
||||
|
||||
if (!this.isReplaceable(worldObj, aint3[0], aint3[1], aint3[2]))
|
||||
{
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
return i == j ? -1 : Math.abs(i);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns a boolean indicating whether or not the current location for the
|
||||
* tree, spanning basePos to to the height limit, is valid.
|
||||
*/
|
||||
boolean validTreeLocation ()
|
||||
{
|
||||
int[] aint = new int[]{
|
||||
this.basePos[0],
|
||||
this.basePos[1],
|
||||
this.basePos[2] };
|
||||
int[] aint1 = new int[]{
|
||||
this.basePos[0],
|
||||
this.basePos[1] + this.heightLimit - 1,
|
||||
this.basePos[2] };
|
||||
Block block = this.worldObj.getBlock(this.basePos[0], this.basePos[1] - 1, this.basePos[2]);
|
||||
|
||||
boolean isSoil = block.canSustainPlant(worldObj, basePos[0], basePos[1] - 1, basePos[2], ForgeDirection.UP, (BlockSapling) BlockRegistry.BlockWarpwoodSapling);
|
||||
if (!isSoil)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
else
|
||||
{
|
||||
int i = this.checkBlockLine(aint, aint1);
|
||||
|
||||
if (i == -1)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
else if (i < 6)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
else
|
||||
{
|
||||
this.heightLimit = i;
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Rescales the generator settings, only used in WorldGenBigTree
|
||||
*/
|
||||
public void setScale (double p_76487_1_, double p_76487_3_, double p_76487_5_)
|
||||
{
|
||||
this.heightLimitLimit = (int) (p_76487_1_ * 12.0D);
|
||||
|
||||
if (p_76487_1_ > 0.5D)
|
||||
{
|
||||
this.leafDistanceLimit = 5;
|
||||
}
|
||||
|
||||
this.scaleWidth = p_76487_3_;
|
||||
this.leafDensity = p_76487_5_;
|
||||
}
|
||||
|
||||
public boolean generate (World p_76484_1_, Random p_76484_2_, int p_76484_3_, int p_76484_4_, int p_76484_5_)
|
||||
{
|
||||
this.worldObj = p_76484_1_;
|
||||
long l = p_76484_2_.nextLong();
|
||||
this.rand.setSeed(l);
|
||||
this.basePos[0] = p_76484_3_;
|
||||
this.basePos[1] = p_76484_4_;
|
||||
this.basePos[2] = p_76484_5_;
|
||||
|
||||
if (this.heightLimit == 0)
|
||||
{
|
||||
this.heightLimit = 5 + this.rand.nextInt(this.heightLimitLimit);
|
||||
}
|
||||
|
||||
if (!this.validTreeLocation())
|
||||
{
|
||||
this.worldObj = null; // Fix vanilla Mem leak, holds latest world
|
||||
return false;
|
||||
}
|
||||
else
|
||||
{
|
||||
this.generateLeafNodeList();
|
||||
this.generateLeaves();
|
||||
this.generateTrunk();
|
||||
this.generateLeafNodeBases();
|
||||
this.worldObj = null; // Fix vanilla Mem leak, holds latest world
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user