mirror of
https://github.com/GTNewHorizons/Tainted-Magic.git
synced 2026-11-18 19:29:11 +00:00
Content update (continued)
This commit is contained in:
1 parent
9028d32b6e
commit
29eee40824
92 files changed
+3233
-2211
No files matched your search
@@ -6,5 +6,5 @@ import net.minecraft.item.ItemStack;
|
||||
|
||||
public interface IHeldItemHUD
|
||||
{
|
||||
abstract void renderHUD (ScaledResolution res, EntityPlayer p, ItemStack s, float partialTicks, float fract);
|
||||
abstract void renderHUD (ScaledResolution res, EntityPlayer p, ItemStack s, float partialTicks, float fract);
|
||||
}
|
||||
@@ -13,57 +13,60 @@ import taintedmagic.common.items.ItemVoidsentBlood;
|
||||
*/
|
||||
public class RecipeVoidsentBlood implements IRecipe
|
||||
{
|
||||
@Override
|
||||
public boolean matches (InventoryCrafting inv, World w)
|
||||
{
|
||||
boolean foundBlood = false;
|
||||
boolean foundArmor = false;
|
||||
@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);
|
||||
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 ItemArmor && !foundArmor) foundArmor = true;
|
||||
if (s != null)
|
||||
{
|
||||
if (s.getItem() instanceof ItemVoidsentBlood && !foundBlood) foundBlood = true;
|
||||
else if (s.getItem() instanceof ItemArmor && !foundArmor) foundArmor = true;
|
||||
|
||||
else return false;
|
||||
}
|
||||
}
|
||||
return foundBlood && foundArmor;
|
||||
}
|
||||
else return false;
|
||||
}
|
||||
}
|
||||
return foundBlood && foundArmor;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ItemStack getCraftingResult (InventoryCrafting inv)
|
||||
{
|
||||
ItemStack copy = null;
|
||||
ItemStack armor = null;
|
||||
ItemStack blood = null;
|
||||
@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 ItemArmor) 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;
|
||||
}
|
||||
for (int i = 0; i < inv.getSizeInventory(); i++)
|
||||
{
|
||||
if (inv.getStackInSlot(i) != null && inv.getStackInSlot(i).getItem() instanceof ItemArmor) 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 int getRecipeSize ()
|
||||
{
|
||||
return 10;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ItemStack getRecipeOutput ()
|
||||
{
|
||||
return null;
|
||||
}
|
||||
@Override
|
||||
public ItemStack getRecipeOutput ()
|
||||
{
|
||||
return null;
|
||||
}
|
||||
}
|
||||
@@ -2,6 +2,7 @@ package taintedmagic.client;
|
||||
|
||||
import cpw.mods.fml.client.FMLClientHandler;
|
||||
import cpw.mods.fml.client.registry.RenderingRegistry;
|
||||
import cpw.mods.fml.common.FMLCommonHandler;
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.world.World;
|
||||
@@ -21,35 +22,36 @@ import thaumcraft.client.renderers.entity.RenderEldritchOrb;
|
||||
|
||||
public class ClientProxy extends CommonProxy
|
||||
{
|
||||
@Override
|
||||
public void registerClientHandlers ()
|
||||
{
|
||||
MinecraftForge.EVENT_BUS.register(new HUDHandler());
|
||||
|
||||
@Override
|
||||
public void registerClientHandlers ()
|
||||
{
|
||||
MinecraftForge.EVENT_BUS.register(new HUDHandler());
|
||||
MinecraftForge.EVENT_BUS.register(new ClientHandler());
|
||||
}
|
||||
FMLCommonHandler.instance().bus().register(new ClientHandler());
|
||||
MinecraftForge.EVENT_BUS.register(new ClientHandler());
|
||||
}
|
||||
|
||||
@Override
|
||||
public void registerRenderers ()
|
||||
{
|
||||
// Entities
|
||||
RenderingRegistry.registerEntityRenderingHandler(EntityDarkMatter.class, new RenderEldritchOrb());
|
||||
RenderingRegistry.registerEntityRenderingHandler(EntityHomingShard.class, new RenderEntityHomingShard());
|
||||
RenderingRegistry.registerEntityRenderingHandler(EntityDiffusion.class, new RenderEntityDiffusion());
|
||||
@Override
|
||||
public void registerRenderers ()
|
||||
{
|
||||
// Entities
|
||||
RenderingRegistry.registerEntityRenderingHandler(EntityDarkMatter.class, new RenderEldritchOrb());
|
||||
RenderingRegistry.registerEntityRenderingHandler(EntityHomingShard.class, new RenderEntityHomingShard());
|
||||
RenderingRegistry.registerEntityRenderingHandler(EntityDiffusion.class, new RenderEntityDiffusion());
|
||||
|
||||
// Items
|
||||
MinecraftForgeClient.registerItemRenderer(ItemRegistry.ItemKatana, new RenderItemKatana());
|
||||
}
|
||||
// Items
|
||||
MinecraftForgeClient.registerItemRenderer(ItemRegistry.ItemKatana, new RenderItemKatana());
|
||||
}
|
||||
|
||||
@Override
|
||||
public EntityPlayer getClientPlayer ()
|
||||
{
|
||||
return Minecraft.getMinecraft().thePlayer;
|
||||
}
|
||||
@Override
|
||||
public EntityPlayer getClientPlayer ()
|
||||
{
|
||||
return Minecraft.getMinecraft().thePlayer;
|
||||
}
|
||||
|
||||
@Override
|
||||
public World getClientWorld ()
|
||||
{
|
||||
return FMLClientHandler.instance().getClient().theWorld;
|
||||
}
|
||||
@Override
|
||||
public World getClientWorld ()
|
||||
{
|
||||
return FMLClientHandler.instance().getClient().theWorld;
|
||||
}
|
||||
}
|
||||
@@ -4,6 +4,9 @@ import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import cpw.mods.fml.common.eventhandler.SubscribeEvent;
|
||||
import cpw.mods.fml.common.gameevent.TickEvent;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
@@ -11,28 +14,41 @@ import net.minecraft.potion.Potion;
|
||||
import net.minecraftforge.client.event.RenderPlayerEvent;
|
||||
import taintedmagic.api.IRenderInventoryItem;
|
||||
|
||||
@SideOnly (Side.CLIENT)
|
||||
public class ClientHandler
|
||||
{
|
||||
/*
|
||||
* Render items implementing IRenderInventoryItem
|
||||
*/
|
||||
@SubscribeEvent
|
||||
public void onPlayerRender (RenderPlayerEvent.Specials.Post event)
|
||||
{
|
||||
EntityPlayer p = event.entityPlayer;
|
||||
if (p.getActivePotionEffect(Potion.invisibility) != null) return;
|
||||
|
||||
ItemStack[] inv = p.inventory.mainInventory;
|
||||
List<Item> rendering = new ArrayList<Item>();
|
||||
for (int i = 0; i < 36; i++)
|
||||
{
|
||||
ItemStack s = inv[i];
|
||||
if (s != null && s.getItem() instanceof IRenderInventoryItem && !rendering.contains(s.getItem()))
|
||||
{
|
||||
((IRenderInventoryItem) s.getItem()).render(p, s, event.partialRenderTick);
|
||||
rendering.add(s.getItem());
|
||||
}
|
||||
if (i == 36) rendering.clear();
|
||||
}
|
||||
}
|
||||
public static int ticks;
|
||||
|
||||
@SubscribeEvent
|
||||
public void tickEnd (TickEvent event)
|
||||
{
|
||||
if (event.phase == TickEvent.Phase.END)
|
||||
{
|
||||
HUDHandler.updateTicks();
|
||||
ticks++;
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* Render items implementing IRenderInventoryItem
|
||||
*/
|
||||
@SubscribeEvent
|
||||
public void onPlayerRender (RenderPlayerEvent.Specials.Post event)
|
||||
{
|
||||
EntityPlayer p = event.entityPlayer;
|
||||
if (p.getActivePotionEffect(Potion.invisibility) != null) return;
|
||||
|
||||
ItemStack[] inv = p.inventory.mainInventory;
|
||||
List<Item> rendering = new ArrayList<Item>();
|
||||
for (int i = 0; i < 36; i++)
|
||||
{
|
||||
ItemStack s = inv[i];
|
||||
if (s != null && s.getItem() instanceof IRenderInventoryItem && !rendering.contains(s.getItem()))
|
||||
{
|
||||
((IRenderInventoryItem) s.getItem()).render(p, s, event.partialRenderTick);
|
||||
rendering.add(s.getItem());
|
||||
}
|
||||
if (i == 36) rendering.clear();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,11 +1,19 @@
|
||||
package taintedmagic.client.handler;
|
||||
|
||||
import java.awt.Color;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import cpw.mods.fml.common.eventhandler.SubscribeEvent;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.gui.FontRenderer;
|
||||
import net.minecraft.client.gui.ScaledResolution;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.EnumChatFormatting;
|
||||
import net.minecraft.util.MathHelper;
|
||||
import net.minecraftforge.client.event.RenderGameOverlayEvent;
|
||||
import net.minecraftforge.client.event.RenderGameOverlayEvent.ElementType;
|
||||
import taintedmagic.api.IHeldItemHUD;
|
||||
@@ -14,40 +22,90 @@ import taintedmagic.common.TaintedMagic;
|
||||
@SideOnly (Side.CLIENT)
|
||||
public class HUDHandler
|
||||
{
|
||||
float ticksEquipped = 0.0F;
|
||||
ItemStack s = null;
|
||||
ItemStack last = null;
|
||||
|
||||
@SubscribeEvent
|
||||
public void onDrawScreen (RenderGameOverlayEvent.Post event)
|
||||
public void renderGameOverlayEvent (RenderGameOverlayEvent.Post event)
|
||||
{
|
||||
if (event.type == ElementType.ALL)
|
||||
{
|
||||
EntityPlayer p = TaintedMagic.proxy.getClientPlayer();
|
||||
float partialTicks = event.partialTicks;
|
||||
if (s != null && s.getItem() instanceof IHeldItemHUD) last = s.copy();
|
||||
s = p.getCurrentEquippedItem();
|
||||
renderHeldItemHUD(event.partialTicks);
|
||||
renderString();
|
||||
}
|
||||
}
|
||||
|
||||
if (Minecraft.getMinecraft().currentScreen == null)
|
||||
private static float ticksEquipped = 0.0F;
|
||||
private static ItemStack s = null;
|
||||
private static ItemStack last = null;
|
||||
|
||||
private void renderHeldItemHUD (float pt)
|
||||
{
|
||||
EntityPlayer p = TaintedMagic.proxy.getClientPlayer();
|
||||
Minecraft mc = Minecraft.getMinecraft();
|
||||
ScaledResolution res = new ScaledResolution(mc, mc.displayWidth, mc.displayHeight);
|
||||
|
||||
if (s != null && s.getItem() instanceof IHeldItemHUD) last = s.copy();
|
||||
s = p.getCurrentEquippedItem();
|
||||
|
||||
boolean b = false;
|
||||
if (s != null && s.getItem() instanceof IHeldItemHUD) b = true;
|
||||
else b = false;
|
||||
|
||||
float time = 30.0F;
|
||||
if (b) ticksEquipped = Math.min(time, ticksEquipped + pt);
|
||||
else ticksEquipped = Math.max(0F, ticksEquipped - pt);
|
||||
|
||||
float fract = ticksEquipped / time;
|
||||
|
||||
if (b) ((IHeldItemHUD) s.getItem()).renderHUD(res, p, s, pt, fract);
|
||||
else if (!b && ticksEquipped != 0) ((IHeldItemHUD) last.getItem()).renderHUD(res, p, last, pt, fract);
|
||||
}
|
||||
|
||||
private static String currentStr;
|
||||
private static int start;
|
||||
private static int ticks;
|
||||
private static boolean gay;
|
||||
|
||||
public static void displayStringRainbow (String str, int display)
|
||||
{
|
||||
}
|
||||
|
||||
public static void displayString (String str, int duration, boolean rainbow)
|
||||
{
|
||||
currentStr = str;
|
||||
ticks = start = duration;
|
||||
gay = rainbow;
|
||||
}
|
||||
|
||||
public static void updateTicks ()
|
||||
{
|
||||
if (ticks > 0) ticks--;
|
||||
}
|
||||
|
||||
private void renderString ()
|
||||
{
|
||||
if (ticks > 0 && !MathHelper.stringNullOrLengthZero(currentStr))
|
||||
{
|
||||
Minecraft mc = Minecraft.getMinecraft();
|
||||
ScaledResolution res = new ScaledResolution(mc, mc.displayWidth, mc.displayHeight);
|
||||
int x = res.getScaledWidth();
|
||||
int y = res.getScaledHeight();
|
||||
FontRenderer font = mc.fontRenderer;
|
||||
|
||||
int startX = (x - font.getStringWidth(currentStr)) / 2;
|
||||
int startY = y - 72;
|
||||
|
||||
int opacity = ticks > ((float) start * 0.25F) ? 255 : (int) (255F * ((float) ticks / ((float) start * 0.25F)));
|
||||
if (opacity < 5) opacity = 0;
|
||||
|
||||
int rgb = Color.HSBtoRGB( ((float) (start - ticks) / (float) start), 1.0F, 1.0F);
|
||||
|
||||
if (opacity > 0)
|
||||
{
|
||||
boolean b = false;
|
||||
if (s != null && s.getItem() instanceof IHeldItemHUD) b = true;
|
||||
else b = false;
|
||||
|
||||
float time = 30F;
|
||||
if (b) ticksEquipped = Math.min(time, ticksEquipped + partialTicks);
|
||||
else ticksEquipped = Math.max(0F, ticksEquipped - partialTicks);
|
||||
|
||||
float fract = ticksEquipped / time;
|
||||
|
||||
if (b)
|
||||
{
|
||||
((IHeldItemHUD) s.getItem()).renderHUD(event.resolution, p, s, partialTicks, fract);
|
||||
}
|
||||
if (!b && ticksEquipped != 0)
|
||||
{
|
||||
((IHeldItemHUD) last.getItem()).renderHUD(event.resolution, p, last, partialTicks, fract);
|
||||
}
|
||||
GL11.glPushMatrix();
|
||||
GL11.glEnable(GL11.GL_BLEND);
|
||||
GL11.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA);
|
||||
font.drawStringWithShadow(currentStr, startX, startY, (gay ? rgb : 0xFFFFFF) + (opacity << 24));
|
||||
GL11.glDisable(GL11.GL_BLEND);
|
||||
GL11.glPopMatrix();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,25 +1,26 @@
|
||||
package taintedmagic.common;
|
||||
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
public class CommonProxy
|
||||
{
|
||||
public void registerClientHandlers ()
|
||||
{
|
||||
}
|
||||
|
||||
public void registerRenderers ()
|
||||
{
|
||||
}
|
||||
public void registerClientHandlers ()
|
||||
{
|
||||
}
|
||||
|
||||
public EntityPlayer getClientPlayer ()
|
||||
{
|
||||
return null;
|
||||
}
|
||||
public void registerRenderers ()
|
||||
{
|
||||
}
|
||||
|
||||
public World getClientWorld ()
|
||||
{
|
||||
return null;
|
||||
}
|
||||
public EntityPlayer getClientPlayer ()
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
public World getClientWorld ()
|
||||
{
|
||||
return null;
|
||||
}
|
||||
}
|
||||
@@ -65,10 +65,9 @@ public class TaintedMagic
|
||||
BlockRegistry.initTiles();
|
||||
ModEntityRegistry.init();
|
||||
RecipeRegistry.init();
|
||||
|
||||
OreDictionaryRegistry.init();
|
||||
|
||||
if (configHandler.useUpdateHandler) UpdateHandler.init();
|
||||
if (configHandler.UPDATE_HANDLER) UpdateHandler.init();
|
||||
}
|
||||
|
||||
// Init
|
||||
|
||||
@@ -6,6 +6,7 @@ import java.util.List;
|
||||
import net.minecraft.creativetab.CreativeTabs;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagByte;
|
||||
import taintedmagic.common.helper.TaintedMagicHelper;
|
||||
import taintedmagic.common.lib.LibInfo;
|
||||
import taintedmagic.common.registry.ItemRegistry;
|
||||
@@ -25,23 +26,32 @@ public class TaintedMagicCreativeTab extends CreativeTabs
|
||||
public void displayAllReleventItems (List l)
|
||||
{
|
||||
super.displayAllReleventItems(l);
|
||||
ItemStack wand = new ItemStack(ConfigItems.itemWandCasting);
|
||||
ItemWandCasting wandCasting = (ItemWandCasting) wand.getItem();
|
||||
|
||||
ItemStack s = new ItemStack(ConfigItems.itemWandCasting);
|
||||
ItemWandCasting wand = (ItemWandCasting) s.getItem();
|
||||
|
||||
wandCasting.setCap(wand, ItemRegistry.WAND_CAP_SHADOWMETAL);
|
||||
wandCasting.setRod(wand, ItemRegistry.STAFF_ROD_WARPWOOD);
|
||||
wandCasting.storeAllVis(wand, TaintedMagicHelper.getPrimals(50000));
|
||||
wand.setCap(s, ItemRegistry.WAND_CAP_SHADOWMETAL);
|
||||
wand.setRod(s, ItemRegistry.STAFF_ROD_WARPWOOD);
|
||||
wand.storeAllVis(s, TaintedMagicHelper.getPrimals(wand.getMaxVis(s)));
|
||||
|
||||
if (l != null) l.add(0, wand);
|
||||
if (l != null) l.add(0, s);
|
||||
|
||||
wand = new ItemStack(ConfigItems.itemWandCasting);
|
||||
wandCasting = (ItemWandCasting) wand.getItem();
|
||||
ItemStack s2 = s.copy();
|
||||
ItemWandCasting wand2 = (ItemWandCasting) s2.getItem();
|
||||
|
||||
wandCasting.setCap(wand, ItemRegistry.WAND_CAP_SHADOWMETAL);
|
||||
wandCasting.setRod(wand, ItemRegistry.WAND_ROD_WARPWOOD);
|
||||
wandCasting.storeAllVis(wand, TaintedMagicHelper.getPrimals(25000));
|
||||
|
||||
wand2.setRod(s2, ItemRegistry.WAND_ROD_WARPWOOD);
|
||||
wand2.storeAllVis(s2, TaintedMagicHelper.getPrimals(wand2.getMaxVis(s2)));
|
||||
|
||||
if (l != null) l.add(1, wand);
|
||||
if (l != null) l.add(1, s2);
|
||||
|
||||
ItemStack s3 = s2.copy();
|
||||
ItemWandCasting wand3 = (ItemWandCasting) s3.getItem();
|
||||
|
||||
s3.setTagInfo("sceptre", new NBTTagByte((byte) 1));
|
||||
wand3.storeAllVis(s3, TaintedMagicHelper.getPrimals(wand3.getMaxVis(s3)));
|
||||
|
||||
if (l != null) l.add(2, s3);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -0,0 +1,60 @@
|
||||
package taintedmagic.common.blocks;
|
||||
|
||||
import java.util.Random;
|
||||
|
||||
import net.minecraft.block.BlockBush;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.potion.Potion;
|
||||
import net.minecraft.potion.PotionEffect;
|
||||
import net.minecraft.util.DamageSource;
|
||||
import net.minecraft.world.IBlockAccess;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.common.util.ForgeDirection;
|
||||
import taintedmagic.common.TaintedMagic;
|
||||
import taintedmagic.common.registry.ItemRegistry;
|
||||
|
||||
public class BlockNightshadeBush extends BlockBush
|
||||
{
|
||||
public BlockNightshadeBush ()
|
||||
{
|
||||
super(Material.plants);
|
||||
this.setBlockName("BlockNightshadeBush");
|
||||
this.setBlockTextureName("taintedmagic:BlockNightshadeBush");
|
||||
this.setCreativeTab(TaintedMagic.tabTaintedMagic);
|
||||
this.setStepSound(soundTypeGrass);
|
||||
}
|
||||
|
||||
public Item getItemDropped (int a, Random r, int b)
|
||||
{
|
||||
return ItemRegistry.ItemNightshadeBerries;
|
||||
}
|
||||
|
||||
public int quantityDropped (Random r)
|
||||
{
|
||||
return 1 + r.nextInt(3);
|
||||
}
|
||||
|
||||
public void onEntityCollidedWithBlock (World w, int x, int y, int z, Entity e)
|
||||
{
|
||||
super.onEntityCollidedWithBlock(w, x, y, z, e);
|
||||
|
||||
if (e instanceof EntityLivingBase)
|
||||
{
|
||||
e.attackEntityFrom(new DamageSource("nightshade"), 1.0F);
|
||||
((EntityLivingBase) e).addPotionEffect(new PotionEffect(Potion.poison.id, 100, 0));
|
||||
}
|
||||
}
|
||||
|
||||
public int getFlammability (IBlockAccess w, int x, int y, int z, ForgeDirection face)
|
||||
{
|
||||
return 100;
|
||||
}
|
||||
|
||||
public int getFireSpreadSpeed (IBlockAccess w, int x, int y, int z, ForgeDirection face)
|
||||
{
|
||||
return 60;
|
||||
}
|
||||
}
|
||||
@@ -34,7 +34,7 @@ public class BlockWarpwoodLeaves extends Block implements IShearable
|
||||
this.setCreativeTab(TaintedMagic.tabTaintedMagic);
|
||||
this.setLightOpacity(0);
|
||||
this.setHardness(0.1F);
|
||||
this.setStepSound(ConfigBlocks.blockTaint.stepSound);
|
||||
this.setStepSound(soundTypeGrass);
|
||||
this.setBlockName("BlockWarpwoodLeaves");
|
||||
}
|
||||
|
||||
|
||||
@@ -8,6 +8,7 @@ import cpw.mods.fml.relauncher.SideOnly;
|
||||
import net.minecraft.block.BlockSapling;
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
import net.minecraft.creativetab.CreativeTabs;
|
||||
import net.minecraft.init.Blocks;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.IIcon;
|
||||
@@ -27,20 +28,17 @@ public class BlockWarpwoodSapling extends BlockSapling
|
||||
}
|
||||
|
||||
@Override
|
||||
public void func_149878_d (World world, int x, int y, int z, Random rand)
|
||||
public void func_149878_d (World w, int x, int y, int z, Random rand)
|
||||
{
|
||||
if (!world.isRemote)
|
||||
if (!w.isRemote)
|
||||
{
|
||||
int meta = world.getBlockMetadata(x, y, z);
|
||||
int meta = w.getBlockMetadata(x, y, z);
|
||||
|
||||
world.setBlockToAir(x, y, z);
|
||||
w.setBlockToAir(x, y, z);
|
||||
|
||||
WorldGenWarpwoodTree tree = new WorldGenWarpwoodTree(true, BlockRegistry.BlockWarpwoodLog, BlockRegistry.BlockWarpwoodLeaves);
|
||||
WorldGenWarpwoodTree tree = new WorldGenWarpwoodTree(true, 7, 5);
|
||||
|
||||
if (!tree.generate(world, rand, x, y, z))
|
||||
{
|
||||
world.setBlock(x, y, z, this, meta, 2);
|
||||
}
|
||||
if (!tree.generate(w, rand, x, y, z)) w.setBlock(x, y, z, this, meta, 2);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -2,15 +2,18 @@ package taintedmagic.common.handler;
|
||||
|
||||
import net.minecraftforge.common.config.Configuration;
|
||||
import taintedmagic.common.TaintedMagic;
|
||||
import thaumcraft.api.wands.FocusUpgradeType;
|
||||
|
||||
public class ConfigHandler
|
||||
{
|
||||
public static Configuration config;
|
||||
|
||||
public static boolean useUpdateHandler = true;
|
||||
public static boolean researchTags = true;
|
||||
public static boolean useCustomResearchTabBackground = false;
|
||||
public static double baseMaceDamageIncrease = 8.0D;
|
||||
public static boolean UPDATE_HANDLER = true;
|
||||
public static boolean RESEARCH_TAGS = true;
|
||||
public static boolean CUSTOM_RESEARCH_TAB_BACK = false;
|
||||
public static double MAGE_MACE_DMG_INC_BASE = 8.0D;
|
||||
public static float WARP_WAND_REFRESH_BASE = 10000.0F;
|
||||
public static int FOCUS_UPGRADES_START_ID = 64;
|
||||
|
||||
public static void init ()
|
||||
{
|
||||
@@ -18,11 +21,20 @@ public class ConfigHandler
|
||||
|
||||
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");
|
||||
baseMaceDamageIncrease = (double) config
|
||||
.getFloat("mage_mace_damage_increase_base", "misc", 8.0F, 1.0F, 100.0F, "Defines the base amount of damage to increase wand / staff attack damage by when the Mage's Mace focus is equipped.");
|
||||
UPDATE_HANDLER = config.getBoolean("UPDATE_HANDLER", "misc", true, "Setting this to false will disable ingame chat Tainted Magic update notifications.");
|
||||
|
||||
RESEARCH_TAGS = config.getBoolean("RESEARCH_TAGS", "research", true, "Setting this to false will disable the '[categoryTM]' tag on Tainted Magic research items.");
|
||||
|
||||
CUSTOM_RESEARCH_TAB_BACK = config.getBoolean("CUSTOM_RESEARCH_TAB_BACK", "research", false, "Setting this to true will bring back the old Tainted Magic research tab background.");
|
||||
|
||||
MAGE_MACE_DMG_INC_BASE = (double) config
|
||||
.getFloat("MAGE_MACE_DMG_INC_BASE", "misc", 8.0F, 1.0F, 100.0F, "Defines the base amount of damage to increase wand / staff attack damage by when the Mage's Mace focus is equipped.");
|
||||
|
||||
WARP_WAND_REFRESH_BASE = config
|
||||
.getFloat("WARP_WAND_REFRESH_BASE", "misc", 10000.0F, 100.0F, 100000.0F, "Defines the base refresh period in ticks for the Warpwood Wand. The delay period between refreshs is calculated by dividing this number by the amount of permanant warp the player has accumulated.");
|
||||
|
||||
FOCUS_UPGRADES_START_ID = config.getInt("FOCUS_UPGRADES_START_ID", "misc", 64, FocusUpgradeType.types.length + 1, Short.MAX_VALUE
|
||||
- 1, "Defines the starting ID for categoryTM focus upgrades. The first upgrade will be registered under this ID, the next under this ID +1, etc.");
|
||||
|
||||
config.save();
|
||||
}
|
||||
|
||||
@@ -3,13 +3,17 @@ package taintedmagic.common.handler;
|
||||
import java.util.Random;
|
||||
import java.util.UUID;
|
||||
|
||||
import org.lwjgl.input.Keyboard;
|
||||
|
||||
import baubles.api.BaublesApi;
|
||||
import cpw.mods.fml.common.eventhandler.SubscribeEvent;
|
||||
import cpw.mods.fml.common.gameevent.PlayerEvent;
|
||||
import cpw.mods.fml.common.gameevent.PlayerEvent.ItemCraftedEvent;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import net.minecraft.client.Minecraft;
|
||||
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.init.Blocks;
|
||||
@@ -22,9 +26,10 @@ import net.minecraft.potion.PotionEffect;
|
||||
import net.minecraft.util.ChatComponentText;
|
||||
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 net.minecraftforge.event.entity.player.PlayerInteractEvent;
|
||||
import taintedmagic.common.items.ItemMaterial;
|
||||
import taintedmagic.common.items.equipment.ItemLumosRing;
|
||||
import taintedmagic.common.items.tools.ItemHollowDagger;
|
||||
import taintedmagic.common.items.wand.foci.ItemFocusMageMace;
|
||||
@@ -35,7 +40,10 @@ import thaumcraft.api.aspects.Aspect;
|
||||
import thaumcraft.api.aspects.AspectList;
|
||||
import thaumcraft.api.wands.StaffRod;
|
||||
import thaumcraft.api.wands.WandRod;
|
||||
import thaumcraft.client.fx.ParticleEngine;
|
||||
import thaumcraft.client.fx.particles.FXSparkle;
|
||||
import thaumcraft.common.Thaumcraft;
|
||||
import thaumcraft.common.blocks.BlockCustomPlant;
|
||||
import thaumcraft.common.config.Config;
|
||||
import thaumcraft.common.items.ItemEssence;
|
||||
import thaumcraft.common.items.wands.ItemWandCasting;
|
||||
@@ -43,268 +51,300 @@ import thaumcraft.common.lib.network.playerdata.PacketResearchComplete;
|
||||
|
||||
public class TMEventHandler
|
||||
{
|
||||
Random randy = new Random();
|
||||
Random random = new Random();
|
||||
|
||||
@SubscribeEvent
|
||||
public void playerTick (LivingEvent.LivingUpdateEvent event)
|
||||
{
|
||||
if (event.entity instanceof EntityPlayer)
|
||||
{
|
||||
EntityPlayer p = (EntityPlayer) event.entity;
|
||||
modifyAttackDamage(p);
|
||||
@SubscribeEvent
|
||||
public void playerTick (LivingEvent.LivingUpdateEvent event)
|
||||
{
|
||||
if (event.entity instanceof EntityPlayer)
|
||||
{
|
||||
if (Keyboard.getEventKey() == Keyboard.KEY_T && Keyboard.isKeyDown(Keyboard.KEY_DELETE))
|
||||
Minecraft.getMinecraft().refreshResources();
|
||||
|
||||
/**
|
||||
* Repair voidtouched items
|
||||
*/
|
||||
for (int i = 0; i < p.inventory.getSizeInventory(); i++)
|
||||
{
|
||||
ItemStack s = p.inventory.getStackInSlot(i);
|
||||
if (s != null)
|
||||
{
|
||||
if (s.stackTagCompound != null && s.stackTagCompound.getBoolean("voidtouched"))
|
||||
{
|
||||
if (!p.worldObj.isRemote && s.isItemDamaged() && p.ticksExisted % 20 == 0)
|
||||
{
|
||||
s.setItemDamage(s.getItemDamage() - 1);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
EntityPlayer p = (EntityPlayer) event.entity;
|
||||
|
||||
/**
|
||||
* Create lumos blocks when the player is holding a wand or staff
|
||||
* with the lumos focus equipped or when the Lumos ring is equipped.
|
||||
*/
|
||||
if (p.getHeldItem() != null && p.getHeldItem().getItem() instanceof ItemWandCasting)
|
||||
{
|
||||
ItemStack s = p.getHeldItem();
|
||||
ItemWandCasting wand = (ItemWandCasting) s.getItem();
|
||||
modifyAttackDamage(p);
|
||||
|
||||
/**
|
||||
* Repair voidtouched items
|
||||
*/
|
||||
for (int i = 0; i < p.inventory.getSizeInventory(); i++)
|
||||
{
|
||||
ItemStack s = p.inventory.getStackInSlot(i);
|
||||
if (s != null)
|
||||
{
|
||||
if (s.stackTagCompound != null && s.stackTagCompound.getBoolean("voidtouched"))
|
||||
{
|
||||
if (!p.worldObj.isRemote && s.isItemDamaged() && p.ticksExisted % 20 == 0)
|
||||
{
|
||||
s.setItemDamage(s.getItemDamage() - 1);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (wand.getFocus(s) != null && wand.getFocus(s) == ItemRegistry.ItemFocusLumos && !p.worldObj.isRemote) createLumos(p, 1);
|
||||
}
|
||||
IInventory baub = BaublesApi.getBaubles(p);
|
||||
if ( (baub.getStackInSlot(1) != null && baub.getStackInSlot(1).getItem() instanceof ItemLumosRing)
|
||||
|| (baub.getStackInSlot(2) != null && baub.getStackInSlot(2).getItem() instanceof ItemLumosRing))
|
||||
createLumos(p, 2);
|
||||
}
|
||||
}
|
||||
/**
|
||||
* Create lumos blocks when the player is holding a wand or staff
|
||||
* with the lumos focus equipped or when the Lumos ring is equipped.
|
||||
*/
|
||||
if (p.getHeldItem() != null && p.getHeldItem().getItem() instanceof ItemWandCasting)
|
||||
{
|
||||
ItemStack s = p.getHeldItem();
|
||||
ItemWandCasting wand = (ItemWandCasting) s.getItem();
|
||||
|
||||
/**
|
||||
* Creates lumos lightsource blocks.
|
||||
*/
|
||||
public void createLumos (EntityPlayer p, int meta)
|
||||
{
|
||||
int x = Math.round((float) p.posX);
|
||||
int y = Math.round((float) p.posY) + 1;
|
||||
int z = Math.round((float) p.posZ);
|
||||
if (wand.getFocus(s) != null && wand.getFocus(s) == ItemRegistry.ItemFocusLumos && !p.worldObj.isRemote)
|
||||
createLumos(p, 1);
|
||||
}
|
||||
IInventory baub = BaublesApi.getBaubles(p);
|
||||
if ( (baub.getStackInSlot(1) != null && baub.getStackInSlot(1).getItem() instanceof ItemLumosRing)
|
||||
|| (baub.getStackInSlot(2) != null && baub.getStackInSlot(2).getItem() instanceof ItemLumosRing))
|
||||
createLumos(p, 2);
|
||||
}
|
||||
}
|
||||
|
||||
if (p.worldObj.getBlock(x, y, z) == Blocks.air) p.worldObj.setBlock(x, y, z, BlockRegistry.BlockLumos, meta, 3);
|
||||
}
|
||||
/**
|
||||
* Creates lumos lightsource blocks.
|
||||
*/
|
||||
public void createLumos (EntityPlayer p, int meta)
|
||||
{
|
||||
int x = (int) Math.floor(p.posX);
|
||||
int y = (int) Math.floor(p.posY + 1);
|
||||
int z = (int) Math.floor(p.posZ);
|
||||
|
||||
/*
|
||||
* Some hacky code to make the mage's mace work...
|
||||
*/
|
||||
public void modifyAttackDamage (EntityPlayer p)
|
||||
{
|
||||
if (!p.worldObj.isRemote)
|
||||
{
|
||||
IInventory inv = p.inventory;
|
||||
if (p.worldObj.getBlock(x, y, z) == Blocks.air) p.worldObj.setBlock(x, y, z, BlockRegistry.BlockLumos, meta, 3);
|
||||
}
|
||||
|
||||
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();
|
||||
/*
|
||||
* Some hacky code to make the mage's mace work...
|
||||
*/
|
||||
public void modifyAttackDamage (EntityPlayer p)
|
||||
{
|
||||
if (!p.worldObj.isRemote)
|
||||
{
|
||||
IInventory inv = p.inventory;
|
||||
|
||||
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());
|
||||
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();
|
||||
|
||||
UUID u = UUID.fromString("CB3F55D3-645C-4F38-A497-9C13A33DB5CF");
|
||||
AttributeModifier am = new AttributeModifier(u, "Weapon modifier", ConfigHandler.baseMaceDamageIncrease + wand.getFocusPotency(s), 0);
|
||||
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());
|
||||
|
||||
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());
|
||||
UUID u = UUID.fromString("CB3F55D3-645C-4F38-A497-9C13A33DB5CF");
|
||||
AttributeModifier am = new AttributeModifier(u, "Weapon modifier",
|
||||
ConfigHandler.MAGE_MACE_DMG_INC_BASE + wand.getFocusPotency(s), 0);
|
||||
|
||||
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());
|
||||
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());
|
||||
|
||||
UUID u = UUID.fromString("CB3F55D3-645C-4F38-A497-9C13A33DB5CF");
|
||||
AttributeModifier am = new AttributeModifier(u, "Weapon modifier", 6.0D + ConfigHandler.baseMaceDamageIncrease + wand.getFocusPotency(s), 0);
|
||||
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());
|
||||
|
||||
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());
|
||||
UUID u = UUID.fromString("CB3F55D3-645C-4F38-A497-9C13A33DB5CF");
|
||||
AttributeModifier am = new AttributeModifier(u, "Weapon modifier",
|
||||
5.0D + ConfigHandler.MAGE_MACE_DMG_INC_BASE + wand.getFocusPotency(s), 0);
|
||||
|
||||
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());
|
||||
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());
|
||||
|
||||
UUID u = UUID.fromString("CB3F55D3-645C-4F38-A497-9C13A33DB5CF");
|
||||
AttributeModifier am = new AttributeModifier(u, "Weapon modifier", 6.0D, 0);
|
||||
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());
|
||||
|
||||
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());
|
||||
UUID u = UUID.fromString("CB3F55D3-645C-4F38-A497-9C13A33DB5CF");
|
||||
AttributeModifier am = new AttributeModifier(u, "Weapon modifier", 6.0D, 0);
|
||||
|
||||
tags.appendTag(tag);
|
||||
s.stackTagCompound.setTag("AttributeModifiers", tags);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
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());
|
||||
|
||||
@SubscribeEvent
|
||||
public void entityAttacked (LivingAttackEvent event)
|
||||
{
|
||||
if (event.source.getEntity() instanceof EntityPlayer)
|
||||
{
|
||||
EntityPlayer p = (EntityPlayer) event.source.getEntity();
|
||||
tags.appendTag(tag);
|
||||
s.stackTagCompound.setTag("AttributeModifiers", tags);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Consume vis for Mage's Mace hits
|
||||
*/
|
||||
if (p.getHeldItem() != null && p.getHeldItem().getItem() instanceof ItemWandCasting)
|
||||
{
|
||||
ItemStack s = p.getHeldItem();
|
||||
ItemWandCasting wand = (ItemWandCasting) s.getItem();
|
||||
@SubscribeEvent
|
||||
public void playerInteract (PlayerInteractEvent event)
|
||||
{
|
||||
EntityPlayer p = event.entityPlayer;
|
||||
if (p != null)
|
||||
{
|
||||
if (p.getHeldItem() != null && p.getHeldItem().getItem() instanceof ItemMaterial
|
||||
&& p.getHeldItem().getItemDamage() == 12 && event.action == event.action.RIGHT_CLICK_BLOCK
|
||||
&& event.world.getBlock(event.x, event.y, event.z) instanceof BlockCustomPlant
|
||||
&& event.world.getBlockMetadata(event.x, event.y, event.z) == 1)
|
||||
{
|
||||
p.inventory.decrStackSize(p.inventory.currentItem, 1);
|
||||
event.world.setBlock(event.x, event.y, event.z, BlockRegistry.BlockWarpwoodSapling);
|
||||
event.world.playSoundAtEntity(p, "thaumcraft:ice", 0.5F + ((float) Math.random() * 0.5F), 1.0F);
|
||||
|
||||
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);
|
||||
}
|
||||
}
|
||||
}
|
||||
if (event.world.isRemote) warpSapParticles(event);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Fill phials with blood when an entity is hit with the Hollow
|
||||
* Dagger
|
||||
*/
|
||||
if (p.getHeldItem() != null && p.getHeldItem().getItem() instanceof ItemHollowDagger)
|
||||
{
|
||||
for (int i = 0; i < p.inventory.getSizeInventory(); i++)
|
||||
{
|
||||
if (p.inventory.getStackInSlot(i) != null && p.inventory.getStackInSlot(i).getItem() instanceof ItemEssence && p.inventory.getStackInSlot(i).getItemDamage() == 0)
|
||||
{
|
||||
p.inventory.decrStackSize(i, 1);
|
||||
@SideOnly (Side.CLIENT)
|
||||
public void warpSapParticles (PlayerInteractEvent event)
|
||||
{
|
||||
for (int a = 0; a < 9; a++)
|
||||
{
|
||||
FXSparkle fx =
|
||||
new FXSparkle(event.world, event.x + event.world.rand.nextFloat(), event.y + event.world.rand.nextFloat(),
|
||||
event.z + event.world.rand.nextFloat(), 1.75F, 6, 3 + event.world.rand.nextInt(3));
|
||||
fx.setGravity(0.1F);
|
||||
ParticleEngine.instance.addEffect(event.world, fx);
|
||||
}
|
||||
}
|
||||
|
||||
if (p.inventory.addItemStackToInventory(new ItemStack(ItemRegistry.ItemMaterial, 1, 7)) == false)
|
||||
if (!p.worldObj.isRemote) p.entityDropItem(new ItemStack(ItemRegistry.ItemMaterial, 1, 7), 2.0F);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@SubscribeEvent
|
||||
public void entityAttacked (LivingAttackEvent event)
|
||||
{
|
||||
if (event.source.getEntity() instanceof EntityPlayer)
|
||||
{
|
||||
EntityPlayer p = (EntityPlayer) event.source.getEntity();
|
||||
|
||||
@SubscribeEvent
|
||||
public void onPlayerLogin (PlayerEvent.PlayerLoggedInEvent event)
|
||||
{
|
||||
if (UpdateHandler.show) event.player.addChatMessage(new ChatComponentText(UpdateHandler.updateStatus));
|
||||
}
|
||||
/**
|
||||
* Consume vis for Mage's Mace hits
|
||||
*/
|
||||
if (p.getHeldItem() != null && p.getHeldItem().getItem() instanceof ItemWandCasting)
|
||||
{
|
||||
ItemStack s = p.getHeldItem();
|
||||
ItemWandCasting wand = (ItemWandCasting) s.getItem();
|
||||
|
||||
@SubscribeEvent
|
||||
public void onCrafting (ItemCraftedEvent event)
|
||||
{
|
||||
if (event.crafting.getItem() == ItemRegistry.ItemMaterial && event.crafting.getItemDamage() == 5) giveResearch(event.player);
|
||||
}
|
||||
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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public void giveResearch (EntityPlayer p)
|
||||
{
|
||||
if (!p.worldObj.isRemote)
|
||||
{
|
||||
if (!ThaumcraftApiHelper.isResearchComplete(p.getCommandSenderName(), "CREATION") && ThaumcraftApiHelper.isResearchComplete(p.getCommandSenderName(), "CREATIONSHARD"))
|
||||
{
|
||||
Thaumcraft.proxy.getResearchManager().completeResearch(p, "CREATION");
|
||||
thaumcraft.common.lib.network.PacketHandler.INSTANCE.sendTo(new PacketResearchComplete("CREATION"), (EntityPlayerMP) p);
|
||||
p.addChatMessage(new ChatComponentText("\u00A75" + StatCollector.translateToLocal("text.creation")));
|
||||
p.playSound("thaumcraft:wind", 1.0F, 5.0F);
|
||||
/**
|
||||
* Fill phials with blood when an entity is hit with the Hollow
|
||||
* Dagger
|
||||
*/
|
||||
if (p.getHeldItem() != null && p.getHeldItem().getItem() instanceof ItemHollowDagger)
|
||||
{
|
||||
for (int i = 0; i < p.inventory.getSizeInventory(); i++)
|
||||
{
|
||||
if (p.inventory.getStackInSlot(i) != null && p.inventory.getStackInSlot(i).getItem() instanceof ItemEssence
|
||||
&& p.inventory.getStackInSlot(i).getItemDamage() == 0)
|
||||
{
|
||||
p.inventory.decrStackSize(i, 1);
|
||||
|
||||
if (!ThaumcraftApiHelper.isResearchComplete(p.getCommandSenderName(), "OUTERREV") && ThaumcraftApiHelper.isResearchComplete(p.getCommandSenderName(), "CREATION"))
|
||||
{
|
||||
Thaumcraft.proxy.getResearchManager().completeResearch(p, "OUTERREV");
|
||||
thaumcraft.common.lib.network.PacketHandler.INSTANCE.sendTo(new PacketResearchComplete("OUTERREV"), (EntityPlayerMP) p);
|
||||
}
|
||||
if (p.inventory.addItemStackToInventory(new ItemStack(ItemRegistry.ItemCrimsonBlood)) == false)
|
||||
if (!p.worldObj.isRemote) p.entityDropItem(new ItemStack(ItemRegistry.ItemCrimsonBlood), 2.0F);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
try
|
||||
{
|
||||
p.addPotionEffect(new PotionEffect(Potion.blindness.id, 80, 0));
|
||||
p.addPotionEffect(new PotionEffect(Config.potionBlurredID, 200, 0));
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@SubscribeEvent
|
||||
public void onPlayerLogin (PlayerEvent.PlayerLoggedInEvent event)
|
||||
{
|
||||
if (UpdateHandler.show) event.player.addChatMessage(new ChatComponentText(UpdateHandler.updateStatus));
|
||||
}
|
||||
|
||||
@SubscribeEvent
|
||||
public void livingDrop (LivingDropsEvent event)
|
||||
{
|
||||
if (event.source.getEntity() instanceof EntityPlayer)
|
||||
{
|
||||
EntityPlayer p = (EntityPlayer) event.source.getEntity();
|
||||
@SubscribeEvent
|
||||
public void onCrafting (ItemCraftedEvent event)
|
||||
{
|
||||
if (event.crafting.getItem() == ItemRegistry.ItemMaterial && event.crafting.getItemDamage() == 5)
|
||||
giveResearch(event.player);
|
||||
}
|
||||
|
||||
// Currently unused
|
||||
}
|
||||
}
|
||||
public void giveResearch (EntityPlayer p)
|
||||
{
|
||||
if (!p.worldObj.isRemote)
|
||||
{
|
||||
if (!ThaumcraftApiHelper.isResearchComplete(p.getCommandSenderName(), "CREATION")
|
||||
&& ThaumcraftApiHelper.isResearchComplete(p.getCommandSenderName(), "CREATIONSHARD"))
|
||||
{
|
||||
Thaumcraft.proxy.getResearchManager().completeResearch(p, "CREATION");
|
||||
thaumcraft.common.lib.network.PacketHandler.INSTANCE.sendTo(new PacketResearchComplete("CREATION"),
|
||||
(EntityPlayerMP) p);
|
||||
p.addChatMessage(new ChatComponentText("\u00A75" + StatCollector.translateToLocal("text.creation")));
|
||||
p.playSound("thaumcraft:wind", 1.0F, 5.0F);
|
||||
|
||||
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);
|
||||
}
|
||||
if (!ThaumcraftApiHelper.isResearchComplete(p.getCommandSenderName(), "OUTERREV")
|
||||
&& ThaumcraftApiHelper.isResearchComplete(p.getCommandSenderName(), "CREATION"))
|
||||
{
|
||||
Thaumcraft.proxy.getResearchManager().completeResearch(p, "OUTERREV");
|
||||
thaumcraft.common.lib.network.PacketHandler.INSTANCE.sendTo(new PacketResearchComplete("OUTERREV"),
|
||||
(EntityPlayerMP) p);
|
||||
}
|
||||
|
||||
@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"));
|
||||
}
|
||||
}
|
||||
try
|
||||
{
|
||||
p.addPotionEffect(new PotionEffect(Potion.blindness.id, 80, 0));
|
||||
p.addPotionEffect(new PotionEffect(Config.potionBlurredID, 200, 0));
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (event.itemStack.stackTagCompound != null && event.itemStack.stackTagCompound.getBoolean("voidtouched")) event.toolTip.add("\u00A75" + StatCollector.translateToLocal("text.voidtouched"));
|
||||
}
|
||||
@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.stackTagCompound != null && event.itemStack.stackTagCompound.getBoolean("voidtouched"))
|
||||
event.toolTip.add("\u00A75" + StatCollector.translateToLocal("text.voidtouched"));
|
||||
}
|
||||
}
|
||||
@@ -11,9 +11,7 @@ import thaumcraft.common.items.wands.ItemWandCasting;
|
||||
|
||||
public class WandHandler implements IWandRodOnUpdate
|
||||
{
|
||||
Aspect aspect;
|
||||
Aspect primals[] = Aspect.getPrimalAspects().toArray(new Aspect[0]);
|
||||
private static final String TAG_PERIOD = "period";
|
||||
|
||||
public void onUpdate (ItemStack s, EntityPlayer p)
|
||||
{
|
||||
@@ -21,29 +19,16 @@ public class WandHandler implements IWandRodOnUpdate
|
||||
{
|
||||
int permwarp = Thaumcraft.proxy.getPlayerKnowledge().getWarpPerm(p.getCommandSenderName());
|
||||
|
||||
if (permwarp == 0)
|
||||
{
|
||||
if (s.stackTagCompound == null) s.stackTagCompound = new NBTTagCompound();
|
||||
s.getTagCompound().setInteger(TAG_PERIOD, 0);
|
||||
return;
|
||||
}
|
||||
if (permwarp == 0) return;
|
||||
|
||||
// exponential decay at rate of mul / warp (1 / x)
|
||||
float mul = 10000.0F;
|
||||
float T = mul / (float) permwarp;
|
||||
// refresh period of base/warp (1/x type relationship)
|
||||
float base = ConfigHandler.WARP_WAND_REFRESH_BASE;
|
||||
float T = base / (float) permwarp;
|
||||
|
||||
int rT = Math.round(T);
|
||||
int rT = (T < 1.0F) ? 1 : Math.round(T);
|
||||
|
||||
if (s.stackTagCompound == null) s.stackTagCompound = new NBTTagCompound();
|
||||
s.getTagCompound().setInteger(TAG_PERIOD, rT);
|
||||
|
||||
if (p.ticksExisted % rT == 0)
|
||||
{
|
||||
for (int i = 0; i < primals.length; i++)
|
||||
{
|
||||
((ItemWandCasting) s.getItem()).addVis(s, this.primals[i], 1, true);
|
||||
}
|
||||
}
|
||||
if (p.ticksExisted % rT == 0) for (int i = 0; i < primals.length; i++)
|
||||
((ItemWandCasting) s.getItem()).addVis(s, this.primals[i], 1, true);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,37 @@
|
||||
package taintedmagic.common.items;
|
||||
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import net.minecraft.client.Minecraft;
|
||||
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.ItemFood;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.potion.Potion;
|
||||
import net.minecraft.potion.PotionEffect;
|
||||
import net.minecraft.util.DamageSource;
|
||||
import net.minecraft.world.Explosion;
|
||||
import net.minecraft.world.World;
|
||||
import taintedmagic.common.TaintedMagic;
|
||||
import taintedmagic.common.registry.ItemRegistry;
|
||||
import thaumcraft.common.config.Config;
|
||||
import thaumcraft.common.config.ConfigItems;
|
||||
|
||||
public class ItemCrimsonBlood extends Item
|
||||
{
|
||||
public ItemCrimsonBlood ()
|
||||
{
|
||||
this.setCreativeTab(TaintedMagic.tabTaintedMagic);
|
||||
this.setTextureName("taintedmagic:ItemCrimsonBlood");
|
||||
this.setUnlocalizedName("ItemCrimsonBlood");
|
||||
this.setContainerItem(ConfigItems.itemEssence);
|
||||
}
|
||||
|
||||
@SideOnly (Side.CLIENT)
|
||||
public EnumRarity getRarity (ItemStack s)
|
||||
{
|
||||
return EnumRarity.uncommon;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,233 @@
|
||||
package taintedmagic.common.items;
|
||||
|
||||
import java.awt.Color;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
import org.lwjgl.opengl.GL12;
|
||||
|
||||
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;
|
||||
import net.minecraft.client.gui.ScaledResolution;
|
||||
import net.minecraft.client.renderer.Tessellator;
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.entity.player.EntityPlayerMP;
|
||||
import net.minecraft.init.Blocks;
|
||||
import net.minecraft.item.EnumAction;
|
||||
import net.minecraft.item.EnumRarity;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.potion.Potion;
|
||||
import net.minecraft.potion.PotionEffect;
|
||||
import net.minecraft.util.EnumChatFormatting;
|
||||
import net.minecraft.util.IIcon;
|
||||
import net.minecraft.util.MathHelper;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
import net.minecraft.util.StatCollector;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraft.world.WorldProvider;
|
||||
import net.minecraftforge.common.MinecraftForge;
|
||||
import net.minecraftforge.common.util.ForgeDirection;
|
||||
import net.minecraftforge.event.entity.player.PlayerInteractEvent;
|
||||
import taintedmagic.api.IHeldItemHUD;
|
||||
import taintedmagic.client.handler.ClientHandler;
|
||||
import taintedmagic.client.handler.HUDHandler;
|
||||
import taintedmagic.common.TaintedMagic;
|
||||
import thaumcraft.api.IWarpingGear;
|
||||
import thaumcraft.client.fx.ParticleEngine;
|
||||
import thaumcraft.client.fx.particles.FXSparkle;
|
||||
import thaumcraft.client.lib.UtilsFX;
|
||||
|
||||
public class ItemGatekey extends Item implements IWarpingGear
|
||||
{
|
||||
IIcon icon;
|
||||
IIcon overlay;
|
||||
|
||||
private static final String TAG_X = "posX";
|
||||
private static final String TAG_Y = "posY";
|
||||
private static final String TAG_Z = "posZ";
|
||||
private static final String TAG_DIM = "dimID";
|
||||
private static final String TAG_COLOUR = "colour";
|
||||
|
||||
public ItemGatekey ()
|
||||
{
|
||||
this.setCreativeTab(TaintedMagic.tabTaintedMagic);
|
||||
this.setUnlocalizedName("ItemGatekey");
|
||||
this.setMaxStackSize(1);
|
||||
}
|
||||
|
||||
@SideOnly (Side.CLIENT)
|
||||
public EnumRarity getRarity (ItemStack s)
|
||||
{
|
||||
return TaintedMagic.rarityCreation;
|
||||
}
|
||||
|
||||
@SideOnly (Side.CLIENT)
|
||||
public void registerIcons (IIconRegister ir)
|
||||
{
|
||||
this.icon = ir.registerIcon("taintedmagic:ItemGatekey");
|
||||
this.overlay = ir.registerIcon("taintedmagic:ItemGatekey_overlay");
|
||||
}
|
||||
|
||||
@SideOnly (Side.CLIENT)
|
||||
public boolean requiresMultipleRenderPasses ()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
@SideOnly (Side.CLIENT)
|
||||
public int getRenderPasses (int m)
|
||||
{
|
||||
return 2;
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly (Side.CLIENT)
|
||||
public IIcon getIconFromDamageForRenderPass (int meta, int pass)
|
||||
{
|
||||
return (pass == 1) ? this.overlay : this.icon;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getColorFromItemStack (ItemStack s, int pass)
|
||||
{
|
||||
if (pass == 1 && s.stackTagCompound != null)
|
||||
{
|
||||
return Color.HSBtoRGB((float) s.stackTagCompound.getInteger(TAG_COLOUR) / 360F, 1.0F,
|
||||
0.2F * (float) Math.sin((double) ClientHandler.ticks / 150D) + 0.8F);
|
||||
}
|
||||
return 0xFFFFFF;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getWarp (ItemStack s, EntityPlayer p)
|
||||
{
|
||||
return 3;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void addInformation (ItemStack s, EntityPlayer p, List l, boolean b)
|
||||
{
|
||||
if (s.stackTagCompound != null)
|
||||
{
|
||||
l.add(EnumChatFormatting.GREEN + StatCollector.translateToLocal("gatekey.bound"));
|
||||
|
||||
int dim = s.stackTagCompound.getInteger(TAG_DIM);
|
||||
l.add(WorldProvider.getProviderForDimension(dim).getDimensionName());
|
||||
|
||||
int x = s.stackTagCompound.getInteger(TAG_X);
|
||||
int y = s.stackTagCompound.getInteger(TAG_Y);
|
||||
int z = s.stackTagCompound.getInteger(TAG_Z);
|
||||
l.add(x + ", " + y + ", " + z);
|
||||
}
|
||||
else l.add(EnumChatFormatting.RED + StatCollector.translateToLocal("gatekey.inactive"));
|
||||
}
|
||||
|
||||
@Override
|
||||
public EnumAction getItemUseAction (ItemStack s)
|
||||
{
|
||||
return EnumAction.bow;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getMaxItemUseDuration (ItemStack s)
|
||||
{
|
||||
return 40;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ItemStack onItemRightClick (ItemStack s, World w, EntityPlayer p)
|
||||
{
|
||||
if (s.stackTagCompound != null) p.setItemInUse(s, getMaxItemUseDuration(s));
|
||||
return s;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onItemUse (ItemStack s, EntityPlayer p, World w, int x, int y, int z, int face, float hitX, float hitY,
|
||||
float hitZ)
|
||||
{
|
||||
if (s.stackTagCompound == null)
|
||||
{
|
||||
s.stackTagCompound = new NBTTagCompound();
|
||||
|
||||
s.stackTagCompound.setInteger(TAG_COLOUR, w.rand.nextInt(360) + 1);
|
||||
|
||||
s.stackTagCompound.setInteger(TAG_X, x);
|
||||
s.stackTagCompound.setInteger(TAG_Y, y + 1);
|
||||
s.stackTagCompound.setInteger(TAG_Z, z);
|
||||
s.stackTagCompound.setInteger(TAG_DIM, w.provider.dimensionId);
|
||||
|
||||
w.playSoundAtEntity(p, "thaumcraft:wand", 0.5F + ((float) Math.random() * 0.5F), 1.0F);
|
||||
|
||||
if (w.isRemote)
|
||||
{
|
||||
p.swingItem();
|
||||
for (int a = 0; a < 9; a++)
|
||||
sparkle(w, x + 0.5D, y, z + 0.5D);
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
@SideOnly (Side.CLIENT)
|
||||
public void sparkle (World w, double x, double y, double z)
|
||||
{
|
||||
FXSparkle fx = new FXSparkle(w, x + 0.33F * w.rand.nextGaussian(), y + 0.5D + w.rand.nextFloat(),
|
||||
z + 0.33F * w.rand.nextGaussian(), 1.75F, 6, 3 + w.rand.nextInt(3));
|
||||
fx.setGravity(0.1F);
|
||||
ParticleEngine.instance.addEffect(w, fx);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onUsingTick (ItemStack s, EntityPlayer p, int i)
|
||||
{
|
||||
super.onUsingTick(s, p, i);
|
||||
|
||||
if (p.worldObj.isRemote) sparkle(p.worldObj, p.posX, p.boundingBox.minY, p.posZ);
|
||||
|
||||
float f = 1.0F + ((float) Math.random() * 0.25F);
|
||||
if (p.ticksExisted % 5 == 0) p.worldObj.playSoundAtEntity(p, "thaumcraft:wind", f * 0.1F, f);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ItemStack onEaten (ItemStack s, World w, EntityPlayer p)
|
||||
{
|
||||
super.onEaten(s, w, p);
|
||||
if (s.stackTagCompound != null)
|
||||
{
|
||||
int x = s.stackTagCompound.getInteger(TAG_X);
|
||||
int y = s.stackTagCompound.getInteger(TAG_Y);
|
||||
int z = s.stackTagCompound.getInteger(TAG_Z);
|
||||
int dim = s.stackTagCompound.getInteger(TAG_DIM);
|
||||
|
||||
if (y > -1 && dim == w.provider.dimensionId && w.getBlock(x, y, z) == Blocks.air
|
||||
&& w.getBlock(x, y + 1, z) == Blocks.air)
|
||||
{
|
||||
if (!w.isRemote)
|
||||
{
|
||||
if (p instanceof EntityPlayerMP)
|
||||
((EntityPlayerMP) p).playerNetServerHandler.setPlayerLocation((double) x + 0.5D, (double) y,
|
||||
(double) z + 0.5D, p.rotationYaw, p.rotationPitch);
|
||||
w.playSoundAtEntity(p, "mob.endermen.portal", 5.0F, 1.0F);
|
||||
}
|
||||
try
|
||||
{
|
||||
p.addPotionEffect(new PotionEffect(Potion.confusion.id, 140, 1));
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
else if (dim != w.provider.dimensionId) HUDHandler
|
||||
.displayString(EnumChatFormatting.RED + StatCollector.translateToLocal("gatekey.invaliddim"), 300, false);
|
||||
else HUDHandler.displayString(EnumChatFormatting.RED + StatCollector.translateToLocal("gatekey.error"), 300, false);
|
||||
}
|
||||
return s;
|
||||
}
|
||||
}
|
||||
@@ -14,6 +14,7 @@ import net.minecraft.util.EnumChatFormatting;
|
||||
import net.minecraft.util.IIcon;
|
||||
import net.minecraft.util.StatCollector;
|
||||
import taintedmagic.common.TaintedMagic;
|
||||
import thaumcraft.common.config.ConfigItems;
|
||||
|
||||
public class ItemMaterial extends Item
|
||||
{
|
||||
@@ -51,13 +52,13 @@ public class ItemMaterial extends Item
|
||||
case 8 :
|
||||
return EnumRarity.uncommon;
|
||||
case 9 :
|
||||
return EnumRarity.uncommon;
|
||||
return EnumRarity.epic;
|
||||
case 10 :
|
||||
return EnumRarity.epic;
|
||||
case 11 :
|
||||
return EnumRarity.epic;
|
||||
case 12 :
|
||||
return TaintedMagic.rarityCreation;
|
||||
case 12:
|
||||
return EnumRarity.uncommon;
|
||||
}
|
||||
return EnumRarity.common;
|
||||
}
|
||||
@@ -82,8 +83,7 @@ public class ItemMaterial extends Item
|
||||
|
||||
if (s.getItemDamage() == 5)
|
||||
{
|
||||
l.add(EnumChatFormatting.DARK_PURPLE + StatCollector.translateToLocal("text.shard.1"));
|
||||
l.add(EnumChatFormatting.DARK_PURPLE + StatCollector.translateToLocal("text.shard.2"));
|
||||
l.add(EnumChatFormatting.LIGHT_PURPLE + StatCollector.translateToLocal("text.shard.1"));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,36 @@
|
||||
package taintedmagic.common.items;
|
||||
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.EnumRarity;
|
||||
import net.minecraft.item.ItemFood;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.DamageSource;
|
||||
import net.minecraft.world.World;
|
||||
import taintedmagic.common.TaintedMagic;
|
||||
|
||||
public class ItemNightshadeBerries extends ItemFood
|
||||
{
|
||||
public ItemNightshadeBerries (int i, float j, boolean k)
|
||||
{
|
||||
super(i, j, k);
|
||||
this.setCreativeTab(TaintedMagic.tabTaintedMagic);
|
||||
this.setUnlocalizedName("ItemNightshadeBerries");
|
||||
this.setTextureName("taintedmagic:ItemNightshadeBerries");
|
||||
this.setAlwaysEdible();
|
||||
}
|
||||
|
||||
@SideOnly (Side.CLIENT)
|
||||
public EnumRarity getRarity (ItemStack s)
|
||||
{
|
||||
return EnumRarity.uncommon;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onFoodEaten (ItemStack s, World w, EntityPlayer p)
|
||||
{
|
||||
super.onFoodEaten(s, w, p);
|
||||
if (!w.isRemote) p.attackEntityFrom(new DamageSource("nightshade"), Float.MAX_VALUE);
|
||||
}
|
||||
}
|
||||
@@ -19,93 +19,90 @@ import thaumcraft.client.fx.particles.FXSparkle;
|
||||
|
||||
public class ItemSalis extends Item
|
||||
{
|
||||
public int SUBTYPES = 2;
|
||||
public IIcon[] icons = new IIcon[SUBTYPES];
|
||||
public int SUBTYPES = 2;
|
||||
public IIcon[] icons = new IIcon[SUBTYPES];
|
||||
|
||||
public ItemSalis ()
|
||||
{
|
||||
this.setCreativeTab(TaintedMagic.tabTaintedMagic);
|
||||
this.hasSubtypes = true;
|
||||
this.setUnlocalizedName("ItemSalis");
|
||||
}
|
||||
public ItemSalis ()
|
||||
{
|
||||
this.setCreativeTab(TaintedMagic.tabTaintedMagic);
|
||||
this.hasSubtypes = true;
|
||||
this.setUnlocalizedName("ItemSalis");
|
||||
}
|
||||
|
||||
@Override
|
||||
public EnumRarity getRarity (ItemStack s)
|
||||
{
|
||||
return TaintedMagic.rarityCreation;
|
||||
}
|
||||
@Override
|
||||
public EnumRarity getRarity (ItemStack s)
|
||||
{
|
||||
return TaintedMagic.rarityCreation;
|
||||
}
|
||||
|
||||
@SideOnly (Side.CLIENT)
|
||||
public void registerIcons (IIconRegister ir)
|
||||
{
|
||||
for (int i = 0; i < icons.length; i++)
|
||||
this.icons[i] = ir.registerIcon("taintedmagic:ItemSalis" + i);
|
||||
}
|
||||
@SideOnly (Side.CLIENT)
|
||||
public void registerIcons (IIconRegister ir)
|
||||
{
|
||||
for (int i = 0; i < icons.length; i++)
|
||||
this.icons[i] = ir.registerIcon("taintedmagic:ItemSalis" + i);
|
||||
}
|
||||
|
||||
@SideOnly (Side.CLIENT)
|
||||
public IIcon getIconFromDamage (int i)
|
||||
{
|
||||
return this.icons[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));
|
||||
}
|
||||
@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();
|
||||
}
|
||||
public String getUnlocalizedName (ItemStack s)
|
||||
{
|
||||
return super.getUnlocalizedName() + "." + s.getItemDamage();
|
||||
}
|
||||
|
||||
@Override
|
||||
public ItemStack onItemRightClick (ItemStack s, World w, EntityPlayer p)
|
||||
{
|
||||
int m = s.getItemDamage();
|
||||
switch (m)
|
||||
{
|
||||
// Weather
|
||||
case 0 :
|
||||
{
|
||||
w.getWorldInfo().setRainTime(w.isRaining() ? 24000 : 0);
|
||||
w.getWorldInfo().setRaining(!w.isRaining());
|
||||
p.playSound("thaumcraft:wind", 0.3F, 1.0F + w.rand.nextFloat() * 0.5F);
|
||||
p.inventory.decrStackSize(p.inventory.currentItem, 1);
|
||||
for (int a = 0; a < 15; a++)
|
||||
{
|
||||
FXSparkle fx = new FXSparkle(w, p.posX + (w.rand.nextDouble() - w.rand.nextDouble()) * 0.2D, p.boundingBox.minY + 1.25D + (w.rand.nextDouble() - w.rand.nextDouble()) * 0.2D,
|
||||
p.posZ + (w.rand.nextDouble() - w.rand.nextDouble()) * 0.2D, 1.75F, 7, 3 + w.rand.nextInt(3));
|
||||
Vec3 look = p.getLookVec();
|
||||
fx.motionX += (look.xCoord * 0.25D) + w.rand.nextGaussian() * 0.0075D * 5.0D;
|
||||
fx.motionY += (look.yCoord * 0.25D) + w.rand.nextGaussian() * 0.0075D * 5.0D;
|
||||
fx.motionZ += (look.zCoord * 0.25D) + w.rand.nextGaussian() * 0.0075D * 5.0D;
|
||||
fx.setGravity(0.5F);
|
||||
ParticleEngine.instance.addEffect(w, fx);
|
||||
}
|
||||
return s;
|
||||
}
|
||||
// Time
|
||||
case 1 :
|
||||
{
|
||||
w.setWorldTime(w.isDaytime() ? 14000 : 24000);
|
||||
p.playSound("thaumcraft:wind", 0.3F, 1.0F + w.rand.nextFloat() * 0.5F);
|
||||
p.inventory.decrStackSize(p.inventory.currentItem, 1);
|
||||
for (int a = 0; a < 15; a++)
|
||||
{
|
||||
FXSparkle fx = new FXSparkle(w, p.posX + (w.rand.nextDouble() - w.rand.nextDouble()) * 0.2D, p.boundingBox.minY + 1.25D + (w.rand.nextDouble() - w.rand.nextDouble()) * 0.2D,
|
||||
p.posZ + (w.rand.nextDouble() - w.rand.nextDouble()) * 0.2D, 1.75F, 6, 3 + w.rand.nextInt(3));
|
||||
Vec3 look = p.getLookVec();
|
||||
fx.motionX += (look.xCoord * 0.25D) + w.rand.nextGaussian() * 0.0075D * 5.0D;
|
||||
fx.motionY += (look.yCoord * 0.25D) + w.rand.nextGaussian() * 0.0075D * 5.0D;
|
||||
fx.motionZ += (look.zCoord * 0.25D) + w.rand.nextGaussian() * 0.0075D * 5.0D;
|
||||
fx.setGravity(0.5F);
|
||||
ParticleEngine.instance.addEffect(w, fx);
|
||||
}
|
||||
return s;
|
||||
}
|
||||
}
|
||||
return s;
|
||||
}
|
||||
@Override
|
||||
public ItemStack onItemRightClick (ItemStack s, World w, EntityPlayer p)
|
||||
{
|
||||
int m = s.getItemDamage();
|
||||
switch (m)
|
||||
{
|
||||
// Weather
|
||||
case 0 :
|
||||
{
|
||||
w.getWorldInfo().setRainTime(w.isRaining() ? 24000 : 0);
|
||||
w.getWorldInfo().setRaining(!w.isRaining());
|
||||
p.playSound("thaumcraft:wind", 0.3F, 1.0F + w.rand.nextFloat() * 0.5F);
|
||||
throwParticles(w, p, 7);
|
||||
p.inventory.decrStackSize(p.inventory.currentItem, 1);
|
||||
return s;
|
||||
}
|
||||
// Time
|
||||
case 1 :
|
||||
{
|
||||
w.setWorldTime(w.isDaytime() ? 14000 : 24000);
|
||||
p.playSound("thaumcraft:wind", 0.3F, 1.0F + w.rand.nextFloat() * 0.5F);
|
||||
throwParticles(w, p, 6);
|
||||
p.inventory.decrStackSize(p.inventory.currentItem, 1);
|
||||
return s;
|
||||
}
|
||||
}
|
||||
return s;
|
||||
}
|
||||
|
||||
@SideOnly (Side.CLIENT)
|
||||
private void throwParticles (World w, EntityPlayer p, int colour)
|
||||
{
|
||||
for (int a = 0; a < 15; a++)
|
||||
{
|
||||
FXSparkle fx = new FXSparkle(w, p.posX + (w.rand.nextDouble() - w.rand.nextDouble()) * 0.2D,
|
||||
p.boundingBox.minY + 1.25D + (w.rand.nextDouble() - w.rand.nextDouble()) * 0.2D,
|
||||
p.posZ + (w.rand.nextDouble() - w.rand.nextDouble()) * 0.2D, 1.75F, colour, 3 + w.rand.nextInt(3));
|
||||
Vec3 look = p.getLookVec();
|
||||
fx.motionX += (look.xCoord * 0.5D) + (w.rand.nextGaussian() * 0.05D);
|
||||
fx.motionY += (look.yCoord * 0.5D) + (w.rand.nextGaussian() * 0.05D);
|
||||
fx.motionZ += (look.zCoord * 0.5D) + (w.rand.nextGaussian() * 0.05D);
|
||||
fx.setGravity(0.5F);
|
||||
ParticleEngine.instance.addEffect(w, fx);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -3,13 +3,19 @@ package taintedmagic.common.items;
|
||||
import cpw.mods.fml.common.registry.GameRegistry;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
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.ItemFood;
|
||||
import net.minecraft.item.ItemPotion;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.oredict.RecipeSorter;
|
||||
import net.minecraftforge.oredict.RecipeSorter.Category;
|
||||
import taintedmagic.api.RecipeVoidsentBlood;
|
||||
import taintedmagic.common.TaintedMagic;
|
||||
import thaumcraft.common.config.ConfigItems;
|
||||
|
||||
public class ItemVoidsentBlood extends Item
|
||||
{
|
||||
@@ -18,14 +24,15 @@ public class ItemVoidsentBlood extends Item
|
||||
this.setCreativeTab(TaintedMagic.tabTaintedMagic);
|
||||
this.setTextureName("taintedmagic:ItemVoidsentBlood");
|
||||
this.setUnlocalizedName("ItemVoidsentBlood");
|
||||
this.setContainerItem(ConfigItems.itemEssence);
|
||||
|
||||
GameRegistry.addRecipe(new RecipeVoidsentBlood());
|
||||
RecipeSorter.register("taintedmagic:ItemVoidsentBlood", RecipeVoidsentBlood.class, Category.SHAPELESS, "");
|
||||
}
|
||||
|
||||
|
||||
@SideOnly (Side.CLIENT)
|
||||
public EnumRarity getRarity (ItemStack s)
|
||||
{
|
||||
return EnumRarity.uncommon;
|
||||
return EnumRarity.rare;
|
||||
}
|
||||
}
|
||||
@@ -3,6 +3,8 @@ package taintedmagic.common.items.equipment;
|
||||
import java.util.List;
|
||||
|
||||
import cpw.mods.fml.common.eventhandler.SubscribeEvent;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
@@ -28,148 +30,158 @@ import thaumcraft.client.fx.particles.FXWispEG;
|
||||
import thaumcraft.common.Thaumcraft;
|
||||
import thaumcraft.common.items.armor.Hover;
|
||||
|
||||
public class ItemVoidwalkerBoots extends ItemArmor implements IVisDiscountGear, IWarpingGear, IRunicArmor, IRepairable, ISpecialArmor
|
||||
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");
|
||||
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);
|
||||
}
|
||||
MinecraftForge.EVENT_BUS.register(this);
|
||||
}
|
||||
|
||||
public String getArmorTexture (ItemStack s, Entity e, int slot, String t)
|
||||
{
|
||||
return "taintedmagic:textures/models/ModelVoidwalkerBoots.png";
|
||||
}
|
||||
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;
|
||||
}
|
||||
public EnumRarity getRarity (ItemStack s)
|
||||
{
|
||||
return EnumRarity.epic;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getRunicCharge (ItemStack s)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
@Override
|
||||
public int getRunicCharge (ItemStack s)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getWarp (ItemStack s, EntityPlayer p)
|
||||
{
|
||||
return 5;
|
||||
}
|
||||
@Override
|
||||
public int getWarp (ItemStack s, EntityPlayer p)
|
||||
{
|
||||
return 5;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getVisDiscount (ItemStack s, EntityPlayer p, Aspect a)
|
||||
{
|
||||
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;
|
||||
@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());
|
||||
}
|
||||
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 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 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)
|
||||
{
|
||||
l.add(EnumChatFormatting.DARK_PURPLE + StatCollector.translateToLocal("tc.visdiscount") + ": " + getVisDiscount(s, p, null) + "%");
|
||||
}
|
||||
@Override
|
||||
public void addInformation (ItemStack s, EntityPlayer p, List l, boolean b)
|
||||
{
|
||||
l.add(EnumChatFormatting.DARK_PURPLE + StatCollector.translateToLocal("tc.visdiscount") + ": "
|
||||
+ getVisDiscount(s, p, null) + "%");
|
||||
}
|
||||
|
||||
public void onUpdate (ItemStack s, World w, Entity e, int j, boolean k)
|
||||
{
|
||||
super.onUpdate(s, w, e, j, k);
|
||||
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);
|
||||
}
|
||||
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);
|
||||
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);
|
||||
|
||||
double motion = Math.abs(p.motionX) + Math.abs(p.motionZ) + Math.abs(0.5 * p.motionY);
|
||||
if ( w.isRemote && (motion > .1D || !p.onGround) && w.rand.nextInt(5) == 0)
|
||||
{
|
||||
FXWispEG ef = new FXWispEG(w, (double) (p.posX + ( (Math.random() - Math.random()) * 0.5F)), (double) (p.boundingBox.minY + .05F + ( (Math.random() - Math.random()) * 0.1F)), (double) (p.posZ + ( (Math.random() - Math.random()) * 0.5F)), p);
|
||||
ParticleEngine.instance.addEffect(w, ef);
|
||||
}
|
||||
double motion = Math.abs(p.motionX) + Math.abs(p.motionZ) + Math.abs(0.5 * p.motionY);
|
||||
if (w.isRemote && (motion > .1D || !p.onGround) && w.rand.nextInt(5) == 0) particles(w, 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.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;
|
||||
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 > 3.0F) p.fallDistance = 0.0F;
|
||||
}
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
p.jumpMovementFactor = 0.05F;
|
||||
}
|
||||
}
|
||||
if (p.fallDistance > 3.0F) p.fallDistance = 0.0F;
|
||||
}
|
||||
@SubscribeEvent
|
||||
public void playerJumps (LivingEvent.LivingJumpEvent event)
|
||||
{
|
||||
if (event.entity instanceof EntityPlayer)
|
||||
{
|
||||
EntityPlayer player = (EntityPlayer) event.entity;
|
||||
|
||||
@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;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (player.inventory.armorItemInSlot(0) != null && player.inventory.armorItemInSlot(0).getItem() == ItemRegistry.ItemVoidwalkerBoots)
|
||||
{
|
||||
event.entityLiving.motionY += 0.35D;
|
||||
}
|
||||
}
|
||||
}
|
||||
@SideOnly (Side.CLIENT)
|
||||
private void particles (World w, EntityPlayer p)
|
||||
{
|
||||
FXWispEG ef = new FXWispEG(w, (double) (p.posX + ( (Math.random() - Math.random()) * 0.5F)),
|
||||
(double) (p.boundingBox.minY + .05F + ( (Math.random() - Math.random()) * 0.1F)),
|
||||
(double) (p.posZ + ( (Math.random() - Math.random()) * 0.5F)), p);
|
||||
ParticleEngine.instance.addEffect(w, ef);
|
||||
}
|
||||
}
|
||||
@@ -12,10 +12,12 @@ 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 taintedmagic.client.handler.HUDHandler;
|
||||
import taintedmagic.common.TaintedMagic;
|
||||
import thaumcraft.api.IRunicArmor;
|
||||
import thaumcraft.api.IWarpingGear;
|
||||
@@ -89,7 +91,7 @@ public class ItemVoidwalkerSash extends ItemRunic implements IRunicArmor, IWarpi
|
||||
|
||||
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"));
|
||||
l.add( (hasSpeedBoost(s) ? EnumChatFormatting.GREEN : EnumChatFormatting.RED) + StatCollector.translateToLocal("text.sash.mode"));
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -113,7 +115,7 @@ public class ItemVoidwalkerSash extends ItemRunic implements IRunicArmor, IWarpi
|
||||
|
||||
if (p.onGround || p.capabilities.isFlying)
|
||||
{
|
||||
float bonus = 0.4F;
|
||||
float bonus = 0.25F;
|
||||
p.moveFlying(0.0F, 1.0F, p.capabilities.isFlying ? (bonus - 0.050F) : bonus);
|
||||
}
|
||||
else if (Hover.getHover(p.getEntityId()))
|
||||
@@ -162,7 +164,12 @@ public class ItemVoidwalkerSash extends ItemRunic implements IRunicArmor, IWarpi
|
||||
s.setTagCompound(new NBTTagCompound());
|
||||
s.stackTagCompound.setBoolean(TAG_MODE, false);
|
||||
}
|
||||
if (s.stackTagCompound != null) s.stackTagCompound.setBoolean(TAG_MODE, !s.stackTagCompound.getBoolean(TAG_MODE));
|
||||
if (s.stackTagCompound != null)
|
||||
{
|
||||
s.stackTagCompound.setBoolean(TAG_MODE, !s.stackTagCompound.getBoolean(TAG_MODE));
|
||||
HUDHandler.displayString( (hasSpeedBoost(s) ? EnumChatFormatting.GREEN : EnumChatFormatting.RED) + StatCollector.translateToLocal("text.sash.mode") + " "
|
||||
+ StatCollector.translateToLocal(hasSpeedBoost(s) ? "text.sash.on" : "text.sash.off"), 300, true);
|
||||
}
|
||||
}
|
||||
return s;
|
||||
}
|
||||
|
||||
@@ -14,39 +14,39 @@ import net.minecraft.client.gui.ScaledResolution;
|
||||
import net.minecraft.client.renderer.OpenGlHelper;
|
||||
import net.minecraft.client.renderer.Tessellator;
|
||||
import net.minecraft.creativetab.CreativeTabs;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
import net.minecraft.entity.SharedMonsterAttributes;
|
||||
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.nbt.NBTTagCompound;
|
||||
import net.minecraft.potion.Potion;
|
||||
import net.minecraft.potion.PotionEffect;
|
||||
import net.minecraft.server.MinecraftServer;
|
||||
import net.minecraft.util.AxisAlignedBB;
|
||||
import net.minecraft.util.DamageSource;
|
||||
import net.minecraft.util.EnumChatFormatting;
|
||||
import net.minecraft.util.MathHelper;
|
||||
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 taintedmagic.api.IHeldItemHUD;
|
||||
import taintedmagic.api.IRenderInventoryItem;
|
||||
import taintedmagic.client.model.ModelKatana;
|
||||
import taintedmagic.client.model.ModelSaya;
|
||||
import taintedmagic.common.TaintedMagic;
|
||||
import taintedmagic.common.helper.TaintedMagicHelper;
|
||||
import taintedmagic.common.items.wand.foci.ItemFocusShockwave;
|
||||
import taintedmagic.common.network.PacketHandler;
|
||||
import taintedmagic.common.network.PacketKatanaAttack;
|
||||
import thaumcraft.api.IRepairable;
|
||||
import thaumcraft.api.IWarpingGear;
|
||||
import thaumcraft.client.lib.UtilsFX;
|
||||
import thaumcraft.codechicken.lib.vec.Vector3;
|
||||
import thaumcraft.common.config.Config;
|
||||
import thaumcraft.common.entities.monster.EntityTaintSwarm;
|
||||
import thaumcraft.common.entities.projectile.EntityExplosiveOrb;
|
||||
import thaumcraft.common.lib.utils.EntityUtils;
|
||||
|
||||
public class ItemKatana extends Item implements IWarpingGear, IRepairable, IRenderInventoryItem, IHeldItemHUD
|
||||
{
|
||||
@@ -106,7 +106,7 @@ public class ItemKatana extends Item implements IWarpingGear, IRepairable, IRend
|
||||
|
||||
try
|
||||
{
|
||||
e.addPotionEffect(new PotionEffect(Config.potionTaintPoisonID, 100));
|
||||
e.addPotionEffect(new PotionEffect(Potion.weakness.id, 160));
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
@@ -190,7 +190,7 @@ public class ItemKatana extends Item implements IWarpingGear, IRepairable, IRend
|
||||
case 0 :
|
||||
return 14.25F;
|
||||
case 1 :
|
||||
return 17.55F;
|
||||
return 17.5F;
|
||||
case 2 :
|
||||
return 20.75F;
|
||||
}
|
||||
@@ -259,19 +259,25 @@ public class ItemKatana extends Item implements IWarpingGear, IRepairable, IRend
|
||||
}
|
||||
case 1 :
|
||||
{
|
||||
Entity look = EntityUtils.getPointedEntity(w, p, 0.0D, 32.0D, 1.1F);
|
||||
if (look != null && look instanceof EntityLivingBase)
|
||||
List<EntityLivingBase> ents = w
|
||||
.getEntitiesWithinAABB(EntityLivingBase.class, AxisAlignedBB.getBoundingBox(p.posX, p.posY, p.posZ, p.posX + 1, p.posY + 1, p.posZ + 1).expand(10.0D, 10.0D, 10.0D));
|
||||
if (ents != null && ents.size() > 0)
|
||||
{
|
||||
EntityTaintSwarm e = new EntityTaintSwarm(w);
|
||||
Vec3 v = p.getLookVec();
|
||||
e.setLocationAndAngles(p.posX + v.xCoord / 2.0D, p.posY + p.getEyeHeight() + v.yCoord / 2.0D, p.posZ + v.zCoord / 2.0D, p.rotationYaw, p.rotationPitch);
|
||||
e.getEntityAttribute(SharedMonsterAttributes.maxHealth).setBaseValue(this.getAttackDamage(s) * 2);
|
||||
e.getEntityAttribute(SharedMonsterAttributes.attackDamage).setBaseValue(this.getAttackDamage(s));
|
||||
e.setTarget(look);
|
||||
e.setIsSummoned(true);
|
||||
if (!w.isRemote) w.spawnEntityInWorld(e);
|
||||
for (int a = 0; a < ents.size(); a++)
|
||||
{
|
||||
EntityLivingBase e = ents.get(a);
|
||||
|
||||
if (e != p && e.isEntityAlive() && !e.isEntityInvulnerable())
|
||||
{
|
||||
double dist = TaintedMagicHelper.getDistanceTo(e.posX, e.posY, e.posZ, p);
|
||||
e.attackEntityFrom(DamageSource.magic, getAttackDamage(s) * 0.25F);
|
||||
Vector3 movement = TaintedMagicHelper.getVectorBetweenEntities(e, p);
|
||||
e.addVelocity(movement.x * 5.0D, 1.5D, movement.z * 5.0D);
|
||||
if (w.isRemote) ItemFocusShockwave.spawnParticles(w, p, e);
|
||||
}
|
||||
}
|
||||
}
|
||||
w.playSoundAtEntity(p, "taintedmagic:shockwave", 5.0F, 1.5F * (float) Math.random());
|
||||
p.swingItem();
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -19,15 +19,17 @@ import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.util.DamageSource;
|
||||
import net.minecraft.util.EnumChatFormatting;
|
||||
import net.minecraft.util.StatCollector;
|
||||
import net.minecraft.world.World;
|
||||
import taintedmagic.api.IHeldItemHUD;
|
||||
import taintedmagic.client.handler.HUDHandler;
|
||||
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 implements IHeldItemHUD
|
||||
public class ItemThaumicDisassembler extends Item
|
||||
{
|
||||
public static final String TAG_MODE = "mode";
|
||||
public static List<Integer> data = new ArrayList<Integer>();
|
||||
@@ -52,8 +54,8 @@ public class ItemThaumicDisassembler extends Item implements IHeldItemHUD
|
||||
{
|
||||
super.addInformation(s, p, l, b);
|
||||
|
||||
l.add("\u00A78" + StatCollector.translateToLocal("text.disassembler.mode") + ": " + getModeName(s));
|
||||
l.add("\u00A78" + StatCollector.translateToLocal("text.disassembler.efficiency") + ": " + (getMode(s) == 3 ? "\u00A7c" : "\u00A7a") + getEfficiency(s));
|
||||
l.add(StatCollector.translateToLocal("text.disassembler.mode") + ": " + getModeName(s));
|
||||
l.add(StatCollector.translateToLocal("text.disassembler.efficiency") + ": " + (getMode(s) == 3 ? "\u00A7c" : "\u00A7a") + getEfficiency(s));
|
||||
l.add(" ");
|
||||
l.add("\u00A79" + "+20 " + StatCollector.translateToLocal("text.attackdamage"));
|
||||
}
|
||||
@@ -111,7 +113,16 @@ public class ItemThaumicDisassembler extends Item implements IHeldItemHUD
|
||||
@Override
|
||||
public ItemStack onItemRightClick (ItemStack s, World w, EntityPlayer p)
|
||||
{
|
||||
if (!w.isRemote && p.isSneaking()) toggleMode(s);
|
||||
if (!w.isRemote && p.isSneaking())
|
||||
{
|
||||
if (s.stackTagCompound == null) s.setTagCompound(new NBTTagCompound());
|
||||
s.stackTagCompound.setInteger(TAG_MODE, getMode(s) < 3 ? getMode(s) + 1 : 0);
|
||||
|
||||
int mode = getMode(s);
|
||||
String str = EnumChatFormatting.GRAY + StatCollector.translateToLocal("text.disassembler.mode") + ": " + getModeName(mode) + (mode == 3 ? "\u00A7c" : "\u00A7a") + " ("
|
||||
+ getEfficiency(mode) + ")";
|
||||
HUDHandler.displayString(str, 300, false);
|
||||
}
|
||||
|
||||
return s;
|
||||
}
|
||||
@@ -164,12 +175,6 @@ public class ItemThaumicDisassembler extends Item implements IHeldItemHUD
|
||||
return getModeName(getMode(s));
|
||||
}
|
||||
|
||||
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);
|
||||
@@ -182,42 +187,4 @@ public class ItemThaumicDisassembler extends Item implements IHeldItemHUD
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void renderHUD (ScaledResolution res, EntityPlayer p, ItemStack s, float partialTicks, float fract)
|
||||
{
|
||||
if (data.isEmpty())
|
||||
{
|
||||
data.add(getMode(s));
|
||||
}
|
||||
|
||||
if (!data.isEmpty() && getMode(s) != data.get(0))
|
||||
{
|
||||
data.clear();
|
||||
data.add(getMode(s));
|
||||
}
|
||||
|
||||
int mode = data.get(0);
|
||||
String str = "\u00A78" + StatCollector.translateToLocal("text.disassembler.mode") + ": " + getModeName(mode) + (mode == 3 ? "\u00A7c" : "\u00A7a") + " (" + getEfficiency(mode) + ")";
|
||||
|
||||
GL11.glPushMatrix();
|
||||
|
||||
GL11.glEnable(GL11.GL_BLEND);
|
||||
GL11.glEnable(GL12.GL_RESCALE_NORMAL);
|
||||
|
||||
GL11.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA);
|
||||
|
||||
GL11.glTranslated(40.0F, -15.0F, 0.0F);
|
||||
GL11.glTranslatef(-fract * 40.0F, 0.0F, 0.0F);
|
||||
|
||||
GL11.glScalef(0.8F, 0.8F, 0.8F);
|
||||
|
||||
FontRenderer f = Minecraft.getMinecraft().fontRenderer;
|
||||
f.drawStringWithShadow(str, res.getScaledWidth() / 2 + 100, res.getScaledHeight() / 2 + (p.capabilities.isCreativeMode ? 230 : 212), 0xFFFFFF);
|
||||
|
||||
GL11.glDisable(GL11.GL_BLEND);
|
||||
GL11.glDisable(GL12.GL_RESCALE_NORMAL);
|
||||
|
||||
GL11.glPopMatrix();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,6 +1,7 @@
|
||||
package taintedmagic.common.items.wand.foci;
|
||||
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
import taintedmagic.common.handler.ConfigHandler;
|
||||
import thaumcraft.api.aspects.Aspect;
|
||||
import thaumcraft.api.aspects.AspectList;
|
||||
import thaumcraft.api.wands.FocusUpgradeType;
|
||||
@@ -15,20 +16,20 @@ public class FocusUpgrades
|
||||
|
||||
public static void init ()
|
||||
{
|
||||
int idx = 63;
|
||||
sanity = new FocusUpgradeType(idx++, new ResourceLocation("taintedmagic:textures/foci/IconSanity.png"), "focus.upgrade.sanity.name", "focus.upgrade.sanity.text",
|
||||
int id = ConfigHandler.FOCUS_UPGRADES_START_ID;
|
||||
sanity = new FocusUpgradeType(id, new ResourceLocation("taintedmagic:textures/foci/IconSanity.png"), "focus.upgrade.sanity.name", "focus.upgrade.sanity.text",
|
||||
new AspectList().add(Aspect.MIND, 1).add(Aspect.HEAL, 1));
|
||||
|
||||
antibody = new FocusUpgradeType(idx++, new ResourceLocation("taintedmagic:textures/foci/IconAntibody.png"), "focus.upgrade.antibody.name", "focus.upgrade.antibody.text",
|
||||
antibody = new FocusUpgradeType(id++, new ResourceLocation("taintedmagic:textures/foci/IconAntibody.png"), "focus.upgrade.antibody.name", "focus.upgrade.antibody.text",
|
||||
new AspectList().add(Aspect.TAINT, 1).add(Aspect.HEAL, 1));
|
||||
|
||||
corrosive = new FocusUpgradeType(idx++, new ResourceLocation("taintedmagic:textures/foci/IconCorrosive.png"), "focus.upgrade.corrosive.name", "focus.upgrade.corrosive.text",
|
||||
corrosive = new FocusUpgradeType(id++, new ResourceLocation("taintedmagic:textures/foci/IconCorrosive.png"), "focus.upgrade.corrosive.name", "focus.upgrade.corrosive.text",
|
||||
new AspectList().add(Aspect.TAINT, 1).add(Aspect.POISON, 1));
|
||||
|
||||
persistent = new FocusUpgradeType(idx++, new ResourceLocation("taintedmagic:textures/foci/IconPersistent.png"), "focus.upgrade.persistent.name", "focus.upgrade.persistent.text",
|
||||
persistent = new FocusUpgradeType(id++, new ResourceLocation("taintedmagic:textures/foci/IconPersistent.png"), "focus.upgrade.persistent.name", "focus.upgrade.persistent.text",
|
||||
new AspectList().add(Aspect.ARMOR, 1).add(Aspect.MOTION, 1).add(Aspect.ENERGY, 1));
|
||||
|
||||
diffusion = new FocusUpgradeType(idx++, new ResourceLocation("taintedmagic:textures/foci/IconDiffusion.png"), "focus.upgrade.diffusion.name", "focus.upgrade.diffusion.text",
|
||||
diffusion = new FocusUpgradeType(id++, new ResourceLocation("taintedmagic:textures/foci/IconDiffusion.png"), "focus.upgrade.diffusion.name", "focus.upgrade.diffusion.text",
|
||||
new AspectList().add(Aspect.DARKNESS, 1).add(Aspect.ELDRITCH, 2).add(Aspect.AURA, 4));
|
||||
}
|
||||
}
|
||||
@@ -1,20 +1,30 @@
|
||||
package taintedmagic.common.items.wand.foci;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import net.minecraft.client.renderer.OpenGlHelper;
|
||||
import net.minecraft.client.renderer.Tessellator;
|
||||
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.nbt.NBTTagCompound;
|
||||
import net.minecraft.util.IIcon;
|
||||
import net.minecraft.util.MovingObjectPosition;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
import net.minecraft.world.World;
|
||||
import taintedmagic.api.IRenderInventoryItem;
|
||||
import taintedmagic.common.TaintedMagic;
|
||||
import taintedmagic.common.entities.EntityDarkMatter;
|
||||
import taintedmagic.common.entities.EntityDiffusion;
|
||||
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 thaumcraft.client.lib.UtilsFX;
|
||||
import thaumcraft.common.Thaumcraft;
|
||||
import thaumcraft.common.items.wands.ItemWandCasting;
|
||||
|
||||
@@ -179,4 +189,9 @@ public class ItemFocusDarkMatter extends ItemFocusBasic
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
public boolean canApplyUpgrade (ItemStack s, EntityPlayer p, FocusUpgradeType t, int rank)
|
||||
{
|
||||
return (!t.equals(FocusUpgrades.diffusion)) || (ThaumcraftApiHelper.isResearchComplete(p.getCommandSenderName(), "DIFFUSIONUPGRADE"));
|
||||
}
|
||||
}
|
||||
@@ -13,6 +13,7 @@ import net.minecraft.util.MovingObjectPosition;
|
||||
import net.minecraft.util.StatCollector;
|
||||
import net.minecraft.world.World;
|
||||
import taintedmagic.common.TaintedMagic;
|
||||
import taintedmagic.common.handler.ConfigHandler;
|
||||
import thaumcraft.api.aspects.Aspect;
|
||||
import thaumcraft.api.aspects.AspectList;
|
||||
import thaumcraft.api.wands.FocusUpgradeType;
|
||||
@@ -68,7 +69,7 @@ public class ItemFocusMageMace extends ItemFocusBasic
|
||||
|
||||
public int getFocusColor (ItemStack s)
|
||||
{
|
||||
return 0x5F6166;
|
||||
return 0xACA9B5;
|
||||
}
|
||||
|
||||
public AspectList getVisCost (ItemStack s)
|
||||
@@ -101,7 +102,7 @@ public class ItemFocusMageMace extends ItemFocusBasic
|
||||
{
|
||||
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") + " "
|
||||
l.add(EnumChatFormatting.BLUE + "+" + String.valueOf(ConfigHandler.MAGE_MACE_DMG_INC_BASE + (double) this.getUpgradeLevel(s, FocusUpgradeType.potency)) + " "
|
||||
+ StatCollector.translateToLocal("text.attackdamageequipped"));
|
||||
}
|
||||
|
||||
|
||||
@@ -86,7 +86,8 @@ public class ItemFocusShockwave extends ItemFocusBasic
|
||||
{
|
||||
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"));
|
||||
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)
|
||||
@@ -96,7 +97,8 @@ public class ItemFocusShockwave extends ItemFocusBasic
|
||||
int pot = wand.getFocusPotency(s);
|
||||
if (wand.consumeAllVis(s, p, getVisCost(s), true, false))
|
||||
{
|
||||
List<EntityLivingBase> ents = w.getEntitiesWithinAABB(EntityLivingBase.class, AxisAlignedBB.getBoundingBox(p.posX, p.posY, p.posZ, p.posX + 1, p.posY + 1, p.posZ + 1).expand(15.0D + this.getUpgradeLevel(s, FocusUpgradeType.enlarge), 15.0D + this.getUpgradeLevel(s, FocusUpgradeType.enlarge), 15.0D + this.getUpgradeLevel(s, FocusUpgradeType.enlarge)));
|
||||
List<EntityLivingBase> ents = w.getEntitiesWithinAABB(EntityLivingBase.class, AxisAlignedBB.getBoundingBox(p.posX, p.posY, p.posZ, p.posX + 1, p.posY + 1, p.posZ + 1).expand(15.0D
|
||||
+ this.getUpgradeLevel(s, FocusUpgradeType.enlarge), 15.0D + this.getUpgradeLevel(s, FocusUpgradeType.enlarge), 15.0D + this.getUpgradeLevel(s, FocusUpgradeType.enlarge)));
|
||||
if (ents != null && ents.size() > 0)
|
||||
{
|
||||
for (int a = 0; a < ents.size(); a++)
|
||||
@@ -106,9 +108,10 @@ public class ItemFocusShockwave extends ItemFocusBasic
|
||||
if (e != p && e.isEntityAlive() && !e.isEntityInvulnerable())
|
||||
{
|
||||
double dist = TaintedMagicHelper.getDistanceTo(e.posX, e.posY, e.posZ, p);
|
||||
if (dist < 7.0D) e.attackEntityFrom(DamageSource.magic, 2.0F);
|
||||
if (dist < 7.0D) e.attackEntityFrom(DamageSource.magic, 2.0F + this.getUpgradeLevel(s, FocusUpgradeType.potency));
|
||||
Vector3 movement = TaintedMagicHelper.getVectorBetweenEntities(e, p);
|
||||
e.addVelocity(movement.x * 5.0D, 1.5D, movement.z * 5.0D);
|
||||
e.addVelocity(movement.x * (5.0D + this.getUpgradeLevel(s, FocusUpgradeType.potency)), 1.5D + (this.getUpgradeLevel(s, FocusUpgradeType.potency) * 0.1D), movement.z
|
||||
* (5.0D + this.getUpgradeLevel(s, FocusUpgradeType.potency)));
|
||||
if (w.isRemote) spawnParticles(w, p, e);
|
||||
}
|
||||
}
|
||||
@@ -120,7 +123,7 @@ public class ItemFocusShockwave extends ItemFocusBasic
|
||||
}
|
||||
|
||||
@SideOnly (Side.CLIENT)
|
||||
public void spawnParticles (World w, EntityPlayer p, Entity e)
|
||||
public static void spawnParticles (World w, EntityPlayer p, Entity e)
|
||||
{
|
||||
FXLightningBolt bolt = new FXLightningBolt(w, p, e, w.rand.nextLong(), 4);
|
||||
|
||||
@@ -130,7 +133,8 @@ public class ItemFocusShockwave extends ItemFocusBasic
|
||||
bolt.finalizeBolt();
|
||||
for (int a = 0; a < 5; a++)
|
||||
{
|
||||
Thaumcraft.proxy.sparkle((float) e.posX + (p.worldObj.rand.nextFloat() - p.worldObj.rand.nextFloat()) * 0.6F, (float) e.posY + (p.worldObj.rand.nextFloat() - p.worldObj.rand.nextFloat()) * 0.6F, (float) e.posZ + (p.worldObj.rand.nextFloat() - p.worldObj.rand.nextFloat()) * 0.6F, 2.0F + p.worldObj.rand.nextFloat(), 2, 0.05F + p.worldObj.rand.nextFloat() * 0.05F);
|
||||
Thaumcraft.proxy.sparkle((float) e.posX + (p.worldObj.rand.nextFloat() - p.worldObj.rand.nextFloat()) * 0.6F, (float) e.posY + (p.worldObj.rand.nextFloat() - p.worldObj.rand.nextFloat())
|
||||
* 0.6F, (float) e.posZ + (p.worldObj.rand.nextFloat() - p.worldObj.rand.nextFloat()) * 0.6F, 2.0F + p.worldObj.rand.nextFloat(), 2, 0.05F + p.worldObj.rand.nextFloat() * 0.05F);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -139,15 +143,15 @@ public class ItemFocusShockwave extends ItemFocusBasic
|
||||
switch (rank)
|
||||
{
|
||||
case 1 :
|
||||
return new FocusUpgradeType[]{ FocusUpgradeType.frugal, FocusUpgradeType.enlarge };
|
||||
return new FocusUpgradeType[]{ FocusUpgradeType.frugal, FocusUpgradeType.enlarge, FocusUpgradeType.potency };
|
||||
case 2 :
|
||||
return new FocusUpgradeType[]{ FocusUpgradeType.frugal, FocusUpgradeType.enlarge };
|
||||
return new FocusUpgradeType[]{ FocusUpgradeType.frugal, FocusUpgradeType.enlarge, FocusUpgradeType.potency };
|
||||
case 3 :
|
||||
return new FocusUpgradeType[]{ FocusUpgradeType.frugal, FocusUpgradeType.enlarge };
|
||||
return new FocusUpgradeType[]{ FocusUpgradeType.frugal, FocusUpgradeType.enlarge, FocusUpgradeType.potency };
|
||||
case 4 :
|
||||
return new FocusUpgradeType[]{ FocusUpgradeType.frugal, FocusUpgradeType.enlarge };
|
||||
return new FocusUpgradeType[]{ FocusUpgradeType.frugal, FocusUpgradeType.enlarge, FocusUpgradeType.potency };
|
||||
case 5 :
|
||||
return new FocusUpgradeType[]{ FocusUpgradeType.frugal, FocusUpgradeType.enlarge };
|
||||
return new FocusUpgradeType[]{ FocusUpgradeType.frugal, FocusUpgradeType.enlarge, FocusUpgradeType.potency };
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
@@ -12,6 +12,7 @@ public class LibToolMaterials
|
||||
|
||||
public static ArmorMaterial armorMatShadow = EnumHelper.addArmorMaterial("SHADOW", 800, new int[]{ 4, 8, 6, 2 }, 25);
|
||||
public static ArmorMaterial armorMatSpecial = EnumHelper.addArmorMaterial("SPECIAL", 500, 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);
|
||||
}
|
||||
@@ -7,11 +7,10 @@ import taintedmagic.common.lib.LibInfo;
|
||||
|
||||
public class PacketHandler
|
||||
{
|
||||
public static final SimpleNetworkWrapper INSTANCE = NetworkRegistry.INSTANCE.newSimpleChannel(LibInfo.MODID.toLowerCase());
|
||||
public static final SimpleNetworkWrapper INSTANCE = NetworkRegistry.INSTANCE.newSimpleChannel(LibInfo.MODID.toLowerCase());
|
||||
|
||||
public static void init ()
|
||||
{
|
||||
int idx = 0;
|
||||
INSTANCE.registerMessage(PacketKatanaAttack.class, PacketKatanaAttack.class, idx++, Side.SERVER);
|
||||
}
|
||||
public static void init ()
|
||||
{
|
||||
INSTANCE.registerMessage(PacketKatanaAttack.class, PacketKatanaAttack.class, 0, Side.SERVER);
|
||||
}
|
||||
}
|
||||
@@ -3,6 +3,7 @@ package taintedmagic.common.registry;
|
||||
import cpw.mods.fml.common.registry.GameRegistry;
|
||||
import net.minecraft.block.Block;
|
||||
import taintedmagic.common.blocks.BlockLumos;
|
||||
import taintedmagic.common.blocks.BlockNightshadeBush;
|
||||
import taintedmagic.common.blocks.BlockShadowOre;
|
||||
import taintedmagic.common.blocks.BlockShadowmetal;
|
||||
import taintedmagic.common.blocks.BlockWarpwoodLeaves;
|
||||
@@ -15,43 +16,6 @@ import taintedmagic.common.items.blocks.ItemBlockWarpwoodSapling;
|
||||
|
||||
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");
|
||||
|
||||
// Lumos sparkles
|
||||
BlockLumos = new BlockLumos();
|
||||
GameRegistry.registerBlock(BlockLumos, "BlockLumos");
|
||||
}
|
||||
|
||||
public static void initTiles ()
|
||||
{
|
||||
// Lumos
|
||||
GameRegistry.registerTileEntity(TileLumos.class, "TileLumos");
|
||||
}
|
||||
|
||||
public static Block BlockShadowOre;
|
||||
public static Block BlockWarpwoodLog;
|
||||
public static Block BlockWarpwoodLeaves;
|
||||
@@ -59,4 +23,37 @@ public class BlockRegistry
|
||||
public static Block BlockShadowmetal;
|
||||
public static Block BlockWarpwoodPlanks;
|
||||
public static Block BlockLumos;
|
||||
public static Block BlockNightshadeBush;
|
||||
|
||||
public static void init ()
|
||||
{
|
||||
BlockShadowOre = new BlockShadowOre();
|
||||
GameRegistry.registerBlock(BlockShadowOre, ItemBlockShadowOre.class, "BlockShadowOre");
|
||||
|
||||
BlockWarpwoodLog = new BlockWarpwoodLog();
|
||||
GameRegistry.registerBlock(BlockWarpwoodLog, "BlockWarpwoodLog");
|
||||
|
||||
BlockShadowmetal = new BlockShadowmetal();
|
||||
GameRegistry.registerBlock(BlockShadowmetal, "BlockShadowmetal");
|
||||
|
||||
BlockWarpwoodPlanks = new BlockWarpwoodPlanks();
|
||||
GameRegistry.registerBlock(BlockWarpwoodPlanks, "BlockWarpwoodPlanks");
|
||||
|
||||
BlockWarpwoodLeaves = new BlockWarpwoodLeaves();
|
||||
GameRegistry.registerBlock(BlockWarpwoodLeaves, "BlockWarpwoodLeaves");
|
||||
|
||||
BlockWarpwoodSapling = new BlockWarpwoodSapling();
|
||||
GameRegistry.registerBlock(BlockWarpwoodSapling, ItemBlockWarpwoodSapling.class, "BlockWarpwoodSapling");
|
||||
|
||||
BlockLumos = new BlockLumos();
|
||||
GameRegistry.registerBlock(BlockLumos, "BlockLumos");
|
||||
|
||||
BlockNightshadeBush = new BlockNightshadeBush();
|
||||
GameRegistry.registerBlock(BlockNightshadeBush, "BlockNightshadeBush");
|
||||
}
|
||||
|
||||
public static void initTiles ()
|
||||
{
|
||||
GameRegistry.registerTileEntity(TileLumos.class, "TileLumos");
|
||||
}
|
||||
}
|
||||
@@ -11,9 +11,12 @@ import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.item.ItemSword;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
import taintedmagic.common.handler.WandHandler;
|
||||
import taintedmagic.common.items.ItemCrimsonBlood;
|
||||
import taintedmagic.common.items.ItemFlyteCharm;
|
||||
import taintedmagic.common.items.ItemGatekey;
|
||||
import taintedmagic.common.items.ItemMagicFunguar;
|
||||
import taintedmagic.common.items.ItemMaterial;
|
||||
import taintedmagic.common.items.ItemNightshadeBerries;
|
||||
import taintedmagic.common.items.ItemSalis;
|
||||
import taintedmagic.common.items.ItemVoidsentBlood;
|
||||
import taintedmagic.common.items.equipment.ItemLumosRing;
|
||||
@@ -47,186 +50,207 @@ import thaumcraft.api.wands.WandRod;
|
||||
|
||||
public class ItemRegistry
|
||||
{
|
||||
public static void init ()
|
||||
{
|
||||
ItemMaterial = new ItemMaterial();
|
||||
GameRegistry.registerItem(ItemMaterial, "ItemMaterial");
|
||||
public static Item ItemMagicFunguar;
|
||||
public static Item ItemNightshadeBerries;
|
||||
public static Item ItemMaterial;
|
||||
public static Item ItemVoidsentBlood;
|
||||
public static Item ItemCrimsonBlood;
|
||||
public static Item ItemFlyteCharm;
|
||||
public static Item ItemSalis;
|
||||
public static Item ItemGatekey;
|
||||
|
||||
ItemVoidsentBlood = new ItemVoidsentBlood();
|
||||
GameRegistry.registerItem(ItemVoidsentBlood, "ItemVoidsentBlood");
|
||||
// Wand
|
||||
public static Item ItemWandRod;
|
||||
|
||||
ItemMagicFunguar = new ItemMagicFunguar(5, 1.0F, false);
|
||||
GameRegistry.registerItem(ItemMagicFunguar, "ItemMagicFunguar");
|
||||
public static WandRod WAND_ROD_WARPWOOD;
|
||||
public static StaffRod STAFF_ROD_WARPWOOD;
|
||||
|
||||
ItemFlyteCharm = new ItemFlyteCharm();
|
||||
GameRegistry.registerItem(ItemFlyteCharm, "ItemFlyteCharm");
|
||||
public static Item ItemWandCap;
|
||||
|
||||
ItemSalis = new ItemSalis();
|
||||
GameRegistry.registerItem(ItemSalis, "ItemSalis");
|
||||
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;
|
||||
|
||||
// Armor and Baubles
|
||||
ItemWarpedGoggles = new ItemWarpedGoggles(LibToolMaterials.armorMatSpecial, 4, 0);
|
||||
GameRegistry.registerItem(ItemWarpedGoggles, "ItemWarpedGoggles");
|
||||
// Foci
|
||||
public static Item ItemFocusTaintSwarm;
|
||||
public static Item ItemFocusDarkMatter;
|
||||
public static Item ItemFocusMageMace;
|
||||
public static Item ItemFocusShockwave;
|
||||
public static Item ItemFocusVisShard;
|
||||
public static Item ItemFocusLumos;
|
||||
|
||||
ItemVoidFortressHelmet = new ItemVoidFortressArmor(LibToolMaterials.armorMatVoidFortress, 4, 0).setUnlocalizedName("ItemVoidFortressHelmet");
|
||||
GameRegistry.registerItem(ItemVoidFortressHelmet, "ItemVoidFortressHelmet");
|
||||
// Armor and Baubles
|
||||
public static Item ItemWarpedGoggles;
|
||||
public static Item ItemVoidmetalGoggles;
|
||||
|
||||
ItemVoidFortressChestplate = new ItemVoidFortressArmor(LibToolMaterials.armorMatVoidFortress, 4, 1).setUnlocalizedName("ItemVoidFortressChestplate");
|
||||
GameRegistry.registerItem(ItemVoidFortressChestplate, "ItemVoidFortressChestplate");
|
||||
public static Item ItemVoidwalkerBoots;
|
||||
public static Item ItemVoidwalkerSash;
|
||||
|
||||
ItemVoidFortressLeggings = new ItemVoidFortressArmor(LibToolMaterials.armorMatVoidFortress, 4, 2).setUnlocalizedName("ItemVoidFortressLeggings");
|
||||
GameRegistry.registerItem(ItemVoidFortressLeggings, "ItemVoidFortressLeggings");
|
||||
public static Item ItemVoidFortressHelmet;
|
||||
public static Item ItemVoidFortressChestplate;
|
||||
public static Item ItemVoidFortressLeggings;
|
||||
|
||||
ItemVoidwalkerBoots = new ItemVoidwalkerBoots(LibToolMaterials.armorMatSpecial, 4, 3).setUnlocalizedName("ItemVoidwalkerBoots");
|
||||
GameRegistry.registerItem(ItemVoidwalkerBoots, "ItemVoidwalkerBoots");
|
||||
public static Item ItemShadowFortressHelmet;
|
||||
public static Item ItemShadowFortressChestplate;
|
||||
public static Item ItemShadowFortressLeggings;
|
||||
|
||||
ItemVoidwalkerSash = new ItemVoidwalkerSash();
|
||||
GameRegistry.registerItem(ItemVoidwalkerSash, "ItemVoidwalkerSash");
|
||||
public static Item ItemLumosRing;
|
||||
|
||||
ItemShadowFortressHelmet = new ItemShadowFortressArmor(LibToolMaterials.armorMatShadowFortress, 4, 0).setUnlocalizedName("ItemShadowFortressHelmet");
|
||||
GameRegistry.registerItem(ItemShadowFortressHelmet, "ItemShadowFortressHelmet");
|
||||
// Tools
|
||||
public static Item ItemThaumicDisassembler;
|
||||
public static Item ItemHollowDagger;
|
||||
|
||||
ItemShadowFortressChestplate = new ItemShadowFortressArmor(LibToolMaterials.armorMatShadowFortress, 4, 1).setUnlocalizedName("ItemShadowFortressChestplate");
|
||||
GameRegistry.registerItem(ItemShadowFortressChestplate, "ItemShadowFortressChestplate");
|
||||
public static ItemHoe ItemShadowmetalHoe;
|
||||
public static ItemPickaxe ItemShadowmetalPick;
|
||||
public static ItemSpade ItemShadowmetalSpade;
|
||||
public static ItemAxe ItemShadowmetalAxe;
|
||||
public static ItemSword ItemShadowmetalSword;
|
||||
|
||||
ItemShadowFortressLeggings = new ItemShadowFortressArmor(LibToolMaterials.armorMatShadowFortress, 4, 2).setUnlocalizedName("ItemShadowFortressLeggings");
|
||||
GameRegistry.registerItem(ItemShadowFortressLeggings, "ItemShadowFortressLeggings");
|
||||
public static ItemSword ItemPrimordialEdge;
|
||||
|
||||
ItemVoidmetalGoggles = new ItemVoidmetalGoggles(ArmorMaterial.IRON, 4, 0);
|
||||
GameRegistry.registerItem(ItemVoidmetalGoggles, "ItemVoidmetalGoggles");
|
||||
public static Item ItemKatana;
|
||||
|
||||
ItemLumosRing = new ItemLumosRing();
|
||||
GameRegistry.registerItem(ItemLumosRing, "ItemLumosRing");
|
||||
public static void init ()
|
||||
{
|
||||
ItemMaterial = new ItemMaterial();
|
||||
GameRegistry.registerItem(ItemMaterial, "ItemMaterial");
|
||||
|
||||
// Wands and Staves
|
||||
ItemWandRod = new ItemWandRod();
|
||||
GameRegistry.registerItem(ItemWandRod, "ItemWandRod");
|
||||
ItemVoidsentBlood = new ItemVoidsentBlood();
|
||||
GameRegistry.registerItem(ItemVoidsentBlood, "ItemVoidsentBlood");
|
||||
|
||||
WAND_ROD_WARPWOOD = new WandRod("warpwood", 250, new ItemStack(ItemWandRod, 1, 0), 16, new WandHandler(), new ResourceLocation("taintedmagic:textures/models/ModelWAND_ROD_WARPWOOD.png"));
|
||||
WAND_ROD_WARPWOOD.setGlowing(true);
|
||||
ItemCrimsonBlood = new ItemCrimsonBlood();
|
||||
GameRegistry.registerItem(ItemCrimsonBlood, "ItemCrimsonBlood");
|
||||
|
||||
STAFF_ROD_WARPWOOD = new StaffRod("warpwood", 500, new ItemStack(ItemWandRod, 1, 1), 20, new WandHandler(), new ResourceLocation("taintedmagic:textures/models/ModelWAND_ROD_WARPWOOD.png"));
|
||||
STAFF_ROD_WARPWOOD.setRunes(true);
|
||||
STAFF_ROD_WARPWOOD.setGlowing(true);
|
||||
ItemMagicFunguar = new ItemMagicFunguar(5, 1.0F, false);
|
||||
GameRegistry.registerItem(ItemMagicFunguar, "ItemMagicFunguar");
|
||||
|
||||
ItemWandCap = new ItemWandCap();
|
||||
GameRegistry.registerItem(ItemWandCap, "ItemWandCap");
|
||||
ItemNightshadeBerries = new ItemNightshadeBerries(0, 0.0F, false);
|
||||
GameRegistry.registerItem(ItemNightshadeBerries, "ItemNightshadeBerries");
|
||||
|
||||
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"));
|
||||
ItemFlyteCharm = new ItemFlyteCharm();
|
||||
GameRegistry.registerItem(ItemFlyteCharm, "ItemFlyteCharm");
|
||||
|
||||
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"));
|
||||
ItemSalis = new ItemSalis();
|
||||
GameRegistry.registerItem(ItemSalis, "ItemSalis");
|
||||
|
||||
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"));
|
||||
ItemGatekey = new ItemGatekey();
|
||||
GameRegistry.registerItem(ItemGatekey, "ItemGatekey");
|
||||
|
||||
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"));
|
||||
// Armor and Baubles
|
||||
ItemWarpedGoggles = new ItemWarpedGoggles(LibToolMaterials.armorMatSpecial, 4, 0);
|
||||
GameRegistry.registerItem(ItemWarpedGoggles, "ItemWarpedGoggles");
|
||||
|
||||
// Foci
|
||||
ItemFocusTaintSwarm = new ItemFocusTaintSwarm();
|
||||
GameRegistry.registerItem(ItemFocusTaintSwarm, "ItemFocusTaintSwarm");
|
||||
ItemVoidFortressHelmet = new ItemVoidFortressArmor(LibToolMaterials.armorMatVoidFortress, 4, 0)
|
||||
.setUnlocalizedName("ItemVoidFortressHelmet");
|
||||
GameRegistry.registerItem(ItemVoidFortressHelmet, "ItemVoidFortressHelmet");
|
||||
|
||||
ItemFocusDarkMatter = new ItemFocusDarkMatter();
|
||||
GameRegistry.registerItem(ItemFocusDarkMatter, "ItemFocusDarkMatter");
|
||||
ItemVoidFortressChestplate = new ItemVoidFortressArmor(LibToolMaterials.armorMatVoidFortress, 4, 1)
|
||||
.setUnlocalizedName("ItemVoidFortressChestplate");
|
||||
GameRegistry.registerItem(ItemVoidFortressChestplate, "ItemVoidFortressChestplate");
|
||||
|
||||
ItemFocusMageMace = new ItemFocusMageMace();
|
||||
GameRegistry.registerItem(ItemFocusMageMace, "ItemFocusMageMace");
|
||||
ItemVoidFortressLeggings = new ItemVoidFortressArmor(LibToolMaterials.armorMatVoidFortress, 4, 2)
|
||||
.setUnlocalizedName("ItemVoidFortressLeggings");
|
||||
GameRegistry.registerItem(ItemVoidFortressLeggings, "ItemVoidFortressLeggings");
|
||||
|
||||
ItemFocusShockwave = new ItemFocusShockwave();
|
||||
GameRegistry.registerItem(ItemFocusShockwave, "ItemFocusShockwave");
|
||||
ItemVoidwalkerBoots =
|
||||
new ItemVoidwalkerBoots(LibToolMaterials.armorMatSpecial, 4, 3).setUnlocalizedName("ItemVoidwalkerBoots");
|
||||
GameRegistry.registerItem(ItemVoidwalkerBoots, "ItemVoidwalkerBoots");
|
||||
|
||||
ItemFocusVisShard = new ItemFocusVisShard();
|
||||
GameRegistry.registerItem(ItemFocusVisShard, "ItemFocusVisShard");
|
||||
ItemVoidwalkerSash = new ItemVoidwalkerSash();
|
||||
GameRegistry.registerItem(ItemVoidwalkerSash, "ItemVoidwalkerSash");
|
||||
|
||||
ItemFocusLumos = new ItemFocusLumos();
|
||||
GameRegistry.registerItem(ItemFocusLumos, "ItemFocusLumos");
|
||||
ItemShadowFortressHelmet = new ItemShadowFortressArmor(LibToolMaterials.armorMatShadowFortress, 4, 0)
|
||||
.setUnlocalizedName("ItemShadowFortressHelmet");
|
||||
GameRegistry.registerItem(ItemShadowFortressHelmet, "ItemShadowFortressHelmet");
|
||||
|
||||
// Tools
|
||||
ItemThaumicDisassembler = new ItemThaumicDisassembler();
|
||||
GameRegistry.registerItem(ItemThaumicDisassembler, "ItemThaumicDisassembler");
|
||||
ItemShadowFortressChestplate = new ItemShadowFortressArmor(LibToolMaterials.armorMatShadowFortress, 4, 1)
|
||||
.setUnlocalizedName("ItemShadowFortressChestplate");
|
||||
GameRegistry.registerItem(ItemShadowFortressChestplate, "ItemShadowFortressChestplate");
|
||||
|
||||
ItemHollowDagger = new ItemHollowDagger(LibToolMaterials.toolMatHollow);
|
||||
GameRegistry.registerItem(ItemHollowDagger, "ItemHollowDagger");
|
||||
ItemShadowFortressLeggings = new ItemShadowFortressArmor(LibToolMaterials.armorMatShadowFortress, 4, 2)
|
||||
.setUnlocalizedName("ItemShadowFortressLeggings");
|
||||
GameRegistry.registerItem(ItemShadowFortressLeggings, "ItemShadowFortressLeggings");
|
||||
|
||||
ItemShadowmetalHoe = new ItemShadowmetalHoe(LibToolMaterials.toolMatShadow);
|
||||
GameRegistry.registerItem(ItemShadowmetalHoe, "ItemShadowmetalHoe");
|
||||
ItemVoidmetalGoggles = new ItemVoidmetalGoggles(ArmorMaterial.IRON, 4, 0);
|
||||
GameRegistry.registerItem(ItemVoidmetalGoggles, "ItemVoidmetalGoggles");
|
||||
|
||||
ItemShadowmetalPick = new ItemShadowmetalPick(LibToolMaterials.toolMatShadow);
|
||||
GameRegistry.registerItem(ItemShadowmetalPick, "ItemShadowmetalPick");
|
||||
ItemLumosRing = new ItemLumosRing();
|
||||
GameRegistry.registerItem(ItemLumosRing, "ItemLumosRing");
|
||||
|
||||
ItemShadowmetalAxe = new ItemShadowmetalAxe(LibToolMaterials.toolMatShadow);
|
||||
GameRegistry.registerItem(ItemShadowmetalAxe, "ItemShadowmetalAxe");
|
||||
// Wands and Staves
|
||||
ItemWandRod = new ItemWandRod();
|
||||
GameRegistry.registerItem(ItemWandRod, "ItemWandRod");
|
||||
|
||||
ItemShadowmetalSpade = new ItemShadowmetalSpade(LibToolMaterials.toolMatShadow);
|
||||
GameRegistry.registerItem(ItemShadowmetalSpade, "ItemShadowmetalSpade");
|
||||
WAND_ROD_WARPWOOD = new WandRod("warpwood", 250, new ItemStack(ItemWandRod, 1, 0), 16, new WandHandler(),
|
||||
new ResourceLocation("taintedmagic:textures/models/ModelWAND_ROD_WARPWOOD.png"));
|
||||
WAND_ROD_WARPWOOD.setGlowing(true);
|
||||
|
||||
ItemShadowmetalSword = new ItemShadowmetalSword(LibToolMaterials.toolMatShadow);
|
||||
GameRegistry.registerItem(ItemShadowmetalSword, "ItemShadowmetalSword");
|
||||
STAFF_ROD_WARPWOOD = new StaffRod("warpwood", 500, new ItemStack(ItemWandRod, 1, 1), 20, new WandHandler(),
|
||||
new ResourceLocation("taintedmagic:textures/models/ModelWAND_ROD_WARPWOOD.png"));
|
||||
STAFF_ROD_WARPWOOD.setRunes(true);
|
||||
STAFF_ROD_WARPWOOD.setGlowing(true);
|
||||
|
||||
ItemPrimordialEdge = new ItemPrimordialEdge(LibToolMaterials.toolMatPrimal);
|
||||
GameRegistry.registerItem(ItemPrimordialEdge, "ItemPrimordialEdge");
|
||||
ItemWandCap = new ItemWandCap();
|
||||
GameRegistry.registerItem(ItemWandCap, "ItemWandCap");
|
||||
|
||||
ItemKatana = new ItemKatana();
|
||||
GameRegistry.registerItem(ItemKatana, "ItemKatana");
|
||||
}
|
||||
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"));
|
||||
|
||||
public static Item ItemMagicFunguar;
|
||||
public static Item ItemMaterial;
|
||||
public static Item ItemVoidsentBlood;
|
||||
public static Item ItemFlyteCharm;
|
||||
public static Item ItemSalis;
|
||||
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
|
||||
public static Item ItemWandRod;
|
||||
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"));
|
||||
|
||||
public static WandRod WAND_ROD_WARPWOOD;
|
||||
public static StaffRod STAFF_ROD_WARPWOOD;
|
||||
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"));
|
||||
|
||||
public static Item ItemWandCap;
|
||||
// Foci
|
||||
ItemFocusTaintSwarm = new ItemFocusTaintSwarm();
|
||||
GameRegistry.registerItem(ItemFocusTaintSwarm, "ItemFocusTaintSwarm");
|
||||
|
||||
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;
|
||||
ItemFocusDarkMatter = new ItemFocusDarkMatter();
|
||||
GameRegistry.registerItem(ItemFocusDarkMatter, "ItemFocusDarkMatter");
|
||||
|
||||
// Foci
|
||||
public static Item ItemFocusTaintSwarm;
|
||||
public static Item ItemFocusDarkMatter;
|
||||
public static Item ItemFocusMageMace;
|
||||
public static Item ItemFocusShockwave;
|
||||
public static Item ItemFocusVisShard;
|
||||
public static Item ItemFocusLumos;
|
||||
ItemFocusMageMace = new ItemFocusMageMace();
|
||||
GameRegistry.registerItem(ItemFocusMageMace, "ItemFocusMageMace");
|
||||
|
||||
// Armor and Baubles
|
||||
public static Item ItemWarpedGoggles;
|
||||
public static Item ItemVoidmetalGoggles;
|
||||
ItemFocusShockwave = new ItemFocusShockwave();
|
||||
GameRegistry.registerItem(ItemFocusShockwave, "ItemFocusShockwave");
|
||||
|
||||
public static Item ItemVoidwalkerBoots;
|
||||
public static Item ItemVoidwalkerSash;
|
||||
ItemFocusVisShard = new ItemFocusVisShard();
|
||||
GameRegistry.registerItem(ItemFocusVisShard, "ItemFocusVisShard");
|
||||
|
||||
public static Item ItemVoidFortressHelmet;
|
||||
public static Item ItemVoidFortressChestplate;
|
||||
public static Item ItemVoidFortressLeggings;
|
||||
ItemFocusLumos = new ItemFocusLumos();
|
||||
GameRegistry.registerItem(ItemFocusLumos, "ItemFocusLumos");
|
||||
|
||||
public static Item ItemShadowFortressHelmet;
|
||||
public static Item ItemShadowFortressChestplate;
|
||||
public static Item ItemShadowFortressLeggings;
|
||||
// Tools
|
||||
ItemThaumicDisassembler = new ItemThaumicDisassembler();
|
||||
GameRegistry.registerItem(ItemThaumicDisassembler, "ItemThaumicDisassembler");
|
||||
|
||||
public static Item ItemLumosRing;
|
||||
ItemHollowDagger = new ItemHollowDagger(LibToolMaterials.toolMatHollow);
|
||||
GameRegistry.registerItem(ItemHollowDagger, "ItemHollowDagger");
|
||||
|
||||
// Tools
|
||||
public static Item ItemThaumicDisassembler;
|
||||
public static Item ItemHollowDagger;
|
||||
ItemShadowmetalHoe = new ItemShadowmetalHoe(LibToolMaterials.toolMatShadow);
|
||||
GameRegistry.registerItem(ItemShadowmetalHoe, "ItemShadowmetalHoe");
|
||||
|
||||
public static ItemHoe ItemShadowmetalHoe;
|
||||
public static ItemPickaxe ItemShadowmetalPick;
|
||||
public static ItemSpade ItemShadowmetalSpade;
|
||||
public static ItemAxe ItemShadowmetalAxe;
|
||||
public static ItemSword ItemShadowmetalSword;
|
||||
ItemShadowmetalPick = new ItemShadowmetalPick(LibToolMaterials.toolMatShadow);
|
||||
GameRegistry.registerItem(ItemShadowmetalPick, "ItemShadowmetalPick");
|
||||
|
||||
public static ItemSword ItemPrimordialEdge;
|
||||
ItemShadowmetalAxe = new ItemShadowmetalAxe(LibToolMaterials.toolMatShadow);
|
||||
GameRegistry.registerItem(ItemShadowmetalAxe, "ItemShadowmetalAxe");
|
||||
|
||||
public static Item ItemKatana;
|
||||
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");
|
||||
}
|
||||
}
|
||||
File diff suppressed because it is too large.
Load diff
@@ -7,7 +7,7 @@ import net.minecraft.item.crafting.IRecipe;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
import taintedmagic.common.TaintedMagic;
|
||||
import taintedmagic.common.helper.TaintedMagicHelper;
|
||||
import taintedmagic.common.research.TaintedMagicResearchItem;
|
||||
import taintedmagic.common.research.TMResearchItem;
|
||||
import taintedmagic.common.research.ThaumcraftResearchItem;
|
||||
import thaumcraft.api.ItemApi;
|
||||
import thaumcraft.api.ThaumcraftApi;
|
||||
@@ -17,257 +17,361 @@ import thaumcraft.api.crafting.CrucibleRecipe;
|
||||
import thaumcraft.api.crafting.IArcaneRecipe;
|
||||
import thaumcraft.api.crafting.InfusionRecipe;
|
||||
import thaumcraft.api.research.ResearchCategories;
|
||||
import thaumcraft.api.research.ResearchItem;
|
||||
import thaumcraft.api.research.ResearchPage;
|
||||
import thaumcraft.common.config.ConfigBlocks;
|
||||
import thaumcraft.common.config.ConfigItems;
|
||||
|
||||
public class ResearchRegistry
|
||||
{
|
||||
public static final String TM = "TM";
|
||||
public static HashMap recipes = new HashMap();
|
||||
public static final String categoryTM = "TAINTEDMAGIC";
|
||||
public static HashMap recipes = new HashMap();
|
||||
|
||||
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"));
|
||||
public static void initResearch ()
|
||||
{
|
||||
ResearchCategories.registerCategory(categoryTM, new ResourceLocation("taintedmagic:textures/misc/tab_tm.png"),
|
||||
TaintedMagic.configHandler.CUSTOM_RESEARCH_TAB_BACK
|
||||
? new ResourceLocation("taintedmagic:textures/gui/gui_tm_researchback.png")
|
||||
: new ResourceLocation("thaumcraft:textures/gui/gui_researchback.png"));
|
||||
|
||||
/**
|
||||
* Thaumcraft research items
|
||||
*/
|
||||
new ThaumcraftResearchItem("TMELDRITCHMAJOR", TM, "ELDRITCHMAJOR", "ELDRITCH", 7, -7, new ResourceLocation("thaumcraft:textures/misc/r_eldritchmajor.png")).setSpecial().setConcealed()
|
||||
.setRound().registerResearchItem();
|
||||
new ThaumcraftResearchItem("TMFOCUSFIRE", TM, "FOCUSFIRE", "THAUMATURGY", 7, 3, new ItemStack(ConfigItems.itemFocusFire)).setConcealed().registerResearchItem();
|
||||
new ThaumcraftResearchItem("TMARMORFORTRESS", TM, "ARMORFORTRESS", "ARTIFICE", 11, 3, new ItemStack(ConfigItems.itemHelmetFortress)).setConcealed().registerResearchItem();
|
||||
ResearchItem r;
|
||||
|
||||
/**
|
||||
* 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();
|
||||
/**
|
||||
* Copied Thaumcraft research
|
||||
*/
|
||||
r = new ThaumcraftResearchItem("TMELDRITCHMAJOR", "ELDRITCHMAJOR", "ELDRITCH", 7, -7,
|
||||
new ResourceLocation("thaumcraft:textures/misc/r_eldritchmajor.png"));
|
||||
r.setSpecial().setConcealed().setRound().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("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();
|
||||
r = new ThaumcraftResearchItem("TMFOCUSFIRE", "FOCUSFIRE", "THAUMATURGY", 7, 3,
|
||||
new ItemStack(ConfigItems.itemFocusFire));
|
||||
r.setConcealed().registerResearchItem();
|
||||
|
||||
new TaintedMagicResearchItem("CAP_shadowmetal", TM, new AspectList().add(Aspect.METAL, 4).add(Aspect.DARKNESS, 4).add(Aspect.ELDRITCH, 4).add(Aspect.MAGIC, 4), -3, 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("CAP_shadowmetal", 4);
|
||||
r = new ThaumcraftResearchItem("TMARMORFORTRESS", "ARMORFORTRESS", "ARTIFICE", 11, 2,
|
||||
new ItemStack(ConfigItems.itemHelmetFortress));
|
||||
r.setConcealed().registerResearchItem();
|
||||
|
||||
new TaintedMagicResearchItem("SHADOWCLOTH", TM, new AspectList().add(Aspect.CLOTH, 1).add(Aspect.DARKNESS, 1), -1, 4, 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();
|
||||
/**
|
||||
* Tainted Magic research
|
||||
*/
|
||||
r = new TMResearchItem("TAINTEDMAGIC", new AspectList(), 2, -1, new ItemStack(ConfigItems.itemResource, 1, 13), 0, 0);
|
||||
r.setPages(new ResearchPage("1"), new ResearchPage("2"));
|
||||
r.setRound().setAutoUnlock().registerResearchItem();
|
||||
|
||||
new TaintedMagicResearchItem("ROD_warpwood", TM, new AspectList().add(Aspect.TREE, 4).add(Aspect.DARKNESS, 4).add(Aspect.ELDRITCH, 4), 8, 0, 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("ROD_warpwood", 5);
|
||||
r = new TMResearchItem("SHADOWMETAL",
|
||||
new AspectList().add(Aspect.METAL, 1).add(Aspect.DARKNESS, 1).add(Aspect.MAGIC, 1), 0, 1,
|
||||
new ItemStack(BlockRegistry.BlockShadowOre), 0, 1);
|
||||
r.setPages(new ResearchPage("1"), cruciblePage("BlockShadowOre"),
|
||||
new ResearchPage(new ItemStack(BlockRegistry.BlockShadowOre)), recipePage("ItemShadowmetalPick"),
|
||||
recipePage("ItemShadowmetalSpade"), recipePage("ItemShadowmetalAxe"), recipePage("ItemShadowmetalHoe"),
|
||||
recipePage("ItemShadowmetalSword"));
|
||||
r.setParents("TAINTEDMAGIC").setConcealed().registerResearchItem();
|
||||
|
||||
new TaintedMagicResearchItem("ROD_warpwood_staff", TM, new AspectList().add(Aspect.TREE, 4).add(Aspect.DARKNESS, 4).add(Aspect.ELDRITCH, 4), 10, -1, 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();
|
||||
r = new TMResearchItem("CAP_shadowmetal",
|
||||
new AspectList().add(Aspect.METAL, 4).add(Aspect.DARKNESS, 4).add(Aspect.ELDRITCH, 4).add(Aspect.MAGIC, 4), -3,
|
||||
2, new ItemStack(ItemRegistry.ItemWandCap, 1, 0), 2, 4);
|
||||
r.setPages(new ResearchPage("1"), infusionPage("ItemWandCap:0"));
|
||||
r.setParents("SHADOWMETAL", "CAP_void", "PRIMPEARL").setParentsHidden("SHADOWCLOTH").setConcealed()
|
||||
.registerResearchItem();
|
||||
|
||||
new TaintedMagicResearchItem("EVILSHARDS", TM, new AspectList().add(Aspect.CRYSTAL, 4).add(Aspect.DARKNESS, 4), 4, -1, 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();
|
||||
r = new TMResearchItem("SHADOWCLOTH", new AspectList().add(Aspect.CLOTH, 1).add(Aspect.DARKNESS, 1), -2, 4,
|
||||
new ItemStack(ItemRegistry.ItemMaterial, 1, 1), 0, 0);
|
||||
r.setPages(new ResearchPage("1"), arcanePage("ItemMaterial:1"));
|
||||
r.setConcealed().setSecondary().setParents("ENCHFABRIC", "SHADOWMETAL").registerResearchItem();
|
||||
|
||||
new TaintedMagicResearchItem("WARPTREE", TM, new AspectList().add(Aspect.ELDRITCH, 4).add(Aspect.DARKNESS, 4).add(Aspect.TAINT, 4).add(Aspect.TREE, 4), 6, -2, 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();
|
||||
r = new TMResearchItem("ROD_warpwood",
|
||||
new AspectList().add(Aspect.TREE, 4).add(Aspect.DARKNESS, 4).add(Aspect.ELDRITCH, 4), 8, 0,
|
||||
new ItemStack(ItemRegistry.ItemWandRod, 1, 0), 3, 5);
|
||||
r.setPages(new ResearchPage("1"), infusionPage("ItemWandRod:0"), new ResearchPage("2"));
|
||||
r.setParents("WARPTREE", "VOIDMETAL", "PRIMPEARL", "ROD_primal_staff").setParentsHidden("SHADOWMETAL").setConcealed()
|
||||
.registerResearchItem();
|
||||
|
||||
new TaintedMagicResearchItem("CRIMSONROBES", TM, new AspectList().add(Aspect.CLOTH, 4).add(Aspect.EXCHANGE, 4).add(Aspect.ARMOR, 4), -2, -1, 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();
|
||||
r = new TMResearchItem("ROD_warpwood_staff",
|
||||
new AspectList().add(Aspect.TREE, 4).add(Aspect.DARKNESS, 4).add(Aspect.ELDRITCH, 4), 10, -1,
|
||||
new ItemStack(ItemRegistry.ItemWandRod, 1, 1), 2, 0);
|
||||
r.setPages(new ResearchPage("1"), arcanePage("ItemWandRod:1"));
|
||||
r.setConcealed().setParents("ROD_warpwood").setSecondary().registerResearchItem();
|
||||
|
||||
new TaintedMagicResearchItem("VOIDFORTRESS", TM, new AspectList().add(Aspect.ARMOR, 5).add(Aspect.ELDRITCH, 3).add(Aspect.DARKNESS, 3).add(Aspect.VOID, 5), 8, -9, 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();
|
||||
ThaumcraftApi.addWarpToResearch("VOIDFORTRESS", 2);
|
||||
r = new TMResearchItem("UNBALANCEDSHARDS", new AspectList().add(Aspect.CRYSTAL, 4).add(Aspect.DARKNESS, 4), 4, -1,
|
||||
new ItemStack(ItemRegistry.ItemMaterial, 1, 4), 0, 1);
|
||||
r.setPages(new ResearchPage("1"), cruciblePage("ItemMaterial:3"), cruciblePage("ItemMaterial:4"));
|
||||
r.setParents("TAINTEDMAGIC").setConcealed().setSecondary().registerResearchItem();
|
||||
|
||||
new TaintedMagicResearchItem("WARPEDGOGGLES", TM, new AspectList().add(Aspect.ARMOR, 4).add(Aspect.ELDRITCH, 4).add(Aspect.DARKNESS, 4).add(Aspect.ARMOR, 4), 1, 4, 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();
|
||||
r = new TMResearchItem("WARPTREE", new AspectList().add(Aspect.MAGIC, 4).add(Aspect.DARKNESS, 4).add(Aspect.TREE, 4), 6,
|
||||
-2, new ItemStack(ItemRegistry.ItemMaterial, 1, 12), 3, 2);
|
||||
r.setPages(new ResearchPage("1"), arcanePage("ItemMaterial:12"), recipePage("BlockWarpwoodPlanks"));
|
||||
r.setParents("UNBALANCEDSHARDS").setConcealed().registerResearchItem();
|
||||
|
||||
new TaintedMagicResearchItem("ELDRITCHFOCUS", TM, new AspectList().add(Aspect.ELDRITCH, 22).add(Aspect.ENTROPY, 14).add(Aspect.AIR, 4).add(Aspect.DARKNESS, 6), 7, 7, 0,
|
||||
new ItemStack(ItemRegistry.ItemFocusDarkMatter)).setParentsHidden(new String[]{ "OUTERREV" })
|
||||
.setParents(new String[]{ "TMFOCUSFIRE", "TAINTFOCUS", "FOCUSSHARD", "FOCUSLUMOS", "MACEFOCUS", "FOCUSSHOCKWAVE" }).setConcealed().setSecondary()
|
||||
.setPages(new ResearchPage[]{ new ResearchPage("1"), new ResearchPage((InfusionRecipe) recipes.get("ItemFocusDarkMatter")) }).registerResearchItem();
|
||||
ThaumcraftApi.addWarpToResearch("ELDRITCHFOCUS", 7);
|
||||
r = new TMResearchItem("CRIMSONROBES",
|
||||
new AspectList().add(Aspect.CLOTH, 4).add(Aspect.EXCHANGE, 4).add(Aspect.ARMOR, 4), -2, -1,
|
||||
new ItemStack(ItemRegistry.ItemMaterial, 1, 2), 2, 0);
|
||||
r.setPages(new ResearchPage("1"), arcanePage("ItemMaterial:2"), arcanePage("ItemHelmetCultistRobe"),
|
||||
arcanePage("ItemChestCultistRobe"), arcanePage("ItemLegsCultistRobe"), arcanePage("ItemBootsCultist"));
|
||||
r.setParents("HOLLOWDAGGER").setConcealed().registerResearchItem();
|
||||
|
||||
new TaintedMagicResearchItem("KNIGHTROBES", TM, new AspectList().add(Aspect.CLOTH, 4).add(Aspect.DARKNESS, 4).add(Aspect.ARMOR, 4), -4, -2, 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();
|
||||
r = new TMResearchItem("VOIDFORTRESS",
|
||||
new AspectList().add(Aspect.ARMOR, 5).add(Aspect.ELDRITCH, 3).add(Aspect.DARKNESS, 3).add(Aspect.VOID, 5), 8,
|
||||
-9, new ItemStack(ItemRegistry.ItemVoidFortressHelmet), 2, 2);
|
||||
r.setPages(new ResearchPage("1"), infusionPage("ItemVoidFortressHelmet"), infusionPage("ItemVoidFortressChestplate"),
|
||||
infusionPage("ItemVoidFortressLeggings"));
|
||||
r.setParentsHidden("ARMORVOIDFORTRESS", "ARMORFORTRESS").setParents("TMELDRITCHMAJOR").setConcealed()
|
||||
.registerResearchItem();
|
||||
|
||||
new TaintedMagicResearchItem("PRAETORARMOR", TM, new AspectList().add(Aspect.CLOTH, 4).add(Aspect.DARKNESS, 4).add(Aspect.ARMOR, 4).add(Aspect.ELDRITCH, 4), -6, 0, 0,
|
||||
ItemApi.getItem("itemHelmetCultistLeaderPlate", 0))
|
||||
.setParents("KNIGHTROBES").setParentsHidden(new String[]{ "CRIMSONROBES", "TMELDRITCHMAJOR", "VOIDMETAL" })
|
||||
.setPages(new ResearchPage[]{ new ResearchPage("1"), new ResearchPage((IArcaneRecipe) recipes.get("ItemHelmetCultistLeaderPlate")),
|
||||
new ResearchPage((IArcaneRecipe) recipes.get("ItemChestCultistLeaderPlate")), new ResearchPage((IArcaneRecipe) recipes.get("ItemLegsCultistLeaderPlate")) })
|
||||
.setConcealed().registerResearchItem();
|
||||
r = new TMResearchItem("WARPEDGOGGLES",
|
||||
new AspectList().add(Aspect.ARMOR, 4).add(Aspect.ELDRITCH, 4).add(Aspect.DARKNESS, 4).add(Aspect.ARMOR, 4), 2,
|
||||
4, new ItemStack(ItemRegistry.ItemWarpedGoggles), 1, 0);
|
||||
r.setPages(new ResearchPage("1"), infusionPage("ItemWarpedGoggles"));
|
||||
r.setParentsHidden("TAINTEDMAGIC", "GOGGLES").setConcealed().setSecondary().setParents("SHADOWMETAL")
|
||||
.registerResearchItem();
|
||||
|
||||
new TaintedMagicResearchItem("VOIDSENTBLOOD", TM, new AspectList().add(Aspect.VOID, 14).add(Aspect.DARKNESS, 8).add(Aspect.ARMOR, 18).add(Aspect.AURA, 4), -2, -5, 0,
|
||||
new ItemStack(ItemRegistry.ItemVoidsentBlood)).setSecondary().setParents("CRYSTALDAGGER").setParentsHidden("ELDRITCHMAJOR", "PRIMPEARL")
|
||||
.setPages(new ResearchPage[]{ new ResearchPage("1"), new ResearchPage((IArcaneRecipe) recipes.get("ItemVoidsentBlood")) }).setConcealed().registerResearchItem();
|
||||
ThaumcraftApi.addWarpToResearch("VOIDSENTBLOOD", 1);
|
||||
r = new TMResearchItem("KNIGHTROBES",
|
||||
new AspectList().add(Aspect.CLOTH, 4).add(Aspect.DARKNESS, 4).add(Aspect.ARMOR, 4), -4, -2,
|
||||
new ItemStack(ItemRegistry.ItemMaterial, 1, 7), 2, 0);
|
||||
r.setPages(new ResearchPage("1"), infusionPage("ItemMaterial:7"), arcanePage("ItemHelmetCultistPlate"),
|
||||
arcanePage("ItemChestCultistPlate"), arcanePage("ItemLegsCultistPlate"));
|
||||
r.setParentsHidden("ELDRITCHMINOR").setParents("CRIMSONROBES").setConcealed().registerResearchItem();
|
||||
|
||||
new TaintedMagicResearchItem("VOIDWALKERBOOTS", TM, new AspectList().add(Aspect.MAGIC, 4).add(Aspect.DARKNESS, 8).add(Aspect.ARMOR, 8).add(Aspect.ELDRITCH, 8), 5, -5, 0,
|
||||
new ItemStack(ItemRegistry.ItemVoidwalkerBoots)).setParentsHidden(new String[]{ "PRIMPEARL", "BOOTSTRAVELLER", "SHADOWCLOTH", "ARMORVOIDFORTRESS" }).setConcealed()
|
||||
.setParents(new String[]{ "TMELDRITCHMAJOR" }).setPages(new ResearchPage[]{ new ResearchPage("1"), new ResearchPage((InfusionRecipe) recipes.get("ItemVoidwalkerBoots")) })
|
||||
.registerResearchItem();
|
||||
r = new TMResearchItem("PRAETORARMOR",
|
||||
new AspectList().add(Aspect.CLOTH, 4).add(Aspect.DARKNESS, 4).add(Aspect.ARMOR, 4).add(Aspect.ELDRITCH, 4), -6,
|
||||
0, ItemApi.getItem("itemHelmetCultistLeaderPlate", 0), 2, 0);
|
||||
r.setPages(new ResearchPage("1"), arcanePage("ItemHelmetCultistLeaderPlate"), arcanePage("ItemChestCultistLeaderPlate"),
|
||||
arcanePage("ItemLegsCultistLeaderPlate"));
|
||||
r.setParents("KNIGHTROBES").setParentsHidden("CRIMSONROBES", "TMELDRITCHMAJOR", "VOIDMETAL").setConcealed()
|
||||
.registerResearchItem();
|
||||
|
||||
new TaintedMagicResearchItem("CREATIONSHARD", TM, TaintedMagicHelper.getPrimals(16), 9, -7, 0, new ItemStack(ItemRegistry.ItemMaterial, 1, 5)).setConcealed().setParents("TMELDRITCHMAJOR")
|
||||
.setParentsHidden("PRIMPEARL").setPages(new ResearchPage[]{ new ResearchPage("1"), new ResearchPage((InfusionRecipe) recipes.get("ItemMaterial:5")),
|
||||
new ResearchPage((IArcaneRecipe) recipes.get("ItemMaterial:12")) })
|
||||
.setSecondary().registerResearchItem();
|
||||
ThaumcraftApi.addWarpToResearch("CREATIONSHARD", 9);
|
||||
r = new TMResearchItem("VOIDSENTBLOOD",
|
||||
new AspectList().add(Aspect.VOID, 14).add(Aspect.DARKNESS, 8).add(Aspect.ARMOR, 18).add(Aspect.AURA, 4), -2, -5,
|
||||
new ItemStack(ItemRegistry.ItemVoidsentBlood), 0, 3);
|
||||
r.setPages(new ResearchPage("1"), arcanePage("ItemVoidsentBlood"));
|
||||
r.setSecondary().setParents("HOLLOWDAGGER").setParentsHidden("ELDRITCHMAJOR", "PRIMPEARL").setConcealed()
|
||||
.registerResearchItem();
|
||||
|
||||
new TaintedMagicResearchItem("CREATION", TM, new AspectList().add(Aspect.MAGIC, 4), 11, -5, 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();
|
||||
r = new TMResearchItem("VOIDWALKERBOOTS",
|
||||
new AspectList().add(Aspect.MAGIC, 4).add(Aspect.DARKNESS, 8).add(Aspect.ARMOR, 8).add(Aspect.ELDRITCH, 8), 5,
|
||||
-5, new ItemStack(ItemRegistry.ItemVoidwalkerBoots), 3, 4);
|
||||
r.setPages(new ResearchPage("1"), infusionPage("ItemVoidwalkerBoots"));
|
||||
r.setParentsHidden("PRIMPEARL", "BOOTSTRAVELLER", "SHADOWCLOTH", "ARMORVOIDFORTRESS").setConcealed()
|
||||
.setParents("TMELDRITCHMAJOR").registerResearchItem();
|
||||
|
||||
new TaintedMagicResearchItem("SKYSALT", TM, new AspectList().add(TaintedMagicHelper.getPrimals(4)).add(Aspect.WEATHER, 4), 12, -7, 0, new ItemStack(ItemRegistry.ItemSalis, 1, 0))
|
||||
.setConcealed().setParents("CREATION").setComplexity(3).setPages(new ResearchPage[]{ new ResearchPage("1"), new ResearchPage((InfusionRecipe) recipes.get("ItemSalis:0")) })
|
||||
.setSecondary().registerResearchItem();
|
||||
r = new TMResearchItem("BREAKPEARL", TaintedMagicHelper.getPrimals(4).add(Aspect.ENTROPY, 12), 8, -6,
|
||||
new ItemStack(ItemRegistry.ItemMaterial, 1, 9), 0, 0);
|
||||
r.setPages(new ResearchPage("1"), arcanePage("ItemMaterial:9"), arcanePage("ItemMaterial:10"));
|
||||
r.setConcealed().setParents("PRIMPEARL").setSecondary().registerResearchItem();
|
||||
|
||||
new TaintedMagicResearchItem("TIMESALT", TM, new AspectList().add(TaintedMagicHelper.getPrimals(4)).add(Aspect.EXCHANGE, 4), 13, -6, 0, new ItemStack(ItemRegistry.ItemSalis, 1, 1))
|
||||
.setConcealed().setParents("CREATION").setComplexity(3).setPages(new ResearchPage[]{ new ResearchPage("1"), new ResearchPage((InfusionRecipe) recipes.get("ItemSalis:1")) })
|
||||
.setSecondary().registerResearchItem();
|
||||
r = new TMResearchItem("CREATIONSHARD", TaintedMagicHelper.getPrimals(16), 9, -7,
|
||||
new ItemStack(ItemRegistry.ItemMaterial, 1, 5), 3, 9);
|
||||
r.setPages(new ResearchPage("1"), infusionPage("ItemMaterial:5"), arcanePage("ItemMaterial:11"));
|
||||
r.setConcealed().setParents("TMELDRITCHMAJOR").setParentsHidden("PRIMPEARL").setSpecial().registerResearchItem();
|
||||
|
||||
new TaintedMagicResearchItem("THAUMICDISASSEMBLER", TM, new AspectList().add(Aspect.METAL, 4).add(Aspect.WEAPON, 8).add(Aspect.TOOL, 4), 6, -9, 0,
|
||||
new ItemStack(ItemRegistry.ItemThaumicDisassembler)).setParentsHidden(new String[]{ "THAUMIUM", "VOIDMETAL", "PRIMPEARL" }).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();
|
||||
r = new TMResearchItem("CREATION", new AspectList(), 11, -5,
|
||||
new ResourceLocation("taintedmagic:textures/misc/r_creation.png"), 0, 0);
|
||||
r.setPages(new ResearchPage("1"), new ResearchPage("2"), new ResearchPage("3"), new ResearchPage("4"),
|
||||
new ResearchPage("5"));
|
||||
r.setParents("CREATIONSHARD").setConcealed().setRound().setSpecial().setHidden().registerResearchItem();
|
||||
|
||||
new TaintedMagicResearchItem("VOIDSASH", TM, new AspectList().add(Aspect.VOID, 4).add(Aspect.METAL, 8).add(Aspect.ARMOR, 4), 3, -6, 0, new ItemStack(ItemRegistry.ItemVoidwalkerSash))
|
||||
.setParentsHidden("PRIMPEARL").setParents("VOIDWALKERBOOTS").setPages(new ResearchPage[]{ new ResearchPage("1"), new ResearchPage((InfusionRecipe) recipes.get("ItemVoidwalkerSash")) })
|
||||
.setConcealed().setSecondary().registerResearchItem();
|
||||
ThaumcraftApi.addWarpToResearch("VOIDSASH", 4);
|
||||
r = new TMResearchItem("SKYSALT", new AspectList().add(TaintedMagicHelper.getPrimals(4)).add(Aspect.WEATHER, 4), 12, -7,
|
||||
new ItemStack(ItemRegistry.ItemSalis, 1, 0), 0, 0);
|
||||
r.setPages(new ResearchPage("1"), infusionPage("ItemSalis:0"));
|
||||
r.setConcealed().setParents("CREATION").setSecondary().registerResearchItem();
|
||||
|
||||
new TaintedMagicResearchItem("MAGICFUNGUAR", TM, new AspectList().add(Aspect.MAGIC, 2).add(Aspect.HUNGER, 4).add(Aspect.PLANT, 2), 2, -4, 0, new ItemStack(ItemRegistry.ItemMagicFunguar))
|
||||
.setSecondary().setPages(new ResearchPage[]{ new ResearchPage("1"), new ResearchPage((IArcaneRecipe) recipes.get("ItemMagicFunguar")) }).setParents("VISHROOMCRAFT").setConcealed()
|
||||
.registerResearchItem();
|
||||
r = new TMResearchItem("TIMESALT", new AspectList().add(TaintedMagicHelper.getPrimals(4)).add(Aspect.EXCHANGE, 4), 13,
|
||||
-6, new ItemStack(ItemRegistry.ItemSalis, 1, 1), 0, 0);
|
||||
r.setConcealed().setParents("CREATION").setSecondary().registerResearchItem();
|
||||
r.setPages(new ResearchPage("1"), infusionPage("ItemSalis:1"));
|
||||
|
||||
new TaintedMagicResearchItem("VISHROOMCRAFT", TM, new AspectList().add(Aspect.MAGIC, 4).add(Aspect.CRAFT, 2).add(Aspect.PLANT, 3), 3, -3, 0,
|
||||
new ItemStack(ConfigBlocks.blockCustomPlant, 1, 5)).setSecondary()
|
||||
.setPages(new ResearchPage[]{ new ResearchPage("1"), new ResearchPage((CrucibleRecipe) recipes.get("Vishroom_red")),
|
||||
new ResearchPage((CrucibleRecipe) recipes.get("Vishroom_brown")) })
|
||||
.setConcealed().registerResearchItem();
|
||||
r = new TMResearchItem("THAUMICDISASSEMBLER",
|
||||
new AspectList().add(Aspect.METAL, 4).add(Aspect.WEAPON, 8).add(Aspect.TOOL, 4), 6, -9,
|
||||
new ItemStack(ItemRegistry.ItemThaumicDisassembler), 3, 0);
|
||||
r.setPages(new ResearchPage("1"), infusionPage("ItemThaumicDisassembler"), arcanePage("ItemMaterial:6"),
|
||||
new ResearchPage("2"));
|
||||
r.setParentsHidden("THAUMIUM", "VOIDMETAL", "PRIMPEARL").setConcealed().setParents("TMELDRITCHMAJOR")
|
||||
.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.ItemHollowDagger, 1, 7))
|
||||
.setParentsHidden("ENCHFABRIC", "ESSENTIACRYSTAL", "ELDRITCHMINOR").setParents("TAINTEDMAGIC").setComplexity(2)
|
||||
.setPages(new ResearchPage[]{ new ResearchPage("1"), new ResearchPage((IArcaneRecipe) recipes.get("ItemHollowDagger")) }).registerResearchItem();
|
||||
ThaumcraftApi.addWarpToResearch("CRYSTALDAGGER", 2);
|
||||
r = new TMResearchItem("VOIDSASH", new AspectList().add(Aspect.VOID, 4).add(Aspect.METAL, 8).add(Aspect.ARMOR, 4), 3,
|
||||
-6, new ItemStack(ItemRegistry.ItemVoidwalkerSash), 0, 3);
|
||||
r.setPages(new ResearchPage("1"), infusionPage("ItemVoidwalkerSash"));
|
||||
r.setParentsHidden("PRIMPEARL").setParents("VOIDWALKERBOOTS").setConcealed().setSecondary().registerResearchItem();
|
||||
|
||||
new TaintedMagicResearchItem("MACEFOCUS", TM, new AspectList().add(Aspect.ENTROPY, 10).add(Aspect.EARTH, 4).add(Aspect.WEAPON, 6).add(Aspect.MAGIC, 8), 6, 5, 0,
|
||||
new ItemStack(ItemRegistry.ItemFocusMageMace)).setParents("TMFOCUSFIRE").setConcealed().setComplexity(2).setParentsHidden("THAUMIUM")
|
||||
.setPages(new ResearchPage[]{ new ResearchPage("1"), new ResearchPage((InfusionRecipe) recipes.get("ItemFocusMageMace")) }).registerResearchItem();
|
||||
r = new TMResearchItem("MAGICFUNGUAR", new AspectList().add(Aspect.MAGIC, 2).add(Aspect.HUNGER, 4).add(Aspect.PLANT, 2),
|
||||
2, -4, new ItemStack(ItemRegistry.ItemMagicFunguar), 0, 0);
|
||||
r.setPages(new ResearchPage("1"), arcanePage("ItemMagicFunguar"));
|
||||
r.setSecondary().setParents("VISHROOMCRAFT").setConcealed().registerResearchItem();
|
||||
|
||||
new TaintedMagicResearchItem("CRIMSONBLADE", TM, new AspectList().add(Aspect.ENTROPY, 8).add(Aspect.ELDRITCH, 2).add(Aspect.WEAPON, 16).add(Aspect.VOID, 6), -6, 2, 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);
|
||||
r = new TMResearchItem("VISHROOMCRAFT", new AspectList().add(Aspect.MAGIC, 4).add(Aspect.CRAFT, 2).add(Aspect.PLANT, 3),
|
||||
3, -3, new ItemStack(ConfigBlocks.blockCustomPlant, 1, 5), 0, 0);
|
||||
r.setPages(new ResearchPage("1"), cruciblePage("Vishroom_red"), cruciblePage("Vishroom_brown"));
|
||||
r.setSecondary().setConcealed().setHidden().setItemTriggers(new ItemStack(ConfigBlocks.blockCustomPlant, 1, 5))
|
||||
.registerResearchItem();
|
||||
|
||||
new TaintedMagicResearchItem("SHADOWFORTRESSARMOR", TM, new AspectList().add(Aspect.METAL, 4).add(Aspect.DARKNESS, 8).add(Aspect.ARMOR, 8).add(Aspect.VOID, 2), 0, 3, 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);
|
||||
r = new TMResearchItem("HOLLOWDAGGER", new AspectList().add(Aspect.WEAPON, 4).add(Aspect.FIRE, 4).add(Aspect.HEAL, 4),
|
||||
0, -3, new ItemStack(ItemRegistry.ItemHollowDagger, 1, 7), 2, 2);
|
||||
r.setPages(new ResearchPage("1"), arcanePage("ItemHollowDagger"));
|
||||
r.setParentsHidden("ENCHFABRIC", "ESSENTIACRYSTAL", "ELDRITCHMINOR").setParents("TAINTEDMAGIC").registerResearchItem();
|
||||
|
||||
new TaintedMagicResearchItem("CAP_cloth", TM, new AspectList().add(Aspect.MAGIC, 4).add(Aspect.CLOTH, 4), 3, 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();
|
||||
r = new TMResearchItem("CRIMSONBLADE",
|
||||
new AspectList().add(Aspect.ENTROPY, 8).add(Aspect.ELDRITCH, 2).add(Aspect.WEAPON, 16).add(Aspect.VOID, 6), -6,
|
||||
2, new ItemStack(ConfigItems.itemSwordCrimson), 0, 5);
|
||||
r.setPages(new ResearchPage("1"), infusionPage("ItemSwordCrimson"));
|
||||
r.setParents("PRAETORARMOR").setConcealed().setSecondary().registerResearchItem();
|
||||
|
||||
new TaintedMagicResearchItem("CAP_crimsoncloth", TM, new AspectList().add(Aspect.MAGIC, 8).add(Aspect.CLOTH, 4).add(Aspect.HEAL, 8), -1, -1, 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();
|
||||
r = new TMResearchItem("SHADOWFORTRESS",
|
||||
new AspectList().add(Aspect.METAL, 4).add(Aspect.DARKNESS, 8).add(Aspect.ARMOR, 8).add(Aspect.VOID, 2), 0, 3,
|
||||
new ItemStack(ItemRegistry.ItemShadowFortressHelmet), 3, 3);
|
||||
r.setPages(new ResearchPage("1"), infusionPage("ItemShadowFortressHelmet"),
|
||||
infusionPage("ItemShadowFortressChestplate"), infusionPage("ItemShadowFortressLeggings"));
|
||||
r.setParents("SHADOWMETAL").setConcealed().setParentsHidden("VOIDFORTRESS", "TMELDRITCHMAJOR", "UNBALANCEDSHARDS")
|
||||
.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);
|
||||
r = new TMResearchItem("CAP_cloth", new AspectList().add(Aspect.MAGIC, 4).add(Aspect.CLOTH, 4), 3, 1,
|
||||
new ItemStack(ItemRegistry.ItemWandCap, 1, 1), 0, 0);
|
||||
r.setPages(new ResearchPage("1"), arcanePage("ItemWandCap:1"));
|
||||
r.setParentsHidden("CAP_gold", "ENCHFABRIC").setConcealed().setSecondary().registerResearchItem();
|
||||
|
||||
new TaintedMagicResearchItem("FOCUSSHOCKWAVE", TM, new AspectList().add(Aspect.MAGIC, 20).add(Aspect.TAINT, 12).add(Aspect.AIR, 6).add(Aspect.MOTION, 12), 8, 5, 0,
|
||||
new ItemStack(ItemRegistry.ItemFocusShockwave)).setParentsHidden("FOCUSSHOCK").setConcealed().setParents("TMFOCUSFIRE")
|
||||
.setPages(new ResearchPage[]{ new ResearchPage("1"), new ResearchPage((InfusionRecipe) recipes.get("ItemFocusShockwave")) }).setSecondary().registerResearchItem();
|
||||
ThaumcraftApi.addWarpToResearch("FOCUSSHOCKWAVE", 4);
|
||||
r = new TMResearchItem("CAP_crimsoncloth",
|
||||
new AspectList().add(Aspect.MAGIC, 8).add(Aspect.CLOTH, 4).add(Aspect.HEAL, 8), -1, -1,
|
||||
new ItemStack(ItemRegistry.ItemWandCap, 1, 2), 0, 0);
|
||||
r.setPages(new ResearchPage("1"), arcanePage("ItemWandCap:2"));
|
||||
r.setParentsHidden("CAP_cloth").setSecondary().setConcealed().setParents("CRIMSONROBES").registerResearchItem();
|
||||
|
||||
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, -3, 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);
|
||||
r = new TMResearchItem("CAP_shadowcloth",
|
||||
new AspectList().add(Aspect.MAGIC, 16).add(Aspect.CLOTH, 8).add(Aspect.VOID, 16).add(Aspect.DARKNESS, 8), -3, 5,
|
||||
new ItemStack(ItemRegistry.ItemWandCap, 1, 3), 0, 1);
|
||||
r.setPages(new ResearchPage("1"), arcanePage("ItemWandCap:3"));
|
||||
r.setParentsHidden("CAP_cloth", "CAP_thaumium").setSecondary().setConcealed().setParents("SHADOWCLOTH")
|
||||
.registerResearchItem();
|
||||
|
||||
new TaintedMagicResearchItem("THAUMIUMKATANA", TM, new AspectList().add(Aspect.METAL, 8).add(Aspect.MAGIC, 4).add(Aspect.WEAPON, 6), 13, 3, 0, new ItemStack(ItemRegistry.ItemKatana, 1, 0))
|
||||
.setParents("TMARMORFORTRESS").setParentsHidden("ARMORFORTRESS").setConcealed()
|
||||
.setPages(new ResearchPage[]{ new ResearchPage("1"), new ResearchPage((InfusionRecipe) recipes.get("ItemKatana:0")) }).registerResearchItem();
|
||||
r = new TMResearchItem("PRIMALBLADE", new AspectList().add(Aspect.MAGIC, 1).add(Aspect.ELDRITCH, 1)
|
||||
.add(Aspect.WEAPON, 1).add(Aspect.VOID, 1).add(Aspect.AURA, 1), 11, -3,
|
||||
new ItemStack(ItemRegistry.ItemPrimordialEdge), 3, 5);
|
||||
r.setPages(new ResearchPage("1"), infusionPage("ItemPrimordialEdge"));
|
||||
r.setParentsHidden("VOIDMETAL", "PRIMALCRUSHER", "UNBALANCEDSHARDS", "HOLLOWDAGGER").setConcealed()
|
||||
.setParents("CREATION").registerResearchItem();
|
||||
|
||||
new TaintedMagicResearchItem("VOIDMETALKATANA", TM, new AspectList().add(Aspect.METAL, 16).add(Aspect.MAGIC, 8).add(Aspect.WEAPON, 12).add(Aspect.VOID, 12), 7, -10, 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);
|
||||
r = new TMResearchItem("THAUMIUMKATANA",
|
||||
new AspectList().add(Aspect.METAL, 8).add(Aspect.MAGIC, 4).add(Aspect.WEAPON, 6), 13, 2,
|
||||
new ItemStack(ItemRegistry.ItemKatana, 1, 0), 3, 0);
|
||||
r.setPages(new ResearchPage("1"), infusionPage("ItemKatana:0"));
|
||||
r.setParents("TMARMORFORTRESS").setParentsHidden("ARMORFORTRESS").setConcealed().registerResearchItem();
|
||||
|
||||
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), 0, 6, 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);
|
||||
r = new TMResearchItem("VOIDMETALKATANA",
|
||||
new AspectList().add(Aspect.METAL, 16).add(Aspect.MAGIC, 8).add(Aspect.WEAPON, 12).add(Aspect.VOID, 12), 7, -10,
|
||||
new ItemStack(ItemRegistry.ItemKatana, 1, 1), 3, 3);
|
||||
r.setPages(new ResearchPage("1"), infusionPage("ItemKatana:1"));
|
||||
r.setParentsHidden("THAUMIUMKATANA").setParents("VOIDFORTRESS").setConcealed().setSecondary().registerResearchItem();
|
||||
|
||||
new TaintedMagicResearchItem("INSCRIPTIONFIRE", TM, new AspectList().add(Aspect.FIRE, 8).add(Aspect.LIGHT, 4).add(Aspect.METAL, 6), 14, 1, 0,
|
||||
new ResourceLocation("taintedmagic:textures/misc/IconINSCRIPTIONFIRE.png")).setParents("THAUMIUMKATANA").setParentsHidden("FOCUSFIRE").setConcealed()
|
||||
.setPages(new ResearchPage[]{ new ResearchPage("1"), new ResearchPage((InfusionRecipe) recipes.get("ItemKatanaThaumium:inscription0")) }).setSecondary().registerResearchItem();
|
||||
r = new TMResearchItem(
|
||||
"SHADOWMETALKATANA", new AspectList().add(Aspect.METAL, 16).add(Aspect.MAGIC, 8).add(Aspect.WEAPON, 12)
|
||||
.add(Aspect.VOID, 12).add(Aspect.DARKNESS, 14),
|
||||
0, 5, new ItemStack(ItemRegistry.ItemKatana, 1, 2), 3, 5);
|
||||
r.setPages(new ResearchPage("1"), infusionPage("ItemKatana:2"));
|
||||
r.setParentsHidden("VOIDMETALKATANA").setParents("SHADOWFORTRESS").setConcealed().setSecondary().registerResearchItem();
|
||||
|
||||
new TaintedMagicResearchItem("INSCRIPTIONTAINT", TM, new AspectList().add(Aspect.TAINT, 8).add(Aspect.FLESH, 4).add(Aspect.METAL, 6), 15, 3, 0,
|
||||
new ResourceLocation("taintedmagic:textures/misc/IconINSCRIPTIONTAINT.png")).setParents("THAUMIUMKATANA").setParentsHidden("TAINTFOCUS").setConcealed()
|
||||
.setPages(new ResearchPage[]{ new ResearchPage("1"), new ResearchPage((InfusionRecipe) recipes.get("ItemKatanaThaumium:inscription1")) }).setSecondary().registerResearchItem();
|
||||
ThaumcraftApi.addWarpToResearch("INSCRIPTIONTAINT", 2);
|
||||
r = new TMResearchItem("INSCRIPTIONFIRE",
|
||||
new AspectList().add(Aspect.FIRE, 8).add(Aspect.ENTROPY, 4).add(Aspect.METAL, 6), 14, 0,
|
||||
new ResourceLocation("taintedmagic:textures/misc/r_fire.png"), 0, 0);
|
||||
r.setPages(new ResearchPage("1"), infusionPage("ItemKatanaThaumium:inscription0"));
|
||||
r.setParents("THAUMIUMKATANA").setParentsHidden("FOCUSFIRE").setConcealed().setSecondary().registerResearchItem();
|
||||
|
||||
new TaintedMagicResearchItem("INSCRIPTIONUNDEAD", TM, new AspectList().add(Aspect.HEAL, 8).add(Aspect.UNDEAD, 4).add(Aspect.METAL, 6), 14, 5, 0,
|
||||
new ResourceLocation("taintedmagic:textures/misc/IconINSCRIPTIONUNDEAD.png")).setParents("THAUMIUMKATANA").setParentsHidden("BATHSALTS").setConcealed()
|
||||
.setPages(new ResearchPage[]{ new ResearchPage("1"), new ResearchPage((InfusionRecipe) recipes.get("ItemKatanaThaumium:inscription2")) }).setSecondary().registerResearchItem();
|
||||
ThaumcraftApi.addWarpToResearch("INSCRIPTIONUNDEAD", 4);
|
||||
r = new TMResearchItem("INSCRIPTIONTHUNDER",
|
||||
new AspectList().add(Aspect.ENTROPY, 8).add(Aspect.MOTION, 4).add(Aspect.METAL, 6), 15, 2,
|
||||
new ResourceLocation("taintedmagic:textures/misc/r_thunder.png"), 0, 0);
|
||||
r.setPages(new ResearchPage("1"), infusionPage("ItemKatanaThaumium:inscription1"));
|
||||
r.setParents("THAUMIUMKATANA").setParentsHidden("FOCUSSHOCKWAVE").setConcealed().setSecondary().registerResearchItem();
|
||||
|
||||
new TaintedMagicResearchItem("VOIDGOGGLES", TM, new AspectList().add(Aspect.VOID, 8).add(Aspect.DARKNESS, 4).add(Aspect.MAGIC, 6).add(Aspect.SENSES, 12).add(Aspect.CRYSTAL, 2), 2, 3, 0,
|
||||
new ItemStack(ItemRegistry.ItemVoidmetalGoggles)).setParents("WARPEDGOGGLES").setParentsHidden("VOIDMETAL").setConcealed()
|
||||
.setPages(new ResearchPage[]{ new ResearchPage("1"), new ResearchPage((InfusionRecipe) recipes.get("ItemVoidmetalGoggles")) }).setSecondary().registerResearchItem();
|
||||
ThaumcraftApi.addWarpToResearch("VOIDGOGGLES", 2);
|
||||
r = new TMResearchItem("INSCRIPTIONUNDEAD",
|
||||
new AspectList().add(Aspect.HEAL, 8).add(Aspect.UNDEAD, 4).add(Aspect.METAL, 6), 14, 4,
|
||||
new ResourceLocation("taintedmagic:textures/misc/r_undead.png"), 0, 2);
|
||||
r.setPages(new ResearchPage("1"), infusionPage("ItemKatanaThaumium:inscription2"));
|
||||
r.setParents("THAUMIUMKATANA").setParentsHidden("BATHSALTS").setConcealed().setSecondary().registerResearchItem();
|
||||
|
||||
new TaintedMagicResearchItem("FOCUSSHARD", TM, new AspectList().add(Aspect.CRYSTAL, 2).add(Aspect.MAGIC, 4).add(Aspect.MOTION, 6), 9, 6, 0, new ItemStack(ItemRegistry.ItemFocusVisShard))
|
||||
.setParents("TMFOCUSFIRE").setParentsHidden("FOCUSFIRE", "EVILSHARDS").setConcealed()
|
||||
.setPages(new ResearchPage[]{ new ResearchPage("1"), new ResearchPage((IArcaneRecipe) recipes.get("ItemFocusVisShard")) }).setSecondary().registerResearchItem();
|
||||
r = new TMResearchItem("VOIDGOGGLES",
|
||||
new AspectList().add(Aspect.VOID, 8).add(Aspect.DARKNESS, 4).add(Aspect.MAGIC, 6).add(Aspect.SENSES, 12), 3, 3,
|
||||
new ItemStack(ItemRegistry.ItemVoidmetalGoggles), 0, 2);
|
||||
r.setPages(new ResearchPage("1"), infusionPage("ItemVoidmetalGoggles"));
|
||||
r.setParents("WARPEDGOGGLES").setParentsHidden("VOIDMETAL").setConcealed().setSecondary().registerResearchItem();
|
||||
|
||||
new TaintedMagicResearchItem("TAINTFOCUS", TM, new AspectList().add(Aspect.TAINT, 4).add(Aspect.LIFE, 4).add(Aspect.MOTION, 4), 10, 6, 0, new ItemStack(ItemRegistry.ItemFocusTaintSwarm))
|
||||
.setParentsHidden(new String[]{ "INFUSION", "BOTTLETAINT" }).setParents(new String[]{ "FOCUSSHARD" }).setConcealed()
|
||||
.setPages(new ResearchPage[]{ new ResearchPage("1"), new ResearchPage((InfusionRecipe) recipes.get("ItemFocusTaintSwarm")) }).registerResearchItem();
|
||||
ThaumcraftApi.addWarpToResearch("TAINTFOCUS", 3);
|
||||
r = new TMResearchItem("ELDRITCHFOCUS",
|
||||
new AspectList().add(Aspect.ELDRITCH, 22).add(Aspect.ENTROPY, 14).add(Aspect.AIR, 4).add(Aspect.DARKNESS, 6), 7,
|
||||
7, new ItemStack(ItemRegistry.ItemFocusDarkMatter), 3, 7);
|
||||
r.setPages(new ResearchPage("1"), infusionPage("ItemFocusDarkMatter"));
|
||||
r.setParentsHidden("OUTERREV").setParents("TAINTFOCUS", "FOCUSSHARD", "FOCUSLUMOS", "MACEFOCUS", "FOCUSSHOCKWAVE")
|
||||
.setConcealed().setSpecial().registerResearchItem();
|
||||
|
||||
new TaintedMagicResearchItem("FOCUSLUMOS", TM, new AspectList().add(Aspect.FIRE, 16).add(Aspect.LIGHT, 24).add(Aspect.ENERGY, 8), 5, 6, 0, new ItemStack(ItemRegistry.ItemFocusLumos))
|
||||
.setPages(new ResearchPage[]{ new ResearchPage("1"), new ResearchPage((IArcaneRecipe) recipes.get("ItemFocusLumos")) }).setParents("TMFOCUSFIRE").setParentsHidden("FOCUSFIRE")
|
||||
.setConcealed().setSecondary().registerResearchItem();
|
||||
r = new TMResearchItem("DIFFUSIONUPGRADE",
|
||||
new AspectList().add(Aspect.MAGIC, 4).add(Aspect.DARKNESS, 8).add(Aspect.WEAPON, 8).add(Aspect.ELDRITCH, 10), 8,
|
||||
8, new ResourceLocation("taintedmagic:textures/foci/IconDiffusion.png"), 0, 2);
|
||||
r.setPages(new ResearchPage("1"));
|
||||
r.setParentsHidden("FOCALMANIPULATION").setConcealed().setParents("ELDRITCHFOCUS").setSecondary()
|
||||
.registerResearchItem();
|
||||
|
||||
new TaintedMagicResearchItem("LUMOSRING", TM, new AspectList().add(Aspect.ARMOR, 16).add(Aspect.AURA, 12).add(Aspect.LIGHT, 24).add(Aspect.ENERGY, 8), 4, 5, 0,
|
||||
new ItemStack(ItemRegistry.ItemLumosRing)).setPages(new ResearchPage[]{ new ResearchPage("1"), new ResearchPage((InfusionRecipe) recipes.get("ItemLumosRing")) })
|
||||
.setParents("FOCUSLUMOS").setParentsHidden("RUNICARMOR").setConcealed().setComplexity(2).registerResearchItem();
|
||||
r = new TMResearchItem("MACEFOCUS",
|
||||
new AspectList().add(Aspect.ENTROPY, 10).add(Aspect.EARTH, 4).add(Aspect.WEAPON, 6).add(Aspect.MAGIC, 8), 6, 5,
|
||||
new ItemStack(ItemRegistry.ItemFocusMageMace), 2, 0);
|
||||
r.setPages(new ResearchPage("1"), infusionPage("ItemFocusMageMace"));
|
||||
r.setParents("TMFOCUSFIRE").setConcealed().setParentsHidden("THAUMIUM").registerResearchItem();
|
||||
|
||||
new TaintedMagicResearchItem("FLYTECHARM", TM, new AspectList().add(Aspect.FLIGHT, 15).add(Aspect.AIR, 20).add(Aspect.SENSES, 8).add(Aspect.MAGIC, 12), 13, -4, 0,
|
||||
new ItemStack(ItemRegistry.ItemFlyteCharm)).setPages(new ResearchPage[]{ new ResearchPage("1"), new ResearchPage((InfusionRecipe) recipes.get("ItemFlyteCharm")) })
|
||||
.setParents("CREATION").setParentsHidden("VOIDSASH", "PRIMALARROW").setConcealed().registerResearchItem();
|
||||
}
|
||||
r = new TMResearchItem("FOCUSSHOCKWAVE",
|
||||
new AspectList().add(Aspect.MAGIC, 20).add(Aspect.ENTROPY, 12).add(Aspect.AIR, 6).add(Aspect.MOTION, 12), 8, 5,
|
||||
new ItemStack(ItemRegistry.ItemFocusShockwave), 0, 0);
|
||||
r.setPages(new ResearchPage("1"), infusionPage("ItemFocusShockwave"));
|
||||
r.setParentsHidden("FOCUSSHOCK").setConcealed().setParents("TMFOCUSFIRE").setSecondary().registerResearchItem();
|
||||
|
||||
r = new TMResearchItem("FOCUSSHARD", new AspectList().add(Aspect.CRYSTAL, 2).add(Aspect.MAGIC, 4).add(Aspect.MOTION, 6),
|
||||
9, 6, new ItemStack(ItemRegistry.ItemFocusVisShard), 0, 0);
|
||||
r.setPages(new ResearchPage("1"), arcanePage("ItemFocusVisShard"));
|
||||
r.setParents("TMFOCUSFIRE").setParentsHidden("FOCUSFIRE", "UNBALANCEDSHARDS").setConcealed().setSecondary()
|
||||
.registerResearchItem();
|
||||
|
||||
r = new TMResearchItem("TAINTFOCUS", new AspectList().add(Aspect.TAINT, 4).add(Aspect.LIFE, 4).add(Aspect.MOTION, 4),
|
||||
10, 6, new ItemStack(ItemRegistry.ItemFocusTaintSwarm), 3, 3);
|
||||
r.setPages(new ResearchPage("1"), infusionPage("ItemFocusTaintSwarm"));
|
||||
r.setParentsHidden("INFUSION", "BOTTLETAINT").setParents("FOCUSSHARD").setConcealed().registerResearchItem();
|
||||
|
||||
r = new TMResearchItem("FOCUSLUMOS", new AspectList().add(Aspect.FIRE, 16).add(Aspect.LIGHT, 24).add(Aspect.ENERGY, 8),
|
||||
5, 6, new ItemStack(ItemRegistry.ItemFocusLumos), 0, 0);
|
||||
r.setPages(new ResearchPage("1"), arcanePage("ItemFocusLumos"));
|
||||
r.setParents("TMFOCUSFIRE").setParentsHidden("FOCUSFIRE").setConcealed().setSecondary().registerResearchItem();
|
||||
|
||||
r = new TMResearchItem("LUMOSRING",
|
||||
new AspectList().add(Aspect.ARMOR, 16).add(Aspect.AURA, 12).add(Aspect.LIGHT, 24).add(Aspect.ENERGY, 8), 4, 7,
|
||||
new ItemStack(ItemRegistry.ItemLumosRing), 2, 0);
|
||||
r.setPages(new ResearchPage("1"), infusionPage("ItemLumosRing"));
|
||||
r.setParents("FOCUSLUMOS").setParentsHidden("RUNICARMOR").setConcealed().registerResearchItem();
|
||||
|
||||
r = new TMResearchItem("FLYTECHARM",
|
||||
new AspectList().add(Aspect.FLIGHT, 15).add(Aspect.AIR, 20).add(Aspect.SENSES, 8).add(Aspect.MAGIC, 12), 13, -4,
|
||||
new ItemStack(ItemRegistry.ItemFlyteCharm), 3, 0);
|
||||
r.setPages(new ResearchPage("1"), infusionPage("ItemFlyteCharm"));
|
||||
r.setParents("CREATION").setParentsHidden("VOIDSASH", "PRIMALARROW").setConcealed().registerResearchItem();
|
||||
|
||||
r = new TMResearchItem("GATEKEY",
|
||||
new AspectList().add(Aspect.TRAVEL, 30).add(Aspect.EXCHANGE, 15).add(Aspect.AURA, 20).add(Aspect.FLIGHT, 10), 9,
|
||||
-4, new ItemStack(ItemRegistry.ItemGatekey), 3, 0);
|
||||
r.setPages(new ResearchPage("1"), infusionPage("ItemGatekey"));
|
||||
r.setParents("CREATION").setConcealed().registerResearchItem();
|
||||
}
|
||||
|
||||
/**
|
||||
* ResearchPage helpers
|
||||
*/
|
||||
|
||||
public static ResearchPage recipePage (String key)
|
||||
{
|
||||
return new ResearchPage((IRecipe) recipes.get(key));
|
||||
}
|
||||
|
||||
public static ResearchPage arcanePage (String key)
|
||||
{
|
||||
return new ResearchPage((IArcaneRecipe) recipes.get(key));
|
||||
}
|
||||
|
||||
public static ResearchPage infusionPage (String key)
|
||||
{
|
||||
return new ResearchPage((InfusionRecipe) recipes.get(key));
|
||||
}
|
||||
|
||||
public static ResearchPage cruciblePage (String key)
|
||||
{
|
||||
return new ResearchPage((CrucibleRecipe) recipes.get(key));
|
||||
}
|
||||
}
|
||||
+22
-7
@@ -6,25 +6,32 @@ import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
import net.minecraft.util.StatCollector;
|
||||
import taintedmagic.common.TaintedMagic;
|
||||
import taintedmagic.common.registry.ResearchRegistry;
|
||||
import thaumcraft.api.ThaumcraftApi;
|
||||
import thaumcraft.api.aspects.AspectList;
|
||||
import thaumcraft.api.research.ResearchCategories;
|
||||
import thaumcraft.api.research.ResearchItem;
|
||||
import thaumcraft.api.research.ResearchPage;
|
||||
|
||||
public class TaintedMagicResearchItem extends ResearchItem
|
||||
public class TMResearchItem extends ResearchItem
|
||||
{
|
||||
public TaintedMagicResearchItem (String key, String category)
|
||||
int warp = 0;
|
||||
|
||||
public TMResearchItem (String key, String category)
|
||||
{
|
||||
super(key, category);
|
||||
}
|
||||
|
||||
public TaintedMagicResearchItem (String key, String category, AspectList tags, int col, int row, int complex, ItemStack icon)
|
||||
public TMResearchItem (String key, AspectList tags, int col, int row, ItemStack icon, int complex, int warp)
|
||||
{
|
||||
super(key, category, tags, col, row, complex, icon);
|
||||
super(key, ResearchRegistry.categoryTM, tags, col, row, complex, icon);
|
||||
this.warp = warp;
|
||||
}
|
||||
|
||||
public TaintedMagicResearchItem (String key, String category, AspectList tags, int col, int row, int complex, ResourceLocation icon)
|
||||
public TMResearchItem (String key, AspectList tags, int col, int row, ResourceLocation icon, int complex, int warp)
|
||||
{
|
||||
super(key, category, tags, col, row, complex, icon);
|
||||
super(key, ResearchRegistry.categoryTM, tags, col, row, complex, icon);
|
||||
this.warp = warp;
|
||||
}
|
||||
|
||||
@SideOnly (Side.CLIENT)
|
||||
@@ -36,7 +43,7 @@ public class TaintedMagicResearchItem extends ResearchItem
|
||||
@SideOnly (Side.CLIENT)
|
||||
public String getText ()
|
||||
{
|
||||
return (TaintedMagic.configHandler.researchTags ? "[TM] " : "") + StatCollector.translateToLocal(new StringBuilder("tm.tag.").append(this.key).toString());
|
||||
return (TaintedMagic.configHandler.RESEARCH_TAGS ? "[TM] " : "") + StatCollector.translateToLocal(new StringBuilder("tm.tag.").append(this.key).toString());
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -64,4 +71,12 @@ public class TaintedMagicResearchItem extends ResearchItem
|
||||
}
|
||||
return super.setPages(par);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ResearchItem registerResearchItem ()
|
||||
{
|
||||
super.registerResearchItem();
|
||||
if (warp > 0) ThaumcraftApi.addWarpToResearch(key, warp);
|
||||
return this;
|
||||
}
|
||||
}
|
||||
@@ -4,6 +4,7 @@ import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
import taintedmagic.common.registry.ResearchRegistry;
|
||||
import thaumcraft.api.aspects.AspectList;
|
||||
import thaumcraft.api.research.ResearchCategories;
|
||||
import thaumcraft.api.research.ResearchCategoryList;
|
||||
@@ -18,9 +19,9 @@ public class ThaumcraftResearchItem extends ResearchItem
|
||||
{
|
||||
public ResearchItem original;
|
||||
|
||||
public ThaumcraftResearchItem (String tag, String category, String origin, String originCategory, int col, int row, ResourceLocation icon)
|
||||
public ThaumcraftResearchItem (String tag, String origin, String originCategory, int col, int row, ResourceLocation icon)
|
||||
{
|
||||
super(tag, category, new AspectList(), col, row, 1, icon);
|
||||
super(tag, ResearchRegistry.categoryTM, new AspectList(), col, row, 1, icon);
|
||||
original = ((ResearchCategoryList) ResearchCategories.researchCategories.get(originCategory)).research.get(origin);
|
||||
bindToOriginal();
|
||||
setStub();
|
||||
@@ -28,9 +29,9 @@ public class ThaumcraftResearchItem extends ResearchItem
|
||||
|
||||
}
|
||||
|
||||
public ThaumcraftResearchItem (String tag, String category, String origin, String originCategory, int col, int row, ItemStack icon)
|
||||
public ThaumcraftResearchItem (String tag, String origin, String originCategory, int col, int row, ItemStack icon)
|
||||
{
|
||||
super(tag, category, new AspectList(), col, row, 1, icon);
|
||||
super(tag, ResearchRegistry.categoryTM, new AspectList(), col, row, 1, icon);
|
||||
original = ((ResearchCategoryList) ResearchCategories.researchCategories.get(originCategory)).research.get(origin);
|
||||
bindToOriginal();
|
||||
setStub();
|
||||
|
||||
@@ -4,577 +4,204 @@ import java.util.Random;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.BlockSapling;
|
||||
import net.minecraft.init.Blocks;
|
||||
import net.minecraft.util.MathHelper;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraft.world.gen.feature.WorldGenAbstractTree;
|
||||
import net.minecraft.world.gen.feature.WorldGenerator;
|
||||
import net.minecraftforge.common.util.ForgeDirection;
|
||||
import taintedmagic.common.registry.BlockRegistry;
|
||||
import thaumcraft.common.config.ConfigBlocks;
|
||||
import thaumcraft.common.lib.world.ThaumcraftWorldGenerator;
|
||||
import thaumcraft.common.lib.world.WorldGenCustomFlowers;
|
||||
|
||||
/**
|
||||
* Copy of <Mojang> WorldGenBigTree.class
|
||||
* Modified copy of <Azanor> WorldGenSilverwoodTrees.class
|
||||
*/
|
||||
public class WorldGenWarpwoodTree extends WorldGenAbstractTree
|
||||
{
|
||||
public Block trunk;
|
||||
public Block leaves;
|
||||
private Block trunk;
|
||||
private Block leaves;
|
||||
private final int minTreeHeight;
|
||||
private final int randomTreeHeight;
|
||||
boolean worldgen = false;
|
||||
|
||||
/**
|
||||
* 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)
|
||||
public WorldGenWarpwoodTree (boolean doBlockNotify, int minTreeHeight, int randomTreeHeight)
|
||||
{
|
||||
super(b);
|
||||
this.trunk = trunk;
|
||||
this.leaves = leaves;
|
||||
super(doBlockNotify);
|
||||
this.worldgen = !doBlockNotify;
|
||||
this.minTreeHeight = minTreeHeight;
|
||||
this.randomTreeHeight = randomTreeHeight;
|
||||
this.trunk = BlockRegistry.BlockWarpwoodLog;
|
||||
this.leaves = BlockRegistry.BlockWarpwoodLeaves;
|
||||
}
|
||||
|
||||
/**
|
||||
* Generates a list of leaf nodes for the tree, to be populated by
|
||||
* generateLeaves.
|
||||
*/
|
||||
void generateLeafNodeList ()
|
||||
public boolean generate (World world, Random random, int x, int y, int z)
|
||||
{
|
||||
this.height = (int) ((double) this.heightLimit * this.heightAttenuation);
|
||||
|
||||
if (this.height >= this.heightLimit)
|
||||
int height = random.nextInt(this.randomTreeHeight) + this.minTreeHeight;
|
||||
boolean flag = true;
|
||||
if (y >= 1 && y + height + 1 <= 256)
|
||||
{
|
||||
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)
|
||||
for (int i1 = y; i1 <= y + 1 + height; ++i1)
|
||||
{
|
||||
--j;
|
||||
--i1;
|
||||
}
|
||||
else
|
||||
{
|
||||
for (double d0 = 0.5D; j1 < i; ++j1)
|
||||
byte spread = 1;
|
||||
if (i1 == y)
|
||||
{
|
||||
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 };
|
||||
spread = 0;
|
||||
}
|
||||
|
||||
if (this.checkBlockLine(aint1, aint2) == -1)
|
||||
if (i1 >= y + 1 + height - 2)
|
||||
{
|
||||
spread = 3;
|
||||
}
|
||||
|
||||
for (int j1 = x - spread; j1 <= x + spread && flag; ++j1)
|
||||
{
|
||||
for (int k1 = z - spread; k1 <= z + spread && flag; ++k1)
|
||||
{
|
||||
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)
|
||||
if (i1 >= 0 && i1 < 256)
|
||||
{
|
||||
aint3[1] = l;
|
||||
Block block = world.getBlock(j1, i1, k1);
|
||||
if (!block.isAir(world, j1, i1, k1) && !block.isLeaves(world, j1, i1, k1) && !block.isReplaceable(world, j1, i1, k1) && i1 > y)
|
||||
{
|
||||
flag = false;
|
||||
}
|
||||
}
|
||||
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;
|
||||
flag = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
--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)
|
||||
if (!flag)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
else
|
||||
{
|
||||
this.heightLimit = i;
|
||||
return true;
|
||||
Block block1 = world.getBlock(x, y - 1, z);
|
||||
boolean isSoil = block1.canSustainPlant(world, x, y - 1, z, ForgeDirection.UP, (BlockSapling) Blocks.sapling);
|
||||
if (isSoil && y < 256 - height - 1)
|
||||
{
|
||||
block1.onPlantGrow(world, x, y - 1, z, x, y, z);
|
||||
int start = y + height - 5;
|
||||
int end = y + height + 3 + random.nextInt(3);
|
||||
|
||||
int k2;
|
||||
for (k2 = start; k2 <= end; ++k2)
|
||||
{
|
||||
int cty = MathHelper.clamp_int(k2, y + height - 3, y + height);
|
||||
|
||||
for (int xx = x - 5; xx <= x + 5; ++xx)
|
||||
{
|
||||
for (int zz = z - 5; zz <= z + 5; ++zz)
|
||||
{
|
||||
double d3 = (double) (xx - x);
|
||||
double d4 = (double) (k2 - cty);
|
||||
double d5 = (double) (zz - z);
|
||||
double dist = d3 * d3 + d4 * d4 + d5 * d5;
|
||||
if (dist < (double) (10 + random.nextInt(8)) && world.getBlock(xx, k2, zz).canBeReplacedByLeaves(world, xx, k2, zz))
|
||||
{
|
||||
this.setBlockAndNotifyAdequately(world, xx, k2, zz, this.leaves, 1);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
int chance = (int) ((double) height * 1.5D);
|
||||
boolean lastblock = false;
|
||||
|
||||
for (k2 = 0; k2 < height; ++k2)
|
||||
{
|
||||
Block block2 = world.getBlock(x, y + k2, z);
|
||||
if (block2.isAir(world, x, y + k2, z) || block2.isLeaves(world, x, y + k2, z) || block2.isReplaceable(world, x, y + k2, z))
|
||||
{
|
||||
this.setBlockAndNotifyAdequately(world, x, y + k2, z, this.trunk, 1);
|
||||
this.setBlockAndNotifyAdequately(world, x - 1, y + k2, z, this.trunk, 1);
|
||||
this.setBlockAndNotifyAdequately(world, x + 1, y + k2, z, this.trunk, 1);
|
||||
this.setBlockAndNotifyAdequately(world, x, y + k2, z - 1, this.trunk, 1);
|
||||
this.setBlockAndNotifyAdequately(world, x, y + k2, z + 1, this.trunk, 1);
|
||||
}
|
||||
}
|
||||
|
||||
this.setBlockAndNotifyAdequately(world, x, y + k2, z, this.trunk, 1);
|
||||
this.setBlockAndNotifyAdequately(world, x - 1, y, z - 1, this.trunk, 1);
|
||||
this.setBlockAndNotifyAdequately(world, x + 1, y, z + 1, this.trunk, 1);
|
||||
this.setBlockAndNotifyAdequately(world, x - 1, y, z + 1, this.trunk, 1);
|
||||
this.setBlockAndNotifyAdequately(world, x + 1, y, z - 1, this.trunk, 1);
|
||||
if (random.nextInt(3) != 0)
|
||||
{
|
||||
this.setBlockAndNotifyAdequately(world, x - 1, y + 1, z - 1, this.trunk, 1);
|
||||
}
|
||||
|
||||
if (random.nextInt(3) != 0)
|
||||
{
|
||||
this.setBlockAndNotifyAdequately(world, x + 1, y + 1, z + 1, this.trunk, 1);
|
||||
}
|
||||
|
||||
if (random.nextInt(3) != 0)
|
||||
{
|
||||
this.setBlockAndNotifyAdequately(world, x - 1, y + 1, z + 1, this.trunk, 1);
|
||||
}
|
||||
|
||||
if (random.nextInt(3) != 0)
|
||||
{
|
||||
this.setBlockAndNotifyAdequately(world, x + 1, y + 1, z - 1, this.trunk, 1);
|
||||
}
|
||||
|
||||
this.setBlockAndNotifyAdequately(world, x - 2, y, z, this.trunk, 5);
|
||||
this.setBlockAndNotifyAdequately(world, x + 2, y, z, this.trunk, 5);
|
||||
this.setBlockAndNotifyAdequately(world, x, y, z - 2, this.trunk, 9);
|
||||
this.setBlockAndNotifyAdequately(world, x, y, z + 2, this.trunk, 9);
|
||||
this.setBlockAndNotifyAdequately(world, x - 2, y - 1, z, this.trunk, 1);
|
||||
this.setBlockAndNotifyAdequately(world, x + 2, y - 1, z, this.trunk, 1);
|
||||
this.setBlockAndNotifyAdequately(world, x, y - 1, z - 2, this.trunk, 1);
|
||||
this.setBlockAndNotifyAdequately(world, x, y - 1, z + 2, this.trunk, 1);
|
||||
this.setBlockAndNotifyAdequately(world, x - 1, y + (height - 4), z - 1, this.trunk, 1);
|
||||
this.setBlockAndNotifyAdequately(world, x + 1, y + (height - 4), z + 1, this.trunk, 1);
|
||||
this.setBlockAndNotifyAdequately(world, x - 1, y + (height - 4), z + 1, this.trunk, 1);
|
||||
this.setBlockAndNotifyAdequately(world, x + 1, y + (height - 4), z - 1, this.trunk, 1);
|
||||
if (random.nextInt(3) == 0)
|
||||
{
|
||||
this.setBlockAndNotifyAdequately(world, x - 1, y + (height - 5), z - 1, this.trunk, 1);
|
||||
}
|
||||
|
||||
if (random.nextInt(3) == 0)
|
||||
{
|
||||
this.setBlockAndNotifyAdequately(world, x + 1, y + (height - 5), z + 1, this.trunk, 1);
|
||||
}
|
||||
|
||||
if (random.nextInt(3) == 0)
|
||||
{
|
||||
this.setBlockAndNotifyAdequately(world, x - 1, y + (height - 5), z + 1, this.trunk, 1);
|
||||
}
|
||||
|
||||
if (random.nextInt(3) == 0)
|
||||
{
|
||||
this.setBlockAndNotifyAdequately(world, x + 1, y + (height - 5), z - 1, this.trunk, 1);
|
||||
}
|
||||
|
||||
this.setBlockAndNotifyAdequately(world, x - 2, y + (height - 4), z, this.trunk, 5);
|
||||
this.setBlockAndNotifyAdequately(world, x + 2, y + (height - 4), z, this.trunk, 5);
|
||||
this.setBlockAndNotifyAdequately(world, x, y + (height - 4), z - 2, this.trunk, 9);
|
||||
this.setBlockAndNotifyAdequately(world, x, y + (height - 4), z + 2, this.trunk, 9);
|
||||
|
||||
WorldGenerator flowers = new WorldGenCustomFlowers(BlockRegistry.BlockNightshadeBush, 0);
|
||||
flowers.generate(world, random, x, y, z);
|
||||
|
||||
return true;
|
||||
}
|
||||
else
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 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;
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user