mirror of
https://github.com/GTNewHorizons/ThaumicTinkerer.git
synced 2026-11-28 16:06:07 +00:00
Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
e760da1c5f | ||
|
|
ed09496d49 | ||
|
|
78496cc716 | ||
|
|
6a5ef9f95e | ||
|
|
d2cf9aae89 | ||
|
|
6056f4fbe7 | ||
|
|
0fac4e2dca | ||
|
|
cad5c288f8 | ||
|
|
cf2e5e2a29 | ||
|
|
5e102295f3 | ||
|
|
fd7bb2e082 | ||
|
|
4eae65551e | ||
|
|
e3667a3647 | ||
|
|
e4f1d4945c | ||
|
|
7666392f7b | ||
|
|
5c0f45a8d6 | ||
|
|
92d4605c8a | ||
|
|
e0dcd6385b | ||
|
|
6e1142d82d | ||
|
|
a0b029eed3 | ||
|
|
c1c3cd063c | ||
|
|
2638fd9b07 | ||
|
|
a4d8535407 | ||
|
|
2204b303c7 | ||
|
|
afd9dccb5a | ||
|
|
f27407de6a | ||
|
|
35a2d0d1bf | ||
|
|
64fc62bdf9 | ||
|
|
f8cad6ab7a | ||
|
|
a24e36a1ee | ||
|
|
6816a371e4 | ||
|
|
bed0b7dff0 | ||
|
|
e05d9fcac3 | ||
|
|
9d29a2b96f | ||
|
|
d8a70b151c | ||
|
|
73e4bb8213 | ||
|
|
4c9f6f5e95 | ||
|
|
e339230748 | ||
|
|
6b3321d2a6 | ||
|
|
56221654f0 | ||
|
|
7bdf8998fa | ||
|
|
29a3578a68 | ||
|
|
50c164891c | ||
|
|
a4e9d78e2b | ||
|
|
58ff3ffdee | ||
|
|
f1827e3a26 | ||
|
|
ec70c130d1 | ||
|
|
e64103fc97 | ||
|
|
0960096bdb | ||
|
|
97d9af8d3a | ||
|
|
de3d9978cf |
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. Researches that come from this mod are prefixed by [TT]. Compiled for Thaumcraft 3.0.5.",
|
||||
"version": "1.0.4",
|
||||
"mcversion": "1.5+",
|
||||
"version": "1.0.6",
|
||||
"mcversion": "1.5.2",
|
||||
"logoFile": "/mods/ThaumicTinkerer/logo.png",
|
||||
"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"]
|
||||
|
||||
@@ -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 @ [28 Jun 2013, 18:06:58 (GMT)]
|
||||
*/
|
||||
package vazkii.tinkerer.block;
|
||||
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.Icon;
|
||||
import net.minecraft.world.World;
|
||||
import thaumcraft.common.Config;
|
||||
import vazkii.tinkerer.lib.LibRenderIDs;
|
||||
import vazkii.tinkerer.tile.TileEntityMagnet;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
|
||||
public class BlockMagnet extends BlockModContainer {
|
||||
|
||||
public BlockMagnet(int par1) {
|
||||
super(par1, Material.iron);
|
||||
setBlockBounds(0.0625F, 0F, 0.0625F, 0.9375F, 1F / 16F * 2F, 0.9375F);
|
||||
setHardness(1.7F);
|
||||
setResistance(1F);
|
||||
setStepSound(soundWoodFootstep);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onBlockActivated(World par1World, int par2, int par3, int par4, EntityPlayer par5EntityPlayer, int par6, float par7, float par8, float par9) {
|
||||
int meta = par1World.getBlockMetadata(par2, par3, par4);
|
||||
par1World.setBlockMetadataWithNotify(par2, par3, par4, meta == 0 ? 1 : 0, 2);
|
||||
if(!par1World.isRemote)
|
||||
par1World.playSoundEffect(par2, par3, par4, "random.click", 1F, 0.5F);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public Icon getIcon(int par1, int par2) {
|
||||
return Config.blockWooden.getIcon(par1, 0);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getRenderType() {
|
||||
return LibRenderIDs.idMagnet;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isOpaqueCube() {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean renderAsNormalBlock() {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public TileEntity createNewTileEntity(World world) {
|
||||
return new TileEntityMagnet();
|
||||
}
|
||||
}
|
||||
@@ -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 Jun 2013, 18:24:35 (GMT)]
|
||||
*/
|
||||
package vazkii.tinkerer.block;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Random;
|
||||
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.util.AxisAlignedBB;
|
||||
import net.minecraft.world.World;
|
||||
import vazkii.tinkerer.item.ModItems;
|
||||
|
||||
public class BlockNitorGas extends BlockGas {
|
||||
|
||||
public BlockNitorGas(int par1) {
|
||||
super(par1);
|
||||
setLightValue(0.85F);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int tickRate(World par1World) {
|
||||
return par1World.getWorldInfo().getDimension() == -1 ? 60 : 20;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void updateTick(World par1World, int par2, int par3, int par4, Random par5Random) {
|
||||
if(!par1World.isRemote) {
|
||||
List<EntityPlayer> players = par1World.getEntitiesWithinAABB(EntityPlayer.class, AxisAlignedBB.getBoundingBox(par2, par3, par4, par2 + 1, par3 + 1, par4 + 1));
|
||||
if(players.isEmpty())
|
||||
par1World.setBlockToAir(par2, par3, par4);
|
||||
else {
|
||||
boolean has = false;
|
||||
for(EntityPlayer player : players)
|
||||
if(player.inventory.hasItem(ModItems.brightNitor.itemID)) {
|
||||
has = true;
|
||||
break;
|
||||
}
|
||||
|
||||
if(!has)
|
||||
par1World.setBlockToAir(par2, par3, par4);
|
||||
}
|
||||
par1World.scheduleBlockUpdate(par2, par3, par4, blockID, tickRate(par1World));
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onBlockAdded(World par1World, int par2, int par3, int par4) {
|
||||
if(!par1World.isRemote)
|
||||
par1World.scheduleBlockUpdate(par2, par3, par4, blockID, tickRate(par1World));
|
||||
}
|
||||
|
||||
}
|
||||
@@ -18,11 +18,14 @@ 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;
|
||||
|
||||
@@ -49,6 +52,31 @@ public class BlockPhantomStone extends BlockWarded {
|
||||
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);
|
||||
|
||||
@@ -39,6 +39,8 @@ public final class ModBlocks {
|
||||
public static Block animationTablet;
|
||||
public static Block darkGas;
|
||||
public static Block phantomStone;
|
||||
public static Block nitorGas;
|
||||
public static Block magnet;
|
||||
|
||||
public static void initBlocks() {
|
||||
glowstoneGas = new BlockGlowstoneGas(LibBlockIDs.idGlowstoneGas).setUnlocalizedName(LibBlockNames.GLOWSTONE_GAS);
|
||||
@@ -51,6 +53,8 @@ public final class ModBlocks {
|
||||
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);
|
||||
nitorGas = new BlockNitorGas(LibBlockIDs.idNitorGas).setUnlocalizedName(LibBlockNames.NITOR_GAS);
|
||||
magnet = new BlockMagnet(LibBlockIDs.idMagnet).setUnlocalizedName(LibBlockNames.MAGNET);
|
||||
|
||||
registerBlocks();
|
||||
nameBlocks();
|
||||
@@ -67,6 +71,8 @@ public final class ModBlocks {
|
||||
GameRegistry.registerBlock(animationTablet, LibBlockNames.ANIMATION_TABLET);
|
||||
GameRegistry.registerBlock(darkGas, LibBlockNames.DARK_GAS);
|
||||
GameRegistry.registerBlock(phantomStone, ItemPhantomStoneBlock.class, LibBlockNames.PHANTOM_STONE);
|
||||
GameRegistry.registerBlock(nitorGas, LibBlockNames.NITOR_GAS);
|
||||
GameRegistry.registerBlock(magnet, LibBlockNames.MAGNET);
|
||||
}
|
||||
|
||||
private static void nameBlocks() {
|
||||
@@ -75,6 +81,7 @@ public final class ModBlocks {
|
||||
LanguageRegistry.addName(darkQuartzStairs, LibBlockNames.DARK_QUARTZ_STAIRS_D);
|
||||
LanguageRegistry.addName(animationTablet, LibBlockNames.ANIMATION_TABLET_D);
|
||||
LanguageRegistry.addName(phantomStone, LibBlockNames.PHANTOM_STONE_D);
|
||||
LanguageRegistry.addName(magnet, LibBlockNames.MAGNET_D);
|
||||
}
|
||||
|
||||
public static void applyObjectTags() {
|
||||
|
||||
@@ -0,0 +1,87 @@
|
||||
/**
|
||||
* 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 @ [28 Jun 2013, 17:35:43 (GMT)]
|
||||
*/
|
||||
package vazkii.tinkerer.client.model;
|
||||
|
||||
import net.minecraft.client.model.ModelBase;
|
||||
import net.minecraft.client.model.ModelRenderer;
|
||||
import vazkii.tinkerer.lib.LibMisc;
|
||||
|
||||
public class ModelMagnet extends ModelBase {
|
||||
|
||||
ModelRenderer panel;
|
||||
ModelRenderer magnet;
|
||||
ModelRenderer box1;
|
||||
ModelRenderer box2;
|
||||
ModelRenderer box3;
|
||||
ModelRenderer box4;
|
||||
ModelRenderer box5;
|
||||
|
||||
public ModelMagnet() {
|
||||
textureWidth = 64;
|
||||
textureHeight = 64;
|
||||
|
||||
panel = new ModelRenderer(this, 0, 0);
|
||||
panel.addBox(0F, 0F, 0F, 14, 2, 14);
|
||||
panel.setRotationPoint(-7F, 22F, -7F);
|
||||
panel.setTextureSize(64, 64);
|
||||
setRotation(panel, 0F, 0F, 0F);
|
||||
magnet = new ModelRenderer(this, 0, 16);
|
||||
magnet.addBox(0F, 0F, 0F, 4, 13, 4);
|
||||
magnet.setRotationPoint(-2F, 9F, -2F);
|
||||
magnet.setTextureSize(64, 64);
|
||||
setRotation(magnet, 0F, 0F, 0F);
|
||||
box1 = new ModelRenderer(this, 28, 19);
|
||||
box1.addBox(0F, -2F, 0F, 6, 14, 0);
|
||||
box1.setRotationPoint(3F, 10F, -3F);
|
||||
box1.setTextureSize(64, 64);
|
||||
setRotation(box1, 0F, -1.570796F, 0F);
|
||||
box2 = new ModelRenderer(this, 28, 33);
|
||||
box2.addBox(0F, 0F, 0F, 6, 14, 0);
|
||||
box2.setRotationPoint(-3F, 8F, 3F);
|
||||
box2.setTextureSize(64, 64);
|
||||
setRotation(box2, 0F, 1.570796F, 0F);
|
||||
box3 = new ModelRenderer(this, 40, 19);
|
||||
box3.addBox(0F, 0F, 0F, 6, 14, 0);
|
||||
box3.setRotationPoint(3F, 8F, 3F);
|
||||
box3.setTextureSize(64, 64);
|
||||
setRotation(box3, 0F, 3.141593F, 0F);
|
||||
box4 = new ModelRenderer(this, 40, 33);
|
||||
box4.addBox(0F, 0F, 0F, 6, 14, 0);
|
||||
box4.setRotationPoint(-3F, 8F, -3F);
|
||||
box4.setTextureSize(64, 64);
|
||||
setRotation(box4, 0F, 0F, 0F);
|
||||
box5 = new ModelRenderer(this, 28, 49);
|
||||
box5.addBox(0F, 0F, 0F, 6, 0, 6);
|
||||
box5.setRotationPoint(-3F, 8F, -3F);
|
||||
box5.setTextureSize(64, 64);
|
||||
setRotation(box5, 0F, 0F, 0F);
|
||||
}
|
||||
|
||||
public void render() {
|
||||
panel.render(LibMisc.MODEL_DEFAULT_RENDER_SCALE);
|
||||
magnet.render(LibMisc.MODEL_DEFAULT_RENDER_SCALE);
|
||||
box1.render(LibMisc.MODEL_DEFAULT_RENDER_SCALE);
|
||||
box2.render(LibMisc.MODEL_DEFAULT_RENDER_SCALE);
|
||||
box3.render(LibMisc.MODEL_DEFAULT_RENDER_SCALE);
|
||||
box4.render(LibMisc.MODEL_DEFAULT_RENDER_SCALE);
|
||||
box5.render(LibMisc.MODEL_DEFAULT_RENDER_SCALE);
|
||||
}
|
||||
|
||||
private void setRotation(ModelRenderer model, float x, float y, float z) {
|
||||
model.rotateAngleX = x;
|
||||
model.rotateAngleY = y;
|
||||
model.rotateAngleZ = z;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,53 @@
|
||||
/**
|
||||
* 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 @ [28 Jun 2013, 21:27:36 (GMT)]
|
||||
*/
|
||||
package vazkii.tinkerer.client.render.block;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.client.renderer.RenderBlocks;
|
||||
import net.minecraft.client.renderer.tileentity.TileEntityRenderer;
|
||||
import net.minecraft.world.IBlockAccess;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import vazkii.tinkerer.lib.LibRenderIDs;
|
||||
import vazkii.tinkerer.tile.TileEntityMagnet;
|
||||
import cpw.mods.fml.client.registry.ISimpleBlockRenderingHandler;
|
||||
|
||||
public class RenderMagnet implements ISimpleBlockRenderingHandler {
|
||||
|
||||
@Override
|
||||
public void renderInventoryBlock(Block block, int metadata, int modelID, RenderBlocks renderer) {
|
||||
GL11.glPushMatrix();
|
||||
GL11.glTranslatef(-0.5F, -0.5F, -0.5F);
|
||||
TileEntityRenderer.instance.renderTileEntityAt(new TileEntityMagnet(), 0.0D, 0.0D, 0.0D, 0.0F);
|
||||
GL11.glPopMatrix();
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean renderWorldBlock(IBlockAccess world, int x, int y, int z, Block block, int modelId, RenderBlocks renderer) {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean shouldRender3DInInventory() {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getRenderId() {
|
||||
return LibRenderIDs.idMagnet;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,70 @@
|
||||
/**
|
||||
* 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 @ [28 Jun 2013, 18:28:15 (GMT)]
|
||||
*/
|
||||
package vazkii.tinkerer.client.render.tile;
|
||||
|
||||
import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.Icon;
|
||||
import net.minecraftforge.common.ForgeDirection;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
import org.lwjgl.opengl.GL12;
|
||||
|
||||
import thaumcraft.client.lib.UtilsFX;
|
||||
import thaumcraft.common.Config;
|
||||
import thaumcraft.common.items.armor.ItemHoverHarness;
|
||||
import vazkii.tinkerer.client.model.ModelMagnet;
|
||||
import vazkii.tinkerer.client.util.handler.ClientTickHandler;
|
||||
import vazkii.tinkerer.lib.LibResources;
|
||||
|
||||
public class RenderTileMagnet extends TileEntitySpecialRenderer {
|
||||
|
||||
ModelMagnet model = new ModelMagnet();
|
||||
|
||||
@Override
|
||||
public void renderTileEntityAt(TileEntity tileentity, double x, double y, double z, float f) {
|
||||
GL11.glPushMatrix();
|
||||
GL11.glEnable(GL12.GL_RESCALE_NORMAL);
|
||||
GL11.glColor4f(1F, 1F, 1F, 1F);
|
||||
GL11.glTranslatef((float)x, (float)y , (float)z);
|
||||
boolean blue = tileentity.worldObj == null || tileentity.getBlockMetadata() == 0;
|
||||
bindTextureByName(blue ? LibResources.MODEL_MAGNET_S : LibResources.MODEL_MAGNET_N);
|
||||
|
||||
int redstone = 0;
|
||||
if(tileentity.worldObj != null) {
|
||||
for(ForgeDirection dir : ForgeDirection.VALID_DIRECTIONS)
|
||||
redstone = Math.max(redstone, tileentity.worldObj.getIndirectPowerLevelTo(tileentity.xCoord + dir.offsetX, tileentity.yCoord + dir.offsetY, tileentity.zCoord + dir.offsetZ, dir.ordinal()));
|
||||
} else redstone = 15;
|
||||
|
||||
GL11.glTranslatef(0.5F, 1.5F, 0.5F);
|
||||
GL11.glScalef(1F, -1F, -1F);
|
||||
model.render();
|
||||
|
||||
GL11.glRotatef(90F, 1F, 0F, 0F);
|
||||
GL11.glTranslatef(0F, 0F, -0.6F);
|
||||
Icon icon = ((ItemHoverHarness) Config.itemHoverHarness).iconLightningRing;
|
||||
for(int i = 0; i < 3; i++) {
|
||||
for(int j = 0; j < 2; j++) {
|
||||
GL11.glScalef(1F, -1F, 1F);
|
||||
UtilsFX.renderQuadCenteredFromIcon(false, icon, redstone / 15F * 0.7F + (redstone == 0 ? 0 : 0.4F), blue ? 0F : 1F, 0F, blue ? 1F : 0F, 225, GL11.GL_ONE_MINUS_SRC_ALPHA, 0.9F);
|
||||
}
|
||||
|
||||
GL11.glTranslated(0, 0, -(Math.cos(ClientTickHandler.clientTicksElapsed / 10F) + 1) * 0.09 - 0.1);
|
||||
}
|
||||
GL11.glEnable(GL12.GL_RESCALE_NORMAL);
|
||||
|
||||
GL11.glPopMatrix();
|
||||
}
|
||||
}
|
||||
@@ -15,14 +15,18 @@
|
||||
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.RenderMagnet;
|
||||
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.RenderTileMagnet;
|
||||
import vazkii.tinkerer.client.render.tile.RenderTileTransmutator;
|
||||
import vazkii.tinkerer.client.render.tile.RenderTileWardChest;
|
||||
import vazkii.tinkerer.client.util.handler.ClientTickHandler;
|
||||
@@ -34,8 +38,10 @@ import vazkii.tinkerer.network.packet.PacketAnimationTabletSync;
|
||||
import vazkii.tinkerer.network.packet.PacketTransmutatorSync;
|
||||
import vazkii.tinkerer.network.packet.PacketVerification;
|
||||
import vazkii.tinkerer.tile.TileEntityAnimationTablet;
|
||||
import vazkii.tinkerer.tile.TileEntityMagnet;
|
||||
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;
|
||||
@@ -57,6 +63,7 @@ public class TTClientProxy extends TTCommonProxy {
|
||||
ClientRegistry.bindTileEntitySpecialRenderer(TileEntityTransmutator.class, new RenderTileTransmutator());
|
||||
ClientRegistry.bindTileEntitySpecialRenderer(TileEntityWardChest.class, new RenderTileWardChest());
|
||||
ClientRegistry.bindTileEntitySpecialRenderer(TileEntityAnimationTablet.class, new RenderTileAnimationTablet());
|
||||
ClientRegistry.bindTileEntitySpecialRenderer(TileEntityMagnet.class, new RenderTileMagnet());
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -78,8 +85,10 @@ public class TTClientProxy extends TTCommonProxy {
|
||||
@Override
|
||||
public void initRenders() {
|
||||
LibRenderIDs.idWardChest = RenderingRegistry.getNextAvailableRenderId();
|
||||
LibRenderIDs.idMagnet = RenderingRegistry.getNextAvailableRenderId();
|
||||
|
||||
RenderingRegistry.registerBlockHandler(new RenderWardChest());
|
||||
RenderingRegistry.registerBlockHandler(new RenderMagnet());
|
||||
|
||||
MinecraftForgeClient.registerItemRenderer(ModItems.fluxDetector.itemID, new RenderItemFluxDetector());
|
||||
}
|
||||
@@ -92,4 +101,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;
|
||||
@@ -25,6 +26,7 @@ import vazkii.tinkerer.lib.LibMisc;
|
||||
import vazkii.tinkerer.network.PacketManager;
|
||||
import vazkii.tinkerer.network.packet.PacketAnimationTabletButton;
|
||||
import vazkii.tinkerer.tile.TileEntityAnimationTablet;
|
||||
import vazkii.tinkerer.tile.TileEntityMagnet;
|
||||
import vazkii.tinkerer.tile.TileEntityTransmutator;
|
||||
import vazkii.tinkerer.tile.TileEntityWardChest;
|
||||
import cpw.mods.fml.common.registry.EntityRegistry;
|
||||
@@ -38,6 +40,7 @@ public class TTCommonProxy {
|
||||
GameRegistry.registerTileEntity(TileEntityTransmutator.class, tileName(LibBlockNames.TRANSMUTATOR));
|
||||
GameRegistry.registerTileEntity(TileEntityWardChest.class, tileName(LibBlockNames.WARD_CHEST));
|
||||
GameRegistry.registerTileEntity(TileEntityAnimationTablet.class, tileName(LibBlockNames.ANIMATION_TABLET));
|
||||
GameRegistry.registerTileEntity(TileEntityMagnet.class, tileName(LibBlockNames.MAGNET));
|
||||
}
|
||||
|
||||
public void initRenders() { }
|
||||
@@ -55,4 +58,8 @@ public class TTCommonProxy {
|
||||
}
|
||||
|
||||
public void sigilLightning(World world, Entity entity, Vec3 end) { }
|
||||
}
|
||||
|
||||
public void sanityCheckedFrozenParticles(EntityLiving entity) { }
|
||||
|
||||
public void sanityCheckedPossessedParticles(EntityLiving entity) { }
|
||||
}
|
||||
@@ -40,7 +40,6 @@ import vazkii.tinkerer.ThaumicTinkerer;
|
||||
import vazkii.tinkerer.lib.LibEnchantmentIDs;
|
||||
import vazkii.tinkerer.lib.LibPotions;
|
||||
import vazkii.tinkerer.potion.ModPotions;
|
||||
import vazkii.tinkerer.util.helper.MiscHelper;
|
||||
import cpw.mods.fml.relauncher.ReflectionHelper;
|
||||
|
||||
public class ModEnchantmentHandler {
|
||||
@@ -119,17 +118,7 @@ public class ModEnchantmentHandler {
|
||||
event.entityLiving.setJumping(false);
|
||||
event.entityLiving.motionY = 0;
|
||||
|
||||
for(int i = 0; i < 6; i++) {
|
||||
float x = (float) (event.entityLiving.posX + (event.entityLiving.worldObj.rand.nextDouble() - 0.5F) * (event.entityLiving.width * 2F));
|
||||
float y = (float) (event.entityLiving.posY + event.entityLiving.worldObj.rand.nextDouble() * event.entityLiving.height);
|
||||
float z = (float) (event.entityLiving.posZ + (event.entityLiving.worldObj.rand.nextDouble() - 0.5F) * (event.entityLiving.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);
|
||||
}
|
||||
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;
|
||||
@@ -153,17 +142,7 @@ public class ModEnchantmentHandler {
|
||||
if(event.entityLiving.getAttackTarget() instanceof EntityPlayer)
|
||||
event.entityLiving.setAttackTarget(null);
|
||||
|
||||
for(int i = 0; i < 3; i++) {
|
||||
float x = (float) (event.entityLiving.posX + (event.entityLiving.worldObj.rand.nextDouble() - 0.5F) * (event.entityLiving.width * 2F));
|
||||
float y = (float) (event.entityLiving.posY + event.entityLiving.worldObj.rand.nextDouble() * event.entityLiving.height);
|
||||
float z = (float) (event.entityLiving.posZ + (event.entityLiving.worldObj.rand.nextDouble() - 0.5F) * (event.entityLiving.width * 2F));
|
||||
|
||||
float size = (float) (Math.random() / 2F);
|
||||
float gravity = (float) (Math.random() / 20F);
|
||||
|
||||
if(MiscHelper.getMc().renderViewEntity != null)
|
||||
ThaumicTinkerer.tcProxy.wispFX2(event.entityLiving.worldObj, x, y, z, size, 5, false, gravity);
|
||||
}
|
||||
ThaumicTinkerer.proxy.sanityCheckedPossessedParticles(event.entityLiving);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,38 @@
|
||||
/**
|
||||
* 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 Jun 2013, 18:00:05 (GMT)]
|
||||
*/
|
||||
package vazkii.tinkerer.item;
|
||||
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.world.World;
|
||||
import vazkii.tinkerer.block.ModBlocks;
|
||||
|
||||
public class ItemBrightNitor extends ItemMod {
|
||||
|
||||
public ItemBrightNitor(int par1) {
|
||||
super(par1);
|
||||
setMaxStackSize(1);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onUpdate(ItemStack par1ItemStack, World par2World, Entity par3Entity, int par4, boolean par5) {
|
||||
int x = (int) par3Entity.posX;
|
||||
int y = (int) par3Entity.posY;
|
||||
int z = (int) par3Entity.posZ;
|
||||
|
||||
if((par2World.getBlockId(x, y, z) == 0 || par2World.getBlockId(x, y, z) == ModBlocks.nitorGas.blockID) && !par2World.isRemote)
|
||||
par2World.setBlock(x, y, z, ModBlocks.nitorGas.blockID, 0, 2);
|
||||
}
|
||||
}
|
||||
@@ -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,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);
|
||||
}
|
||||
}
|
||||
@@ -49,6 +49,8 @@ public final class ModItems {
|
||||
public static Item cleansingTalisman;
|
||||
public static Item fluxDetector;
|
||||
public static Item dummyEnchantbook;
|
||||
public static Item researchShareBook;
|
||||
public static Item brightNitor;
|
||||
|
||||
public static void initItems() {
|
||||
wandTinkerer = new ItemWandTinkerer(LibItemIDs.idWandTinkerer).setUnlocalizedName(LibItemNames.WAND_TINKERER);
|
||||
@@ -73,6 +75,8 @@ public final class ModItems {
|
||||
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);
|
||||
brightNitor = new ItemBrightNitor(LibItemIDs.idBrightNitor).setUnlocalizedName(LibItemNames.BRIGHT_NITOR);
|
||||
|
||||
nameItems();
|
||||
}
|
||||
@@ -99,7 +103,8 @@ public final class ModItems {
|
||||
LanguageRegistry.addName(gasRemover, LibItemNames.GAS_REMOVER_D);
|
||||
LanguageRegistry.addName(cleansingTalisman, LibItemNames.CLEANSING_TALISMAN_D);
|
||||
LanguageRegistry.addName(fluxDetector, LibItemNames.FLUX_DETECTOR_D);
|
||||
LanguageRegistry.addName(dummyEnchantbook, "DUMMY ENCHANTING BOOK");
|
||||
LanguageRegistry.addName(researchShareBook, LibItemNames.RESEARCH_SHARE_BOOK_D);
|
||||
LanguageRegistry.addName(brightNitor, LibItemNames.BRIGHT_NITOR_D);
|
||||
}
|
||||
|
||||
public static void applyObjectTags() {
|
||||
|
||||
@@ -26,6 +26,8 @@ public final class LibBlockIDs {
|
||||
public static final int DEFAULT_DARK_QUARTZ_SLAB_FULL = 2157;
|
||||
public static final int DEFAULT_DARK_GAS = 2158;
|
||||
public static final int DEFAULT_PHANTOM_STONE = 2159;
|
||||
public static final int DEFAULT_NITOR_GAS = 2160;
|
||||
public static final int DEFAULT_MAGNET = 2161;
|
||||
|
||||
public static int idGlowstoneGas;
|
||||
public static int idTransmutator;
|
||||
@@ -37,4 +39,6 @@ public final class LibBlockIDs {
|
||||
public static int idAnimationTablet;
|
||||
public static int idDarkGas;
|
||||
public static int idPhantomStone;
|
||||
public static int idNitorGas;
|
||||
public static int idMagnet;
|
||||
}
|
||||
@@ -54,6 +54,12 @@ public final class LibBlockNames {
|
||||
public static final String PHANTOM_STONE_R = "PHANTOM_STONE";
|
||||
public static final String PHANTOM_STONE_D = "Phantom Stone Block";
|
||||
|
||||
public static final String NITOR_GAS = "nitorGas";
|
||||
|
||||
public static final String MAGNET = "magnet";
|
||||
public static final String MAGNET_R = "MAGNET";
|
||||
public static final String MAGNET_D = "Thaumostatic Magnetizer";
|
||||
|
||||
public static final String[] DARK_QUARTZ_BLOCK_NAMES = {
|
||||
"Block of Smokey Quartz",
|
||||
"Chiseled Smokey Quartz Block",
|
||||
|
||||
@@ -24,6 +24,8 @@ public final class LibItemIDs {
|
||||
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 final int DEFAULT_BRIGHT_NITOR = 21173;
|
||||
|
||||
public static int idWandTinkerer;
|
||||
public static int idGlowstoneGas;
|
||||
@@ -47,4 +49,6 @@ public final class LibItemIDs {
|
||||
public static int idFluxDetector;
|
||||
public static int idCleansingTalisman;
|
||||
public static int idDummyEnchantbook;
|
||||
public static int idResearchShareBook;
|
||||
public static int idBrightNitor;
|
||||
}
|
||||
@@ -95,4 +95,11 @@ public final class LibItemNames {
|
||||
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";
|
||||
|
||||
public static final String BRIGHT_NITOR = "brightNitor";
|
||||
public static final String BRIGHT_NITOR_R = "BRIGHT_NITOR";
|
||||
public static final String BRIGHT_NITOR_D = "Hyperenergetic Nitor";
|
||||
}
|
||||
@@ -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.4";
|
||||
public static final String MOD_VERSION = "1.0.6";
|
||||
|
||||
public static final String DEPENDENCIES = "required-after:Thaumcraft";
|
||||
|
||||
|
||||
@@ -17,5 +17,6 @@ package vazkii.tinkerer.lib;
|
||||
public final class LibRenderIDs {
|
||||
|
||||
public static int idWardChest;
|
||||
public static int idMagnet;
|
||||
|
||||
}
|
||||
@@ -34,6 +34,8 @@ public final class LibResources {
|
||||
|
||||
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 MODEL_MAGNET_N = ROOT_MODEL + "magnetN.png";
|
||||
public static final String MODEL_MAGNET_S = ROOT_MODEL + "magnetS.png";
|
||||
|
||||
public static final String MISC_GLYPHS = BLUR + ROOT_MISC + "transmutatorGlyphs.png";
|
||||
public static final String MISC_WARD_CHEST_OVERLAY = ROOT_MISC + "wardChestOverlay.png";
|
||||
@@ -41,7 +43,6 @@ public final class LibResources {
|
||||
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_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";
|
||||
}
|
||||
@@ -197,5 +197,22 @@ public final class ModInfusionRecipes {
|
||||
'I', new ItemStack(Item.blazeRod),
|
||||
'N', new ItemStack(Config.itemResearchNotes),
|
||||
'B', new ItemStack(Item.book));
|
||||
|
||||
tags = new ObjectTags().add(EnumTag.FIRE, 16).add(EnumTag.LIGHT, 32).add(EnumTag.POWER, 20);
|
||||
ThaumcraftApi.addInfusionCraftingRecipe(LibItemNames.BRIGHT_NITOR_R, LibItemNames.BRIGHT_NITOR_R, 250, tags, new ItemStack(ModItems.brightNitor),
|
||||
"GNG", "NAN", "GNG",
|
||||
'A', new ItemStack(Config.itemResource, 1, 0),
|
||||
'G', new ItemStack(ModItems.glowstoneGas),
|
||||
'N', new ItemStack(Config.itemResource, 1, 1));
|
||||
|
||||
tags = new ObjectTags().add(EnumTag.POWER, 12).add(EnumTag.METAL, 16).add(EnumTag.CONTROL, 6);
|
||||
ThaumcraftApi.addInfusionCraftingRecipe(LibBlockNames.MAGNET_R, LibBlockNames.MAGNET_R, 100, tags, new ItemStack(ModBlocks.magnet),
|
||||
" I ", "SIs", "LWR",
|
||||
'I', new ItemStack(Item.ingotIron),
|
||||
's', new ItemStack(Config.itemShard, 1, 3),
|
||||
'S', new ItemStack(Config.itemShard),
|
||||
'W', new ItemStack(Config.blockWooden),
|
||||
'L', new ItemStack(Item.dyePowder, 1, 4),
|
||||
'R', new ItemStack(Item.redstone));
|
||||
}
|
||||
}
|
||||
@@ -25,6 +25,7 @@ import vazkii.tinkerer.item.ModItems;
|
||||
import vazkii.tinkerer.lib.LibBlockNames;
|
||||
import vazkii.tinkerer.lib.LibEnchantmentNames;
|
||||
import vazkii.tinkerer.lib.LibItemNames;
|
||||
import vazkii.tinkerer.util.handler.ConfigurationHandler;
|
||||
|
||||
public final class ModResearchItems {
|
||||
|
||||
@@ -54,6 +55,8 @@ public final class ModResearchItems {
|
||||
public static ResearchItem fluxDetector;
|
||||
public static ResearchItem lostEnchants;
|
||||
public static ResearchItem phantomBlocks;
|
||||
public static ResearchItem brightNitor;
|
||||
public static ResearchItem magnet;
|
||||
|
||||
public static void registerModResearchItems() {
|
||||
ObjectTags tags = new ObjectTags().add(EnumTag.MAGIC, 16).add(EnumTag.VOID, 8);
|
||||
@@ -74,8 +77,10 @@ public final class ModResearchItems {
|
||||
tags = new ObjectTags().add(EnumTag.WOOD, 1).add(EnumTag.DARK, 1);
|
||||
nametag = new ResearchItem(LibItemNames.NAMETAG_R, tags, 4, 18, ModItems.nametag).setParents(Config.researchGolemancy).registerResearchItem();
|
||||
|
||||
tags = new ObjectTags().add(EnumTag.FLUX, 12).add(EnumTag.EXCHANGE, 20);
|
||||
transmutator = new ResearchItem(LibBlockNames.TRANSMUTATOR_R, tags, -5, 24, ModBlocks.transmutator).setParents(Config.researchCrystalCore).setParentsHidden(Config.researchWandTrade).registerResearchItem();
|
||||
if(ConfigurationHandler.enableTransmutator) {
|
||||
tags = new ObjectTags().add(EnumTag.FLUX, 12).add(EnumTag.EXCHANGE, 20);
|
||||
transmutator = new ResearchItem(LibBlockNames.TRANSMUTATOR_R, tags, -5, 24, ModBlocks.transmutator).setParents(Config.researchCrystalCore).setParentsHidden(Config.researchWandTrade).registerResearchItem();
|
||||
}
|
||||
|
||||
tags = new ObjectTags().add(EnumTag.EVIL, 8).add(EnumTag.TRAP, 16).add(EnumTag.KNOWLEDGE, 12);
|
||||
xpTalisman = new ResearchItem(LibItemNames.XP_TALISMAN_R, tags, -4, 14, ModItems.xpTalisman).setParents(Config.researchJarBrain).setHidden().registerResearchItem();
|
||||
@@ -133,5 +138,11 @@ public final class ModResearchItems {
|
||||
|
||||
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();
|
||||
|
||||
tags = new ObjectTags().add(EnumTag.FIRE, 12).add(EnumTag.LIGHT, 24).add(EnumTag.POWER, 30).add(EnumTag.MOTION, 12).add(EnumTag.DESTRUCTION, 6).add(EnumTag.VISION, 16);
|
||||
brightNitor = new ResearchItem(LibItemNames.BRIGHT_NITOR_R, tags, 2, 27, new ItemStack(ModItems.brightNitor)).setHidden().setParents(Config.researchTTOE).setParentsHidden(glowstoneGas).registerResearchItem();
|
||||
|
||||
tags = new ObjectTags().add(EnumTag.POWER, 6).add(EnumTag.CONTROL, 12).add(EnumTag.WIND, 6).add(EnumTag.METAL, 5).add(EnumTag.MECHANISM, 16);
|
||||
magnet = new ResearchItem(LibBlockNames.MAGNET_R, tags, -4, 27, new ItemStack(ModBlocks.magnet)).setHidden().setParents(Config.researchHoverHarness).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;
|
||||
|
||||
@@ -0,0 +1,71 @@
|
||||
/**
|
||||
* 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 @ [28 Jun 2013, 18:22:16 (GMT)]
|
||||
*/
|
||||
package vazkii.tinkerer.tile;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.entity.item.EntityItem;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.AxisAlignedBB;
|
||||
import net.minecraftforge.common.ForgeDirection;
|
||||
import thaumcraft.client.codechicken.core.vec.Vector3;
|
||||
import vazkii.tinkerer.ThaumicTinkerer;
|
||||
|
||||
public class TileEntityMagnet extends TileEntity {
|
||||
|
||||
@Override
|
||||
public void updateEntity() {
|
||||
int redstone = 0;
|
||||
for(ForgeDirection dir : ForgeDirection.VALID_DIRECTIONS)
|
||||
redstone = Math.max(redstone, worldObj.getIndirectPowerLevelTo(xCoord + dir.offsetX, yCoord + dir.offsetY, zCoord + dir.offsetZ, dir.ordinal()));
|
||||
|
||||
if(redstone > 0) {
|
||||
double x1 = xCoord + 0.5;
|
||||
double y1 = yCoord + 0.5;
|
||||
double z1 = zCoord + 0.5;
|
||||
|
||||
boolean blue = getBlockMetadata() == 0;
|
||||
int speedMod = blue ? 1 : -1;
|
||||
double range = redstone / 2;
|
||||
|
||||
AxisAlignedBB boundingBox = AxisAlignedBB.getBoundingBox(x1 - range, yCoord, z1 - range, x1 + range, y1 + range, z1 + range);
|
||||
List<EntityItem> items = worldObj.getEntitiesWithinAABB(EntityItem.class, boundingBox);
|
||||
|
||||
for(EntityItem item : items) {
|
||||
double x2 = item.posX;
|
||||
double y2 = item.posY;
|
||||
double z2 = item.posZ;
|
||||
|
||||
float distanceSqrd = blue ? ((float) ((x1 - x2) * (x1 - x2) + (y1 - y2) * (y1 - y2) + (z1 - z2) * (z1 - z2))) : 1.1F;
|
||||
|
||||
if(distanceSqrd > 1) {
|
||||
setEntityMotionFromVector(item, x1, y1, z1, speedMod * 0.25F);
|
||||
ThaumicTinkerer.tcProxy.sparkle((float) x2, (float) y2, (float) z2, blue ? 2 : 4);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private static void setEntityMotionFromVector(Entity entity, double x, double y, double z, float modifier) {
|
||||
Vector3 originalPosVector = new Vector3(x, y, z);
|
||||
Vector3 entityVector = Vector3.fromEntityCenter(entity);
|
||||
Vector3 finalVector = originalPosVector.subtract(entityVector).normalize();
|
||||
entity.motionX = finalVector.x * modifier;
|
||||
entity.motionY = finalVector.y * modifier;
|
||||
entity.motionZ = finalVector.z * modifier;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -66,6 +66,8 @@ public final class ConfigurationHandler {
|
||||
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);
|
||||
LibItemIDs.idBrightNitor = loadItem(LibItemNames.BRIGHT_NITOR, LibItemIDs.DEFAULT_BRIGHT_NITOR);
|
||||
|
||||
LibBlockIDs.idGlowstoneGas = loadBlock(LibBlockNames.GLOWSTONE_GAS, LibBlockIDs.DEFAULT_GLOWSTONE_GAS);
|
||||
LibBlockIDs.idTransmutator = loadBlock(LibBlockNames.TRANSMUTATOR, LibBlockIDs.DEFAULT_TRANSMUTATOR);
|
||||
@@ -77,6 +79,8 @@ public final class ConfigurationHandler {
|
||||
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);
|
||||
LibBlockIDs.idNitorGas = loadBlock(LibBlockNames.NITOR_GAS, LibBlockIDs.DEFAULT_NITOR_GAS);
|
||||
LibBlockIDs.idMagnet = loadBlock(LibBlockNames.MAGNET, LibBlockIDs.DEFAULT_MAGNET);
|
||||
|
||||
LibPotions.idStopwatch = loadPotion(LibPotions.NAME_STOPWATCH, LibPotions.DEFAULT_ID_STOPWATCH);
|
||||
LibPotions.idFrozen = loadPotion(LibPotions.NAME_FROZEN, LibPotions.DEFAULT_ID_FROZEN);
|
||||
|
||||
@@ -4,6 +4,8 @@ Welcome to the Thaumic Tinkerer Github Repo.
|
||||
|
||||
Thaumic Tinkerer is a Thaumcraft addon, it's intention is to add new content to Thaumcraft, and bring back some oldies, but goodies.
|
||||
|
||||
[Thaumic Tinkerer MCF Thread](http://www.minecraftforum.net/topic/1813058-)
|
||||
|
||||
Thaumcraft © Azanor 2012
|
||||
[Thaumcraft MCF Thread](http://www.minecraftforum.net/topic/1585216-)
|
||||
|
||||
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 4.6 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 4.6 KiB |
@@ -284,7 +284,7 @@ This new detector, the Fluxometer can measure the flux in the nearest relevant n
|
||||
<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 trough 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>
|
||||
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.
|
||||
@@ -310,4 +310,26 @@ These blocks are based on the design you had put together for Warded Stone Block
|
||||
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>
|
||||
|
||||
<!-- ======================================== Hyperenergetic Nitor /-->
|
||||
<project id = "BRIGHT_NITOR" version = "1">
|
||||
<name>Hyperenergetic Nitor</name>
|
||||
<popupText>[TT] Portable Flame</popupText>
|
||||
<longText>Breaking the fourth wall reveals an oddness of everything that's bright: it's not bright unless it's static. You are thinking, after fixing the fourth wall, about a way you can put an end to that.</longText>
|
||||
<page type = "text">After shattering some walls on the fourth quadrant, you managed to create a light that will shine even if it's being carried by a player by energizing the everburning flame that is Nitor with sources of energy, like Alumentum.
|
||||
|
||||
The light casted by this will shine closely behind the carrier, it seems to leave a longer trail in the Nether, due to the heat.</page>
|
||||
<page type = "infusioncrafting">BRIGHT_NITOR</page>
|
||||
</project>
|
||||
|
||||
<!-- ======================================== Thaumostatic Magnetizer /-->
|
||||
<project id = "MAGNET" version = "1">
|
||||
<name>Thaumostatic Magnetizer</name>
|
||||
<popupText>[TT] How do they work?</popupText>
|
||||
<longText>By studying the thaumostatic field to create the Thaumostatic Harness, you have acquired important knowledge in the area of moving matter in space, the question here is "magnets, how do they work?".</longText>
|
||||
<page type = "text">With the knowledge of the thaumostatic field you got from creating the Thaumostatic Harness, you made something, a bit less impressive, admittedly, that may prove useful.
|
||||
|
||||
This block acts as a magnet, it's state can be changed by right clicking it. While in south (blue) mode, it'll pull any nearby items towards it. While in north (red) mode, it'll do the opposite. Furthermore, the range of this attraction, or repulsion, is determined by the strength of the redstone signal applied to it.</page>
|
||||
<page type = "infusioncrafting">MAGNET</page>
|
||||
</project>
|
||||
</research>
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 3.3 KiB |
Reference in new issue
Block a user