mirror of
https://github.com/GTNewHorizons/ThaumicTinkerer.git
synced 2026-11-28 16:06:07 +00:00
Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
1b07525a42 | ||
|
|
81b7835b8e | ||
|
|
40ea404e11 | ||
|
|
934b18c48a | ||
|
|
3f20f67777 | ||
|
|
7e1b341363 | ||
|
|
d0afd1ffc1 | ||
|
|
8bb56a1402 | ||
|
|
13225fdcf4 | ||
|
|
1f1914862b | ||
|
|
5084fa5eb2 | ||
|
|
53138dd309 | ||
|
|
624d1f4717 | ||
|
|
6e57f44e23 | ||
|
|
6900b897dd | ||
|
|
620a65ee21 | ||
|
|
6274ea0d36 | ||
|
|
264985d4c4 | ||
|
|
99daf56fbf | ||
|
|
cbe87c9714 | ||
|
|
b48fcdf35a | ||
|
|
579116994a | ||
|
|
eec97ab588 | ||
|
|
bd26b95a63 | ||
|
|
0edfb65083 | ||
|
|
df5c91e81f |
No files matched your search
+3
-3
@@ -3,13 +3,13 @@
|
||||
"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.0",
|
||||
"version": "1.0.2",
|
||||
"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"]
|
||||
|
||||
@@ -91,10 +91,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,9 +19,12 @@ 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;
|
||||
@@ -39,12 +42,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 +82,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);
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -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) {
|
||||
|
||||
@@ -36,6 +36,7 @@ public final class ModBlocks {
|
||||
public static Block darkQuartzSlab;
|
||||
public static Block darkQuartzSlabFull;
|
||||
public static Block animationTablet;
|
||||
public static Block darkGas;
|
||||
|
||||
public static void initBlocks() {
|
||||
glowstoneGas = new BlockGlowstoneGas(LibBlockIDs.idGlowstoneGas).setUnlocalizedName(LibBlockNames.GLOWSTONE_GAS);
|
||||
@@ -46,10 +47,10 @@ 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);
|
||||
|
||||
registerBlocks();
|
||||
nameBlocks();
|
||||
registerObjectTags();
|
||||
}
|
||||
|
||||
private static void registerBlocks() {
|
||||
@@ -61,6 +62,7 @@ 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);
|
||||
}
|
||||
|
||||
private static void nameBlocks() {
|
||||
@@ -70,7 +72,7 @@ public final class ModBlocks {
|
||||
LanguageRegistry.addName(animationTablet, LibBlockNames.ANIMATION_TABLET_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)
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -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,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;
|
||||
}
|
||||
|
||||
}
|
||||
+8
-5
@@ -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 @ [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.item.EnumRarity;
|
||||
import net.minecraft.item.ItemArmor;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraftforge.common.MinecraftForge;
|
||||
import thaumcraft.api.IVisDiscounter;
|
||||
import thaumcraft.api.ThaumcraftApi;
|
||||
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 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;
|
||||
}
|
||||
}
|
||||
@@ -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,13 @@ 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 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 +62,11 @@ 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);
|
||||
|
||||
nameItems();
|
||||
applyObjectTags();
|
||||
}
|
||||
|
||||
private static void nameItems() {
|
||||
@@ -79,9 +85,12 @@ 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);
|
||||
}
|
||||
|
||||
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 +123,8 @@ 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);
|
||||
}
|
||||
}
|
||||
@@ -19,11 +19,12 @@ 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 int idGlowstoneGas;
|
||||
public static int idTransmutator;
|
||||
@@ -33,4 +34,5 @@ public final class LibBlockIDs {
|
||||
public static int idDarkQuartzStairs;
|
||||
public static int idDarkQuartzSlabFull;
|
||||
public static int idAnimationTablet;
|
||||
public static int idDarkGas;
|
||||
}
|
||||
@@ -48,6 +48,8 @@ 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[] DARK_QUARTZ_BLOCK_NAMES = {
|
||||
"Block of Smokey Quartz",
|
||||
"Chiseled Smokey Quartz Block",
|
||||
|
||||
@@ -30,9 +30,12 @@ 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;
|
||||
}
|
||||
@@ -15,8 +15,11 @@ 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 int idWandTinkerer;
|
||||
public static int idGlowstoneGas;
|
||||
@@ -33,4 +36,7 @@ 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;
|
||||
}
|
||||
@@ -69,4 +69,16 @@ 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";
|
||||
}
|
||||
@@ -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.0";
|
||||
public static final String MOD_VERSION = "1.0.2";
|
||||
|
||||
public static final String DEPENDENCIES = "required-after:Thaumcraft";
|
||||
|
||||
|
||||
@@ -33,9 +33,10 @@ 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";
|
||||
|
||||
@@ -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(name != null && name.length() == 0)
|
||||
if(name != null && name.length() != 0)
|
||||
ResearchList.craftingRecipesForResearch.put(name, Arrays.asList(CraftingManager.getInstance().getRecipeList().size() -1));
|
||||
}
|
||||
|
||||
|
||||
@@ -131,5 +131,26 @@ 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));
|
||||
}
|
||||
}
|
||||
@@ -44,13 +44,16 @@ 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 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 +86,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 +102,14 @@ 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();
|
||||
}
|
||||
}
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
@@ -4,6 +4,7 @@ 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.LibItemIDs;
|
||||
@@ -15,13 +16,26 @@ public final class ConfigurationHandler {
|
||||
private static Configuration config;
|
||||
|
||||
private static final String CATEGORY_POTIONS = "potions";
|
||||
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";
|
||||
|
||||
public static int transmutatorVisMultiplier = 2;
|
||||
public static int transmutatorEssentiaMultiplier = 4;
|
||||
public static int transmutatorMaxValue = 75;
|
||||
public static boolean enableTransmutator = 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 +54,9 @@ 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);
|
||||
|
||||
LibBlockIDs.idGlowstoneGas = loadBlock(LibBlockNames.GLOWSTONE_GAS, LibBlockIDs.DEFAULT_GLOWSTONE_GAS);
|
||||
LibBlockIDs.idTransmutator = loadBlock(LibBlockNames.TRANSMUTATOR, LibBlockIDs.DEFAULT_TRANSMUTATOR);
|
||||
@@ -49,9 +66,15 @@ 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);
|
||||
|
||||
LibPotions.idStopwatch = loadPotion(LibPotions.NAME_STOPWATCH, LibPotions.DEFAULT_ID_STOPWATCH);
|
||||
|
||||
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.");
|
||||
|
||||
config.save();
|
||||
}
|
||||
|
||||
@@ -67,4 +90,15 @@ public final class ConfigurationHandler {
|
||||
return config.get(CATEGORY_POTIONS, 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,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.source.isUnblockable()) {
|
||||
event.ammount = health - 1;
|
||||
|
||||
if(!player.worldObj.isRemote)
|
||||
player.addChatMessage(EnumChatFormatting.GOLD + "" + EnumChatFormatting.ITALIC + "Your Goliath's Leggings protected you from death.");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 3.0 KiB |
@@ -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 fall damage that would have been taken is negated.</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,43 @@ 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 Glowstone /-->
|
||||
<project id = "DARK_GAS" version = "2">
|
||||
<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>
|
||||
</research>
|
||||
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.0 KiB |
Reference in new issue
Block a user