Compare commits

..
96 Commits
Author SHA1 Message Date
Vazkii 50c164891c Fixed The Tome of Sharing crashing the game when it was supposed to work... 2013-05-30 19:39:39 +01:00
Vazkii a4e9d78e2b And 1.0.5. 2013-05-29 21:28:10 +01:00
Vazkii 58ff3ffdee Added the Tome of Knowledge Sharing item. 2013-05-29 21:27:12 +01:00
Vazkii f1827e3a26 Added more checking for the TDT. Should fix #11. 2013-05-29 20:49:38 +01:00
Vazkii ec70c130d1 Actually fixed phantom stone breaking... 2013-05-29 20:49:06 +01:00
Vazkii e64103fc97 Fixed phantom blocks being unbreakable. 2013-05-29 19:47:58 +01:00
Vazkii 0960096bdb Proxied the particles for enchantments. Fixes #10. 2013-05-29 19:43:17 +01:00
TheWhiteWolves 97d9af8d3a Fixed typo in the Lost Enchantments research 2013-05-28 23:11:06 +01:00
TheWhiteWolves de3d9978cf Fixed Infernal Bracelet not recharging 2013-05-28 23:11:05 +01:00
Vazkii 2df312c46a Made the Phantom Block recipe work. Derp... 2013-05-28 21:24:38 +01:00
Vazkii 6320c7d926 And that about wraps up the 1.0.4 release I believe. 2013-05-27 22:46:37 +01:00
Vazkii c6265980a1 Moved and tweaked some things around. 2013-05-27 22:44:08 +01:00
Vazkii 2969d57f55 Added the recipes/researches for the enchants and phantom stone blocks, had to implement a dummy item for crafting to work. 2013-05-27 22:36:06 +01:00
Vazkii 34a78e77ce Mobs shouldn't spawn on phantom stone... 2013-05-27 19:41:11 +01:00
Vazkii e205562eee Meh, I don't need that. 2013-05-27 19:33:17 +01:00
Vazkii 0adca6c6cb Fixed the warded chest rendering in a container breaking subsequent block renders. 2013-05-27 19:29:30 +01:00
Vazkii a97f063d1f Phantom stone blocks now have glint when rendering in the inventory. 2013-05-27 19:21:01 +01:00
Vazkii 84e9abd491 Phantom stone is now working nicely. 2013-05-27 19:10:48 +01:00
Vazkii f6bfd2ff3b Initial draft for the Phantom Stone blocks, currently they don't work, they need more overrides :P 2013-05-27 13:06:48 +01:00
Vazkii 85c552133c That was a nice resource, but I don't need it. 2013-05-27 12:20:19 +01:00
Vazkii c116faae74 Once a mob gets possessed, it should stay for quite a fair bit, not 10 seconds... 2013-05-27 12:16:47 +01:00
Vazkii ec3765f7f0 Lost enchantments should no longer crash the game on enchanting... 2013-05-27 12:06:20 +01:00
Vazkii 840c8ab497 Implemented the Soulbringer enchantment. 2013-05-27 12:03:44 +01:00
Vazkii de0636e941 Yay, enchantment particles :D 2013-05-27 00:21:23 +01:00
Vazkii 774179d40e Added the possessed potion effect. Doesn't do anything yet, will be used for the Soulbringer enchant. 2013-05-26 23:35:12 +01:00
Vazkii 1424f6fbb4 Added config option for wand of dislocation pickup tiles. 2013-05-26 20:23:45 +01:00
Vazkii 86aeb86f91 Made the fume dissipator need to be researched, this should fix som issues... 2013-05-26 20:12:20 +01:00
Vazkii 7a005a1ae3 Implemented the Ashes enchant. 2013-05-26 19:54:25 +01:00
Vazkii 3aac6bc05f Vampirism now does stuff. 2013-05-25 23:56:01 +01:00
Vazkii 32e7a42406 Added SFX to freezing and made the warded chest doesn't budge sound a more appropriate one. 2013-05-25 23:42:41 +01:00
Vazkii 1b71aeb790 Sync and Withering? BORING! Changing enchantments around, bringing back some TC2 goodies :D 2013-05-25 23:39:30 +01:00
Vazkii e255521141 Copied over the Frozen potion effect from Elemental Tinkerer, working on implementing some of the enchantments. 2013-05-25 23:16:25 +01:00
Vazkii a9ef042830 Added the enchantments I want to make, they don't do anything yet. 2013-05-25 12:24:52 +01:00
Vazkii 5df0319081 Actually laid the foundations, that last commit didn't go so well... 2013-05-25 11:38:18 +01:00
Vazkii 09e35e1565 Laid some foundations for some new enchantments. 2013-05-25 11:37:11 +01:00
Vazkii df96ea26c5 Rewrote the Fluxometer render. Should work universally now, hopefully... 2013-05-25 00:49:42 +01:00
Vazkii 671c449743 Stopwatch now behaves on servers... 2013-05-24 23:58:47 +01:00
Vazkii 6737d04706 Ok, a proper code template is good. 2013-05-21 17:20:33 +01:00
Vazkii 179d6f7ae5 Readied the libs for 1.0.3. 2013-05-21 12:59:42 +01:00
Vazkii 165e6a0d87 Fluxometer research and recipe. 2013-05-21 12:38:26 +01:00
Vazkii 9269c0a26e Tweaked the Flux Detector renderer to show near-empty values, so they can be seen even if they are minimal. 2013-05-21 12:37:27 +01:00
Vazkii 70748fd00c Dividing by zero is bad. 2013-05-21 11:59:14 +01:00
Vazkii 507a630668 Think I'll settle with that renderer. 2013-05-21 11:45:08 +01:00
Vazkii b233aaa802 Made the renderer for the Fluxometer neater. 2013-05-21 11:29:16 +01:00
Vazkii 9c67110655 Fixed the warded chest crashing the server... 2013-05-21 10:59:40 +01:00
Vazkii 4c39ce4fe9 Flux detector render, WIP. 2013-05-21 00:37:41 +01:00
Vazkii 5f4d434362 And some better research text for it too, I found the old one to be somewhat lacking. 2013-05-20 23:47:54 +01:00
Vazkii a42c8e80fe Cleaned up the TWW's Remedium Talisman ;) 2013-05-20 23:43:05 +01:00
Vazkii fdcbc88cb9 Fluxometer now has a tag compound to store found object tags on the nearby aura... hopefully. 2013-05-20 23:38:14 +01:00
TheWhiteWolves 594b34f78c Tweaked aspects on talisman of remedium 2013-05-20 23:33:01 +01:00
TheWhiteWolves d130f1061c Cleaned up code and added in missing config for talisman of remedium 2013-05-20 23:30:22 +01:00
TheWhiteWolves 0a1bde7abb Added Talisman of Remedium 2013-05-20 23:13:40 +01:00
Vazkii 5d5e99c69e Laid some scaffolding *cough* for the Fluxometer render. 2013-05-20 22:59:46 +01:00
Vazkii 1e69128e85 Getting started on a new item, the Fluxometer. 2013-05-20 22:32:00 +01:00
Vazkii dc48c45527 Fixed the wand of uprising recipe being wrong, and made the research be easier to understand. 2013-05-20 22:26:19 +01:00
Vazkii 054022bf2c Screw it, remove all the .25 translations. Fixing some render weirdness in the TDT renderer... 2013-05-20 22:09:55 +01:00
Vazkii f0bf6178da Recipe and Research for the Fume Dissipator. 2013-05-20 22:08:32 +01:00
Vazkii 8eeccc7449 Added the Fume Dissipator item. 2013-05-20 21:26:10 +01:00
Vazkii 40f87e628f Changed the Wand of the Tinkerer recipe and recharge time. 2013-05-20 20:59:05 +01:00
Vazkii 21e26b051b Commited the project Code Template, backup is good. 2013-05-20 19:53:35 +01:00
Vazkii 740b65785b Fixed TDT overlay for right clicks not rotating. 2013-05-20 19:28:13 +01:00
Vazkii 2483ec15bf Made the TDT able to be rotated and fixed some render shifts for it. 2013-05-20 13:10:37 +01:00
Vazkii 141b6e5f7b TDT render now shows where it's facing. 2013-05-20 12:07:50 +01:00
Vazkii af6b2d0287 Ok, how did that pass? 2013-05-20 11:46:19 +01:00
Vazkii 24e5bbf962 Merge branch 'master' of https://github.com/Vazkii/ThaumicTinkerer 2013-05-20 11:42:02 +01:00
Vazkii f78a3141e0 Hopefully fixed spellbinding cloth crashing when it breaks. 2013-05-20 11:41:16 +01:00
TheWhiteWolves 7f8dc37db0 Made Goliath Legging's effect work against creeper blasts 2013-05-19 19:19:22 +01:00
TheWhiteWolves 4449eea79c Fixed Goliath Leggings not receiving the Repair enchant 2013-05-19 18:51:34 +01:00
Vazkii 1b07525a42 Ready for the 1.0.2 relaase. 2013-05-19 17:12:47 +01:00
Vazkii 81b7835b8e Changed the order in which object tags are registered to make recipe stuff better. Also added the dark aspect to smokey quartz. 2013-05-19 17:10:52 +01:00
Vazkii 40ea404e11 Added Gaseous Tenebrae research and recipe. 2013-05-19 17:03:08 +01:00
Vazkii 934b18c48a Added the Gaseous Tenebrae item/block. 2013-05-19 16:37:50 +01:00
Vazkii 3f20f67777 Changed the gaseous glowstone code to be more modular. This change will be needed in a moment. 2013-05-19 16:13:08 +01:00
Vazkii 7e1b341363 Goliath's Leggings research, recipe and vis discout feature. 2013-05-19 16:01:24 +01:00
TheWhiteWolves d0afd1ffc1 Fixed the typos in the research
changed the trough's to through's and the dark to smokey in the smokey
quartz
2013-05-19 15:45:10 +01:00
Vazkii 8bb56a1402 Fixed some research typos. 2013-05-19 15:39:41 +01:00
Vazkii 13225fdcf4 Added the Goliath's Leggings, plus their effect. And some cleanup too. 2013-05-19 15:34:59 +01:00
Vazkii 1f1914862b Fixed IDs being incorrrect. 2013-05-19 14:45:57 +01:00
Vazkii 5084fa5eb2 Commited resources for a new armor, Goliath's Leggings. 2013-05-19 14:37:08 +01:00
Vazkii 53138dd309 Moved the gaseous glowstone research a bit to the left. *looks at MysteriousAges* 2013-05-19 14:22:26 +01:00
Vazkii 624d1f4717 Ender Mirror research and recipe. 2013-05-19 14:11:49 +01:00
Vazkii 6e57f44e23 Added the effect for the Ender Mirror. 2013-05-19 13:22:45 +01:00
Vazkii 6900b897dd Getting started on a new item, the Ender Mirror. And a bunch of cleanup got thrown together with this. 2013-05-19 13:08:07 +01:00
Vazkii 620a65ee21 The TDT and Transmutator now behave on block breaking. 2013-05-19 12:52:44 +01:00
Vazkii 6274ea0d36 TDT now longer breaks everything in one hit (how did that happen? O.o) 2013-05-19 12:46:33 +01:00
Vazkii 264985d4c4 The GUI for the transmutator now draws accurate values based on the config. 2013-05-19 12:25:54 +01:00
Vazkii 99daf56fbf Made the sigil of memories faster. 2013-05-19 11:58:59 +01:00
Vazkii cbe87c9714 Made smokey quartz slabs behave creative mode pick block. 2013-05-19 11:57:05 +01:00
Vazkii b48fcdf35a Added a master switch to the transmutator. 2013-05-19 11:46:44 +01:00
Vazkii 579116994a Made the Transmutator configurable. 2013-05-19 11:44:02 +01:00
Vazkii eec97ab588 Fixed TDT breaking bedrock and other unbreakable blocks. 2013-05-19 11:31:54 +01:00
Vazkii bd26b95a63 Ready to push 1.0.1. 2013-05-18 20:38:52 +01:00
Vazkii 0edfb65083 Buffed the DefaultEnchant items' durability. 2013-05-18 20:38:10 +01:00
Vazkii df5c91e81f Fixed 2 crashes, one related to ars magica not loading, one related to the smokey quartz research. 2013-05-18 20:36:04 +01:00
Vazkii d2faaf43fc Ooops. guess the warded chest was duping everything that was put there. 2013-05-18 18:56:39 +01:00
Vazkii 1eca01b2f0 Yay for running on servers. Changed the version name over to 1.0, as it is ready for an actual release :D 2013-05-18 17:38:37 +01:00
78 changed files with 2295 additions and 187 deletions

No files matched your search

+24
View File
@@ -0,0 +1,24 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?><templates><template autoinsert="false" context="gettercomment_context" deleted="false" description="Comment for getter method" enabled="true" id="org.eclipse.jdt.ui.text.codetemplates.gettercomment" name="gettercomment"/><template autoinsert="false" context="settercomment_context" deleted="false" description="Comment for setter method" enabled="true" id="org.eclipse.jdt.ui.text.codetemplates.settercomment" name="settercomment"/><template autoinsert="false" context="constructorcomment_context" deleted="false" description="Comment for created constructors" enabled="true" id="org.eclipse.jdt.ui.text.codetemplates.constructorcomment" name="constructorcomment"/><template autoinsert="false" context="filecomment_context" deleted="false" description="Comment for created Java files" enabled="true" id="org.eclipse.jdt.ui.text.codetemplates.filecomment" name="filecomment">/**
* This class was created by &lt;Vazkii&gt;. It's distributed as
* part of the ${project_name} Mod.
*
* ${project_name} is Open Source and distributed under a
* Creative Commons Attribution-NonCommercial-ShareAlike 3.0 License
* (http://creativecommons.org/licenses/by-nc-sa/3.0/deed.en_GB)
*
* ${project_name} is a Derivative Work on Thaumcraft 3.
* Thaumcraft 3 © Azanor 2012
* (http://www.minecraftforum.net/topic/1585216-)
*
* File Created @ [${date}, ${time} (GMT)]
*/</template><template autoinsert="false" context="typecomment_context" deleted="false" description="Comment for created types" enabled="true" id="org.eclipse.jdt.ui.text.codetemplates.typecomment" name="typecomment"/><template autoinsert="false" context="fieldcomment_context" deleted="false" description="Comment for fields" enabled="true" id="org.eclipse.jdt.ui.text.codetemplates.fieldcomment" name="fieldcomment"/><template autoinsert="false" context="methodcomment_context" deleted="false" description="Comment for non-overriding methods" enabled="true" id="org.eclipse.jdt.ui.text.codetemplates.methodcomment" name="methodcomment"/><template autoinsert="false" context="overridecomment_context" deleted="false" description="Comment for overriding methods" enabled="true" id="org.eclipse.jdt.ui.text.codetemplates.overridecomment" name="overridecomment"/><template autoinsert="false" context="delegatecomment_context" deleted="false" description="Comment for delegate methods" enabled="true" id="org.eclipse.jdt.ui.text.codetemplates.delegatecomment" name="delegatecomment"/><template autoinsert="true" context="newtype_context" deleted="false" description="Newly created files" enabled="true" id="org.eclipse.jdt.ui.text.codetemplates.newtype" name="newtype">${filecomment}
${package_declaration}
${typecomment}
${type_declaration}</template><template autoinsert="true" context="classbody_context" deleted="false" description="Code in new class type bodies" enabled="true" id="org.eclipse.jdt.ui.text.codetemplates.classbody" name="classbody">
</template><template autoinsert="true" context="interfacebody_context" deleted="false" description="Code in new interface type bodies" enabled="true" id="org.eclipse.jdt.ui.text.codetemplates.interfacebody" name="interfacebody">
</template><template autoinsert="true" context="enumbody_context" deleted="false" description="Code in new enum type bodies" enabled="true" id="org.eclipse.jdt.ui.text.codetemplates.enumbody" name="enumbody">
</template><template autoinsert="true" context="annotationbody_context" deleted="false" description="Code in new annotation type bodies" enabled="true" id="org.eclipse.jdt.ui.text.codetemplates.annotationbody" name="annotationbody">
</template><template autoinsert="true" context="catchblock_context" deleted="false" description="Code in new catch blocks" enabled="true" id="org.eclipse.jdt.ui.text.codetemplates.catchblock" name="catchblock">// ${todo} Auto-generated catch block
${exception_var}.printStackTrace();</template><template autoinsert="false" context="methodbody_context" deleted="false" description="Code in created method stubs" enabled="true" id="org.eclipse.jdt.ui.text.codetemplates.methodbody" name="methodbody"/><template autoinsert="true" context="constructorbody_context" deleted="false" description="Code in created constructor stubs" enabled="true" id="org.eclipse.jdt.ui.text.codetemplates.constructorbody" name="constructorbody">${body_statement}
// ${todo} Auto-generated constructor stub</template><template autoinsert="true" context="getterbody_context" deleted="false" description="Code in created getters" enabled="true" id="org.eclipse.jdt.ui.text.codetemplates.getterbody" name="getterbody">return ${field};</template><template autoinsert="true" context="setterbody_context" deleted="false" description="Code in created setters" enabled="true" id="org.eclipse.jdt.ui.text.codetemplates.setterbody" name="setterbody">${field} = ${param};</template></templates>
+4 -4
View File
@@ -2,14 +2,14 @@
{
"modid": "ThaumicTinkerer",
"name": "Thaumic Tinkerer",
"description": "An addon to Thaumcraft 3, implementing new content. This mod is a spiritual successor to Elemental Tinkerer. Compiled for Thaumcraft 3.0.5.",
"version": "1.0pre",
"description": "An addon to Thaumcraft 3, implementing new content. This mod is a spiritual successor to Elemental Tinkerer. Researches that come from this mod are prefixed by [TT]. Compiled for Thaumcraft 3.0.5.",
"version": "1.0.5",
"mcversion": "1.5+",
"logoFile": "/mods/ThaumicTinkerer/logo.png",
"url": "",
"url": "minecraftforum.net/topic/1813058-",
"updateUrl": "",
"authors": ["Vazkii"],
"credits": "azanor for creating Thaumcraft. TheAtlanticCraft, MartysGames, TheWhiteWolves",
"credits": "azanor for creating Thaumcraft. TheAtlanticCraft, MartysGames, TheWhiteWolves.",
"parent": "",
"screenshots": [],
"dependencies": ["Thaumcraft"]
+6 -2
View File
@@ -20,6 +20,7 @@ import thaumcraft.common.CommonProxy;
import thaumcraft.common.Thaumcraft;
import vazkii.tinkerer.block.ModBlocks;
import vazkii.tinkerer.core.proxy.TTCommonProxy;
import vazkii.tinkerer.enchantment.ModEnchantments;
import vazkii.tinkerer.item.ModItems;
import vazkii.tinkerer.lib.LibMisc;
import vazkii.tinkerer.lib.LibNetwork;
@@ -76,6 +77,7 @@ public class ThaumicTinkerer {
ModBlocks.initBlocks();
ModItems.initItems();
ModPotions.initPotions();
ModEnchantments.initEnchantments();
proxy.initEntities();
proxy.initTileEntities();
@@ -91,10 +93,12 @@ public class ThaumicTinkerer {
@PostInit
public void onPostInit(FMLPostInitializationEvent event) {
ModCraftingRecipes.initCraftingRecipes();
ModResearchItems.registerModResearchItems();
ModInfusionRecipes.initInfusionRecipes();
ModArcaneRecipes.initArcaneRecipes();
ModCraftingRecipes.initCraftingRecipes();
}
ModItems.applyObjectTags();
ModBlocks.applyObjectTags();
}
}
@@ -19,13 +19,17 @@ import java.util.Random;
import net.minecraft.block.material.Material;
import net.minecraft.client.renderer.texture.IconRegister;
import net.minecraft.entity.EntityLiving;
import net.minecraft.entity.item.EntityItem;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.ItemStack;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.ChunkCoordinates;
import net.minecraft.util.Icon;
import net.minecraft.util.MathHelper;
import net.minecraft.world.World;
import net.minecraftforge.common.ForgeDirection;
import thaumcraft.common.items.wands.ItemWandCasting;
import vazkii.tinkerer.ThaumicTinkerer;
import vazkii.tinkerer.client.util.helper.IconHelper;
import vazkii.tinkerer.lib.LibGuiIDs;
@@ -39,12 +43,16 @@ public class BlockAnimationTablet extends BlockModContainer {
Icon iconTop;
Icon iconSides;
Random random;
public BlockAnimationTablet(int par1) {
super(par1, Material.iron);
setBlockBounds(0F, 0F, 0F, 1F, 1F / 16F * 2F, 1F);
setHardness(3F);
setResistance(50F);
setStepSound(soundMetalFootstep);
random = new Random();
}
@Override
@@ -75,6 +83,49 @@ public class BlockAnimationTablet extends BlockModContainer {
par1World.setBlockMetadataWithNotify(par2, par3, par4, b0, 2);
}
@Override
public void breakBlock(World par1World, int par2, int par3, int par4, int par5, int par6) {
TileEntityAnimationTablet tablet = (TileEntityAnimationTablet) par1World.getBlockTileEntity(par2, par3, par4);
if (tablet != null) {
if(tablet.getIsBreaking()) {
ChunkCoordinates coords = tablet.getTargetLoc();
par1World.destroyBlockInWorldPartially(tablet.getFakePlayer().entityId, coords.posX, coords.posY, coords.posZ, -1);
}
for (int j1 = 0; j1 < tablet.getSizeInventory(); ++j1) {
ItemStack itemstack = tablet.getStackInSlot(j1);
if (itemstack != null) {
float f = random.nextFloat() * 0.8F + 0.1F;
float f1 = random.nextFloat() * 0.8F + 0.1F;
EntityItem entityitem;
for (float f2 = random.nextFloat() * 0.8F + 0.1F; itemstack.stackSize > 0; par1World.spawnEntityInWorld(entityitem)) {
int k1 = random.nextInt(21) + 10;
if (k1 > itemstack.stackSize)
k1 = itemstack.stackSize;
itemstack.stackSize -= k1;
entityitem = new EntityItem(par1World, par2 + f, par3 + f1, par4 + f2, new ItemStack(itemstack.itemID, k1, itemstack.getItemDamage()));
float f3 = 0.05F;
entityitem.motionX = (float)random.nextGaussian() * f3;
entityitem.motionY = (float)random.nextGaussian() * f3 + 0.2F;
entityitem.motionZ = (float)random.nextGaussian() * f3;
if (itemstack.hasTagCompound())
entityitem.getEntityItem().setTagCompound((NBTTagCompound)itemstack.getTagCompound().copy());
}
}
}
par1World.func_96440_m(par2, par3, par4, par5);
}
super.breakBlock(par1World, par2, par3, par4, par5, par6);
}
@Override
public void onNeighborBlockChange(World par1World, int par2, int par3, int par4, int par5) {
boolean power = par1World.isBlockIndirectlyGettingPowered(par2, par3, par4) || par1World.isBlockIndirectlyGettingPowered(par2, par3 + 1, par4);
@@ -110,8 +161,20 @@ public class BlockAnimationTablet extends BlockModContainer {
public boolean onBlockActivated(World par1World, int par2, int par3, int par4, EntityPlayer par5EntityPlayer, int par6, float par7, float par8, float par9) {
if(!par1World.isRemote) {
TileEntity tile = par1World.getBlockTileEntity(par2, par3, par4);
if(tile != null)
par5EntityPlayer.openGui(ThaumicTinkerer.modInstance, LibGuiIDs.ID_ANIMATION_TABLET, par1World, par2, par3, par4);
if(tile != null) {
TileEntityAnimationTablet tablet = (TileEntityAnimationTablet) tile;
if(par5EntityPlayer.getCurrentEquippedItem() != null && par5EntityPlayer.getCurrentEquippedItem().getItem() instanceof ItemWandCasting) {
int meta = par1World.getBlockMetadata(par2, par3, par4);
boolean activated = (meta & 8) != 0;
if(!activated && !tablet.getIsBreaking() && tablet.swingProgress == 0) {
par1World.setBlockMetadataWithNotify(par2, par3, par4, meta == 5 ? + 2 : meta + 1, 1 | 2);
par1World.playSoundEffect(par2, par3, par4, "thaumcraft.tool", 0.6F, 1F);
} else par5EntityPlayer.addChatMessage("You can not rotate the Tablet while it's activated.");
// Rare chance this might happen, but better to cope for it.
return true;
} else par5EntityPlayer.openGui(ThaumicTinkerer.modInstance, LibGuiIDs.ID_ANIMATION_TABLET, par1World, par2, par3, par4);
}
}
return true;
@@ -0,0 +1,42 @@
/**
* This class was created by <Vazkii>. It's distributed as
* part of the ThaumicTinkerer Mod.
*
* ThaumicTinkerer is Open Source and distributed under a
* Creative Commons Attribution-NonCommercial-ShareAlike 3.0 License
* (http://creativecommons.org/licenses/by-nc-sa/3.0/deed.en_GB)
*
* ThaumicTinkerer is a Derivative Work on Thaumcraft 3.
* Thaumcraft 3 © Azanor 2012
* (http://www.minecraftforum.net/topic/1585216-)
*
* File Created @ [19 May 2013, 16:17:59 (GMT)]
*/
package vazkii.tinkerer.block;
import java.util.Random;
import net.minecraft.world.World;
import vazkii.tinkerer.ThaumicTinkerer;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
public class BlockDarkGas extends BlockGas {
public BlockDarkGas(int par1) {
super(par1);
setLightOpacity(215);
}
@Override
@SideOnly(Side.CLIENT)
public void randomDisplayTick(World par1World, int par2, int par3, int par4, Random par5Random) {
if(par5Random.nextFloat() < 0.0075F)
ThaumicTinkerer.tcProxy.wispFX2(par1World, par2 + 0.5, par3 + 0.5, par4 + 0.5, 0.125F, 5, true, -0.02F);
}
@Override
public void placeParticle(World world, int par2, int par3, int par4) {
ThaumicTinkerer.tcProxy.wispFX2(world, par2 + 0.5, par3 + 0.5, par4 + 0.5, 0.125F, 5, true, -0.02F);
}
}
@@ -20,6 +20,7 @@ import net.minecraft.block.material.Material;
import net.minecraft.client.renderer.texture.IconRegister;
import net.minecraft.item.ItemStack;
import net.minecraft.util.Icon;
import net.minecraft.world.World;
import vazkii.tinkerer.lib.LibBlockNames;
import vazkii.tinkerer.util.helper.ModCreativeTab;
import cpw.mods.fml.relauncher.Side;
@@ -48,6 +49,12 @@ public class BlockDarkQuartzSlab extends BlockHalfSlab {
return ModBlocks.darkQuartzSlab.blockID;
}
@Override
@SideOnly(Side.CLIENT)
public int idPicked(World par1World, int par2, int par3, int par4) {
return blockID;
}
@Override
protected ItemStack createStackedBlock(int par1) {
return new ItemStack(ModBlocks.darkQuartzSlab);
+130
View File
@@ -0,0 +1,130 @@
/**
* This class was created by <Vazkii>. It's distributed as
* part of the ThaumicTinkerer Mod.
*
* ThaumicTinkerer is Open Source and distributed under a
* Creative Commons Attribution-NonCommercial-ShareAlike 3.0 License
* (http://creativecommons.org/licenses/by-nc-sa/3.0/deed.en_GB)
*
* ThaumicTinkerer is a Derivative Work on Thaumcraft 3.
* Thaumcraft 3 © Azanor 2012
* (http://www.minecraftforum.net/topic/1585216-)
*
* File Created @ [25 Apr 2013, 11:57:15 (GMT)]
*/
package vazkii.tinkerer.block;
import java.util.ArrayList;
import java.util.Random;
import net.minecraft.block.material.Material;
import net.minecraft.client.renderer.texture.IconRegister;
import net.minecraft.item.ItemStack;
import net.minecraft.util.AxisAlignedBB;
import net.minecraft.world.Explosion;
import net.minecraft.world.World;
import vazkii.tinkerer.client.util.helper.IconHelper;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
public abstract class BlockGas extends BlockMod {
public BlockGas(int par1) {
super(par1, Material.air);
setBlockBounds(0, 0, 0, 0, 0, 0);
setTickRandomly(true);
}
@Override
@SideOnly(Side.CLIENT)
public void registerIcons(IconRegister par1IconRegister) {
blockIcon = IconHelper.emptyTexture(par1IconRegister);
}
@Override
public int getRenderType() {
return -1;
}
@Override
public void updateTick(World par1World, int par2, int par3, int par4, Random par5Random) {
int meta = par1World.getBlockMetadata(par2, par3, par4);
if(meta != 0) {
setAt(par1World, par2 - 1, par3, par4, meta - 1);
setAt(par1World, par2 + 1, par3, par4, meta - 1);
setAt(par1World, par2, par3 - 1, par4, meta - 1);
setAt(par1World, par2, par3 + 1, par4, meta - 1);
setAt(par1World, par2, par3, par4 - 1, meta - 1);
setAt(par1World, par2, par3, par4 + 1, meta - 1);
// Just in case...
par1World.setBlockMetadataWithNotify(par2, par3, par4, 0, 2);
placeParticle(par1World, par2, par3, par4);
}
}
public void placeParticle(World world, int par2, int par3, int par4) {
// NO-OP, override
}
private void setAt(World world, int x, int y, int z, int meta) {
if(world.isAirBlock(x, y, z) && world.getBlockId(x, y, z) != blockID) {
if(!world.isRemote)
world.setBlock(x, y, z, blockID, meta, 2);
world.scheduleBlockUpdate(x, y, z, blockID, 10);
}
}
@Override
public boolean isBlockNormalCube(World world, int x, int y, int z) {
return false;
}
@Override
public boolean isOpaqueCube() {
return false;
}
@Override
boolean registerInCreative() {
return false;
}
@Override
public boolean canDragonDestroy(World world, int x, int y, int z) {
return false;
}
@Override
public boolean canCollideCheck(int par1, boolean par2) {
return false;
}
@Override
public boolean canBeReplacedByLeaves(World world, int x, int y, int z) {
return true;
}
@Override
public boolean canDropFromExplosion(Explosion par1Explosion) {
return false;
}
@Override
public ArrayList<ItemStack> getBlockDropped(World world, int x, int y, int z, int metadata, int fortune) {
return new ArrayList(); // Empty List
}
@Override
public AxisAlignedBB getCollisionBoundingBoxFromPool(World par1World, int par2, int par3, int par4) {
return null;
}
@Override
public boolean isAirBlock(World world, int x, int y, int z) {
return true;
}
}
@@ -10,42 +10,22 @@
* Thaumcraft 3 © Azanor 2012
* (http://www.minecraftforum.net/topic/1585216-)
*
* File Created @ [25 Apr 2013, 11:57:15 (GMT)]
* File Created @ [19 May 2013, 16:10:50 (GMT)]
*/
package vazkii.tinkerer.block;
import java.util.ArrayList;
import java.util.Random;
import net.minecraft.block.material.Material;
import net.minecraft.client.renderer.texture.IconRegister;
import net.minecraft.item.ItemStack;
import net.minecraft.util.AxisAlignedBB;
import net.minecraft.world.Explosion;
import net.minecraft.world.World;
import vazkii.tinkerer.ThaumicTinkerer;
import vazkii.tinkerer.client.util.helper.IconHelper;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
public class BlockGlowstoneGas extends BlockMod {
public class BlockGlowstoneGas extends BlockGas {
public BlockGlowstoneGas(int par1) {
super(par1, Material.air);
super(par1);
setLightValue(0.85F);
setBlockBounds(0, 0, 0, 0, 0, 0);
setTickRandomly(true);
}
@Override
@SideOnly(Side.CLIENT)
public void registerIcons(IconRegister par1IconRegister) {
blockIcon = IconHelper.emptyTexture(par1IconRegister);
}
@Override
public int getRenderType() {
return -1;
}
@Override
@@ -56,80 +36,7 @@ public class BlockGlowstoneGas extends BlockMod {
}
@Override
public void updateTick(World par1World, int par2, int par3, int par4, Random par5Random) {
int meta = par1World.getBlockMetadata(par2, par3, par4);
if(meta != 0) {
setAt(par1World, par2 - 1, par3, par4, meta - 1);
setAt(par1World, par2 + 1, par3, par4, meta - 1);
setAt(par1World, par2, par3 - 1, par4, meta - 1);
setAt(par1World, par2, par3 + 1, par4, meta - 1);
setAt(par1World, par2, par3, par4 - 1, meta - 1);
setAt(par1World, par2, par3, par4 + 1, meta - 1);
// Just in case...
par1World.setBlockMetadataWithNotify(par2, par3, par4, 0, 2);
ThaumicTinkerer.tcProxy.sparkle(par2 + 0.5F, par3 + 0.5F, par4 + 0.5F, 1);
}
public void placeParticle(World world, int par2, int par3, int par4) {
ThaumicTinkerer.tcProxy.sparkle(par2 + 0.5F, par3 + 0.5F, par4 + 0.5F, 1);
}
private void setAt(World world, int x, int y, int z, int meta) {
if(world.isAirBlock(x, y, z) && world.getBlockId(x, y, z) != blockID) {
if(!world.isRemote)
world.setBlock(x, y, z, blockID, meta, 2);
world.scheduleBlockUpdate(x, y, z, blockID, 10);
}
}
@Override
public boolean isBlockNormalCube(World world, int x, int y, int z) {
return false;
}
@Override
public boolean isOpaqueCube() {
return false;
}
@Override
boolean registerInCreative() {
return false;
}
@Override
public boolean canDragonDestroy(World world, int x, int y, int z) {
return false;
}
@Override
public boolean canCollideCheck(int par1, boolean par2) {
return false;
}
@Override
public boolean canBeReplacedByLeaves(World world, int x, int y, int z) {
return true;
}
@Override
public boolean canDropFromExplosion(Explosion par1Explosion) {
return false;
}
@Override
public ArrayList<ItemStack> getBlockDropped(World world, int x, int y, int z, int metadata, int fortune) {
return new ArrayList(); // Empty List
}
@Override
public AxisAlignedBB getCollisionBoundingBoxFromPool(World par1World, int par2, int par3, int par4) {
return null;
}
@Override
public boolean isAirBlock(World world, int x, int y, int z) {
return true;
}
}
}
@@ -0,0 +1,86 @@
/**
* This class was created by <Vazkii>. It's distributed as
* part of the ThaumicTinkerer Mod.
*
* ThaumicTinkerer is Open Source and distributed under a
* Creative Commons Attribution-NonCommercial-ShareAlike 3.0 License
* (http://creativecommons.org/licenses/by-nc-sa/3.0/deed.en_GB)
*
* ThaumicTinkerer is a Derivative Work on Thaumcraft 3.
* Thaumcraft 3 © Azanor 2012
* (http://www.minecraftforum.net/topic/1585216-)
*
* File Created @ [27 May 2013, 12:27:14 (GMT)]
*/
package vazkii.tinkerer.block;
import java.util.List;
import net.minecraft.entity.Entity;
import net.minecraft.entity.EnumCreatureType;
import net.minecraft.entity.item.EntityItem;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.ItemStack;
import net.minecraft.util.AxisAlignedBB;
import net.minecraft.world.World;
import thaumcraft.common.Config;
import thaumcraft.common.blocks.BlockWarded;
import thaumcraft.common.items.wands.ItemWandCasting;
import thaumcraft.common.tiles.TileOwned;
import vazkii.tinkerer.util.helper.ModCreativeTab;
public class BlockPhantomStone extends BlockWarded {
public BlockPhantomStone(int par1) {
super(par1);
if(Config.wardedStone)
setCreativeTab(ModCreativeTab.INSTANCE);
}
@Override
public boolean canCreatureSpawn(EnumCreatureType type, World world, int x, int y, int z) {
return false;
}
@Override
public boolean isOpaqueCube() {
return false;
}
@Override
public boolean isBlockNormalCube(World world, int x, int y, int z) {
return false;
}
@Override
public boolean onBlockActivated(World par1World, int par2, int par3, int par4, EntityPlayer par5EntityPlayer, int par6, float par7, float par8, float par9) {
TileOwned tile = (TileOwned) par1World.getBlockTileEntity(par2, par3, par4);
if (tile != null) {
String owner = tile.owner;
if(owner.equals(par5EntityPlayer.username)) {
if(par5EntityPlayer.getCurrentEquippedItem() != null && par5EntityPlayer.getCurrentEquippedItem().getItem() instanceof ItemWandCasting) {
if(!par1World.isRemote) {
int id = par1World.getBlockId(par2, par3, par4);
int meta = par1World.getBlockMetadata(par2, par3, par4);
par1World.spawnEntityInWorld(new EntityItem(par1World, par2 + 0.5, par3 + 0.5, par4 + 0.5, new ItemStack(id, 1, meta)));
par1World.playAuxSFX(2001, par2, par3, par4, blockID + (meta << 12));
tile.safeToRemove = true;
par1World.setBlock(par2, par3, par4, 0, 0, 1 & 2);
} else par5EntityPlayer.swingItem();
return true;
}
}
}
return false;
}
@Override
public void addCollisionBoxesToList(World par1World, int par2, int par3, int par4, AxisAlignedBB par5AxisAlignedBB, List par6List, Entity par7Entity) {
TileOwned tile = (TileOwned) par1World.getBlockTileEntity(par2, par3, par4);
if(!(par7Entity instanceof EntityPlayer && ((EntityPlayer) par7Entity).username.equals(tile.owner)))
super.addCollisionBoxesToList(par1World, par2, par3, par4, par5AxisAlignedBB, par6List, par7Entity);
}
}
@@ -14,9 +14,14 @@
*/
package vazkii.tinkerer.block;
import java.util.Random;
import net.minecraft.block.material.Material;
import net.minecraft.client.renderer.texture.IconRegister;
import net.minecraft.entity.item.EntityItem;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.ItemStack;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.Icon;
import net.minecraft.world.World;
@@ -24,6 +29,7 @@ import vazkii.tinkerer.ThaumicTinkerer;
import vazkii.tinkerer.client.util.helper.IconHelper;
import vazkii.tinkerer.lib.LibGuiIDs;
import vazkii.tinkerer.tile.TileEntityTransmutator;
import vazkii.tinkerer.util.handler.ConfigurationHandler;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
@@ -31,25 +37,70 @@ public class BlockTransmutator extends BlockModContainer {
Icon[] icons = new Icon[6];
Random random;
public BlockTransmutator(int par1) {
super(par1, Material.wood);
setBlockBounds(0F, 0F, 0F, 1F, 1F / 16F * 6F, 1F);
setHardness(1.7F);
setResistance(1F);
setStepSound(soundWoodFootstep);
random = new Random();
}
@Override
public boolean onBlockActivated(World par1World, int par2, int par3, int par4, EntityPlayer par5EntityPlayer, int par6, float par7, float par8, float par9) {
if(!par1World.isRemote) {
TileEntity tile = par1World.getBlockTileEntity(par2, par3, par4);
if(tile != null)
par5EntityPlayer.openGui(ThaumicTinkerer.modInstance, LibGuiIDs.ID_TRANSMUTATOR, par1World, par2, par3, par4);
if(tile != null) {
if(ConfigurationHandler.enableTransmutator)
par5EntityPlayer.openGui(ThaumicTinkerer.modInstance, LibGuiIDs.ID_TRANSMUTATOR, par1World, par2, par3, par4);
else par5EntityPlayer.addChatMessage("The Arcane Transmutator is disabled on this server.");
}
}
return true;
}
@Override
public void breakBlock(World par1World, int par2, int par3, int par4, int par5, int par6) {
TileEntityTransmutator transmutator = (TileEntityTransmutator) par1World.getBlockTileEntity(par2, par3, par4);
if (transmutator != null) {
for (int j1 = 0; j1 < transmutator.getSizeInventory(); ++j1) {
ItemStack itemstack = transmutator.getStackInSlot(j1);
if (itemstack != null) {
float f = random.nextFloat() * 0.8F + 0.1F;
float f1 = random.nextFloat() * 0.8F + 0.1F;
EntityItem entityitem;
for (float f2 = random.nextFloat() * 0.8F + 0.1F; itemstack.stackSize > 0; par1World.spawnEntityInWorld(entityitem)) {
int k1 = random.nextInt(21) + 10;
if (k1 > itemstack.stackSize)
k1 = itemstack.stackSize;
itemstack.stackSize -= k1;
entityitem = new EntityItem(par1World, par2 + f, par3 + f1, par4 + f2, new ItemStack(itemstack.itemID, k1, itemstack.getItemDamage()));
float f3 = 0.05F;
entityitem.motionX = (float)random.nextGaussian() * f3;
entityitem.motionY = (float)random.nextGaussian() * f3 + 0.2F;
entityitem.motionZ = (float)random.nextGaussian() * f3;
if (itemstack.hasTagCompound())
entityitem.getEntityItem().setTagCompound((NBTTagCompound)itemstack.getTagCompound().copy());
}
}
}
par1World.func_96440_m(par2, par3, par4, par5);
}
super.breakBlock(par1World, par2, par3, par4, par5, par6);
}
@Override
@SideOnly(Side.CLIENT)
public void registerIcons(IconRegister par1IconRegister) {
@@ -140,7 +140,7 @@ public class BlockWardChest extends BlockModContainer {
par1World.playSoundEffect(par2, par3, par4, "thaumcraft.key", 1F, 1F);
} else {
par5EntityPlayer.addChatMessage("The Chest refuses to budge.");
par1World.playSoundEffect(par2, par3, par4, "random.chestclosed", 1F, 0.2F);
par1World.playSoundEffect(par2, par3, par4, "thaumcraft.doorfail", 1F, 0.2F);
}
}
}
+9 -2
View File
@@ -20,6 +20,7 @@ import thaumcraft.api.ObjectTags;
import thaumcraft.api.ThaumcraftApi;
import vazkii.tinkerer.item.ItemDarkQuartzBlock;
import vazkii.tinkerer.item.ItemDarkQuartzSlab;
import vazkii.tinkerer.item.ItemPhantomStoneBlock;
import vazkii.tinkerer.lib.LibBlockIDs;
import vazkii.tinkerer.lib.LibBlockNames;
import vazkii.tinkerer.lib.LibMisc;
@@ -36,6 +37,8 @@ public final class ModBlocks {
public static Block darkQuartzSlab;
public static Block darkQuartzSlabFull;
public static Block animationTablet;
public static Block darkGas;
public static Block phantomStone;
public static void initBlocks() {
glowstoneGas = new BlockGlowstoneGas(LibBlockIDs.idGlowstoneGas).setUnlocalizedName(LibBlockNames.GLOWSTONE_GAS);
@@ -46,10 +49,11 @@ public final class ModBlocks {
darkQuartzSlab = new BlockDarkQuartzSlab(LibBlockIDs.idDarkQuartzSlab, false).setUnlocalizedName(LibBlockNames.DARK_QUARTZ_SLAB);
darkQuartzSlabFull = new BlockDarkQuartzSlab(LibBlockIDs.idDarkQuartzSlabFull, true).setUnlocalizedName(LibBlockNames.DARK_QUARTZ_SLAB);
animationTablet = new BlockAnimationTablet(LibBlockIDs.idAnimationTablet).setUnlocalizedName(LibBlockNames.ANIMATION_TABLET);
darkGas = new BlockDarkGas(LibBlockIDs.idDarkGas).setUnlocalizedName(LibBlockNames.DARK_GAS);
phantomStone = new BlockPhantomStone(LibBlockIDs.idPhantomStone).setUnlocalizedName(LibBlockNames.PHANTOM_STONE);
registerBlocks();
nameBlocks();
registerObjectTags();
}
private static void registerBlocks() {
@@ -61,6 +65,8 @@ public final class ModBlocks {
GameRegistry.registerBlock(darkQuartzSlab, ItemDarkQuartzSlab.class, LibBlockNames.DARK_QUARTZ_SLAB);
GameRegistry.registerBlock(darkQuartzSlabFull, ItemDarkQuartzSlab.class, LibBlockNames.DARK_QUARTZ_SLAB_FULL);
GameRegistry.registerBlock(animationTablet, LibBlockNames.ANIMATION_TABLET);
GameRegistry.registerBlock(darkGas, LibBlockNames.DARK_GAS);
GameRegistry.registerBlock(phantomStone, ItemPhantomStoneBlock.class, LibBlockNames.PHANTOM_STONE);
}
private static void nameBlocks() {
@@ -68,9 +74,10 @@ public final class ModBlocks {
LanguageRegistry.addName(wardChest, LibBlockNames.WARD_CHEST_D);
LanguageRegistry.addName(darkQuartzStairs, LibBlockNames.DARK_QUARTZ_STAIRS_D);
LanguageRegistry.addName(animationTablet, LibBlockNames.ANIMATION_TABLET_D);
LanguageRegistry.addName(phantomStone, LibBlockNames.PHANTOM_STONE_D);
}
private static void registerObjectTags() {
public static void applyObjectTags() {
ObjectTags tags = new ObjectTags().add(EnumTag.WOOD, 16).add(EnumTag.EXCHANGE, 64).add(EnumTag.FLUX, 24).add(EnumTag.MECHANISM, 8).add(EnumTag.MAGIC, 16);
ThaumcraftApi.registerObjectTag(transmutator.blockID, LibMisc.CRAFTING_META_WILDCARD, tags);
@@ -33,6 +33,7 @@ import vazkii.tinkerer.inventory.container.ContainerTransmutator;
import vazkii.tinkerer.inventory.slot.SlotTransmutator;
import vazkii.tinkerer.lib.LibResources;
import vazkii.tinkerer.tile.TileEntityTransmutator;
import vazkii.tinkerer.util.handler.ConfigurationHandler;
import vazkii.tinkerer.util.helper.MiscHelper;
public class GuiTransmutator extends GuiContainer {
@@ -64,7 +65,7 @@ public class GuiTransmutator extends GuiContainer {
GL11.glPushMatrix();
GL11.glScalef(0.5F, 0.5F, 0.5F);
ObjectTags tags = ThaumcraftCraftingManager.getObjectTags(transmutator.getStackInSlot(0));
int value = SlotTransmutator.getTotalAspectValue(tags);
int value = SlotTransmutator.getTotalAspectValue(tags) * ConfigurationHandler.transmutatorVisMultiplier;
String price = value + " vis";
fontRenderer.drawString(price, (x + 162 - fontRenderer.getStringWidth(price) / 2) * 2, (y + 69) * 2, 0xFFFFFF);
GL11.glPopMatrix();
@@ -83,7 +84,7 @@ public class GuiTransmutator extends GuiContainer {
int amount = tags.getAmount(tag);
int xpos = (int) (50 + 35 * Math.cos(renderDeg * Math.PI / 180));
int ypos = (int) (16 + 35 * Math.sin(renderDeg * Math.PI / 180));
UtilsFX.drawTag(mc, xpos, ypos, tag, amount * 4, this, false, false);
UtilsFX.drawTag(mc, xpos, ypos, tag, amount * ConfigurationHandler.transmutatorEssentiaMultiplier, this, false, false);
float deg = (float) (transmutator.ticksExisted * amount % 360F);
int color = tag.color;
@@ -91,7 +92,7 @@ public class GuiTransmutator extends GuiContainer {
int green = color >> 8 & 0xFF;
int blue = color & 0xFF;
GL11.glColor4ub((byte) red, (byte) green, (byte) blue, (byte) 128);
if(transmutator.foundTags.getAmount(tag) >= amount * 4)
if(transmutator.foundTags.getAmount(tag) >= amount * ConfigurationHandler.transmutatorEssentiaMultiplier)
renderGlyphsAt(xpos + 8, ypos + 8, deg);
if(i > xpos + x && i < xpos + x + 16 && j > ypos + y && j < ypos + y + 16)
@@ -0,0 +1,94 @@
/**
* This class was created by <Vazkii>. It's distributed as
* part of the ThaumicTinkerer Mod.
*
* ThaumicTinkerer is Open Source and distributed under a
* Creative Commons Attribution-NonCommercial-ShareAlike 3.0 License
* (http://creativecommons.org/licenses/by-nc-sa/3.0/deed.en_GB)
*
* ThaumicTinkerer is a Derivative Work on Thaumcraft 3.
* Thaumcraft 3 © Azanor 2012
* (http://www.minecraftforum.net/topic/1585216-)
*
* File Created @ [20 May 2013, 22:38:51 (GMT)]
*/
package vazkii.tinkerer.client.render.item;
import java.awt.Color;
import net.minecraft.client.renderer.RenderEngine;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.ItemStack;
import org.lwjgl.opengl.GL11;
import thaumcraft.api.EnumTag;
import thaumcraft.api.ObjectTags;
import thaumcraft.client.lib.UtilsFX;
import thaumcraft.client.renderers.item.HandheldItemRenderer;
import thaumcraft.common.items.armor.ItemGoggles;
import vazkii.tinkerer.client.util.handler.ClientTickHandler;
import vazkii.tinkerer.item.ItemFluxDetector;
import vazkii.tinkerer.util.helper.MiscHelper;
public class RenderItemFluxDetector extends HandheldItemRenderer {
// Because I'm a lasy bastard and don't want to code
// the whole renderer. <3 you Azanor.
@Override
public void renderThaumometer(ItemStack arg0, EntityPlayer arg1, RenderEngine arg2, float arg3) {
MiscHelper.getMc();
boolean goggles = arg1.getCurrentItemOrArmor(4) != null && arg1.getCurrentItemOrArmor(4).getItem() instanceof ItemGoggles;
GL11.glPushMatrix();
GL11.glTranslatef(-0.5F, -0.5F, 0F);
GL11.glScalef(3F, 3F, 3F);
renderItemStack(arg1, arg0, 0, false);
GL11.glScalef(0.3334F, 0.3334F, 0.3334F);
GL11.glScalef(-1F, -1F, 1F);
GL11.glTranslatef(-1.5F, -1.25F, 0F);
float zLevel = 5F;
ObjectTags tags = ItemFluxDetector.getTags(arg0);
if(tags != null && tags.size() > 0 && !arg1.isSwingInProgress) {
int degPerTag = 360 / tags.size();
int renderDeg = -90 + (int) (ClientTickHandler.clientTicksElapsed % 360);
for(EnumTag tag : tags.getAspects()) {
int amount = tags.getAmount(tag);
float radius = Math.max(0, Math.min(60, arg1.rotationPitch - 30)) / 30F;
float xpos = (float) (radius * Math.cos(renderDeg * Math.PI / 180));
float ypos = (float) (radius * Math.sin(renderDeg * Math.PI / 180));
if(amount == 100 && arg1.rotationPitch >= 90 && goggles) {
xpos += (Math.random() - 0.5) / 25F;
ypos += (Math.random() - 0.5) / 25F;
}
GL11.glPushMatrix();
float opacity = Math.min(arg1.rotationPitch / 100F, Math.max(0.3F, amount / 100F));
if(!goggles)
opacity = (float) Math.min(arg1.rotationPitch / 100F, Math.cos(ClientTickHandler.clientTicksElapsed / 5F) + 1.5F);
drawTag(goggles ? tag : EnumTag.UNKNOWN, 1.5F - arg1.rotationPitch / 100F, xpos, ypos, zLevel, opacity);
GL11.glTranslatef(0F, 0F, -1F);
GL11.glPopMatrix();
renderDeg += degPerTag;
zLevel -= 0.001F;
}
}
GL11.glPopMatrix();
}
private void drawTag(EnumTag tag, float defScale, float x, float y, float z, float opacity) {
final String tex = "/mods/thaumcraft/textures/misc/ss_tags_1.png";
Color color = new Color(tag.color);
GL11.glPushMatrix();
GL11.glDisable(GL11.GL_LIGHTING);
GL11.glTranslatef(x, y, z);
UtilsFX.renderQuadCenteredFromTexture(tex, 8, tag.id, defScale + (float) Math.cos(ClientTickHandler.clientTicksElapsed / 5F) / 20F, color.getRed() / 255F, color.getGreen() / 255F, color.getBlue() / 255F, 255, GL11.GL_ONE_MINUS_SRC_ALPHA, opacity);
GL11.glPopMatrix();
}
}
@@ -38,30 +38,32 @@ import vazkii.tinkerer.util.helper.MiscHelper;
public class RenderTileAnimationTablet extends TileEntitySpecialRenderer {
private static final float[][] TRANSLATIONS = new float[][] {
{ 0F, 0F, -1.25F },
{ -1.25F, 0F, 0F },
{ 0F, 0F, -1F },
{ -1F, 0F, 0F },
{ 0F, 0F, 0F },
{ -1.25F, 0F, -1.25F }
{ -1F, 0F, -1F }
};
@Override
public void renderTileEntityAt(TileEntity tileentity, double d0, double d1, double d2, float partialTicks) {
TileEntityAnimationTablet tile = (TileEntityAnimationTablet) tileentity;
GL11.glPushMatrix();
GL11.glTranslated(d0, d1, d2);
renderOverlay(tile, LibResources.MISC_AT_OVERLAY_DIAL, -1, false, false, 0.65, 0.13F);
if(tile.leftClick)
renderOverlay(tile, LibResources.MISC_AT_OVERLAY_LEFT, 1, false, true, 1, 0.13F);
else renderOverlay(tile, LibResources.MISC_AT_OVERLAY_RIGHT, 1, false, true, 1, 0.13F);
int meta = tile.getBlockMetadata() & 7;
int rotation = meta == 2 ? 270 : meta == 3 ? 90 : meta == 4 ? 0 : 180;
GL11.glPushMatrix();
GL11.glTranslated(d0, d1, d2);
renderOverlay(tile, LibResources.MISC_AT_OVERLAY_DIAL, -1, false, false, 0.65, 0.13F, 0F);
if(tile.leftClick)
renderOverlay(tile, LibResources.MISC_AT_OVERLAY_LEFT, 1, false, true, 1, 0.13F, 0F);
else renderOverlay(tile, LibResources.MISC_AT_OVERLAY_RIGHT, 1, false, true, 1, 0.131F, 0F);
renderOverlay(tile, LibResources.MISC_AT_OVERLAY_FACING, 0, false, false, 0.5F, 0.13F, rotation + 90F);
GL11.glRotatef(rotation, 0F, 1F, 0F);
GL11.glTranslated(0.1, 0.2 + Math.cos(ClientTickHandler.clientTicksElapsed / 12D) / 18F, 0.5);
GL11.glScalef(0.8F, 0.8F, 0.8F);
float[] translations = TRANSLATIONS[meta - 2];
GL11.glTranslatef(translations[0], translations[1], translations[2]);
GL11.glScalef(0.8F, 0.8F, 0.8F);
GL11.glTranslatef(0.5F, 0F, 0.5F);
GL11.glRotatef(tile.swingProgress, 0F, 0F, 1F);
GL11.glTranslatef(-0.5F, 0F, -0.5F);
@@ -101,7 +103,7 @@ public class RenderTileAnimationTablet extends TileEntitySpecialRenderer {
}
}
private void renderOverlay(TileEntityAnimationTablet tablet, String texture, int rotationMod, boolean useLighting, boolean useBlend, double size, float height) {
private void renderOverlay(TileEntityAnimationTablet tablet, String texture, int rotationMod, boolean useLighting, boolean useBlend, double size, float height, float forceDeg) {
Minecraft mc = MiscHelper.getMc();
mc.renderEngine.bindTexture(texture);
GL11.glPushMatrix();
@@ -113,7 +115,7 @@ public class RenderTileAnimationTablet extends TileEntitySpecialRenderer {
GL11.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA);
}
GL11.glTranslatef(0.5F, height, 0.5F);
float deg = (float) (tablet.ticksExisted * rotationMod % 360F);
float deg = rotationMod == 0 ? forceDeg : (float) (tablet.ticksExisted * rotationMod % 360F);
GL11.glRotatef(deg, 0F, 1F, 0F);
GL11.glColor4f(1F, 1F, 1F, 1F);
Tessellator tess = Tessellator.instance;
@@ -79,7 +79,6 @@ public class RenderTileWardChest extends TileEntitySpecialRenderer {
GL11.glRotatef(rotation, 0F, 1F, 0F);
GL11.glTranslatef(-0.5F, -0.5F, -0.5F);
chestModel.chestLid.render(LibMisc.MODEL_DEFAULT_RENDER_SCALE);
GL11.glDisable(GL12.GL_RESCALE_NORMAL);
GL11.glDisable(GL11.GL_BLEND);
GL11.glDepthMask(true);
GL11.glPopMatrix();
@@ -15,16 +15,21 @@
package vazkii.tinkerer.core.proxy;
import net.minecraft.entity.Entity;
import net.minecraft.entity.EntityLiving;
import net.minecraft.util.Vec3;
import net.minecraft.world.World;
import net.minecraftforge.client.MinecraftForgeClient;
import thaumcraft.client.fx.FXLightningBolt;
import vazkii.tinkerer.ThaumicTinkerer;
import vazkii.tinkerer.client.render.block.RenderWardChest;
import vazkii.tinkerer.client.render.entity.RenderDeathRune;
import vazkii.tinkerer.client.render.item.RenderItemFluxDetector;
import vazkii.tinkerer.client.render.tile.RenderTileAnimationTablet;
import vazkii.tinkerer.client.render.tile.RenderTileTransmutator;
import vazkii.tinkerer.client.render.tile.RenderTileWardChest;
import vazkii.tinkerer.client.util.handler.ClientTickHandler;
import vazkii.tinkerer.entity.EntityDeathRune;
import vazkii.tinkerer.item.ModItems;
import vazkii.tinkerer.lib.LibRenderIDs;
import vazkii.tinkerer.network.PacketManager;
import vazkii.tinkerer.network.packet.PacketAnimationTabletSync;
@@ -33,6 +38,7 @@ import vazkii.tinkerer.network.packet.PacketVerification;
import vazkii.tinkerer.tile.TileEntityAnimationTablet;
import vazkii.tinkerer.tile.TileEntityTransmutator;
import vazkii.tinkerer.tile.TileEntityWardChest;
import vazkii.tinkerer.util.helper.MiscHelper;
import cpw.mods.fml.client.registry.ClientRegistry;
import cpw.mods.fml.client.registry.RenderingRegistry;
import cpw.mods.fml.common.registry.TickRegistry;
@@ -77,6 +83,8 @@ public class TTClientProxy extends TTCommonProxy {
LibRenderIDs.idWardChest = RenderingRegistry.getNextAvailableRenderId();
RenderingRegistry.registerBlockHandler(new RenderWardChest());
MinecraftForgeClient.registerItemRenderer(ModItems.fluxDetector.itemID, new RenderItemFluxDetector());
}
@Override
@@ -87,4 +95,33 @@ public class TTClientProxy extends TTCommonProxy {
lightning.finalizeBolt();
}
@Override
public void sanityCheckedFrozenParticles(EntityLiving entity) {
for(int i = 0; i < 6; i++) {
float x = (float) (entity.posX + (entity.worldObj.rand.nextDouble() - 0.5F) * (entity.width * 2F));
float y = (float) (entity.posY + entity.worldObj.rand.nextDouble() * entity.height);
float z = (float) (entity.posZ + (entity.worldObj.rand.nextDouble() - 0.5F) * (entity.width * 2F));
float size = (float) Math.random();
float gravity = (float) (Math.random() / 20F);
if(MiscHelper.getMc().renderViewEntity != null)
ThaumicTinkerer.tcProxy.sparkle(x, y, z, size, 2, gravity);
}
}
@Override
public void sanityCheckedPossessedParticles(EntityLiving entity) {
for(int i = 0; i < 3; i++) {
float x = (float) (entity.posX + (entity.worldObj.rand.nextDouble() - 0.5F) * (entity.width * 2F));
float y = (float) (entity.posY + entity.worldObj.rand.nextDouble() * entity.height);
float z = (float) (entity.posZ + (entity.worldObj.rand.nextDouble() - 0.5F) * (entity.width * 2F));
float size = (float) (Math.random() / 2F);
float gravity = (float) (Math.random() / 20F);
if(MiscHelper.getMc().renderViewEntity != null)
ThaumicTinkerer.tcProxy.wispFX2(entity.worldObj, x, y, z, size, 5, false, gravity);
}
}
}
@@ -15,6 +15,7 @@
package vazkii.tinkerer.core.proxy;
import net.minecraft.entity.Entity;
import net.minecraft.entity.EntityLiving;
import net.minecraft.util.Vec3;
import net.minecraft.world.World;
import vazkii.tinkerer.ThaumicTinkerer;
@@ -55,4 +56,8 @@ public class TTCommonProxy {
}
public void sigilLightning(World world, Entity entity, Vec3 end) { }
}
public void sanityCheckedFrozenParticles(EntityLiving entity) { }
public void sanityCheckedPossessedParticles(EntityLiving entity) { }
}
@@ -0,0 +1,25 @@
/**
* This class was created by <Vazkii>. It's distributed as
* part of the ThaumicTinkerer Mod.
*
* ThaumicTinkerer is Open Source and distributed under a
* Creative Commons Attribution-NonCommercial-ShareAlike 3.0 License
* (http://creativecommons.org/licenses/by-nc-sa/3.0/deed.en_GB)
*
* ThaumicTinkerer is a Derivative Work on Thaumcraft 3.
* Thaumcraft 3 © Azanor 2012
* (http://www.minecraftforum.net/topic/1585216-)
*
* File Created @ [25 May 2013, 12:18:48 (GMT)]
*/
package vazkii.tinkerer.enchantment;
import net.minecraft.enchantment.EnumEnchantmentType;
public class EnchantmentAshes extends EnchantmentLost {
protected EnchantmentAshes(int par1) {
super(par1, EnumEnchantmentType.all);
}
}
@@ -0,0 +1,25 @@
/**
* This class was created by <Vazkii>. It's distributed as
* part of the ThaumicTinkerer Mod.
*
* ThaumicTinkerer is Open Source and distributed under a
* Creative Commons Attribution-NonCommercial-ShareAlike 3.0 License
* (http://creativecommons.org/licenses/by-nc-sa/3.0/deed.en_GB)
*
* ThaumicTinkerer is a Derivative Work on Thaumcraft 3.
* Thaumcraft 3 © Azanor 2012
* (http://www.minecraftforum.net/topic/1585216-)
*
* File Created @ [25 May 2013, 11:03:55 (GMT)]
*/
package vazkii.tinkerer.enchantment;
import net.minecraft.enchantment.EnumEnchantmentType;
public class EnchantmentFreezing extends EnchantmentLost {
protected EnchantmentFreezing(int par1) {
super(par1, EnumEnchantmentType.weapon);
}
}
@@ -0,0 +1,36 @@
/**
* This class was created by <Vazkii>. It's distributed as
* part of the ThaumicTinkerer Mod.
*
* ThaumicTinkerer is Open Source and distributed under a
* Creative Commons Attribution-NonCommercial-ShareAlike 3.0 License
* (http://creativecommons.org/licenses/by-nc-sa/3.0/deed.en_GB)
*
* ThaumicTinkerer is a Derivative Work on Thaumcraft 3.
* Thaumcraft 3 © Azanor 2012
* (http://www.minecraftforum.net/topic/1585216-)
*
* File Created @ [25 May 2013, 11:21:12 (GMT)]
*/
package vazkii.tinkerer.enchantment;
import net.minecraft.enchantment.Enchantment;
import net.minecraft.enchantment.EnumEnchantmentType;
import net.minecraft.item.ItemStack;
public class EnchantmentLost extends Enchantment {
protected EnchantmentLost(int par1, EnumEnchantmentType par3EnumEnchantmentType) {
super(par1, 1, par3EnumEnchantmentType);
}
@Override
public boolean canApplyAtEnchantingTable(ItemStack stack) {
return false; // Thank god for forge hooks :D
}
@Override
public boolean canApplyTogether(Enchantment par1Enchantment) {
return !(par1Enchantment instanceof EnchantmentLost);
}
}
@@ -0,0 +1,25 @@
/**
* This class was created by <Vazkii>. It's distributed as
* part of the ThaumicTinkerer Mod.
*
* ThaumicTinkerer is Open Source and distributed under a
* Creative Commons Attribution-NonCommercial-ShareAlike 3.0 License
* (http://creativecommons.org/licenses/by-nc-sa/3.0/deed.en_GB)
*
* ThaumicTinkerer is a Derivative Work on Thaumcraft 3.
* Thaumcraft 3 © Azanor 2012
* (http://www.minecraftforum.net/topic/1585216-)
*
* File Created @ [25 May 2013, 12:14:21 (GMT)]
*/
package vazkii.tinkerer.enchantment;
import net.minecraft.enchantment.EnumEnchantmentType;
public class EnchantmentSoulbringer extends EnchantmentLost {
protected EnchantmentSoulbringer(int par1) {
super(par1, EnumEnchantmentType.weapon);
}
}
@@ -0,0 +1,25 @@
/**
* This class was created by <Vazkii>. It's distributed as
* part of the ThaumicTinkerer Mod.
*
* ThaumicTinkerer is Open Source and distributed under a
* Creative Commons Attribution-NonCommercial-ShareAlike 3.0 License
* (http://creativecommons.org/licenses/by-nc-sa/3.0/deed.en_GB)
*
* ThaumicTinkerer is a Derivative Work on Thaumcraft 3.
* Thaumcraft 3 © Azanor 2012
* (http://www.minecraftforum.net/topic/1585216-)
*
* File Created @ [25 May 2013, 12:17:08 (GMT)]
*/
package vazkii.tinkerer.enchantment;
import net.minecraft.enchantment.EnumEnchantmentType;
public class EnchantmentVampirism extends EnchantmentLost {
protected EnchantmentVampirism(int par1) {
super(par1, EnumEnchantmentType.weapon);
}
}
@@ -0,0 +1,177 @@
/**
* This class was created by <Vazkii>. It's distributed as
* part of the ThaumicTinkerer Mod.
*
* ThaumicTinkerer is Open Source and distributed under a
* Creative Commons Attribution-NonCommercial-ShareAlike 3.0 License
* (http://creativecommons.org/licenses/by-nc-sa/3.0/deed.en_GB)
*
* ThaumicTinkerer is a Derivative Work on Thaumcraft 3.
* Thaumcraft 3 © Azanor 2012
* (http://www.minecraftforum.net/topic/1585216-)
*
* File Created @ [25 May 2013, 22:57:41 (GMT)]
*/
package vazkii.tinkerer.enchantment;
import java.util.ArrayList;
import java.util.List;
import net.minecraft.enchantment.EnchantmentHelper;
import net.minecraft.entity.EntityLiving;
import net.minecraft.entity.EnumCreatureAttribute;
import net.minecraft.entity.ai.EntityAIAttackOnCollide;
import net.minecraft.entity.ai.EntityAINearestAttackableTarget;
import net.minecraft.entity.ai.EntityAITaskEntry;
import net.minecraft.entity.ai.EntityAIWatchClosest;
import net.minecraft.entity.monster.EntityMob;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.ItemStack;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.nbt.NBTTagList;
import net.minecraft.potion.PotionEffect;
import net.minecraft.util.EnumChatFormatting;
import net.minecraftforge.event.EventPriority;
import net.minecraftforge.event.ForgeSubscribe;
import net.minecraftforge.event.entity.living.LivingEvent.LivingUpdateEvent;
import net.minecraftforge.event.entity.living.LivingHurtEvent;
import net.minecraftforge.event.entity.player.PlayerDestroyItemEvent;
import vazkii.tinkerer.ThaumicTinkerer;
import vazkii.tinkerer.lib.LibEnchantmentIDs;
import vazkii.tinkerer.lib.LibPotions;
import vazkii.tinkerer.potion.ModPotions;
import cpw.mods.fml.relauncher.ReflectionHelper;
public class ModEnchantmentHandler {
@ForgeSubscribe
public void onEntityDamaged(LivingHurtEvent event) {
if(event.source.getEntity() instanceof EntityLiving) {
EntityLiving attacker = (EntityLiving) event.source.getEntity();
ItemStack heldItem = attacker.getHeldItem();
if(heldItem == null)
return;
if(EnchantmentHelper.getEnchantmentLevel(LibEnchantmentIDs.freezing, heldItem) > 0) {
event.entityLiving.addPotionEffect(new PotionEffect(ModPotions.effectFrozen.id, 60));
event.entityLiving.worldObj.playSoundAtEntity(event.entityLiving, "thaumcraft.ice", 0.6F, 1F);
}
if(EnchantmentHelper.getEnchantmentLevel(LibEnchantmentIDs.soulbringer, heldItem) > 0 && event.entityLiving.getCreatureAttribute() == EnumCreatureAttribute.UNDEAD && !isEntityPossessed(event.entityLiving) && Math.random() < 0.05F) {
event.entityLiving.addPotionEffect(new PotionEffect(ModPotions.effectPossessed.id, 12000));
if(attacker instanceof EntityPlayer) {
EntityPlayer player = (EntityPlayer) attacker;
if(!player.worldObj.isRemote)
player.addChatMessage(EnumChatFormatting.GOLD + "" + EnumChatFormatting.ITALIC + "The " + event.entityLiving.getEntityName() + " was possessed to join your fight.");
}
event.entityLiving.heal(event.entityLiving.getMaxHealth());
event.entityLiving.worldObj.playSoundAtEntity(event.entityLiving, "thaumcraft.wand", 0.6F, 1F);
}
if(EnchantmentHelper.getEnchantmentLevel(LibEnchantmentIDs.vampirism, heldItem) > 0) {
attacker.heal((int) Math.ceil(event.ammount / 4D));
event.entityLiving.worldObj.playSoundAtEntity(event.entityLiving, "thaumcraft.zap", 0.6F, 1F);
}
}
}
@ForgeSubscribe(priority = EventPriority.HIGHEST)
public void onItemBroken(PlayerDestroyItemEvent event) {
if(EnchantmentHelper.getEnchantmentLevel(LibEnchantmentIDs.ashes, event.original) > 0) {
event.original.setItemDamage(0);
NBTTagList list = event.original.getEnchantmentTagList();
int remLoc = -1;
for(int i = 0; i < list.tagCount(); i++) {
short id = ((NBTTagCompound) list.tagAt(i)).getShort("id");
if(id == LibEnchantmentIDs.ashes) {
remLoc = i;
break;
}
}
if(remLoc >= 0)
list.removeTag(remLoc);
for(int i = 0; list.tagCount() > 0 && i < 2; i++) {
int loc = event.entity.worldObj.rand.nextInt(list.tagCount());
list.removeTag(loc);
}
if(list.tagCount() == 0)
event.original.getTagCompound().removeTag("ench");
event.original.stackSize++;
event.entityPlayer.inventory.mainInventory[event.entityPlayer.inventory.currentItem] = event.original.copy();
if(!event.entityPlayer.worldObj.isRemote)
event.entityPlayer.addChatMessage(EnumChatFormatting.GOLD + "" + EnumChatFormatting.ITALIC + "Your " + event.original.getDisplayName() + " was reborn from the Ashes.");
event.entityPlayer.worldObj.playSoundAtEntity(event.entityPlayer, "thaumcraft.fireloop", 0.6F, 1F);
}
}
@ForgeSubscribe(priority = EventPriority.HIGHEST)
public void onEntityUpdate(LivingUpdateEvent event) {
if(isEntityFrozen(event.entityLiving)) {
event.entityLiving.landMovementFactor = 0F;
event.entityLiving.jumpMovementFactor = 0F;
event.entityLiving.setJumping(false);
event.entityLiving.motionY = 0;
ThaumicTinkerer.proxy.sanityCheckedFrozenParticles(event.entityLiving);
} else if(event.entityLiving.landMovementFactor == 0F && event.entityLiving.jumpMovementFactor == 0F){
event.entityLiving.landMovementFactor = 0.1F;
event.entityLiving.jumpMovementFactor = 0.02F;
// This gets calibrated after, but for some entities (e.g. slimes)
// it doesn't get calibrated automatically, so they stay
// in the same place.
}
if(isEntityPossessed(event.entityLiving)) {
List<EntityAITaskEntry> entries = new ArrayList(event.entityLiving.tasks.taskEntries);
entries.addAll(new ArrayList(event.entityLiving.targetTasks.taskEntries));
for(EntityAITaskEntry entry : entries) {
if(entry.action instanceof EntityAIAttackOnCollide)
messWithAttackAI((EntityAIAttackOnCollide) entry.action);
else if(entry.action instanceof EntityAINearestAttackableTarget)
messWithFollowAI((EntityAINearestAttackableTarget) entry.action);
else if(entry.action instanceof EntityAIWatchClosest)
messWithWatchAI((EntityAIWatchClosest) entry.action);
}
if(event.entityLiving.getAttackTarget() instanceof EntityPlayer)
event.entityLiving.setAttackTarget(null);
ThaumicTinkerer.proxy.sanityCheckedPossessedParticles(event.entityLiving);
}
}
private void messWithAttackAI(EntityAIAttackOnCollide aiEntry) {
// EntityAIAttackOnCollide.classTarget
ReflectionHelper.setPrivateValue(EntityAIAttackOnCollide.class, aiEntry, EntityMob.class, 7);
}
private void messWithFollowAI(EntityAINearestAttackableTarget aiEntry) {
// EntityAINearestAttackableTarget.classTarget
ReflectionHelper.setPrivateValue(EntityAINearestAttackableTarget.class, aiEntry, EntityMob.class, 1);
}
public void messWithWatchAI(EntityAIWatchClosest aiEntry) {
// EntityAIWatchClosest.watchedClass
ReflectionHelper.setPrivateValue(EntityAIWatchClosest.class, aiEntry, EntityMob.class, 5);
}
@ForgeSubscribe
public void onEntityDamage(LivingHurtEvent event) {
if(isEntityFrozen(event.entityLiving) && event.source.isFireDamage())
event.entityLiving.removePotionEffect(LibPotions.idFrozen);
}
public static boolean isEntityFrozen(EntityLiving entity) {
return entity.isPotionActive(LibPotions.idFrozen);
}
public static boolean isEntityPossessed(EntityLiving entity) {
return entity.isPotionActive(LibPotions.idPossessed);
}
}
@@ -0,0 +1,54 @@
/**
* This class was created by <Vazkii>. It's distributed as
* part of the ThaumicTinkerer Mod.
*
* ThaumicTinkerer is Open Source and distributed under a
* Creative Commons Attribution-NonCommercial-ShareAlike 3.0 License
* (http://creativecommons.org/licenses/by-nc-sa/3.0/deed.en_GB)
*
* ThaumicTinkerer is a Derivative Work on Thaumcraft 3.
* Thaumcraft 3 © Azanor 2012
* (http://www.minecraftforum.net/topic/1585216-)
*
* File Created @ [25 May 2013, 11:06:00 (GMT)]
*/
package vazkii.tinkerer.enchantment;
import net.minecraft.enchantment.Enchantment;
import net.minecraftforge.common.MinecraftForge;
import vazkii.tinkerer.lib.LibEnchantmentIDs;
import vazkii.tinkerer.lib.LibEnchantmentNames;
import vazkii.tinkerer.util.handler.EnchantedBookCraftingHandler;
import cpw.mods.fml.common.registry.GameRegistry;
import cpw.mods.fml.common.registry.LanguageRegistry;
public final class ModEnchantments {
public static Enchantment freezing;
public static Enchantment soulbringer;
public static Enchantment vampirism;
public static Enchantment ashes;
public static void initEnchantments(){
freezing = new EnchantmentFreezing(LibEnchantmentIDs.freezing).setName(LibEnchantmentNames.FREEZING);
soulbringer = new EnchantmentSoulbringer(LibEnchantmentIDs.soulbringer).setName(LibEnchantmentNames.SOULBRINGER);
vampirism = new EnchantmentVampirism(LibEnchantmentIDs.vampirism).setName(LibEnchantmentNames.VAMPIRISM);
ashes = new EnchantmentAshes(LibEnchantmentIDs.ashes).setName(LibEnchantmentNames.ASHES);
nameEnchantments();
MinecraftForge.EVENT_BUS.register(new ModEnchantmentHandler());
GameRegistry.registerCraftingHandler(new EnchantedBookCraftingHandler());
}
private static void nameEnchantments() {
nameEnchant(freezing, LibEnchantmentNames.FREEZING_D);
nameEnchant(soulbringer, LibEnchantmentNames.SOULBRINGER_D);
nameEnchant(vampirism, LibEnchantmentNames.VAMPIRISM_D);
nameEnchant(ashes, LibEnchantmentNames.ASHES_D);
}
private static void nameEnchant(Enchantment enchant, String name) {
LanguageRegistry.instance().addStringLocalization(enchant.getName(), name);
}
}
@@ -20,6 +20,7 @@ import thaumcraft.api.EnumTag;
import thaumcraft.api.ObjectTags;
import thaumcraft.common.lib.ThaumcraftCraftingManager;
import vazkii.tinkerer.tile.TileEntityTransmutator;
import vazkii.tinkerer.util.handler.ConfigurationHandler;
public class SlotTransmutator extends Slot {
@@ -31,7 +32,7 @@ public class SlotTransmutator extends Slot {
public boolean isItemValid(ItemStack par1ItemStack) {
ObjectTags tags = ThaumcraftCraftingManager.getObjectTags(par1ItemStack);
return tags != null && getTotalAspectValue(tags) <= 100;
return tags != null && getTotalAspectValue(tags) <= ConfigurationHandler.transmutatorMaxValue;
}
public static int getTotalAspectValue(ObjectTags tags) {
@@ -22,6 +22,7 @@ import thaumcraft.api.ObjectTags;
import thaumcraft.common.aura.AuraManager;
import thaumcraft.common.lib.ThaumcraftCraftingManager;
import vazkii.tinkerer.tile.TileEntityTransmutator;
import vazkii.tinkerer.util.handler.ConfigurationHandler;
public class SlotTransmutatorOutput extends SlotPureOutput {
@@ -36,17 +37,16 @@ public class SlotTransmutatorOutput extends SlotPureOutput {
public void onPickupFromSlot(EntityPlayer par1EntityPlayer, ItemStack par2ItemStack) {
ObjectTags tags = ThaumcraftCraftingManager.getObjectTags(transmutator.getStackInSlot(0));
int value = SlotTransmutator.getTotalAspectValue(tags);
int cost = value == 1 ? 0 : value / 2;
int cost = value == 1 ? 0 : value * ConfigurationHandler.transmutatorVisMultiplier;
AuraManager.decreaseClosestAura(transmutator.worldObj, transmutator.xCoord, transmutator.yCoord, transmutator.zCoord, cost);
for(EnumTag tag : tags.getAspects()) {
IAspectSource source = transmutator.foundTags.getSource(tag);
if(source != null)
source.takeFromSource(tag, tags.getAmount(tag) * 4);
source.takeFromSource(tag, tags.getAmount(tag) * ConfigurationHandler.transmutatorEssentiaMultiplier);
}
par1EntityPlayer.worldObj.playSoundAtEntity(par1EntityPlayer, "thaumcraft.wand", 0.3F, 1F);
}
}
@@ -0,0 +1,119 @@
/**
* This class was created by <TheWhiteWolves>. It's distributed as
* part of the ThaumicTinkerer Mod.
*
* ThaumicTinkerer is Open Source and distributed under a
* Creative Commons Attribution-NonCommercial-ShareAlike 3.0 License
* (http://creativecommons.org/licenses/by-nc-sa/3.0/deed.en_GB)
*
* ThaumicTinkerer is a Derivative Work on Thaumcraft 3.
* Thaumcraft 3 © Azanor 2012
* (http://www.minecraftforum.net/topic/1585216-)
*
* File Created @ [20 May 2013, 19:35:05 (GMT)]
*/
package vazkii.tinkerer.item;
import java.util.List;
import net.minecraft.client.renderer.texture.IconRegister;
import net.minecraft.entity.Entity;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.EnumRarity;
import net.minecraft.item.ItemStack;
import net.minecraft.potion.Potion;
import net.minecraft.util.EnumChatFormatting;
import net.minecraft.util.Icon;
import net.minecraft.world.World;
import thaumcraft.common.aura.AuraManager;
import vazkii.tinkerer.client.util.helper.IconHelper;
import vazkii.tinkerer.lib.LibFeatures;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
public class ItemCleansingTalisman extends ItemMod {
private Icon enabledIcon;
private long timer = 0L;
private static final int[] POTIONS_TO_REMOVE = new int[] {
Potion.blindness.id,
Potion.confusion.id,
Potion.poison.id,
Potion.weakness.id,
Potion.moveSlowdown.id,
Potion.wither.id
};
public ItemCleansingTalisman(int par1) {
super(par1);
setMaxStackSize(1);
}
@Override
public ItemStack onItemRightClick(ItemStack par1ItemStack, World par2World, EntityPlayer par3EntityPlayer) {
if(par3EntityPlayer.isSneaking()) {
int damage = par1ItemStack.getItemDamage();
par1ItemStack.setItemDamage(damage == 0 ? 1 : 0);
par2World.playSoundAtEntity(par3EntityPlayer, "random.orb", 0.3F, 0.1F);
}
return par1ItemStack;
}
@Override
public void onUpdate(ItemStack par1ItemStack, World par2World, Entity par3Entity, int par4, boolean par5) {
if(par1ItemStack.getItemDamage() == 1 && !par2World.isRemote) {
if(timer < System.currentTimeMillis()) {
timer = System.currentTimeMillis() + 1000L;
if (par3Entity instanceof EntityPlayer) {
EntityPlayer player = (EntityPlayer)par3Entity;
boolean removed = false;
if(player.isBurning()) {
player.extinguish();
removed = true;
} else for(int potion : POTIONS_TO_REMOVE) {
if(player.isPotionActive(potion)) {
player.removePotionEffect(potion);
removed = true;
break;
}
}
if(removed) {
AuraManager.decreaseClosestAura(par2World, player.posX, player.posY, player.posZ, LibFeatures.CLEANSING_TALISMAN_VIS);
par2World.playSoundAtEntity(player, "thaumcraft.wand", 0.3F, 0.1F);
}
}
}
}
}
@Override
@SideOnly(Side.CLIENT)
public void registerIcons(IconRegister par1IconRegister) {
itemIcon = IconHelper.forItem(par1IconRegister, this, 0);
enabledIcon = IconHelper.forItem(par1IconRegister, this, 1);
}
@Override
@SideOnly(Side.CLIENT)
public void addInformation(ItemStack par1ItemStack, EntityPlayer par2EntityPlayer, List par3List, boolean par4) {
if(par1ItemStack.getItemDamage() == 0)
par3List.add(EnumChatFormatting.RED + "Inactive");
else par3List.add(EnumChatFormatting.GREEN + "Active");
}
@Override
@SideOnly(Side.CLIENT)
public Icon getIconFromDamage(int par1) {
return par1 == 1 ? enabledIcon : itemIcon;
}
@Override
@SideOnly(Side.CLIENT)
public EnumRarity getRarity(ItemStack par1ItemStack) {
return EnumRarity.uncommon;
}
}
@@ -22,7 +22,7 @@ import vazkii.tinkerer.lib.LibBlockNames;
public class ItemDarkQuartzBlock extends ItemMultiTextureTile {
public ItemDarkQuartzBlock(int par1) {
super(par1, ModBlocks.darkQuartz, new String[] { });
super(par1, ModBlocks.darkQuartz, new String[] { "" } );
}
@Override
@@ -26,6 +26,8 @@ public class ItemDarkQuartzSlab extends ItemSlab {
super(par1, (BlockHalfSlab) ModBlocks.darkQuartzSlab, (BlockHalfSlab) ModBlocks.darkQuartzSlabFull, par1 == ModBlocks.darkQuartzSlabFull.blockID);
}
@Override
public String getItemDisplayName(ItemStack par1ItemStack) {
return LibBlockNames.DARK_QUARTZ_SLAB_D;
@@ -0,0 +1,64 @@
/**
* This class was created by <Vazkii>. It's distributed as
* part of the ThaumicTinkerer Mod.
*
* ThaumicTinkerer is Open Source and distributed under a
* Creative Commons Attribution-NonCommercial-ShareAlike 3.0 License
* (http://creativecommons.org/licenses/by-nc-sa/3.0/deed.en_GB)
*
* ThaumicTinkerer is a Derivative Work on Thaumcraft 3.
* Thaumcraft 3 © Azanor 2012
* (http://www.minecraftforum.net/topic/1585216-)
*
* File Created @ [27 May 2013, 21:05:58 (GMT)]
*/
package vazkii.tinkerer.item;
import java.util.List;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.EnumRarity;
import net.minecraft.item.Item;
import net.minecraft.item.ItemEnchantedBook;
import net.minecraft.item.ItemStack;
import net.minecraft.util.Icon;
import thaumcraft.client.gui.GuiInfusionWorkbench;
import thaumcraft.client.gui.GuiResearchRecipe;
import vazkii.tinkerer.util.helper.MiscHelper;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
public class ItemDummyEnchantbook extends ItemEnchantedBook {
public ItemDummyEnchantbook(int par1) {
super(par1);
}
@Override
@SideOnly(Side.CLIENT)
public void addInformation(ItemStack par1ItemStack, EntityPlayer par2EntityPlayer, List par3List, boolean par4) {
if(MiscHelper.getMc().currentScreen != null && MiscHelper.getMc().currentScreen instanceof GuiResearchRecipe)
return;
if(MiscHelper.getMc().currentScreen != null && !(MiscHelper.getMc().currentScreen instanceof GuiInfusionWorkbench)) {
par3List.add("A dummy book for enchanting. It's an internal item");
par3List.add("and is of no use to the player.");
} else par3List.add("This book will be enchanted upon creation.");
}
@Override
public EnumRarity getRarity(ItemStack par1ItemStack) {
return EnumRarity.uncommon;
}
@Override
public String getItemDisplayName(ItemStack par1ItemStack) {
return Item.enchantedBook.getItemDisplayName(par1ItemStack);
}
@Override
@SideOnly(Side.CLIENT)
public Icon getIconFromDamage(int par1) {
return Item.enchantedBook.getIconFromDamage(par1);
}
}
@@ -0,0 +1,54 @@
/**
* This class was created by <Vazkii>. It's distributed as
* part of the ThaumicTinkerer Mod.
*
* ThaumicTinkerer is Open Source and distributed under a
* Creative Commons Attribution-NonCommercial-ShareAlike 3.0 License
* (http://creativecommons.org/licenses/by-nc-sa/3.0/deed.en_GB)
*
* ThaumicTinkerer is a Derivative Work on Thaumcraft 3.
* Thaumcraft 3 © Azanor 2012
* (http://www.minecraftforum.net/topic/1585216-)
*
* File Created @ [19 May 2013, 12:12:46 (GMT)]
*/
package vazkii.tinkerer.item;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.EnumRarity;
import net.minecraft.item.ItemStack;
import net.minecraft.world.World;
import thaumcraft.common.aura.AuraManager;
import vazkii.tinkerer.lib.LibFeatures;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
public class ItemEnderMirror extends ItemMod {
public ItemEnderMirror(int par1) {
super(par1);
setMaxStackSize(1);
}
@Override
public ItemStack onItemRightClick(ItemStack par1ItemStack, World par2World, EntityPlayer par3EntityPlayer) {
if(AuraManager.decreaseClosestAura(par2World, par3EntityPlayer.posX, par3EntityPlayer.posY, par3EntityPlayer.posZ, LibFeatures.ENDER_MIRROR_COST)) {
par3EntityPlayer.displayGUIChest(par3EntityPlayer.getInventoryEnderChest());
par2World.playSoundAtEntity(par3EntityPlayer, "mob.endermen.portal", 1F, 1F);
}
return par1ItemStack;
}
@Override
@SideOnly(Side.CLIENT)
public boolean isFull3D() {
return true;
}
@Override
@SideOnly(Side.CLIENT)
public EnumRarity getRarity(ItemStack par1ItemStack) {
return EnumRarity.uncommon;
}
}
@@ -70,6 +70,8 @@ public class ItemFireBracelet extends ItemMod {
par3World.playSoundAtEntity(par2EntityPlayer, "thaumcraft.brain", 1F, 1F);
did = true;
onItemUseFirst(par1ItemStack, par2EntityPlayer, par3World, par4, par5, par6, par7, par8, par9, par10);
return did;
}
}
@@ -0,0 +1,113 @@
/**
* This class was created by <Vazkii>. It's distributed as
* part of the ThaumicTinkerer Mod.
*
* ThaumicTinkerer is Open Source and distributed under a
* Creative Commons Attribution-NonCommercial-ShareAlike 3.0 License
* (http://creativecommons.org/licenses/by-nc-sa/3.0/deed.en_GB)
*
* ThaumicTinkerer is a Derivative Work on Thaumcraft 3.
* Thaumcraft 3 © Azanor 2012
* (http://www.minecraftforum.net/topic/1585216-)
*
* File Created @ [20 May 2013, 22:15:39 (GMT)]
*/
package vazkii.tinkerer.item;
import java.util.Collection;
import net.minecraft.entity.Entity;
import net.minecraft.item.ItemStack;
import net.minecraft.nbt.NBTBase;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.nbt.NBTTagInt;
import net.minecraft.util.Icon;
import net.minecraft.world.World;
import thaumcraft.api.EnumTag;
import thaumcraft.api.ObjectTags;
import thaumcraft.api.aura.AuraNode;
import thaumcraft.common.items.ItemThaumometer;
import vazkii.tinkerer.util.helper.MiscHelper;
import vazkii.tinkerer.util.helper.ModCreativeTab;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
public class ItemFluxDetector extends ItemThaumometer {
private static final String TAG_OBJECT_TAGS_CMP = "tagsCmp";
private static final String TAG_OBJECT_TAG = "tag%s";
private static final String TAG_OBJECT_TAG_REPLACE = "tag";
public ItemFluxDetector(int par1) {
super(par1);
setCreativeTab(ModCreativeTab.INSTANCE);
}
@Override
public void onUpdate(ItemStack par1ItemStack, World par2World, Entity par3Entity, int par4, boolean par5) {
if(!par2World.isRemote) {
AuraNode node = MiscHelper.getClosestNode(par2World, par3Entity.posX, par3Entity.posY, par3Entity.posZ);
setTagCompoundForNode(par1ItemStack, node);
}
}
private void setTagCompoundForNode(ItemStack stack, AuraNode node) {
NBTTagCompound cmp = new NBTTagCompound();
if(node == null) {
if(stack.hasTagCompound())
cmp.setCompoundTag(TAG_OBJECT_TAGS_CMP, new NBTTagCompound());
} else {
NBTTagCompound cmp1 = new NBTTagCompound();
ObjectTags flux = node.flux;
if(flux != null && flux.getAspects().length > 0) // Nice clean aura :D
for(EnumTag tag : flux.getAspects())
if(tag != null)
cmp1.setInteger(String.format(TAG_OBJECT_TAG, tag.id), flux.getAmount(tag));
cmp.setCompoundTag(TAG_OBJECT_TAGS_CMP, cmp1);
stack.setTagCompound(cmp);
}
}
public static ObjectTags getTags(ItemStack stack) {
if(stack.hasTagCompound()) {
NBTTagCompound cmp = stack.getTagCompound();
if(cmp.hasKey(TAG_OBJECT_TAGS_CMP)) {
NBTTagCompound cmp1 = cmp.getCompoundTag(TAG_OBJECT_TAGS_CMP);
if(cmp1 != null) {
ObjectTags tags = new ObjectTags();
Collection<NBTBase> cmpTags = cmp1.getTags();
for(NBTBase tag : cmpTags) {
if(tag instanceof NBTTagInt) {
NBTTagInt integer = (NBTTagInt) tag;
int tagID = Integer.parseInt(tag.getName().replaceAll(TAG_OBJECT_TAG_REPLACE, ""));
int amount = integer.data;
tags.add(EnumTag.get(tagID), amount);
}
}
return tags;
}
}
}
return null;
}
@Override
public boolean getShareTag() {
return true;
}
@Override
@SideOnly(Side.CLIENT)
public Icon getIconFromDamage(int par1) {
return iconRing;
}
@Override
@SideOnly(Side.CLIENT)
public boolean requiresMultipleRenderPasses() {
return false;
}
}
@@ -14,15 +14,18 @@
*/
package vazkii.tinkerer.item;
import net.minecraft.block.Block;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.ItemStack;
import net.minecraft.world.World;
import vazkii.tinkerer.block.ModBlocks;
public class ItemGlowstoneGas extends ItemMod {
public class ItemGas extends ItemMod {
public ItemGlowstoneGas(int par1) {
private Block setBlock;
public ItemGas(int par1, Block setBlock) {
super(par1);
this.setBlock = setBlock;
}
@Override
@@ -39,9 +42,9 @@ public class ItemGlowstoneGas extends ItemMod {
if(air) {
if(!par2World.isRemote)
par2World.setBlock(x, y, z, ModBlocks.glowstoneGas.blockID, 4, 2);
par2World.setBlock(x, y, z, setBlock.blockID, 4, 2);
else par3EntityPlayer.swingItem();
par2World.scheduleBlockUpdate(x, y, z, ModBlocks.glowstoneGas.blockID, 10);
par2World.scheduleBlockUpdate(x, y, z, setBlock.blockID, 10);
}
return par1ItemStack;
@@ -0,0 +1,62 @@
/**
* This class was created by <Vazkii>. It's distributed as
* part of the ThaumicTinkerer Mod.
*
* ThaumicTinkerer is Open Source and distributed under a
* Creative Commons Attribution-NonCommercial-ShareAlike 3.0 License
* (http://creativecommons.org/licenses/by-nc-sa/3.0/deed.en_GB)
*
* ThaumicTinkerer is a Derivative Work on Thaumcraft 3.
* Thaumcraft 3 © Azanor 2012
* (http://www.minecraftforum.net/topic/1585216-)
*
* File Created @ [20 May 2013, 21:01:32 (GMT)]
*/
package vazkii.tinkerer.item;
import net.minecraft.block.Block;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.EnumRarity;
import net.minecraft.item.ItemStack;
import net.minecraft.world.World;
import vazkii.tinkerer.block.BlockGas;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
public class ItemGasRemover extends ItemMod {
public ItemGasRemover(int par1) {
super(par1);
setMaxStackSize(1);
}
@Override
public ItemStack onItemRightClick(ItemStack par1ItemStack, World par2World, EntityPlayer par3EntityPlayer) {
if(par3EntityPlayer.isSneaking()) {
int xs = (int) par3EntityPlayer.posX;
int ys = (int) par3EntityPlayer.posY;
int zs = (int) par3EntityPlayer.posZ;
for(int x = xs - 2; x < xs + 2; x++)
for(int y = ys - 3; y < ys + 3; y++)
for(int z = zs - 2; z < zs + 2; z++) {
int id = par2World.getBlockId(x, y, z);
if(Block.blocksList[id] != null && Block.blocksList[id] instanceof BlockGas) {
BlockGas gas = (BlockGas) Block.blocksList[id];
gas.placeParticle(par2World, x, y, z);
par2World.setBlock(x, y, z, 0, 0, 1 | 2);
}
}
par2World.playSoundAtEntity(par3EntityPlayer, "thaumcraft.wand", 0.2F, 1F);
}
return par1ItemStack;
}
@Override
@SideOnly(Side.CLIENT)
public EnumRarity getRarity(ItemStack par1ItemStack) {
return EnumRarity.uncommon;
}
}
@@ -0,0 +1,73 @@
/**
* This class was created by <Vazkii>. It's distributed as
* part of the ThaumicTinkerer Mod.
*
* ThaumicTinkerer is Open Source and distributed under a
* Creative Commons Attribution-NonCommercial-ShareAlike 3.0 License
* (http://creativecommons.org/licenses/by-nc-sa/3.0/deed.en_GB)
*
* ThaumicTinkerer is a Derivative Work on Thaumcraft 3.
* Thaumcraft 3 © Azanor 2012
* (http://www.minecraftforum.net/topic/1585216-)
*
* File Created @ [19 May 2013, 14:48:10 (GMT)]
*/
package vazkii.tinkerer.item;
import net.minecraft.client.renderer.texture.IconRegister;
import net.minecraft.entity.Entity;
import net.minecraft.entity.EntityLiving;
import net.minecraft.item.EnumRarity;
import net.minecraft.item.ItemArmor;
import net.minecraft.item.ItemStack;
import net.minecraftforge.common.MinecraftForge;
import thaumcraft.api.IVisDiscounter;
import thaumcraft.api.IVisRepairable;
import thaumcraft.api.ThaumcraftApi;
import thaumcraft.common.aura.AuraManager;
import vazkii.tinkerer.client.util.helper.IconHelper;
import vazkii.tinkerer.lib.LibResources;
import vazkii.tinkerer.util.handler.PlayerDamageHandler;
import vazkii.tinkerer.util.helper.ModCreativeTab;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
public class ItemGoliathLegs extends ItemArmor implements IVisRepairable, IVisDiscounter {
public ItemGoliathLegs(int par1) {
super(par1, ThaumcraftApi.armorMatSpecial, 0, 2);
setCreativeTab(ModCreativeTab.INSTANCE);
MinecraftForge.EVENT_BUS.register(new PlayerDamageHandler());
}
@Override
@SideOnly(Side.CLIENT)
public void registerIcons(IconRegister par1IconRegister) {
itemIcon = IconHelper.forItem(par1IconRegister, this);
}
@Override
@SideOnly(Side.CLIENT)
public EnumRarity getRarity(ItemStack par1ItemStack) {
return EnumRarity.rare;
}
@Override
public String getArmorTexture(ItemStack stack, Entity entity, int slot, int layer) {
return LibResources.MODEL_LEGS_GOLIATH;
}
@Override
public int getVisDiscount() {
return 4;
}
@Override
public void doRepair(ItemStack stack, Entity player)
{
if (AuraManager.decreaseClosestAura(player.worldObj, player.posX, player.posY, player.posZ, 1)) {
stack.damageItem(-1, (EntityLiving)player);
}
}
}
@@ -0,0 +1,33 @@
/**
* This class was created by <Vazkii>. It's distributed as
* part of the ThaumicTinkerer Mod.
*
* ThaumicTinkerer is Open Source and distributed under a
* Creative Commons Attribution-NonCommercial-ShareAlike 3.0 License
* (http://creativecommons.org/licenses/by-nc-sa/3.0/deed.en_GB)
*
* ThaumicTinkerer is a Derivative Work on Thaumcraft 3.
* Thaumcraft 3 © Azanor 2012
* (http://www.minecraftforum.net/topic/1585216-)
*
* File Created @ [27 May 2013, 19:16:25 (GMT)]
*/
package vazkii.tinkerer.item;
import net.minecraft.item.ItemStack;
import thaumcraft.common.blocks.BlockWardedItem;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
public class ItemPhantomStoneBlock extends BlockWardedItem {
public ItemPhantomStoneBlock(int par1) {
super(par1);
}
@Override
@SideOnly(Side.CLIENT)
public boolean hasEffect(ItemStack par1ItemStack) {
return true;
}
}
@@ -0,0 +1,122 @@
/**
* This class was created by <Vazkii>. It's distributed as
* part of the ThaumicTinkerer Mod.
*
* ThaumicTinkerer is Open Source and distributed under a
* Creative Commons Attribution-NonCommercial-ShareAlike 3.0 License
* (http://creativecommons.org/licenses/by-nc-sa/3.0/deed.en_GB)
*
* ThaumicTinkerer is a Derivative Work on Thaumcraft 3.
* Thaumcraft 3 © Azanor 2012
* (http://www.minecraftforum.net/topic/1585216-)
*
* File Created @ [29 May 2013, 20:52:44 (GMT)]
*/
package vazkii.tinkerer.item;
import java.util.List;
import net.minecraft.client.gui.GuiScreen;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.EnumRarity;
import net.minecraft.item.ItemStack;
import net.minecraft.util.Icon;
import net.minecraft.world.World;
import thaumcraft.common.Config;
import thaumcraft.common.research.ResearchManager;
import vazkii.tinkerer.util.helper.ItemNBTHelper;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
public class ItemShareTome extends ItemMod {
private static final String TAG_PLAYER = "player";
private static final String NON_ASIGNED = "[Not Assigned]";
private static final String[] INFO = new String[] {
"This is a creative only item.",
"It can be right clicked by a player",
"to keep their research. After this,",
"another player can right click it",
"and they'll learn all that the other",
"player knew. This is good for co-op playing.",
"Have fun - Vazkii"
};
public ItemShareTome(int par1) {
super(par1);
setMaxStackSize(1);
}
@Override
public ItemStack onItemRightClick(ItemStack par1ItemStack, World par2World, EntityPlayer par3EntityPlayer) {
String name = getPlayerName(par1ItemStack);
if(name.endsWith(NON_ASIGNED)) {
setPlayerName(par1ItemStack, par3EntityPlayer.username);
if(!par2World.isRemote)
par3EntityPlayer.addChatMessage("Research Data Written!");
} else {
sync : {
List<String> researchesDone = ResearchManager.getCompletedResearch(name);
if(researchesDone == null) {
if(!par2World.isRemote)
par3EntityPlayer.addChatMessage(name + "is not online. Research could not be acquired.");
break sync;
}
for(String key : researchesDone)
ResearchManager.completeResearch(par3EntityPlayer, key);
if(!par2World.isRemote)
par3EntityPlayer.addChatMessage("Research Data Synced!");
}
}
return par1ItemStack;
}
@Override
@SideOnly(Side.CLIENT)
public EnumRarity getRarity(ItemStack par1ItemStack) {
return EnumRarity.epic;
}
@Override
@SideOnly(Side.CLIENT)
public Icon getIconFromDamage(int par1) {
return Config.itemThaumonomicon.getIconFromDamage(1);
}
@Override
@SideOnly(Side.CLIENT)
public boolean hasEffect(ItemStack par1ItemStack) {
return true;
}
@Override
@SideOnly(Side.CLIENT)
public void addInformation(ItemStack par1ItemStack, EntityPlayer par2EntityPlayer, List par3List, boolean par4) {
String name = getPlayerName(par1ItemStack);
par3List.add(name.equals(NON_ASIGNED) ? name : "Bound to " + name + "'s research.");
if(GuiScreen.isShiftKeyDown())
for(String s : INFO)
par3List.add(s);
else par3List.add("Press SHIFT for more info.");
}
@Override
public boolean getShareTag() {
return true;
}
private String getPlayerName(ItemStack stack) {
return ItemNBTHelper.getString(stack, TAG_PLAYER, NON_ASIGNED);
}
private void setPlayerName(ItemStack stack, String playerName) {
ItemNBTHelper.setString(stack, TAG_PLAYER, playerName);
}
}
@@ -46,12 +46,9 @@ public class ItemSpellCloth extends ItemMod {
@Override
public ItemStack getContainerItemStack(ItemStack itemStack) {
ItemStack copyStack = itemStack.copy();
copyStack.setItemDamage(copyStack.getItemDamage() + 1);
if(copyStack.getItemDamage() >= copyStack.getMaxDamage())
return null;
itemStack.setItemDamage(itemStack.getItemDamage() + 1);
return copyStack;
return itemStack;
}
@Override
@@ -21,6 +21,7 @@ import net.minecraft.entity.player.EntityPlayerMP;
import net.minecraft.item.EnumRarity;
import net.minecraft.item.ItemStack;
import net.minecraft.potion.PotionEffect;
import net.minecraft.util.FoodStats;
import net.minecraft.world.World;
import net.minecraftforge.common.FakePlayer;
import thaumcraft.common.aura.AuraManager;
@@ -157,10 +158,12 @@ public class ItemStopwatch extends ItemMod {
float saturation = ItemNBTHelper.getFloat(stack, TAG_SATURATION, 0F);
player.playerNetServerHandler.setPlayerLocation(x, y, z, pitch, yaw);
player.setVelocity(motionX, motionY, motionZ);
player.motionX = motionX;
player.motionY = motionY;
player.motionZ = motionZ;
player.setEntityHealth(health);
player.getFoodStats().setFoodLevel(food);
player.getFoodStats().setFoodSaturationLevel(saturation);
FoodStats foodStats = player.getFoodStats();
foodStats.addStats(food - foodStats.getFoodLevel(), saturation - foodStats.getSaturationLevel());
}
private static void wipeData(ItemStack stack, Entity player) {
@@ -28,6 +28,7 @@ import thaumcraft.common.items.wands.ItemWandTrade;
import vazkii.tinkerer.ThaumicTinkerer;
import vazkii.tinkerer.client.util.helper.IconHelper;
import vazkii.tinkerer.lib.LibFeatures;
import vazkii.tinkerer.util.handler.ConfigurationHandler;
import vazkii.tinkerer.util.helper.ItemNBTHelper;
import vazkii.tinkerer.util.helper.ModCreativeTab;
import cpw.mods.fml.relauncher.Side;
@@ -101,7 +102,7 @@ public class ItemWandDislocation extends ItemWandTrade {
}
arg2.playSoundAtEntity(arg1, "thaumcraft.wand", 0.5F, 1F);
}
} else if(!ThaumcraftApi.portableHoleBlackList.contains(id) && Block.blocksList[id] != null && Block.blocksList[id].getBlockHardness(arg2, arg3, arg4, arg5) != -1F) {
} else if((tile == null || ConfigurationHandler.wandDislocationTiles) && !ThaumcraftApi.portableHoleBlackList.contains(id) && Block.blocksList[id] != null && Block.blocksList[id].getBlockHardness(arg2, arg3, arg4, arg5) != -1F) {
arg2.removeBlockTileEntity(arg3, arg4, arg5);
arg2.setBlock(arg3, arg4, arg5, 0, 0, 1 | 2);
storePickedBlock(arg0, (short) id, (short) meta, tile);
@@ -37,7 +37,7 @@ public class ItemWandTinkerer extends ItemWandCasting {
@Override
public int getRechargeInterval() {
return 9;
return 12;
}
@Override
+32 -3
View File
@@ -19,6 +19,7 @@ import net.minecraft.item.Item;
import thaumcraft.api.EnumTag;
import thaumcraft.api.ObjectTags;
import thaumcraft.api.ThaumcraftApi;
import vazkii.tinkerer.block.ModBlocks;
import vazkii.tinkerer.lib.LibItemIDs;
import vazkii.tinkerer.lib.LibItemNames;
import vazkii.tinkerer.lib.LibMisc;
@@ -41,10 +42,18 @@ public final class ModItems {
public static Item deathRune;
public static Item silkSword;
public static Item fortuneMaul;
public static Item enderMirror;
public static Item goliathLegs;
public static Item darkGas;
public static Item gasRemover;
public static Item cleansingTalisman;
public static Item fluxDetector;
public static Item dummyEnchantbook;
public static Item researchShareBook;
public static void initItems() {
wandTinkerer = new ItemWandTinkerer(LibItemIDs.idWandTinkerer).setUnlocalizedName(LibItemNames.WAND_TINKERER);
glowstoneGas = new ItemGlowstoneGas(LibItemIDs.idGlowstoneGas).setUnlocalizedName(LibItemNames.GLOWSTONE_GAS);
glowstoneGas = new ItemGas(LibItemIDs.idGlowstoneGas, ModBlocks.glowstoneGas).setUnlocalizedName(LibItemNames.GLOWSTONE_GAS);
spellCloth = new ItemSpellCloth(LibItemIDs.idSpellCloth).setUnlocalizedName(LibItemNames.SPELL_CLOTH);
stopwatch = new ItemStopwatch(LibItemIDs.idStopwatch).setUnlocalizedName(LibItemNames.STOPWATCH);
wandDislocation = new ItemWandDislocation(LibItemIDs.idWandDislocation).setUnlocalizedName(LibItemNames.WAND_DISLOCATION);
@@ -58,9 +67,16 @@ public final class ModItems {
deathRune = new ItemDeathRune(LibItemIDs.idDeathRune).setUnlocalizedName(LibItemNames.DEATH_RUNE);
silkSword = new ItemDefaultEnchant(LibItemIDs.idSilkSword, Enchantment.silkTouch, 1).setUnlocalizedName(LibItemNames.SILK_SWORD);
fortuneMaul = new ItemDefaultEnchant(LibItemIDs.idFortuneMaul, Enchantment.fortune, 3).setUnlocalizedName(LibItemNames.FORTUNE_MAUL);
enderMirror = new ItemEnderMirror(LibItemIDs.idEnderMirror).setUnlocalizedName(LibItemNames.ENDER_MIRROR);
goliathLegs = new ItemGoliathLegs(LibItemIDs.idGoliathLegs).setUnlocalizedName(LibItemNames.GOLIATH_LEGS);
darkGas = new ItemGas(LibItemIDs.idDarkGas, ModBlocks.darkGas).setUnlocalizedName(LibItemNames.DARK_GAS);
gasRemover = new ItemGasRemover(LibItemIDs.idGasRemover).setUnlocalizedName(LibItemNames.GAS_REMOVER);
cleansingTalisman = new ItemCleansingTalisman(LibItemIDs.idCleansingTalisman).setUnlocalizedName(LibItemNames.CLEANSING_TALISMAN);
fluxDetector = new ItemFluxDetector(LibItemIDs.idFluxDetector).setUnlocalizedName(LibItemNames.FLUX_DETECTOR);
dummyEnchantbook = new ItemDummyEnchantbook(LibItemIDs.idDummyEnchantbook).setUnlocalizedName(LibItemNames.DUMMY_ENCHANTBOOK);
researchShareBook = new ItemShareTome(LibItemIDs.idResearchShareBook).setUnlocalizedName(LibItemNames.RESEARCH_SHARE_BOOK);
nameItems();
applyObjectTags();
}
private static void nameItems() {
@@ -79,9 +95,16 @@ public final class ModItems {
LanguageRegistry.addName(deathRune, LibItemNames.DEATH_RUNE_D);
LanguageRegistry.addName(silkSword, LibItemNames.SILK_SWORD_D);
LanguageRegistry.addName(fortuneMaul, LibItemNames.FORTUNE_MAUL_D);
LanguageRegistry.addName(enderMirror, LibItemNames.ENDER_MIRROR_D);
LanguageRegistry.addName(goliathLegs, LibItemNames.GOLIATH_LEGS_D);
LanguageRegistry.addName(darkGas, LibItemNames.DARK_GAS_D);
LanguageRegistry.addName(gasRemover, LibItemNames.GAS_REMOVER_D);
LanguageRegistry.addName(cleansingTalisman, LibItemNames.CLEANSING_TALISMAN_D);
LanguageRegistry.addName(fluxDetector, LibItemNames.FLUX_DETECTOR_D);
LanguageRegistry.addName(researchShareBook, LibItemNames.RESEARCH_SHARE_BOOK_D);
}
private static void applyObjectTags() {
public static void applyObjectTags() {
ObjectTags tags = new ObjectTags().add(EnumTag.MAGIC, 48).add(EnumTag.VOID, 12).add(EnumTag.CRYSTAL, 15);
ThaumcraftApi.registerObjectTag(wandTinkerer.itemID, LibMisc.TAG_META_WILDCARD, tags);
@@ -114,5 +137,11 @@ public final class ModItems {
tags = new ObjectTags().add(EnumTag.DEATH, 16).add(EnumTag.TRAP, 12).add(EnumTag.POWER, 12).add(EnumTag.MAGIC, 22);
ThaumcraftApi.registerObjectTag(deathRune.itemID, LibMisc.TAG_META_WILDCARD, tags);
tags = new ObjectTags().add(EnumTag.DARK, 1);
ThaumcraftApi.registerComplexObjectTag(darkQuartz.itemID, LibMisc.TAG_META_WILDCARD, tags);
tags = new ObjectTags().add(EnumTag.HEAL, 16).add(EnumTag.KNOWLEDGE, 18).add(EnumTag.WATER, 6).add(EnumTag.MAGIC, 10).add(EnumTag.TOOL, 12);
ThaumcraftApi.registerObjectTag(cleansingTalisman.itemID, LibMisc.TAG_META_WILDCARD, tags);
}
}
+6 -2
View File
@@ -19,11 +19,13 @@ public final class LibBlockIDs {
public static final int DEFAULT_GLOWSTONE_GAS = 2150;
public static final int DEFAULT_TRANSMUTATOR = 2151;
public static final int DEFAULT_WARD_CHEST = 2152;
public static final int DEFAULT_ANIMATION_TABLET = 2153;
public static final int DEFAULT_DARK_QUARTZ = 2154;
public static final int DEFAULT_DARK_QUARTZ_SLAB = 2155;
public static final int DEFAULT_DARK_QUARTZ_STAIRS = 2156;
public static final int DEFAULT_DARK_QUARTZ_SLAB_FULL = 2157;
public static final int DEFAULT_ANIMATION_TABLET = 2153;
public static final int DEFAULT_DARK_GAS = 2158;
public static final int DEFAULT_PHANTOM_STONE = 2159;
public static int idGlowstoneGas;
public static int idTransmutator;
@@ -33,4 +35,6 @@ public final class LibBlockIDs {
public static int idDarkQuartzStairs;
public static int idDarkQuartzSlabFull;
public static int idAnimationTablet;
}
public static int idDarkGas;
public static int idPhantomStone;
}
@@ -48,6 +48,12 @@ public final class LibBlockNames {
public static final String ANIMATION_TABLET_R = "ANIMATION_TABLET";
public static final String ANIMATION_TABLET_D = "Tool Dynamism Tablet";
public static final String DARK_GAS = LibItemNames.DARK_GAS;
public static final String PHANTOM_STONE = "phantomStone";
public static final String PHANTOM_STONE_R = "PHANTOM_STONE";
public static final String PHANTOM_STONE_D = "Phantom Stone Block";
public static final String[] DARK_QUARTZ_BLOCK_NAMES = {
"Block of Smokey Quartz",
"Chiseled Smokey Quartz Block",
@@ -0,0 +1,28 @@
/**
* This class was created by <Vazkii>. It's distributed as
* part of the ThaumicTinkerer Mod.
*
* ThaumicTinkerer is Open Source and distributed under a
* Creative Commons Attribution-NonCommercial-ShareAlike 3.0 License
* (http://creativecommons.org/licenses/by-nc-sa/3.0/deed.en_GB)
*
* ThaumicTinkerer is a Derivative Work on Thaumcraft 3.
* Thaumcraft 3 © Azanor 2012
* (http://www.minecraftforum.net/topic/1585216-)
*
* File Created @ [25 May 2013, 11:06:36 (GMT)]
*/
package vazkii.tinkerer.lib;
public final class LibEnchantmentIDs {
public static final int DEFAULT_FREEZING = 215;
public static final int DEFAULT_SOULBRINGER = 216;
public static final int DEFAULT_VAMPIRISM = 217;
public static final int DEFAULT_ASHES = 218;
public static int freezing;
public static int soulbringer;
public static int vampirism;
public static int ashes;
}
@@ -0,0 +1,36 @@
/**
* This class was created by <Vazkii>. It's distributed as
* part of the ThaumicTinkerer Mod.
*
* ThaumicTinkerer is Open Source and distributed under a
* Creative Commons Attribution-NonCommercial-ShareAlike 3.0 License
* (http://creativecommons.org/licenses/by-nc-sa/3.0/deed.en_GB)
*
* ThaumicTinkerer is a Derivative Work on Thaumcraft 3.
* Thaumcraft 3 © Azanor 2012
* (http://www.minecraftforum.net/topic/1585216-)
*
* File Created @ [25 May 2013, 11:07:24 (GMT)]
*/
package vazkii.tinkerer.lib;
public final class LibEnchantmentNames {
public static final String FREEZING = "freezing";
public static final String FREEZING_R = "ENCHANT_FREEZING";
public static final String FREEZING_D = "Freezing";
public static final String SOULBRINGER = "soulbringer";
public static final String SOULBRINGER_R = "ENCHANT_SOULBRINGER";
public static final String SOULBRINGER_D = "Soulbringer";
public static final String VAMPIRISM = "vampirism";
public static final String VAMPIRISM_R = "ENCHANT_VAMPIRISM";
public static final String VAMPIRISM_D = "Vampirism";
public static final String ASHES = "ashes";
public static final String ASHES_R = "ENCHANT_ASHES";
public static final String ASHES_D = "Ashes";
public static final String LOST_ENCHANTS_RESEARCH_NAME = "LOST_ENCHANTS";
}
+8 -3
View File
@@ -30,9 +30,14 @@ public final class LibFeatures {
public static final int FIRE_BRACELET_CHARGES = 64;
public static final int FIRE_BRACELET_RECHARGE_VIS = 12;
public static final int TELEPORT_SIGIL_TIME = 100;
public static final int TELEPORT_SIGIL_TIME = 60;
public static final int TELEPORT_SIGIL_VIS = 25;
public static final int ENCHANT_ITEM_MAX_DMG = 1000;
public static final int ENCHANT_ITEM_MAX_DMG = 1200;
}
public static final int ENDER_MIRROR_COST = 1;
public static final int GOLIATH_LEGS_MAX_SAFETY = 5;
public static final int CLEANSING_TALISMAN_VIS = 10;
}
+18 -2
View File
@@ -15,8 +15,16 @@ public final class LibItemIDs {
public static final int DEFAULT_WAND_UPRISING = 21160;
public static final int DEFAULT_SWORD_CONDOR = 21161;
public static final int DEFAULT_DEATH_RUNE = 21162;
public static final int DEFAULT_SILK_SWORD = 21162;
public static final int DEFAULT_FORTUNE_MAUL = 21163;
public static final int DEFAULT_SILK_SWORD = 21163;
public static final int DEFAULT_FORTUNE_MAUL = 21164;
public static final int DEFAULT_ENDER_MIRROR = 21165;
public static final int DEFAULT_GOLIATH_LEGS = 21166;
public static final int DEFAULT_DARK_GAS = 21167;
public static final int DEFAULT_GAS_REMOVER = 21168;
public static final int DEFAULT_FLUX_DETECTOR = 21169;
public static final int DEFAULT_CLEANSING_TALISMAN = 21170;
public static final int DEFAULT_DUMMY_ENCHANTBOOK = 21171;
public static final int DEFAULT_RESEARCH_SHARE_BOOK = 21172;
public static int idWandTinkerer;
public static int idGlowstoneGas;
@@ -33,4 +41,12 @@ public final class LibItemIDs {
public static int idDeathRune;
public static int idSilkSword;
public static int idFortuneMaul;
public static int idEnderMirror;
public static int idGoliathLegs;
public static int idDarkGas;
public static int idGasRemover;
public static int idFluxDetector;
public static int idCleansingTalisman;
public static int idDummyEnchantbook;
public static int idResearchShareBook;
}
@@ -69,4 +69,33 @@ public final class LibItemNames {
public static final String FORTUNE_MAUL = "fortuneMaul";
public static final String FORTUNE_MAUL_R = "FORTUNE_MAUL";
public static final String FORTUNE_MAUL_D = "Fortunate Maul";
public static final String ENDER_MIRROR = "enderMirror";
public static final String ENDER_MIRROR_R = "ENDER_MIRROR";
public static final String ENDER_MIRROR_D = "Ender Mirror";
public static final String GOLIATH_LEGS = "goliathLegs";
public static final String GOLIATH_LEGS_R = "GOLIATH_LEGS";
public static final String GOLIATH_LEGS_D = "Goliath's Leggings";
public static final String DARK_GAS = "darkGas";
public static final String DARK_GAS_R = "DARK_GAS";
public static final String DARK_GAS_D = "Gaseous Tenebrae";
public static final String GAS_REMOVER = "gasRemover";
public static final String GAS_REMOVER_R = "GAS_REMOVER";
public static final String GAS_REMOVER_D = "Fume Dissipator";
public static final String FLUX_DETECTOR = "fluxDetector";
public static final String FLUX_DETECTOR_R = "FLUX_DETECTOR";
public static final String FLUX_DETECTOR_D = "Fluxometer";
public static final String CLEANSING_TALISMAN = "cleansingTalisman";
public static final String CLEANSING_TALISMAN_R = "CLEANSING_TALISMAN";
public static final String CLEANSING_TALISMAN_D = "Talisman of Remedium";
public static final String DUMMY_ENCHANTBOOK = "dummyEnchantbook";
public static final String RESEARCH_SHARE_BOOK = "researchShareBook";
public static final String RESEARCH_SHARE_BOOK_D = "Tome of Knowledge Sharing";
}
+1 -1
View File
@@ -18,7 +18,7 @@ public final class LibMisc {
public static final String MOD_ID = "ThaumicTinkerer";
public static final String MOD_NAME = "Thaumic Tinkerer";
public static final String MOD_VERSION = "1.0pre";
public static final String MOD_VERSION = "1.0.5";
public static final String DEPENDENCIES = "required-after:Thaumcraft";
+8 -1
View File
@@ -17,11 +17,18 @@ package vazkii.tinkerer.lib;
public final class LibPotions {
public static final int DEFAULT_ID_STOPWATCH = 21;
public static final int DEFAULT_ID_FROZEN = 22;
public static final int DEFAULT_ID_POSSESSED = 23;
public static int idStopwatch;
public static int idFrozen;
public static int idPossessed = 23;
public static final String NAME_STOPWATCH = "stopwatch";
public static final String NAME_FROZEN = "frozen";
public static final String NAME_POSSESSED = "possessed";
public static final String DISPLAY_NAME_STOPWATCH = "Time Twister";
public static final String DISPLAY_NAME_FROZEN = "Frozen";
public static final String DISPLAY_NAME_POSSESSED = "Possessed";
}
+4 -2
View File
@@ -33,13 +33,15 @@ public final class LibResources {
public static final String GUI_ANIMATION_TABLET = ROOT_GUI + "guiAnimationTablet.png";
public static final String MODEL_WARD_CHEST = ROOT_MODEL + "chestWard.png";
public static final String MODEL_LEGS_GOLIATH = ROOT_MODEL + "armorGoliath.png";
public static final String MISC_GLYPHS = BLUR + ROOT_MISC + "transmutatorGlyphs.png";
public static final String MISC_WARD_CHEST_OVERLAY = BLUR + ROOT_MISC + "wardChestOverlay.png";
public static final String MISC_WARD_CHEST_OVERLAY = ROOT_MISC + "wardChestOverlay.png";
public static final String MISC_AT_OVERLAY_LEFT = BLUR + ROOT_MISC + "atLeft.png";
public static final String MISC_AT_OVERLAY_RIGHT = BLUR + ROOT_MISC + "atRight1.png";
public static final String MISC_AT_OVERLAY_DIAL = BLUR + ROOT_TC + "misc/dial.png";
public static final String MISC_ATOVERLAY_REDSTONE = BLUR + ROOT_TC + "misc/dial_ind.png";
public static final String MISC_AT_OVERLAY_FACING = BLUR + ROOT_MISC + "tabletFacingInd.png";
public static final String MISC_ENTITY_POSSESSED = ROOT_MISC + "mobPossessed.png";
public static final String EMTPY_TEXTURE = "emptyTexture";
}
@@ -19,11 +19,13 @@ import vazkii.tinkerer.lib.LibPotions;
public final class ModPotions {
public static int idStopwatch;
public static Potion effectStopwatch;
public static Potion effectFrozen;
public static Potion effectPossessed;
public static void initPotions() {
effectStopwatch = new TTPotion(idStopwatch, false, 0x999900, 0, 0).setPotionName(LibPotions.DISPLAY_NAME_STOPWATCH);
effectStopwatch = new TTPotion(LibPotions.idStopwatch, false, 0x999900, 0, 0).setPotionName(LibPotions.DISPLAY_NAME_STOPWATCH);
effectFrozen = new TTPotion(LibPotions.idFrozen, false, 0x8BCFFB, 1, 0).setPotionName(LibPotions.DISPLAY_NAME_FROZEN);
effectPossessed = new TTPotion(LibPotions.idPossessed, false, 0x13001A, 2, 0).setPotionName(LibPotions.DISPLAY_NAME_POSSESSED);
}
}
@@ -14,11 +14,21 @@
*/
package vazkii.tinkerer.research;
import java.util.Arrays;
import net.minecraft.block.Block;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import thaumcraft.api.ThaumcraftApi;
import thaumcraft.api.crafting.ShapedArcaneCraftingRecipes;
import thaumcraft.api.research.ResearchList;
import thaumcraft.common.Config;
import thaumcraft.common.lib.ThaumcraftCraftingManager;
import vazkii.tinkerer.block.ModBlocks;
import vazkii.tinkerer.item.ModItems;
import vazkii.tinkerer.lib.LibBlockNames;
import vazkii.tinkerer.lib.LibItemNames;
import vazkii.tinkerer.lib.LibMisc;
public final class ModArcaneRecipes {
@@ -27,6 +37,35 @@ public final class ModArcaneRecipes {
"SI",
'S', new ItemStack(Item.sign),
'I', new ItemStack(Item.dyePowder));
ThaumcraftApi.addArcaneCraftingRecipe(LibItemNames.GAS_REMOVER_R, LibItemNames.GAS_REMOVER_R, 15, new ItemStack(ModItems.gasRemover),
"DDD", "T G", "QQQ",
'D', new ItemStack(ModItems.darkQuartz),
'T', new ItemStack(ModItems.darkGas),
'G', new ItemStack(ModItems.glowstoneGas),
'Q', new ItemStack(Item.netherQuartz));
ThaumcraftApi.addArcaneCraftingRecipe(LibItemNames.FLUX_DETECTOR_R, LibItemNames.FLUX_DETECTOR_R, 75, new ItemStack(ModItems.fluxDetector),
" G ", "FMF", " G ",
'G', new ItemStack(Item.ingotGold),
'F', new ItemStack(Config.itemResource, 1, 8),
'M', new ItemStack(Config.itemThaumometer));
for(int i = 0; i < 16; i++)
ThaumcraftApi.addArcaneCraftingRecipe(LibBlockNames.PHANTOM_STONE_R, 120, new ItemStack(ModBlocks.phantomStone, 4, i),
"SSS", "TBT", "SDS",
'S', new ItemStack(Block.whiteStone),
'T', new ItemStack(Config.blockInfusionWorkbench, 1, 0),
'B', new ItemStack(Config.itemResource, 1, 5),
'D', new ItemStack(Item.dyePowder, 1, i));
ResearchList.craftingRecipesForResearch.put(LibBlockNames.PHANTOM_STONE_R, Arrays.asList(new ShapedArcaneCraftingRecipes[] { ThaumcraftCraftingManager.createFakeArcaneRecipe(
LibBlockNames.PHANTOM_STONE_R, 120, new ItemStack(ModBlocks.phantomStone, 4, LibMisc.CRAFTING_META_WILDCARD),
"SSS", "TBT", "SDS",
'S', new ItemStack(Block.whiteStone),
'T', new ItemStack(Config.blockInfusionWorkbench, 1, 0),
'B', new ItemStack(Config.itemResource, 1, 5),
'D', new ItemStack(Item.dyePowder, 1, LibMisc.CRAFTING_META_WILDCARD)) }));
}
}
@@ -19,7 +19,6 @@ import java.util.Arrays;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraft.item.crafting.CraftingManager;
import net.minecraft.util.MathHelper;
import thaumcraft.api.research.ResearchList;
import vazkii.tinkerer.block.ModBlocks;
import vazkii.tinkerer.item.ModItems;
@@ -59,7 +58,7 @@ public final class ModCraftingRecipes {
private static void registerResearchItem(String name, ItemStack output, Object... stuff) {
GameRegistry.addRecipe(output, stuff);
if(!MathHelper.stringNullOrLengthZero(name))
if(name != null && name.length() != 0)
ResearchList.craftingRecipesForResearch.put(name, Arrays.asList(CraftingManager.getInstance().getRecipeList().size() -1));
}
@@ -8,8 +8,10 @@ import thaumcraft.api.ObjectTags;
import thaumcraft.api.ThaumcraftApi;
import thaumcraft.common.Config;
import vazkii.tinkerer.block.ModBlocks;
import vazkii.tinkerer.enchantment.ModEnchantments;
import vazkii.tinkerer.item.ModItems;
import vazkii.tinkerer.lib.LibBlockNames;
import vazkii.tinkerer.lib.LibEnchantmentNames;
import vazkii.tinkerer.lib.LibItemNames;
import vazkii.tinkerer.lib.LibMisc;
@@ -20,7 +22,7 @@ public final class ModInfusionRecipes {
ThaumcraftApi.addInfusionCraftingRecipe(LibItemNames.WAND_TINKERER_R, LibItemNames.WAND_TINKERER_R, 85, tags, new ItemStack(ModItems.wandTinkerer),
"SSS", "SWS", "SSS",
'S', new ItemStack(Config.itemShard, 1, 4),
'W', new ItemStack(Config.itemWandCastingApprentice, 1, LibMisc.CRAFTING_META_WILDCARD));
'W', new ItemStack(Config.itemWandCastingAdept, 1, LibMisc.CRAFTING_META_WILDCARD));
tags = new ObjectTags().add(EnumTag.WIND, 8);
ThaumcraftApi.addInfusionCraftingRecipe(LibItemNames.GLOWSTONE_GAS_R, LibItemNames.GLOWSTONE_GAS_R, 5, tags, new ItemStack(ModItems.glowstoneGas),
@@ -88,7 +90,7 @@ public final class ModInfusionRecipes {
tags = new ObjectTags().add(EnumTag.FLIGHT, 12).add(EnumTag.WIND, 6);
ThaumcraftApi.addInfusionCraftingRecipe(LibItemNames.WAND_UPRISING_R, LibItemNames.WAND_UPRISING_R, 25, tags, new ItemStack(ModItems.wandUprising),
" Q ", "QWQ", " Q ",
'Q', new ItemStack(Config.itemResource, 1, 10),
'Q', new ItemStack(Config.itemResource, 1, 3),
'W', new ItemStack(Config.itemWandLightning));
tags = new ObjectTags().add(EnumTag.POWER, 14).add(EnumTag.FLIGHT, 6);
@@ -131,5 +133,69 @@ public final class ModInfusionRecipes {
'4', new ItemStack(Config.itemShovelThaumium),
'O', new ItemStack(Block.obsidian),
'D', new ItemStack(Item.diamond));
tags = new ObjectTags().add(EnumTag.TOOL, 8).add(EnumTag.VISION, 6).add(EnumTag.ELDRITCH, 12);
ThaumcraftApi.addInfusionCraftingRecipe(LibItemNames.ENDER_MIRROR_R, LibItemNames.ENDER_MIRROR_R, 25, tags, new ItemStack(ModItems.enderMirror),
"E C", " M ", "O E",
'O', new ItemStack(Block.obsidian),
'C', new ItemStack(Block.enderChest),
'M', new ItemStack(Config.itemHandMirror),
'E', new ItemStack(Item.enderPearl));
tags = new ObjectTags().add(EnumTag.BEAST, 16).add(EnumTag.ARMOR, 16);
ThaumcraftApi.addInfusionCraftingRecipe(LibItemNames.GOLIATH_LEGS_R, LibItemNames.GOLIATH_LEGS_R, 80, tags, new ItemStack(ModItems.goliathLegs),
"LLL", "LRL", "L L",
'L', new ItemStack(Item.leather),
'R', new ItemStack(Config.itemLegsRobe));
tags = new ObjectTags().add(EnumTag.WIND, 6).add(EnumTag.DARK, 2);
ThaumcraftApi.addInfusionCraftingRecipe(LibItemNames.DARK_GAS_R, LibItemNames.DARK_GAS_R, 5, tags, new ItemStack(ModItems.darkGas),
"QPQ", " A ",
'Q', new ItemStack(ModItems.darkQuartz),
'P', new ItemStack(Config.itemEssence, 1, 0),
'A', new ItemStack(Config.itemResource, 1, 0));
tags = new ObjectTags().add(EnumTag.HEAL, 16).add(EnumTag.KNOWLEDGE, 18).add(EnumTag.TOOL, 12).add(EnumTag.MAGIC, 10);
ThaumcraftApi.addInfusionCraftingRecipe(LibItemNames.CLEANSING_TALISMAN_R, LibItemNames.CLEANSING_TALISMAN_R, 100, tags, new ItemStack(ModItems.cleansingTalisman),
"STS", "TWT", "STS",
'S', new ItemStack(ModItems.darkQuartz),
'T', new ItemStack(Config.itemResource, 1, 7),
'W', new ItemStack(Item.enderPearl));
tags = new ObjectTags().add(EnumTag.MAGIC, 12).add(EnumTag.KNOWLEDGE, 32).add(EnumTag.COLD, 40);
ItemStack stack = new ItemStack(ModItems.dummyEnchantbook, 1, 0);
stack.addEnchantment(ModEnchantments.freezing, 1);
ThaumcraftApi.addInfusionCraftingRecipe(LibEnchantmentNames.LOST_ENCHANTS_RESEARCH_NAME, LibEnchantmentNames.FREEZING_R, 200, tags, stack,
"INI", "IBI", "III",
'I', new ItemStack(Block.blockSnow),
'N', new ItemStack(Config.itemResearchNotes),
'B', new ItemStack(Item.book));
tags = new ObjectTags().add(EnumTag.MAGIC, 12).add(EnumTag.KNOWLEDGE, 32).add(EnumTag.INSECT, 40);
stack = new ItemStack(ModItems.dummyEnchantbook, 1, 1);
stack.addEnchantment(ModEnchantments.vampirism, 1);
ThaumcraftApi.addInfusionCraftingRecipe(LibEnchantmentNames.LOST_ENCHANTS_RESEARCH_NAME, LibEnchantmentNames.VAMPIRISM_R, 200, tags, stack,
"INI", "IBI", "III",
'I', new ItemStack(Item.rottenFlesh),
'N', new ItemStack(Config.itemResearchNotes),
'B', new ItemStack(Item.book));
tags = new ObjectTags().add(EnumTag.MAGIC, 12).add(EnumTag.KNOWLEDGE, 32).add(EnumTag.SPIRIT, 40);
stack = new ItemStack(ModItems.dummyEnchantbook, 1, 2);
stack.addEnchantment(ModEnchantments.soulbringer, 1);
ThaumcraftApi.addInfusionCraftingRecipe(LibEnchantmentNames.LOST_ENCHANTS_RESEARCH_NAME, LibEnchantmentNames.SOULBRINGER_R, 200, tags, stack,
"INI", "IBI", "III",
'I', new ItemStack(Block.slowSand),
'N', new ItemStack(Config.itemResearchNotes),
'B', new ItemStack(Item.book));
tags = new ObjectTags().add(EnumTag.MAGIC, 12).add(EnumTag.KNOWLEDGE, 32).add(EnumTag.FIRE, 40);
stack = new ItemStack(ModItems.dummyEnchantbook, 1, 3);
stack.addEnchantment(ModEnchantments.ashes, 1);
ThaumcraftApi.addInfusionCraftingRecipe(LibEnchantmentNames.LOST_ENCHANTS_RESEARCH_NAME, LibEnchantmentNames.ASHES_R, 200, tags, stack,
"INI", "IBI", "III",
'I', new ItemStack(Item.blazeRod),
'N', new ItemStack(Config.itemResearchNotes),
'B', new ItemStack(Item.book));
}
}
@@ -14,6 +14,7 @@
*/
package vazkii.tinkerer.research;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import thaumcraft.api.EnumTag;
import thaumcraft.api.ObjectTags;
@@ -22,6 +23,7 @@ import thaumcraft.common.Config;
import vazkii.tinkerer.block.ModBlocks;
import vazkii.tinkerer.item.ModItems;
import vazkii.tinkerer.lib.LibBlockNames;
import vazkii.tinkerer.lib.LibEnchantmentNames;
import vazkii.tinkerer.lib.LibItemNames;
public final class ModResearchItems {
@@ -44,13 +46,21 @@ public final class ModResearchItems {
public static ResearchItem animationTablet;
public static ResearchItem silkSword;
public static ResearchItem fortuneMaul;
public static ResearchItem enderMirror;
public static ResearchItem goliathLegs;
public static ResearchItem darkGas;
public static ResearchItem gasRemover;
public static ResearchItem cleansingTalisman;
public static ResearchItem fluxDetector;
public static ResearchItem lostEnchants;
public static ResearchItem phantomBlocks;
public static void registerModResearchItems() {
ObjectTags tags = new ObjectTags().add(EnumTag.MAGIC, 16).add(EnumTag.VOID, 8);
wandTinkerer = new ResearchItem(LibItemNames.WAND_TINKERER_R, tags, -5, 3, ModItems.wandTinkerer).setParentsHidden(Config.researchGoggles).registerResearchItem();
tags = new ObjectTags().add(EnumTag.LIGHT, 7).add(EnumTag.WIND, 4).add(EnumTag.POWER, 3);
glowstoneGas = new ResearchItem(LibItemNames.GLOWSTONE_GAS_R, tags, 5, 2, ModItems.glowstoneGas).setParents(Config.researchNitor).registerResearchItem();
glowstoneGas = new ResearchItem(LibItemNames.GLOWSTONE_GAS_R, tags, 4, 2, ModItems.glowstoneGas).setParents(Config.researchNitor).registerResearchItem();
tags = new ObjectTags().add(EnumTag.CLOTH, 9).add(EnumTag.MAGIC, 8).add(EnumTag.EXCHANGE, 6);
spellCloth = new ResearchItem(LibItemNames.SPELL_CLOTH_R, tags, -6, 1, ModItems.spellCloth).setParents(Config.researchFabric).setParentsHidden(Config.researchUTFT).registerResearchItem();
@@ -83,10 +93,10 @@ public final class ModResearchItems {
sigilTeleport = new ResearchItem(LibItemNames.TELEPORTATION_SIGIL_R, tags, -2, 26, new ItemStack(ModItems.teleportSigil, 0, 1)).setParents(Config.researchTTOE).setHidden().registerResearchItem();
tags = new ObjectTags().add(EnumTag.MAGIC, 8).add(EnumTag.POWER, 8).add(EnumTag.MOTION, 12).add(EnumTag.FLIGHT, 14);
wandUprising = new ResearchItem(LibItemNames.WAND_UPRISING_R, tags, 2, 7, ModItems.wandUprising).setParentsHidden(Config.researchElementalSword).setHidden().registerResearchItem();
wandUprising = new ResearchItem(LibItemNames.WAND_UPRISING_R, tags, 2, 7, ModItems.wandUprising).setParents(Config.researchElementalSword).setHidden().registerResearchItem();
tags = new ObjectTags().add(EnumTag.FLIGHT, 12).add(EnumTag.MOTION, 8).add(EnumTag.POWER, 14).add(EnumTag.MAGIC, 12);
swordCondor = new ResearchItem(LibItemNames.SWORD_CONDOR_R, tags, 4, 7, ModItems.swordCondor).setParentsHidden(wandUprising).setHidden().registerResearchItem();
swordCondor = new ResearchItem(LibItemNames.SWORD_CONDOR_R, tags, 4, 7, ModItems.swordCondor).setParents(wandUprising).setHidden().registerResearchItem();
tags = new ObjectTags().add(EnumTag.DEATH, 20).add(EnumTag.POWER, 16).add(EnumTag.TRAP, 12);
deathRune = new ResearchItem(LibItemNames.DEATH_RUNE_R, tags, 5, 11, ModItems.deathRune).setParents(wardChest).setHidden().registerResearchItem();
@@ -99,5 +109,29 @@ public final class ModResearchItems {
tags = new ObjectTags().add(EnumTag.TOOL, 12).add(EnumTag.DARK, 1).add(EnumTag.VALUABLE, 12);
fortuneMaul = new ResearchItem(LibItemNames.FORTUNE_MAUL_R, tags, 8, 24, ModItems.fortuneMaul).setParentsHidden(Config.researchThaumium).setHidden().setLost().registerResearchItem();
tags = new ObjectTags().add(EnumTag.TOOL, 8).add(EnumTag.ELDRITCH, 6).add(EnumTag.MAGIC, 12).add(EnumTag.VISION, 12);
enderMirror = new ResearchItem(LibItemNames.ENDER_MIRROR_R, tags, 5, 5, ModItems.enderMirror).setParents(Config.researchHandMirror).setHidden().registerResearchItem();
tags = new ObjectTags().add(EnumTag.BEAST, 12).add(EnumTag.ARMOR, 12);
goliathLegs = new ResearchItem(LibItemNames.GOLIATH_LEGS_R, tags, 1, 15, ModItems.goliathLegs).setParentsHidden(Config.researchRobes).setParents(Config.researchUTFT).setHidden().registerResearchItem();
tags = new ObjectTags().add(EnumTag.DARK, 4).add(EnumTag.WIND, 5).add(EnumTag.POWER, 4);
darkGas = new ResearchItem(LibItemNames.DARK_GAS_R, tags, 5, -1, ModItems.darkGas).setParents(Config.researchAlumentum).setParentsHidden(glowstoneGas).registerResearchItem();
tags = new ObjectTags().add(EnumTag.LIGHT, 1).add(EnumTag.DARK, 1).add(EnumTag.WIND, 1);
gasRemover = new ResearchItem(LibItemNames.GAS_REMOVER_R, tags, 5, -2, ModItems.gasRemover).setParents(darkGas).registerResearchItem();
tags = new ObjectTags().add(EnumTag.HEAL, 10).add(EnumTag.TOOL, 16).add(EnumTag.MAGIC, 8).add(EnumTag.WATER, 4).add(EnumTag.KNOWLEDGE, 16);
cleansingTalisman = new ResearchItem(LibItemNames.CLEANSING_TALISMAN_R, tags, 1, 18, ModItems.cleansingTalisman).setParents(Config.researchUTFT).setHidden().registerResearchItem();
tags = new ObjectTags().add(EnumTag.VISION, 16).add(EnumTag.MAGIC, 12).add(EnumTag.FLUX, 10);
fluxDetector = new ResearchItem(LibItemNames.FLUX_DETECTOR_R, tags, -3, 19, ModItems.fluxDetector).setParents(Config.researchBasicFlux).setParentsHidden(Config.researchGoggles).registerResearchItem();
tags = new ObjectTags().add(EnumTag.MAGIC, 12).add(EnumTag.KNOWLEDGE, 24).add(EnumTag.COLD, 12).add(EnumTag.SPIRIT, 12).add(EnumTag.FIRE, 12).add(EnumTag.INSECT, 12).add(EnumTag.ELDRITCH, 16).add(EnumTag.POWER, 12).add(EnumTag.WEAPON, 14).add(EnumTag.TOOL, 14);
lostEnchants = new ResearchItem(LibEnchantmentNames.LOST_ENCHANTS_RESEARCH_NAME, tags, 8, 26, Item.enchantedBook).setParentsHidden(Config.researchTTOE).setHidden().setLost().setSpecial().registerResearchItem();
tags = new ObjectTags().add(EnumTag.SPIRIT, 16).add(EnumTag.CRYSTAL, 12).add(EnumTag.TRAP, 6).add(EnumTag.ROCK, 12).add(EnumTag.ELDRITCH, 4);
phantomBlocks = new ResearchItem(LibBlockNames.PHANTOM_STONE_R, tags, 2, 13, new ItemStack(ModBlocks.phantomStone, 1, 15)).setHidden().setParents(Config.researchArcaneDoor).registerResearchItem();
}
}
@@ -0,0 +1,35 @@
/**
* This class was created by <Vazkii>. It's distributed as
* part of the ThaumicTinkerer Mod.
*
* ThaumicTinkerer is Open Source and distributed under a
* Creative Commons Attribution-NonCommercial-ShareAlike 3.0 License
* (http://creativecommons.org/licenses/by-nc-sa/3.0/deed.en_GB)
*
* ThaumicTinkerer is a Derivative Work on Thaumcraft 3.
* Thaumcraft 3 © Azanor 2012
* (http://www.minecraftforum.net/topic/1585216-)
*
* File Created @ [29 May 2013, 20:28:06 (GMT)]
*/
package vazkii.tinkerer.tile;
import net.minecraft.entity.player.InventoryPlayer;
import net.minecraft.item.ItemStack;
public class FakeInvPlayer extends InventoryPlayer {
TabletFakePlayer fakePlayer;
public FakeInvPlayer(TabletFakePlayer fakePlayer) {
super(fakePlayer);
this.fakePlayer = fakePlayer;
}
@Override
public void setInventorySlotContents(int par1, ItemStack par2ItemStack) {
super.setInventorySlotContents(par1, par2ItemStack);
if(par1 == currentItem)
fakePlayer.tablet.setInventorySlotContents(0, getStackInSlot(currentItem));
}
}
@@ -26,6 +26,7 @@ public class TabletFakePlayer extends FakePlayer {
public TabletFakePlayer(TileEntityAnimationTablet tablet) {
super(tablet.worldObj, tablet.getInvName());
this.tablet = tablet;
inventory = new FakeInvPlayer(this);
}
@Override
@@ -35,6 +36,8 @@ public class TabletFakePlayer extends FakePlayer {
@Override
public void onUpdate() {
capabilities.isCreativeMode = false;
posX = tablet.xCoord + 0.5;
posY = tablet.yCoord + 1.6;
posZ = tablet.zCoord + 0.5;
@@ -148,7 +148,7 @@ public class TileEntityAnimationTablet extends TileEntity implements IInventory
player.attackTargetEntityWithCurrentItem(entity);
done = true;
} else if(!isBreaking){
if(id != 0 && !Block.blocksList[id].isAirBlock(worldObj, coords.posX, coords.posY, coords.posZ)) {
if(id != 0 && !Block.blocksList[id].isAirBlock(worldObj, coords.posX, coords.posY, coords.posZ) && Block.blocksList[id].getBlockHardness(worldObj, coords.posX, coords.posY, coords.posZ) >= 0) {
isBreaking = true;
startBreaking(Block.blocksList[id], worldObj.getBlockMetadata(coords.posX, coords.posY, coords.posZ));
done = true;
@@ -251,7 +251,7 @@ public class TileEntityAnimationTablet extends TileEntity implements IInventory
stopBreaking();
else {
Block var3 = Block.blocksList[var2];
var4 = var3.getPlayerRelativeBlockHardness(player, worldObj,coords.posX, coords.posY, coords.posZ) * var1 + 1F;
var4 = var3.getPlayerRelativeBlockHardness(player, worldObj,coords.posX, coords.posY, coords.posZ) * var1;
var5 = (int) (var4 * 10);
if (var5 != durabilityRemainingOnBlock) {
@@ -331,6 +331,14 @@ public class TileEntityAnimationTablet extends TileEntity implements IInventory
return coords;
}
public boolean getIsBreaking() {
return isBreaking;
}
public FakePlayer getFakePlayer() {
return player;
}
@Override
public boolean receiveClientEvent(int par1, int par2) {
if(par1 == 0) {
@@ -30,6 +30,7 @@ import vazkii.tinkerer.inventory.slot.SlotTransmutator;
import vazkii.tinkerer.lib.LibBlockNames;
import vazkii.tinkerer.network.PacketManager;
import vazkii.tinkerer.network.packet.PacketTransmutatorSync;
import vazkii.tinkerer.util.handler.ConfigurationHandler;
public class TileEntityTransmutator extends TileInfusionWorkbench implements ISidedInventory {
@@ -66,14 +67,14 @@ public class TileEntityTransmutator extends TileInfusionWorkbench implements ISi
ObjectTags tags = ThaumcraftCraftingManager.getObjectTags(getStackInSlot(0));
int value = SlotTransmutator.getTotalAspectValue(tags);
boolean hasVis = value == 1 ? true : AuraManager.decreaseClosestAura(worldObj, xCoord, yCoord, zCoord, value * 2, false);
boolean hasVis = value == 1 ? true : AuraManager.decreaseClosestAura(worldObj, xCoord, yCoord, zCoord, value * ConfigurationHandler.transmutatorVisMultiplier, false);
if(!hasVis)
return false;
for(EnumTag tag : tags.getAspects()) {
int amount = tags.getAmount(tag);
int transAmount = foundTags.getAmount(tag);
if(transAmount < amount * 4)
if(transAmount < amount * ConfigurationHandler.transmutatorEssentiaMultiplier)
return false;
}
@@ -19,7 +19,6 @@ import net.minecraft.inventory.ISidedInventory;
import net.minecraft.item.ItemStack;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.nbt.NBTTagList;
import net.minecraft.util.MathHelper;
import net.minecraftforge.common.ForgeDirection;
import thaumcraft.common.tiles.TileOwned;
import vazkii.tinkerer.lib.LibBlockNames;
@@ -129,12 +128,12 @@ public class TileEntityWardChest extends TileOwned implements ISidedInventory, n
@Override
public boolean isInvNameLocalized() {
return !MathHelper.stringNullOrLengthZero(customName);
return customName != null && customName.length() > 0;
}
@Override
public int getInventoryStackLimit() {
return 0;
return 64;
}
@Override
@@ -4,8 +4,11 @@ import java.io.File;
import net.minecraftforge.common.ConfigCategory;
import net.minecraftforge.common.Configuration;
import net.minecraftforge.common.Property;
import vazkii.tinkerer.lib.LibBlockIDs;
import vazkii.tinkerer.lib.LibBlockNames;
import vazkii.tinkerer.lib.LibEnchantmentIDs;
import vazkii.tinkerer.lib.LibEnchantmentNames;
import vazkii.tinkerer.lib.LibItemIDs;
import vazkii.tinkerer.lib.LibItemNames;
import vazkii.tinkerer.lib.LibPotions;
@@ -15,13 +18,29 @@ public final class ConfigurationHandler {
private static Configuration config;
private static final String CATEGORY_POTIONS = "potions";
private static final String CATEGORY_ENCHANTMENTS = "enchantments";
private static final String CATEGORY_BALANCE = "balance";
private static ConfigCategory categoryPotions;
private static ConfigCategory categoryBalance;
private static String NODE_TRANSMUTATOR_VIS_MULTI = "transmutator.visMultiplier";
private static String NODE_TRANSMUTATOR_ESSENTIA_MULTI = "transmutator.aspectMultiplier";
private static String NODE_TRANSMUTATOR_MAX_VALUE = "transmutator.maxValue";
private static String NODE_TRANSMUTATOR_ENABLE = "transmutator.enable";
private static String NODE_WAND_DISLOCATION_TILES = "wandDislocation.pickupTiles";
public static int transmutatorVisMultiplier = 2;
public static int transmutatorEssentiaMultiplier = 4;
public static int transmutatorMaxValue = 75;
public static boolean enableTransmutator = true;
public static boolean wandDislocationTiles = true;
public static void loadConfig(File configFile) {
config = new Configuration(configFile);
categoryPotions = new ConfigCategory(CATEGORY_POTIONS);
categoryBalance = new ConfigCategory(CATEGORY_BALANCE);
config.load();
@@ -40,6 +59,14 @@ public final class ConfigurationHandler {
LibItemIDs.idDeathRune = loadItem(LibItemNames.DEATH_RUNE, LibItemIDs.DEFAULT_DEATH_RUNE);
LibItemIDs.idSilkSword = loadItem(LibItemNames.SILK_SWORD, LibItemIDs.DEFAULT_SILK_SWORD);
LibItemIDs.idFortuneMaul = loadItem(LibItemNames.FORTUNE_MAUL, LibItemIDs.DEFAULT_FORTUNE_MAUL);
LibItemIDs.idEnderMirror = loadItem(LibItemNames.ENDER_MIRROR, LibItemIDs.DEFAULT_ENDER_MIRROR);
LibItemIDs.idGoliathLegs = loadItem(LibItemNames.GOLIATH_LEGS, LibItemIDs.DEFAULT_GOLIATH_LEGS);
LibItemIDs.idDarkGas = loadItem(LibItemNames.DARK_GAS, LibItemIDs.DEFAULT_DARK_GAS);
LibItemIDs.idGasRemover = loadItem(LibItemNames.GAS_REMOVER, LibItemIDs.DEFAULT_GAS_REMOVER);
LibItemIDs.idFluxDetector = loadItem(LibItemNames.FLUX_DETECTOR, LibItemIDs.DEFAULT_FLUX_DETECTOR);
LibItemIDs.idCleansingTalisman = loadItem(LibItemNames.CLEANSING_TALISMAN, LibItemIDs.DEFAULT_CLEANSING_TALISMAN);
LibItemIDs.idDummyEnchantbook = loadItem(LibItemNames.DUMMY_ENCHANTBOOK, LibItemIDs.DEFAULT_DUMMY_ENCHANTBOOK);
LibItemIDs.idResearchShareBook = loadItem(LibItemNames.RESEARCH_SHARE_BOOK, LibItemIDs.DEFAULT_RESEARCH_SHARE_BOOK);
LibBlockIDs.idGlowstoneGas = loadBlock(LibBlockNames.GLOWSTONE_GAS, LibBlockIDs.DEFAULT_GLOWSTONE_GAS);
LibBlockIDs.idTransmutator = loadBlock(LibBlockNames.TRANSMUTATOR, LibBlockIDs.DEFAULT_TRANSMUTATOR);
@@ -49,8 +76,23 @@ public final class ConfigurationHandler {
LibBlockIDs.idDarkQuartzSlab = loadBlock(LibBlockNames.DARK_QUARTZ_SLAB, LibBlockIDs.DEFAULT_DARK_QUARTZ_SLAB);
LibBlockIDs.idDarkQuartzSlabFull = loadBlock(LibBlockNames.DARK_QUARTZ_SLAB_FULL, LibBlockIDs.DEFAULT_DARK_QUARTZ_SLAB_FULL);
LibBlockIDs.idAnimationTablet = loadBlock(LibBlockNames.ANIMATION_TABLET, LibBlockIDs.DEFAULT_ANIMATION_TABLET);
LibBlockIDs.idDarkGas = loadBlock(LibBlockNames.DARK_GAS, LibBlockIDs.DEFAULT_DARK_GAS);
LibBlockIDs.idPhantomStone = loadBlock(LibBlockNames.PHANTOM_STONE, LibBlockIDs.DEFAULT_PHANTOM_STONE);
LibPotions.idStopwatch = loadPotion(LibPotions.NAME_STOPWATCH, LibPotions.DEFAULT_ID_STOPWATCH);
LibPotions.idFrozen = loadPotion(LibPotions.NAME_FROZEN, LibPotions.DEFAULT_ID_FROZEN);
LibPotions.idPossessed = loadPotion(LibPotions.NAME_POSSESSED, LibPotions.DEFAULT_ID_POSSESSED);
LibEnchantmentIDs.freezing = loadEnchantment(LibEnchantmentNames.FREEZING, LibEnchantmentIDs.DEFAULT_FREEZING);
LibEnchantmentIDs.soulbringer = loadEnchantment(LibEnchantmentNames.SOULBRINGER, LibEnchantmentIDs.DEFAULT_SOULBRINGER);
LibEnchantmentIDs.vampirism = loadEnchantment(LibEnchantmentNames.VAMPIRISM, LibEnchantmentIDs.DEFAULT_VAMPIRISM);
LibEnchantmentIDs.ashes = loadEnchantment(LibEnchantmentNames.ASHES, LibEnchantmentIDs.DEFAULT_ASHES);
transmutatorVisMultiplier = loadBalanceInt(NODE_TRANSMUTATOR_VIS_MULTI, transmutatorVisMultiplier, "The multiplier of the vis cost for an item on the transmutator. X times the total amount of aspect value.");
transmutatorEssentiaMultiplier = loadBalanceInt(NODE_TRANSMUTATOR_ESSENTIA_MULTI, transmutatorEssentiaMultiplier, "The multiplier of the aspect cost for an item on the transmutator, X times the amount of the original value.");
transmutatorMaxValue = loadBalanceInt(NODE_TRANSMUTATOR_MAX_VALUE, transmutatorMaxValue, "The maximum cost of an item that can be put in a transmutator. Cost refers to the total amount of aspect value.");
enableTransmutator = loadBalanceBool(NODE_TRANSMUTATOR_ENABLE, enableTransmutator, "Set to false to completely disable the transmutator.");
wandDislocationTiles = loadBalanceBool(NODE_WAND_DISLOCATION_TILES, wandDislocationTiles, "Set to false to prevent the wand of dislocation from picking up tile entities (chests, furnaces, etc.)");
config.save();
}
@@ -67,4 +109,19 @@ public final class ConfigurationHandler {
return config.get(CATEGORY_POTIONS, label, deafultID).getInt(deafultID);
}
private static int loadEnchantment(String label, int deafultID) {
return config.get(CATEGORY_ENCHANTMENTS, label, deafultID).getInt(deafultID);
}
private static boolean loadBalanceBool(String label, boolean defaultValue, String comment) {
Property prop = config.get(CATEGORY_BALANCE, label, defaultValue);
prop.comment = comment;
return prop.getBoolean(defaultValue);
}
private static int loadBalanceInt(String label, int defaultValue, String comment) {
Property prop = config.get(CATEGORY_BALANCE, label, defaultValue);
prop.comment = comment;
return prop.getInt(defaultValue);
}
}
@@ -0,0 +1,50 @@
/**
* This class was created by <Vazkii>. It's distributed as
* part of the ThaumicTinkerer Mod.
*
* ThaumicTinkerer is Open Source and distributed under a
* Creative Commons Attribution-NonCommercial-ShareAlike 3.0 License
* (http://creativecommons.org/licenses/by-nc-sa/3.0/deed.en_GB)
*
* ThaumicTinkerer is a Derivative Work on Thaumcraft 3.
* Thaumcraft 3 © Azanor 2012
* (http://www.minecraftforum.net/topic/1585216-)
*
* File Created @ [27 May 2013, 21:02:51 (GMT)]
*/
package vazkii.tinkerer.util.handler;
import net.minecraft.enchantment.Enchantment;
import net.minecraft.enchantment.EnchantmentData;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.inventory.IInventory;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import vazkii.tinkerer.enchantment.ModEnchantments;
import vazkii.tinkerer.item.ModItems;
import cpw.mods.fml.common.ICraftingHandler;
public class EnchantedBookCraftingHandler implements ICraftingHandler {
private static Enchantment[] enchantsInBooks;
public EnchantedBookCraftingHandler() {
enchantsInBooks = new Enchantment[] {
ModEnchantments.freezing,
ModEnchantments.vampirism,
ModEnchantments.soulbringer,
ModEnchantments.ashes
};
}
@Override
public void onCrafting(EntityPlayer player, ItemStack item, IInventory craftMatrix) {
if(item.itemID == ModItems.dummyEnchantbook.itemID) {
Item.enchantedBook.func_92115_a(item, new EnchantmentData(enchantsInBooks[item.getItemDamage()], 1));
item.itemID = Item.enchantedBook.itemID;
}
}
@Override
public void onSmelting(EntityPlayer player, ItemStack item) { }
}
@@ -0,0 +1,47 @@
/**
* This class was created by <Vazkii>. It's distributed as
* part of the ThaumicTinkerer Mod.
*
* ThaumicTinkerer is Open Source and distributed under a
* Creative Commons Attribution-NonCommercial-ShareAlike 3.0 License
* (http://creativecommons.org/licenses/by-nc-sa/3.0/deed.en_GB)
*
* ThaumicTinkerer is a Derivative Work on Thaumcraft 3.
* Thaumcraft 3 © Azanor 2012
* (http://www.minecraftforum.net/topic/1585216-)
*
* File Created @ [19 May 2013, 15:15:51 (GMT)]
*/
package vazkii.tinkerer.util.handler;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.util.EnumChatFormatting;
import net.minecraftforge.event.EventPriority;
import net.minecraftforge.event.ForgeSubscribe;
import net.minecraftforge.event.entity.living.LivingHurtEvent;
import vazkii.tinkerer.item.ItemGoliathLegs;
import vazkii.tinkerer.lib.LibFeatures;
public final class PlayerDamageHandler {
@ForgeSubscribe(priority = EventPriority.HIGHEST)
public void onPlayerDamage(LivingHurtEvent event) {
if(!(event.entityLiving instanceof EntityPlayer))
return;
EntityPlayer player = (EntityPlayer) event.entityLiving;
if(player.getCurrentArmor(1) != null && player.getCurrentArmor(1).getItem() instanceof ItemGoliathLegs && event.ammount > 0) {
event.ammount -= 1;
int health = player.getHealth();
if(health > LibFeatures.GOLIATH_LEGS_MAX_SAFETY && event.ammount >= health) {
event.ammount = health - 1;
if(!player.worldObj.isRemote)
player.addChatMessage(EnumChatFormatting.GOLD + "" + EnumChatFormatting.ITALIC + "Your Goliath's Leggings protected you from death.");
}
}
}
}
@@ -14,9 +14,14 @@
*/
package vazkii.tinkerer.util.helper;
import java.util.List;
import net.minecraft.client.Minecraft;
import net.minecraft.client.entity.EntityClientPlayerMP;
import net.minecraft.item.ItemStack;
import net.minecraft.world.World;
import thaumcraft.api.aura.AuraNode;
import thaumcraft.common.aura.AuraManager;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
@@ -35,4 +40,29 @@ public final class MiscHelper {
public static String stackAsString(ItemStack stack) {
return stack == null ? "null" : stack.itemID + ":" + stack.getItemDamage();
}
public static AuraNode getClosestNode(World world, double x, double y, double z) {
List<Integer> nodes = AuraManager.getAurasWithin(world, x, y, z);
double closestDist = Double.MAX_VALUE;
AuraNode closestNode = null;
for(int i : nodes) {
AuraNode node = AuraManager.getNode(i);
float value = node.baseLevel / 4F;
double distX = node.xPos - x;
double distY = node.yPos - y;
double distZ = node.zPos - z;
double dist = distX * distX + distY * distY + distZ * distZ;
if(value * value >= dist && dist < closestDist) {
closestDist = dist;
closestNode = node;
}
}
return closestNode;
}
}
Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.0 KiB

After

Width:  |  Height:  |  Size: 5.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.0 KiB

+107 -6
View File
@@ -19,7 +19,7 @@ This wand can carry 500 vis, unlike the Wand of the Adept. It's not a very dispe
<longText>Researching the intricacies of the Light is paying off, you are close to finding a way to make completely invisible light.</longText>
<page type = "text">You have studied the intricacies of the Light, and found out a way to create completely invisible light by infusing Glowstone with the raw flame.
This phial contains a concentrated extract of Gaseous Glowstone, that can be released trough a right click, and will spread relatively fast in the nearby area, lighting it up.</page>
This phial contains a concentrated extract of Gaseous Glowstone, that can be released through a right click, and will spread relatively fast in the nearby area, lighting it up.</page>
<page type = "infusioncrafting">GLOWSTONE_GAS</page>
</project>
@@ -34,7 +34,7 @@ This phial contains a concentrated extract of Gaseous Glowstone, that can be rel
<!-- ======================================== Stopwatch of the Timebender /-->
<project id = "STOPWATCH" version = "1">
<name>Stopwatch of the Timebender</name>
<name>Stopwatch of the Timetwister</name>
<popupText>[TT] 1.21 GIGAWATTS!?!</popupText>
<longText>You think you know a way of twisting the very fabric of time to your will.</longText>
<page type = "text">You have found a way of twisting the very fabric of time to your own will.
@@ -117,7 +117,7 @@ Similarly to Warded Blocks, this chest can be removed with a wand. On a negative
<popupText>[TT] Inverted Looks</popupText>
<page type = "text">Smokey Quartz is pretty much Quartz, but negative. All regular blocks that can be made with quartz, can also be made with smokey quartz, and they look black.
Dark Quartz itself can be made with a piece of coal or charcoal for tinting, and a few pieces of regular nether quartz.</page>
Smokey Quartz itself can be made with a piece of coal or charcoal for tinting, and a few pieces of regular nether quartz.</page>
<page type = "crafting">DARK_QUARTZ0</page>
<page type = "crafting">DARK_QUARTZ1</page>
<page type = "crafting">DARK_QUARTZ2</page>
@@ -144,7 +144,7 @@ After a sigil is bound, you can hold right click it, like a bow to charge it and
<longText>Knowing the power of the Sword of the Zephyr to propel foes away, you are trying to create something that will allow you to propel yourself.</longText>
<page type = "text">Using the knowledge you got from creating the Sword of the Zephyr of propeling things around with air, you created a wand that will propel the holder in the direction that they're looking at.
While someone is flying trough the use of this Wand, any fall damage that would have been taken is negated.</page>
While someone is flying through the use of this Wand, any acumulated gravitational energy is negated, reseting the fall damage the holder would take.</page>
<page type = "infusioncrafting">WAND_UPRISING</page>
</project>
@@ -193,7 +193,7 @@ Virtually anything can be animated, including blocks. The type of tool in the ta
This item acts as an "omnitool" of sorts, it can break virtually anything, but it's not very fast at it. You think enchanting it with Efficiency using an anvil is the logical next step.
Furthermore, after crafting this item, it instantly comes enchanted with the Silk Touch enchantment. The one downside to this is that it can't be enchanted trough regular means. It also seems to hold it's magical energy with a extraordinary bond, possibly unbreakable.</page>
Furthermore, after crafting this item, it instantly comes enchanted with the Silk Touch enchantment. The one downside to this is that it can't be enchanted through regular means. It also seems to hold it's magical energy with a extraordinary bond, possibly unbreakable.</page>
<page type = "infusioncrafting">SILK_SWORD</page>
</project>
@@ -206,7 +206,108 @@ Furthermore, after crafting this item, it instantly comes enchanted with the Sil
This item acts as an "omnitool" of sorts, it can break virtually anything, but it's not very fast at it. You think enchanting it with Efficiency using an anvil is the logical next step.
Furthermore, after crafting this item, it instantly comes enchanted with the Fortune III enchantment. The one downside to this is that it can't be enchanted trough regular means. It also seems to hold it's magical energy with a extraordinary bond, possibly unbreakable.</page>
Furthermore, after crafting this item, it instantly comes enchanted with the Fortune III enchantment. The one downside to this is that it can't be enchanted through regular means. It also seems to hold it's magical energy with a extraordinary bond, possibly unbreakable.</page>
<page type = "infusioncrafting">FORTUNE_MAUL</page>
</project>
<!-- ======================================== Ender Mirror /-->
<project id = "ENDER_MIRROR" version = "1">
<name>Ender Mirror</name>
<popupText>[TT] Another sight</popupText>
<longText>After learning how to transport items using Hand Mirrors, you are thinking you can apply that knowledge to the Ender Chests.</longText>
<page type = "text">You have put the knowledge acquired from constructing the Magic Hand Mirror into good use, and applied it to the Ender Chests.
This mirror, for a small cost of vis from the local aura allows you to access your ender chest inventory without needing to place it down yourself.</page>
<page type = "infusioncrafting">ENDER_MIRROR</page>
</project>
<!-- ======================================== Goliath's Leggings /-->
<project id = "GOLIATH_LEGS" version = "1">
<name>Goliath's Leggings</name>
<popupText>[TT] Legs of the Giant</popupText>
<longText>You are thinking you can create more protective robes using the Thaumaturge's Robes you already know how to make.</longText>
<page type = "text">Making use of the Thaumaturge's Robes you created, you futher worked on them, creating new leggings. These leggings protect the wearer from all incoming damage, by reducing it by 1.
Futhermore, when the wearer would die by a crushing blow when they have more than 2.5 hearts, they stay barely alive with half a heart.
They also give a more powerful vis reduction.</page>
<page type = "infusioncrafting">GOLIATH_LEGS</page>
</project>
<!-- ======================================== Gaseous Tenebrae /-->
<project id = "DARK_GAS" version = "1">
<name>Gaseous Tenebrae</name>
<popupText>[TT] Darkened Air</popupText>
<longText>After having learned how to create Gaseous Glowstone, you are thinking about making air that's dark. You are confident that it's possible, and that the other alchemical material is required.</longText>
<page type = "text">You have studied the intricacies of the Shadow, and found out a way to create gaseous darkess by infusing Smokey Quartz with the raw power.
This phial contains a concentrated extract of Gaseous Tenebrae, that can be released through a right click, and will spread relatively fast in the nearby area, darkening it.</page>
<page type = "infusioncrafting">DARK_GAS</page>
</project>
<!-- ======================================== Fume Dissipator /-->
<project id = "GAS_REMOVER" version = "1">
<name>Fume Dissipator</name>
<popupText>[TT] Clearing the Ambient</popupText>
<longText>After knowing Gaseous glowstone and Tenebrae, you are thinking it might be possible to get rid of them in an easy manner. Researching the components of the two gases would be the logical next step, you think.</longText>
<page type = "text">After knowing both the Gaseous Glowstone and Tenebrae, you are thinking it's becoming a hassle to get rid of it. With this item, by shift-right clicking on it, all the nearby gas will get dissipated.</page>
<page type = "arcanecrafting">GAS_REMOVER</page>
</project>
<!-- ======================================== Talisman of Remedium /-->
<project id = "CLEANSING_TALISMAN" version = "1">
<name>Talisman of Remedium</name>
<popupText>[TT] Better Than Milk!</popupText>
<longText>By studying the elements of life and body, you are confident you can make an item to purify yourself.</longText>
<page type = "text">You have studied life and the body and found that through the application of magic you can protect yourself from harmful outside influences by redirecting these effects to another place. This talisman will dispell most harmful effects on the holder, at the cost of vis from the local aura.
To enable or disable this ability, one would shift-right click on it. As expected, it only works whilst enabled.</page>
<page type = "infusioncrafting">CLEANSING_TALISMAN</page>
</project>
<!-- ======================================== Fluxometer /-->
<project id = "FLUX_DETECTOR" version = "1">
<name>Fluxometer</name>
<popupText>[TT] Visual Damage</popupText>
<longText>After research of the flux itself, you think that you can make use of one of your early discoveries, the Thaumometer, to measure the flux.</longText>
<page type = "text">Through the research of the flux itself, and through usage of one of your early discoveries, the Thaumomenter, you managed to discover an upgrade for it.
This new detector, the Fluxometer can measure the flux in the nearest relevant node. Whilst looking at the Fluxometer with Goggles of Revealing, the holder can see what flux is in the air. The flux displays as icons, the opacity of each icon indicates how much of that aspect is in the aura. If you look close, you can see maxed out aspects as a bit unstable.</page>
<page type = "arcanecrafting">FLUX_DETECTOR</page>
</project>
<!-- ======================================== Lost Enchantments /-->
<project id = "LOST_ENCHANTS" version = "1">
<name>Lost Enchantments</name>
<popupText>[TT] A new level of magic</popupText>
<longText>The pieces of knowledge you have been connecting speak of extremely powerful enchantments on the various schools of magic. You don't know what might come out of this, but you are sure that you would need to study various different items.</longText>
<page type = "text">Extensive research of lost knowledge revealed a set of four very powerful enchantments.
These enchantments can not be enchanted through the regular means of using an enchanting table, rather, they would need to be created by the usage of an infusion altar. Furthermore, only one of these enchantments can be applied to a specific item at any given time.</page>
<page type = "text">Freezing: Any entity hit with this sword will recieve a freezing effect, imparing their movement. Being set on fire will negate this.
Soulbringer: When a sword imbuded with this hits an undead, there's a chance for that undead to get possessed and succumb to your side.
Vampirism: Upon hitting an entity, a quarter of the damage dealt will be absorbed by the attacker.
Ashes: The only of the four enchantments that isn't only for weapons. Any item that has this enchantment, upon being broken, it'll be revived back to life, at the cost of this enchantment and two random others.</page>
<page type = "infusioncrafting">ENCHANT_FREEZING</page>
<page type = "infusioncrafting">ENCHANT_SOULBRINGER</page>
<page type = "infusioncrafting">ENCHANT_VAMPIRISM</page>
<page type = "infusioncrafting">ENCHANT_ASHES</page>
</project>
<!-- ======================================== Phantom Stone Blocks /-->
<project id = "PHANTOM_STONE" version = "1">
<name>Phantom Stone Blocks</name>
<popupText>[TT] Is it real?</popupText>
<longText>You are not quite sure what you are doing, you think you might have found something, that's about it...</longText>
<page type = "text">You don't know how you managed to do it, but you have found a way of creating blocks that exist in non-euclidean space.
These blocks are based on the design you had put together for Warded Stone Blocks, they can only be broken by the player who placed them, using a wand.
However, there's a particularity to these. They have no physical boundaries for the player who placed them, allowing them to walk trough these blocks as if they didn't exist. For everything else, they act as normal blocks.</page>
<page type = "arcanecrafting">PHANTOM_STONE</page>
</project>
</research>
Binary file not shown.

After

Width:  |  Height:  |  Size: 3.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.0 KiB