diff --git a/forge2/src/main/java/flaxbeard/thaumicexploration/ThaumicExploration.java b/forge2/src/main/java/flaxbeard/thaumicexploration/ThaumicExploration.java index 452396d..ac90f0b 100644 --- a/forge2/src/main/java/flaxbeard/thaumicexploration/ThaumicExploration.java +++ b/forge2/src/main/java/flaxbeard/thaumicexploration/ThaumicExploration.java @@ -2,11 +2,14 @@ +import java.lang.reflect.Field; +import java.lang.reflect.Modifier; import java.util.ArrayList; import net.minecraft.block.Block; import net.minecraft.block.StepSound; import net.minecraft.creativetab.CreativeTabs; +import net.minecraft.enchantment.Enchantment; import net.minecraft.entity.Entity; import net.minecraft.entity.EntityEggInfo; import net.minecraft.entity.EntityList; @@ -15,6 +18,7 @@ import net.minecraft.item.EnumArmorMaterial; import net.minecraft.item.Item; import net.minecraft.item.ItemStack; +import net.minecraft.potion.Potion; import net.minecraft.util.ResourceLocation; import net.minecraft.world.biome.BiomeGenBase; import net.minecraftforge.client.event.sound.SoundLoadEvent; @@ -31,6 +35,7 @@ import thaumcraft.common.config.ConfigBlocks; import thaumcraft.common.lib.ThaumcraftCraftingManager; import cpw.mods.fml.client.registry.RenderingRegistry; +import cpw.mods.fml.common.Loader; import cpw.mods.fml.common.Mod; import cpw.mods.fml.common.Mod.EventHandler; import cpw.mods.fml.common.Mod.Instance; @@ -45,25 +50,36 @@ import cpw.mods.fml.common.registry.LanguageRegistry; import cpw.mods.fml.common.registry.TickRegistry; import cpw.mods.fml.relauncher.Side; -import flaxbeard.thaumicexploration.block.BlockBootsIce; import flaxbeard.thaumicexploration.block.BlockBoundChest; import flaxbeard.thaumicexploration.block.BlockBoundJar; import flaxbeard.thaumicexploration.block.BlockCrucibleSouls; import flaxbeard.thaumicexploration.block.BlockEverfullUrn; import flaxbeard.thaumicexploration.block.BlockReplicator; +import flaxbeard.thaumicexploration.block.BlockSkullCandle; +import flaxbeard.thaumicexploration.block.BlockTaintBerries; import flaxbeard.thaumicexploration.block.BlockThinkTank; import flaxbeard.thaumicexploration.common.CommonProxy; +import flaxbeard.thaumicexploration.enchantment.EnchantmentBinding; +import flaxbeard.thaumicexploration.enchantment.EnchantmentDisarm; +import flaxbeard.thaumicexploration.enchantment.EnchantmentNightVision; import flaxbeard.thaumicexploration.event.TXBootsEventHandler; import flaxbeard.thaumicexploration.event.TXEventHandler; import flaxbeard.thaumicexploration.event.TXTickHandler; import flaxbeard.thaumicexploration.gui.TXGuiHandler; +import flaxbeard.thaumicexploration.integration.TTIntegration; import flaxbeard.thaumicexploration.item.ItemBlankSeal; import flaxbeard.thaumicexploration.item.ItemBrain; import flaxbeard.thaumicexploration.item.ItemChestSeal; import flaxbeard.thaumicexploration.item.ItemChestSealLinked; +import flaxbeard.thaumicexploration.item.ItemFoodTalisman; +import flaxbeard.thaumicexploration.item.ItemSkullCandle; import flaxbeard.thaumicexploration.item.ItemTXArmorSpecial; import flaxbeard.thaumicexploration.item.ItemTXArmorSpecialDiscount; +import flaxbeard.thaumicexploration.item.ItemTaintSeedFood; import flaxbeard.thaumicexploration.item.focus.ItemFocusNecromancy; +import flaxbeard.thaumicexploration.misc.TXPotion; +import flaxbeard.thaumicexploration.misc.TXTaintPotion; +import flaxbeard.thaumicexploration.misc.WorldGenTX; import flaxbeard.thaumicexploration.packet.TXPacketHandler; import flaxbeard.thaumicexploration.research.ModRecipes; import flaxbeard.thaumicexploration.research.ModResearch; @@ -77,7 +93,7 @@ import flaxbeard.thaumicexploration.wand.WandRodTransmutationOnUpdate; -@Mod(modid = "ThaumicExploration", name = "Thaumic Exploration", version = "0.1.1", dependencies="required-after:Thaumcraft") +@Mod(modid = "ThaumicExploration", name = "Thaumic Exploration", version = "0.4.0", dependencies="required-after:Thaumcraft;after:ThaumicTinkerer") @NetworkMod(clientSideRequired=true, serverSideRequired=false, channels={"tExploration"}, packetHandler = TXPacketHandler.class) public class ThaumicExploration { @@ -112,7 +128,14 @@ public class ThaumicExploration { public static Item bootsComet; public static int bootsCometID; public static Item charmNoTaint; - public static int charmNoTaintID = 11012; + public static int charmNoTaintID; + public static Item charmTaint; + public static int charmTaintID; + public static Item talismanFood; + public static int talismanFoodID; + + public static Item taintBerry; + public static int taintBerryID; public static Block boundChest; public static int boundChestID; @@ -123,17 +146,25 @@ public class ThaumicExploration { public static Block everfullUrn; public static int everfullUrnID; public static Block crucibleSouls; + public static int crucibleSoulsID; + public static Block taintBerryCrop; + public static int taintBerryCropID; public static Block meltyIce; public static int meltyIceID; public static Block replicator; public static int replicatorID; + public static Block skullCandle; + public static int skullCandleID; public static WandRod WAND_ROD_CRYSTAL; public static WandRod WAND_ROD_AMBER; + public WorldGenTX worldGen; + public static int everfullUrnRenderID; public static int crucibleSoulsRenderID; public static int replicatorRenderID; + public static int candleSkullRenderID; public static CreativeTabs tab; @@ -142,7 +173,33 @@ public class ThaumicExploration { public static boolean allowMagicPlankReplication; public static boolean allowModWoodReplication; public static boolean allowModStoneReplication; + public static boolean allowCrucSouls; + public static boolean allowThinkTank; + public static boolean allowFood; + public static boolean allowUrn; + public static boolean allowBoots; + + public static boolean allowOsmotic; + + public static boolean prefix; + + public static boolean brainsGolem; + public static boolean taintBloom; + public static int potionBindingID; + public static int potionTaintWithdrawlID; + + public static Enchantment enchantmentBinding; + public static Enchantment enchantmentNightVision; + public static Enchantment enchantmentDisarm; + + public static int enchantmentBindingID; + public static int enchantmentNightVisionID; + public static int enchantmentDisarmID; + + + public static Potion potionBinding; + public static Potion potionTaintWithdrawl; @SidedProxy(clientSide = "flaxbeard.thaumicexploration.client.ClientProxy", serverSide = "flaxbeard.thaumicexploration.common.CommonProxy") public static CommonProxy proxy; @@ -153,6 +210,32 @@ public class ThaumicExploration { @EventHandler public void preInit(FMLPreInitializationEvent event) { + GameRegistry.registerWorldGenerator(this.worldGen = new WorldGenTX()); + + this.worldGen.initialize(); + + Potion[] potionTypes = null; + + for (Field f : Potion.class.getDeclaredFields()) { + f.setAccessible(true); + try { + if (f.getName().equals("potionTypes") || f.getName().equals("field_76425_a")) { + Field modfield = Field.class.getDeclaredField("modifiers"); + modfield.setAccessible(true); + modfield.setInt(f, f.getModifiers() & ~Modifier.FINAL); + + potionTypes = (Potion[])f.get(null); + final Potion[] newPotionTypes = new Potion[256]; + System.arraycopy(potionTypes, 0, newPotionTypes, 0, potionTypes.length); + f.set(null, newPotionTypes); + } + } + catch (Exception e) { + System.err.println("Severe error, please report this to the mod author:"); + System.err.println(e); + } + } + Configuration config = new Configuration(event.getSuggestedConfigurationFile()); config.load(); @@ -167,11 +250,13 @@ public void preInit(FMLPreInitializationEvent event) { jarSealLinkedID = config.getItem("Linked Jar Binding Seal", 11007).getInt(); transmutationCoreID = config.getItem("Transmutation Filter Wand Core", 11004).getInt(); amberCoreID = config.getItem("Amber Wand Core", 11005).getInt(); - - //Armor Item IDs maskEvilID = config.getItem("Mask of Cruelty", 11008).getInt(); bootsMeteorID = config.getItem("Boots of the Meteor", 11010).getInt(); bootsCometID = config.getItem("Boots of the Comet", 11011).getInt(); + charmNoTaintID = config.getItem("Wispy Dreamcatcher", 11012).getInt(); + charmTaintID = config.getItem("Tainted Band", 11014).getInt(); + taintBerryID = config.getItem("Taintberry", 11015).getInt(); + talismanFoodID = config.getItem("Talisman of Nourishment", 11013).getInt(); focusNecromancyID = config.getItem("Focus of Necromancy", 11009).getInt(); //Block IDs @@ -181,10 +266,28 @@ public void preInit(FMLPreInitializationEvent event) { thinkTankJarID = config.getBlock("Think Tank", 703).getInt(); crucibleSoulsID = config.getBlock("Crucible of Souls", 704).getInt(); meltyIceID = config.getBlock("Fast-Melting Ice", 705).getInt(); + skullCandleID = config.getBlock("Skull Candle", 707).getInt(); replicatorID = config.getBlock("Thaumic Replicator", 706).getInt(); - + taintBerryCropID = config.getBlock("Taintberry Crop Block", 708).getInt(); + + potionTaintWithdrawlID = config.get("Potion", "Taint Withdrawl", 32).getInt(); + potionBindingID = config.get("Potion", "Binding", 31).getInt(); + + enchantmentBindingID = config.get("Enchantment", "Binding", 77).getInt(); + enchantmentNightVisionID = config.get("Enchantment", "Night Vision", 78).getInt(); + enchantmentDisarmID = config.get("Enchantment", "Disarming", 79).getInt(); + + //allowOsmotic = config.get("Miscellaneous", "Add new enchantments to Thaumic Tinkerer's Osmotic Enchanter (Requires TT Build 72+)", true).getBoolean(true); + prefix = config.get("Miscellaneous", "Display [TX] prefix before Thaumic Exploration research", true).getBoolean(true); + brainsGolem = config.get("Miscellaneous", "Use Purified Brains in advanced golems", true).getBoolean(true); + taintBloom = config.get("Miscellaneous", "Move the Etheral Bloom to the Tainturgy tab", true).getBoolean(true); allowBoundInventories = config.get("Miscellaneous", "Allow bound inventories", true).getBoolean(true); allowReplication = config.get("Miscellaneous", "Allow Thaumic Replicator", true).getBoolean(true); + allowCrucSouls = config.get("Miscellaneous", "Allow Crucible of Souls", true).getBoolean(true); + allowThinkTank = config.get("Miscellaneous", "Allow Think Tank", true).getBoolean(true); + allowFood = config.get("Miscellaneous", "Allow Talisman of Nourishment", true).getBoolean(true); + allowUrn = config.get("Miscellaneous", "Allow Everfull Urn", true).getBoolean(true); + allowBoots = config.get("Miscellaneous", "Allow Boots of the Meteor/Comet", true).getBoolean(true); allowMagicPlankReplication = config.get("Replicator", "Allow replication of Greatwood/Silverwood planks", true).getBoolean(true); allowModWoodReplication = config.get("Replicator", "Allow replication of other mods' logs and planks", true).getBoolean(true); allowModStoneReplication = config.get("Replicator", "Allow replication of other mods' stone blocks", true).getBoolean(true); @@ -206,6 +309,7 @@ public void load(FMLInitializationEvent event) { everfullUrnRenderID = RenderingRegistry.getNextAvailableRenderId(); crucibleSoulsRenderID = RenderingRegistry.getNextAvailableRenderId(); replicatorRenderID = RenderingRegistry.getNextAvailableRenderId(); + candleSkullRenderID = RenderingRegistry.getNextAvailableRenderId(); //Creative Tab tab = new TXTab(CreativeTabs.getNextID(), "thaumicExploration"); @@ -227,13 +331,17 @@ public void load(FMLInitializationEvent event) { crucibleSouls = new BlockCrucibleSouls(crucibleSoulsID).setHardness(2.0F).setUnlocalizedName("thaumicexploration:crucibleSouls").setCreativeTab(tab).setTextureName("thaumicExploration:crucible3"); replicator = new BlockReplicator(replicatorID).setHardness(4.0F).setUnlocalizedName("thaumicexploration:replicator").setCreativeTab(tab).setTextureName("thaumicexploration:replicatorBottom"); - meltyIce = new BlockBootsIce(meltyIceID).setUnlocalizedName("thaumicexploration:meltyIce").setHardness(0.5F).setLightOpacity(3).setStepSound(Block.soundGlassFootstep).setUnlocalizedName("ice").setTextureName("ice"); + meltyIce = new BlockSkullCandle(meltyIceID).setUnlocalizedName("thaumicexploration:meltyIce").setHardness(0.5F).setLightOpacity(3).setStepSound(Block.soundGlassFootstep).setUnlocalizedName("ice").setTextureName("ice"); + //skullCandle = new BlockSkullCandle(skullCandleID).setUnlocalizedName("thaumicexploration:skullCandle"); + taintBerryCrop = new BlockTaintBerries(taintBerryCropID).setUnlocalizedName("thaumicexploration:taintBerryCrop").setTextureName("thaumicExploration:berries"); boundChest = new BlockBoundChest(boundChestID, 0).setHardness(2.5F).setStepSound(new StepSound("wood", 1.0F, 1.0F)).setUnlocalizedName("boundChest"); boundJar = new BlockBoundJar(boundJarID).setUnlocalizedName("boundJar"); GameRegistry.registerBlock(boundChest, "boundChest"); + GameRegistry.registerBlock(taintBerryCrop, "taintBerryCrop"); + //GameRegistry.registerBlock(skullCandle, "skullCandle"); GameRegistry.registerBlock(meltyIce, "meltyIce"); GameRegistry.registerBlock(boundJar, "boundJar"); GameRegistry.registerBlock(thinkTankJar, "thinkTankJar"); @@ -243,6 +351,7 @@ public void load(FMLInitializationEvent event) { //Items transmutationCore = (new Item(transmutationCoreID)).setUnlocalizedName("thaumicexploration:transmutationCore").setCreativeTab(tab).setTextureName("thaumicexploration:rodTransmutation"); + talismanFood = (new ItemFoodTalisman(talismanFoodID)).setUnlocalizedName("thaumicexploration:talismanFood").setCreativeTab(tab).setTextureName("thaumicexploration:talismanFood"); amberCore = (new Item(amberCoreID)).setUnlocalizedName("thaumicexploration:amberCore").setCreativeTab(tab).setTextureName("thaumicexploration:rodAmber"); pureZombieBrain = (new ItemBrain(pureZombieBrainID)).setUnlocalizedName("thaumicexploration:pureZombieBrain").setCreativeTab(tab).setTextureName("thaumicexploration:pureZombieBrain"); blankSeal = (new ItemBlankSeal(blankSealID).setCreativeTab(tab).setTextureName("thaumicexploration:sealBlank")); @@ -251,18 +360,29 @@ public void load(FMLInitializationEvent event) { jarSeal = (new ItemChestSeal(jarSealID).setCreativeTab(tab).setTextureName("thaumicexploration:sealJar").setUnlocalizedName("thaumicexploration:jarSeal")); jarSealLinked = (new ItemChestSealLinked(jarSealLinkedID).setTextureName("thaumicexploration:sealJar").setUnlocalizedName("thaumicexploration:jarSeal")); - charmNoTaint = (new Item(charmNoTaintID)).setUnlocalizedName("thaumicexploration:dreamcatcher").setCreativeTab(tab).setTextureName("thaumicexploration:taintRing"); + charmNoTaint = (new Item(charmNoTaintID)).setUnlocalizedName("thaumicexploration:dreamcatcher").setCreativeTab(tab).setTextureName("thaumicexploration:dreamcatcher"); + charmTaint = (new Item(charmTaintID)).setUnlocalizedName("thaumicexploration:ringTaint").setCreativeTab(tab).setTextureName("thaumicexploration:taintRing"); maskEvil = (new ItemTXArmorSpecialDiscount(maskEvilID, ThaumcraftApi.armorMatSpecial, 2, 0)).setUnlocalizedName("thaumicexploration:maskEvil").setCreativeTab(tab).setTextureName("thaumicexploration:maskEvil"); bootsMeteor = (new ItemTXArmorSpecial(bootsMeteorID, ThaumcraftApi.armorMatSpecial, 4, 3)).setUnlocalizedName("thaumicexploration:bootsMeteor").setCreativeTab(tab).setTextureName("thaumicexploration:bootsMeteor"); bootsComet = (new ItemTXArmorSpecial(bootsCometID, ThaumcraftApi.armorMatSpecial, 4, 3)).setUnlocalizedName("thaumicexploration:bootsComet").setCreativeTab(tab).setTextureName("thaumicexploration:bootsComet"); focusNecromancy = (new ItemFocusNecromancy(focusNecromancyID)).setUnlocalizedName("thaumicexploration:necromancy").setCreativeTab(tab).setTextureName("thaumicexploration:focusNecromancy"); + taintBerry = (new ItemTaintSeedFood(taintBerryID, 1, 0.3F, Block.tnt.blockID, ConfigBlocks.blockTaint.blockID)).setCreativeTab(tab).setUnlocalizedName("thaumicexploration:taintBerry").setTextureName("thaumicExploration:taintBerry"); + //Item skull = (new ItemSkullCandle(11016)).setUnlocalizedName("skull").setTextureName("skull"); //Wands WAND_ROD_AMBER = new WandRod("amber",10,new ItemStack(ThaumicExploration.amberCore),8,new WandRodAmberOnUpdate(), new ResourceLocation("thaumicexploration:textures/models/rodAmber.png")); - WAND_ROD_CRYSTAL = new WandRod("transmutation",25,new ItemStack(ThaumicExploration.transmutationCore),1,new WandRodTransmutationOnUpdate()); + WAND_ROD_CRYSTAL = new WandRod("transmutation",100,new ItemStack(ThaumicExploration.transmutationCore),1,new WandRodTransmutationOnUpdate()); //WandRod.rods.put("transmutation1", WAND_ROD_CRYSTAL1); - + enchantmentBinding = new EnchantmentBinding(enchantmentBindingID, 1); + enchantmentNightVision = new EnchantmentNightVision(enchantmentNightVisionID, 1); + enchantmentDisarm = new EnchantmentDisarm(enchantmentDisarmID, 1); + if (Loader.isModLoaded("ThaumicTinkerer")) { + TTIntegration.registerEnchants(); + } + potionBinding = (new TXPotion(potionBindingID, false, 0)).setIconIndex(0, 0).setPotionName("potion.binding"); + potionTaintWithdrawl = (new TXTaintPotion(potionTaintWithdrawlID, true, 0)).setPotionName("potion.taintWithdrawl"); + proxy.registerRenderers(); } diff --git a/forge2/src/main/java/flaxbeard/thaumicexploration/ai/EntityAICreeperDummy.java b/forge2/src/main/java/flaxbeard/thaumicexploration/ai/EntityAICreeperDummy.java new file mode 100644 index 0000000..c7fc261 --- /dev/null +++ b/forge2/src/main/java/flaxbeard/thaumicexploration/ai/EntityAICreeperDummy.java @@ -0,0 +1,57 @@ +package flaxbeard.thaumicexploration.ai; + +import net.minecraft.entity.EntityLivingBase; +import net.minecraft.entity.ai.EntityAIBase; +import net.minecraft.entity.monster.EntityCreeper; + +public class EntityAICreeperDummy extends EntityAIBase +{ + /** The creeper that is swelling. */ + EntityCreeper swellingCreeper; + + /** + * The creeper's attack target. This is used for the changing of the creeper's state. + */ + EntityLivingBase creeperAttackTarget; + + public EntityAICreeperDummy(EntityCreeper par1EntityCreeper) + { + this.swellingCreeper = par1EntityCreeper; + this.setMutexBits(1); + } + + /** + * Returns whether the EntityAIBase should begin execution. + */ + public boolean shouldExecute() + { + EntityLivingBase entitylivingbase = this.swellingCreeper.getAttackTarget(); + return this.swellingCreeper.getCreeperState() > 0 || entitylivingbase != null && this.swellingCreeper.getDistanceSqToEntity(entitylivingbase) < 9.0D; + } + + /** + * Execute a one shot task or start executing a continuous task + */ + public void startExecuting() + { + this.swellingCreeper.getNavigator().clearPathEntity(); + this.creeperAttackTarget = this.swellingCreeper.getAttackTarget(); + } + + /** + * Resets the task + */ + public void resetTask() + { + this.creeperAttackTarget = null; + } + + /** + * Updates the task + */ + public void updateTask() + { + this.swellingCreeper.setCreeperState(-1); + + } +} diff --git a/forge2/src/main/java/flaxbeard/thaumicexploration/ai/EntityAINearestAttackablePureTarget.java b/forge2/src/main/java/flaxbeard/thaumicexploration/ai/EntityAINearestAttackablePureTarget.java new file mode 100644 index 0000000..1700995 --- /dev/null +++ b/forge2/src/main/java/flaxbeard/thaumicexploration/ai/EntityAINearestAttackablePureTarget.java @@ -0,0 +1,107 @@ +package flaxbeard.thaumicexploration.ai; + +import java.util.ArrayList; +import java.util.Collections; +import java.util.List; + +import net.minecraft.command.IEntitySelector; +import net.minecraft.entity.EntityCreature; +import net.minecraft.entity.EntityLivingBase; +import net.minecraft.entity.ai.EntityAINearestAttackableTargetSorter; +import net.minecraft.entity.ai.EntityAITarget; + +public class EntityAINearestAttackablePureTarget extends EntityAITarget +{ + private final Class targetClass; + private final int targetChance; + + /** Instance of EntityAINearestAttackableTargetSorter. */ + private final EntityAINearestAttackableTargetSorter theNearestAttackableTargetSorter; + + /** + * This filter is applied to the Entity search. Only matching entities will be targetted. (null -> no + * restrictions) + */ + private final IEntitySelector targetEntitySelector; + private EntityLivingBase targetEntity; + + public EntityAINearestAttackablePureTarget(EntityCreature par1EntityCreature, Class par2Class, int par3, boolean par4) + { + this(par1EntityCreature, par2Class, par3, par4, false); + } + + public EntityAINearestAttackablePureTarget(EntityCreature par1EntityCreature, Class par2Class, int par3, boolean par4, boolean par5) + { + this(par1EntityCreature, par2Class, par3, par4, par5, (IEntitySelector)null); + } + + public EntityAINearestAttackablePureTarget(EntityCreature par1EntityCreature, Class par2Class, int par3, boolean par4, boolean par5, IEntitySelector par6IEntitySelector) + { + super(par1EntityCreature, par4, par5); + this.targetClass = par2Class; + this.targetChance = par3; + this.theNearestAttackableTargetSorter = new EntityAINearestAttackableTargetSorter(par1EntityCreature); + this.setMutexBits(1); + this.targetEntitySelector = new EntityAINearestAttackableTargetSelectorReplacement(this, par6IEntitySelector); + } + + public boolean isSuitableTarget(EntityLivingBase par1EntityLivingBase, boolean par2) + { + System.out.println("is suitable?"); + if (par1EntityLivingBase.getEntityData().hasKey("tainted")) + { + if (par1EntityLivingBase.getEntityData().getBoolean("tainted") == true) + { + return false; + } + } + System.out.println("is suitable."); + return super.isSuitableTarget(par1EntityLivingBase, par2); + + } + + /** + * Returns whether the EntityAIBase should begin execution. + */ + public boolean shouldExecute() + { + if (this.targetChance > 0 && this.taskOwner.getRNG().nextInt(this.targetChance) != 0) + { + return false; + } + else + { + double d0 = this.getTargetDistance(); + List list = this.taskOwner.worldObj.selectEntitiesWithinAABB(this.targetClass, this.taskOwner.boundingBox.expand(d0, 4.0D, d0), this.targetEntitySelector); + Collections.sort(list, this.theNearestAttackableTargetSorter); + List mobsToRemove = new ArrayList(); + for (Object mob : list) { + if (!this.isSuitableTarget((EntityLivingBase) mob, false)) { + mobsToRemove.add(mob); + } + } + for (Object mob : mobsToRemove) { + list.remove(mob); + } + + if (list.isEmpty()) + { + return false; + } + else + { + this.targetEntity = (EntityLivingBase)list.get(0); + return true; + } + } + } + + /** + * Execute a one shot task or start executing a continuous task + */ + public void startExecuting() + { + this.taskOwner.setAttackTarget(this.targetEntity); + super.startExecuting(); + } +} diff --git a/forge2/src/main/java/flaxbeard/thaumicexploration/ai/EntityAINearestAttackableTargetNecromancy.java b/forge2/src/main/java/flaxbeard/thaumicexploration/ai/EntityAINearestAttackableTargetNecromancy.java index 2b071dc..9fc1452 100644 --- a/forge2/src/main/java/flaxbeard/thaumicexploration/ai/EntityAINearestAttackableTargetNecromancy.java +++ b/forge2/src/main/java/flaxbeard/thaumicexploration/ai/EntityAINearestAttackableTargetNecromancy.java @@ -49,7 +49,8 @@ public EntityAINearestAttackableTargetNecromancy(EntityCreature par1EntityCreatu this.targetChance = par3; this.theNearestAttackableTargetSorter = new EntityAINearestAttackableTargetSorter(par1EntityCreature); this.setMutexBits(1); - this.targetEntitySelector = new EntityAINearestAttackableTargetSelectorReplacement(this, par6IEntitySelector); + this.targetEntitySelector = null; + //this.targetEntitySelector = new EntityAINearestAttackableTargetSelectorReplacement(this, par6IEntitySelector); } public boolean isSuitableTarget(EntityLivingBase par1EntityLivingBase, boolean par2) diff --git a/forge2/src/main/java/flaxbeard/thaumicexploration/ai/EntityAINearestAttackableTargetSelectorReplacement.java b/forge2/src/main/java/flaxbeard/thaumicexploration/ai/EntityAINearestAttackableTargetSelectorReplacement.java index 9a9ae78..4c940c6 100644 --- a/forge2/src/main/java/flaxbeard/thaumicexploration/ai/EntityAINearestAttackableTargetSelectorReplacement.java +++ b/forge2/src/main/java/flaxbeard/thaumicexploration/ai/EntityAINearestAttackableTargetSelectorReplacement.java @@ -8,9 +8,9 @@ public class EntityAINearestAttackableTargetSelectorReplacement implements IEnti { final IEntitySelector field_111103_c; - final EntityAINearestAttackableTargetNecromancy field_111102_d; + final EntityAINearestAttackablePureTarget field_111102_d; - public EntityAINearestAttackableTargetSelectorReplacement(EntityAINearestAttackableTargetNecromancy par1EntityAINearestAttackableTargetNecromancy, IEntitySelector par2IEntitySelector) + EntityAINearestAttackableTargetSelectorReplacement(EntityAINearestAttackablePureTarget par1EntityAINearestAttackableTargetNecromancy, IEntitySelector par2IEntitySelector) { this.field_111102_d = par1EntityAINearestAttackableTargetNecromancy; this.field_111103_c = par2IEntitySelector; @@ -20,7 +20,7 @@ public EntityAINearestAttackableTargetSelectorReplacement(EntityAINearestAttacka * Return whether the specified entity is applicable to this filter. */ public boolean isEntityApplicable(Entity par1Entity) - { + { return !(par1Entity instanceof EntityLivingBase) ? false : (this.field_111103_c != null && !this.field_111103_c.isEntityApplicable(par1Entity) ? false : this.field_111102_d.isSuitableTarget((EntityLivingBase)par1Entity, false)); } } diff --git a/forge2/src/main/java/flaxbeard/thaumicexploration/block/BlockBoundJar.java b/forge2/src/main/java/flaxbeard/thaumicexploration/block/BlockBoundJar.java index 005bbf4..b56a61e 100644 --- a/forge2/src/main/java/flaxbeard/thaumicexploration/block/BlockBoundJar.java +++ b/forge2/src/main/java/flaxbeard/thaumicexploration/block/BlockBoundJar.java @@ -85,10 +85,6 @@ public void breakBlock(World par1World, int par2, int par3, int par4, int par5, public boolean onBlockActivated(World world, int x, int y, int z, EntityPlayer player, int par6, float par7, float par8, float par9) { if (!world.isRemote) { - int id = ((TileEntityBoundJar)world.getBlockTileEntity(x, y, z)).id; - int amt1 = ((TileEntityBoundJar)world.getBlockTileEntity(x, y, z)).myJarData.getJarAmount(); - int amt2 = ((TileEntityBoundJar)world.getBlockTileEntity(x, y, z)).amount; - System.out.println("ID: " + id + " Bound amount: " + amt1 + " Contained amount: " + amt2); world.markBlockForUpdate(x, y, z); } TileEntity te = world.getBlockTileEntity(x, y, z); diff --git a/forge2/src/main/java/flaxbeard/thaumicexploration/block/BlockSkullCandle.java b/forge2/src/main/java/flaxbeard/thaumicexploration/block/BlockSkullCandle.java new file mode 100644 index 0000000..3025768 --- /dev/null +++ b/forge2/src/main/java/flaxbeard/thaumicexploration/block/BlockSkullCandle.java @@ -0,0 +1,197 @@ +package flaxbeard.thaumicexploration.block; + +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; +import java.util.List; +import java.util.Random; + +import flaxbeard.thaumicexploration.ThaumicExploration; +import net.minecraft.block.Block; +import net.minecraft.block.BlockContainer; +import net.minecraft.block.material.Material; +import net.minecraft.client.renderer.texture.IconRegister; +import net.minecraft.creativetab.CreativeTabs; +import net.minecraft.item.ItemStack; +import net.minecraft.tileentity.TileEntity; +import net.minecraft.tileentity.TileEntitySkull; +import net.minecraft.util.AxisAlignedBB; +import net.minecraft.util.Icon; +import net.minecraft.world.IBlockAccess; +import net.minecraft.world.World; +import net.minecraftforge.common.ForgeDirection; +import thaumcraft.client.renderers.block.BlockRenderer; +import thaumcraft.common.Thaumcraft; +import thaumcraft.common.config.ConfigBlocks; + +public class BlockSkullCandle + extends BlockContainer +{ + public Icon icon; + public Icon iconStub; +public Icon iconSkull; +public Icon icon2; + + + public BlockSkullCandle(int i) + { + super(i, Material.circuits); + setHardness(0.1F); + setStepSound(Block.soundClothFootstep); + setUnlocalizedName("blockCandle"); + setCreativeTab(Thaumcraft.tabTC); + setLightValue(0.95F); + } + + @SideOnly(Side.CLIENT) + public void getSubBlocks(int par1, CreativeTabs par2CreativeTabs, List par3List) + { + for (int var4 = 0; var4 < 16; var4++) { + par3List.add(new ItemStack(par1, 1, var4)); + } + } + + @SideOnly(Side.CLIENT) + public void registerIcons(IconRegister ir) + { + this.icon = ir.registerIcon("thaumicexploration:candle"); + this.iconStub = ir.registerIcon("thaumicexploration:candlestub"); + this.icon2 = ir.registerIcon("thaumicexploration:candle2"); + } + + @SideOnly(Side.CLIENT) + public Icon getIcon(int side, int meta) + { + return this.icon; + } + + public int getRenderColor(int par1) + { + return thaumcraft.common.lib.Utils.colors[par1]; + } + + public boolean canPlaceBlockAt(World par1World, int par2, int par3, int par4) + { + return par1World.doesBlockHaveSolidTopSurface(par2, par3, par4); + } + + public void onNeighborBlockChange(World par1World, int par2, int par3, int par4, int par5) + { + int var6 = par1World.getBlockMetadata(par2, par3, par4); + boolean var7 = canPlaceBlockAt(par1World, par2, par3 - 1, par4); + if (!var7) + { + dropBlockAsItem(par1World, par2, par3, par4, var6, 0); + par1World.setBlock(par2, par3, par4, 0, 0, 3); + } + super.onNeighborBlockChange(par1World, par2, par3, par4, par5); + } + + public boolean canPlaceBlockOnSide(World par1World, int par2, int par3, int par4, int par5) + { + return canPlaceBlockAt(par1World, par2, par3 - 1, par4); + } + + + public int colorMultiplier(IBlockAccess par1iBlockAccess, int par2, int par3, int par4) + { + int md = par1iBlockAccess.getBlockMetadata(par2, par3, par4); + return thaumcraft.common.lib.Utils.colors[15]; + } + + public int damageDropped(int par1) + { + return par1; + } + + + public boolean isBlockSolidOnSide(World world, int x, int y, int z, ForgeDirection side) + { + return false; + } + + + public int getRenderType() + { + return ThaumicExploration.candleSkullRenderID; + } + + public boolean renderAsNormalBlock() + { + return false; + } + + public boolean isOpaqueCube() + { + return false; + } + + public void randomDisplayTick(World world, int par2, int par3, int par4, Random par5Random) + { + double var7 = par2 + 0.5F; + double var9 = par3 + 0.7F + 0.5F - BlockRenderer.W3; + double var11 = par4 + 0.5F; + + float xOffset=0; + float yOffset=0; + float zOffset=0; + if (world.getBlockMetadata(par2,par3,par4) != 1) { + yOffset = BlockRenderer.W4; + } + if (world.getBlockMetadata(par2,par3,par4) == 2) + zOffset = 0.25F; + if (world.getBlockMetadata(par2,par3,par4) == 3) + zOffset = -0.25F; + if (world.getBlockMetadata(par2,par3,par4) == 4) + xOffset = 0.25F; + if (world.getBlockMetadata(par2,par3,par4) == 5) + xOffset = -0.25F; + + var7 += xOffset; + var9 += yOffset; + var11 += zOffset; + + world.spawnParticle("smoke", var7, var9, var11, 0.0D, 0.0D, 0.0D); + world.spawnParticle("flame", var7, var9, var11, 0.0D, 0.0D, 0.0D); + //ThaumicExploration.proxy.crucibleBubble(world, (float)var7, (float)var9, (float)var11, (float)0.0D, (float)0.0D, (float)0.0D); + } + + public void setBlockBoundsBasedOnState(IBlockAccess par1IBlockAccess, int par2, int par3, int par4) + { + int l = par1IBlockAccess.getBlockMetadata(par2, par3, par4) & 7; + + switch (l) + { + case 1: + default: + this.setBlockBounds(0.25F, 0.0F, 0.25F, 0.75F, 0.5F, 0.75F); + break; + case 2: + this.setBlockBounds(0.25F, 0.25F, 0.5F, 0.75F, 0.75F, 1.0F); + break; + case 3: + this.setBlockBounds(0.25F, 0.25F, 0.0F, 0.75F, 0.75F, 0.5F); + break; + case 4: + this.setBlockBounds(0.5F, 0.25F, 0.25F, 1.0F, 0.75F, 0.75F); + break; + case 5: + this.setBlockBounds(0.0F, 0.25F, 0.25F, 0.5F, 0.75F, 0.75F); + } + } + + /** + * Returns a bounding box from the pool of bounding boxes (this means this box can change after the pool has been + * cleared to be reused) + */ + public AxisAlignedBB getCollisionBoundingBoxFromPool(World par1World, int par2, int par3, int par4) + { + this.setBlockBoundsBasedOnState(par1World, par2, par3, par4); + return super.getCollisionBoundingBoxFromPool(par1World, par2, par3, par4); + } + +@Override +public TileEntity createNewTileEntity(World world) { + // TODO Auto-generated method stub + return new TileEntitySkull(); +} +} diff --git a/forge2/src/main/java/flaxbeard/thaumicexploration/block/BlockTaintBerries.java b/forge2/src/main/java/flaxbeard/thaumicexploration/block/BlockTaintBerries.java new file mode 100644 index 0000000..658a7cb --- /dev/null +++ b/forge2/src/main/java/flaxbeard/thaumicexploration/block/BlockTaintBerries.java @@ -0,0 +1,269 @@ +package flaxbeard.thaumicexploration.block; + +import java.util.ArrayList; +import java.util.Random; + +import net.minecraft.block.Block; +import net.minecraft.block.BlockFlower; +import net.minecraft.block.material.Material; +import net.minecraft.client.renderer.texture.IconRegister; +import net.minecraft.creativetab.CreativeTabs; +import net.minecraft.item.ItemStack; +import net.minecraft.util.Icon; +import net.minecraft.util.MathHelper; +import net.minecraft.world.World; +import net.minecraftforge.common.ForgeDirection; +import thaumcraft.common.config.Config; +import thaumcraft.common.config.ConfigBlocks; +import thaumcraft.common.lib.world.ThaumcraftWorldGenerator; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; +import flaxbeard.thaumicexploration.ThaumicExploration; + +public class BlockTaintBerries extends BlockTaintlessFlower +{ + @SideOnly(Side.CLIENT) + private Icon[] iconArray; + + public BlockTaintBerries(int par1) + { + super(par1, Material.plants); + this.setTickRandomly(true); + float f = 0.5F; + this.setBlockBounds(0.5F - f, 0.0F, 0.5F - f, 0.5F + f, 0.25F, 0.5F + f); + this.setCreativeTab((CreativeTabs)null); + this.setHardness(0.0F); + this.setStepSound(soundGrassFootstep); + this.disableStats(); + } + + /** + * Gets passed in the blockID of the block below and supposed to return true if its allowed to grow on the type of + * blockID passed in. Args: blockID + */ + @Override + public boolean canBlockStay(World par3World, int par2, int par3, int par4) + { + Block soil = blocksList[par3World.getBlockId(par2, par3 - 1, par4)]; + + return (par3World.getFullBlockLightValue(par2, par3, par4) >= 8 || par3World.canBlockSeeTheSky(par2, par3, par4)) && + (soil != null && ((soil.blockID == Block.grass.blockID && par3World.getBiomeGenForCoords(par2, par4) == ThaumcraftWorldGenerator.biomeTaint) || (soil.blockID == ConfigBlocks.blockTaint.blockID && par3World.getBlockMetadata(par2, par3-1, par4) == 1))); + } + + @Override + protected boolean canThisPlantGrowOnThisBlockID(int par1) + { + return true; + } + + /** + * Ticks the block if it's been scheduled + */ + public void updateTick(World par1World, int par2, int par3, int par4, Random par5Random) + { + super.updateTick(par1World, par2, par3, par4, par5Random); + + if (par1World.getBlockLightValue(par2, par3 + 1, par4) >= 9) + { + int l = par1World.getBlockMetadata(par2, par3, par4); + + if (l < 7) + { + float f = this.getGrowthRate(par1World, par2, par3, par4); + + if (par5Random.nextInt((int)(25.0F / f) + 1) == 0) + { + ++l; + par1World.setBlockMetadataWithNotify(par2, par3, par4, l, 2); + } + } + } + } + + /** + * Apply bonemeal to the crops. + */ + public void fertilize(World par1World, int par2, int par3, int par4) + { + int l = par1World.getBlockMetadata(par2, par3, par4) + MathHelper.getRandomIntegerInRange(par1World.rand, 2, 5); + + if (l > 7) + { + l = 7; + } + + par1World.setBlockMetadataWithNotify(par2, par3, par4, l, 2); + } + + /** + * Gets the growth rate for the crop. Setup to encourage rows by halving growth rate if there is diagonals, crops on + * different sides that aren't opposing, and by adding growth for every crop next to this one (and for crop below + * this one). Args: x, y, z + */ + private float getGrowthRate(World par1World, int par2, int par3, int par4) + { + float f = 1.0F; + int l = par1World.getBlockId(par2, par3, par4 - 1); + int i1 = par1World.getBlockId(par2, par3, par4 + 1); + int j1 = par1World.getBlockId(par2 - 1, par3, par4); + int k1 = par1World.getBlockId(par2 + 1, par3, par4); + int l1 = par1World.getBlockId(par2 - 1, par3, par4 - 1); + int i2 = par1World.getBlockId(par2 + 1, par3, par4 - 1); + int j2 = par1World.getBlockId(par2 + 1, par3, par4 + 1); + int k2 = par1World.getBlockId(par2 - 1, par3, par4 + 1); + boolean flag = j1 == this.blockID || k1 == this.blockID; + boolean flag1 = l == this.blockID || i1 == this.blockID; + boolean flag2 = l1 == this.blockID || i2 == this.blockID || j2 == this.blockID || k2 == this.blockID; + + for (int l2 = par2 - 1; l2 <= par2 + 1; ++l2) + { + for (int i3 = par4 - 1; i3 <= par4 + 1; ++i3) + { + int j3 = par1World.getBlockId(l2, par3 - 1, i3); + float f1 = 0.0F; + + if (blocksList[j3] != null) + { + + f1 = 3.0F; + } + + if (l2 != par2 || i3 != par4) + { + f1 /= 4.0F; + } + + f += f1; + } + } + + if (flag2 || flag && flag1) + { + f /= 2.0F; + } + + return f; + } + + @SideOnly(Side.CLIENT) + + /** + * From the specified side and block metadata retrieves the blocks texture. Args: side, metadata + */ + public Icon getIcon(int par1, int par2) + { + if (par2 < 7) + { + if (par2 == 6) + { + par2 = 5; + } + + return this.iconArray[par2 >> 1]; + } + else + { + return this.iconArray[3]; + } + } + + /** + * The type of render function that is called for this block + */ + public int getRenderType() + { + return 6; + } + + /** + * Generate a seed ItemStack for this crop. + */ + protected int getSeedItem() + { + return ThaumicExploration.taintBerry.itemID; + } + + /** + * Generate a crop produce ItemStack for this crop. + */ + protected int getCropItem() + { + return ThaumicExploration.taintBerry.itemID; + } + + /** + * Drops the block items with a specified chance of dropping the specified items + */ + public void dropBlockAsItemWithChance(World par1World, int par2, int par3, int par4, int par5, float par6, int par7) + { + super.dropBlockAsItemWithChance(par1World, par2, par3, par4, par5, par6, 0); + } + + @Override + public ArrayList getBlockDropped(World world, int x, int y, int z, int metadata, int fortune) + { + ArrayList ret = super.getBlockDropped(world, x, y, z, metadata, fortune); + + if (metadata >= 7) + { + for (int n = 0; n < 3 + fortune; n++) + { + if (world.rand.nextInt(15) <= metadata) + { + ret.add(new ItemStack(this.getSeedItem(), 1, 0)); + } + } + } + + return ret; + } + + /** + * Returns the ID of the items to drop on destruction. + */ + public int idDropped(int par1, Random par2Random, int par3) + { + return par1 == 7 ? this.getCropItem() : this.getSeedItem(); + } + + /** + * Returns the quantity of items to drop on block destruction. + */ + public int quantityDropped(Random par1Random) + { + return 1; + } + + @SideOnly(Side.CLIENT) + + /** + * only called by clickMiddleMouseButton , and passed to inventory.setCurrentItem (along with isCreative) + */ + public int idPicked(World par1World, int par2, int par3, int par4) + { + return this.getSeedItem(); + } + + @SideOnly(Side.CLIENT) + + /** + * When this method is called, your block should register all the icons it needs with the given IconRegister. This + * is the only chance you get to register icons. + */ + + public void registerIcons(IconRegister par1IconRegister) + { + this.iconArray = new Icon[4]; + + for (int i = 0; i < this.iconArray.length; ++i) + { + this.iconArray[i] = par1IconRegister.registerIcon(this.getTextureName() + "_" + i); + } + } +} + + + + + + diff --git a/forge2/src/main/java/flaxbeard/thaumicexploration/block/BlockTaintlessFlower.java b/forge2/src/main/java/flaxbeard/thaumicexploration/block/BlockTaintlessFlower.java new file mode 100644 index 0000000..6d84f6f --- /dev/null +++ b/forge2/src/main/java/flaxbeard/thaumicexploration/block/BlockTaintlessFlower.java @@ -0,0 +1,152 @@ +package flaxbeard.thaumicexploration.block; + +import static net.minecraftforge.common.EnumPlantType.Cave; +import static net.minecraftforge.common.EnumPlantType.Crop; +import static net.minecraftforge.common.EnumPlantType.Desert; +import static net.minecraftforge.common.EnumPlantType.Nether; +import static net.minecraftforge.common.EnumPlantType.Plains; +import static net.minecraftforge.common.EnumPlantType.Water; + +import java.util.Random; + +import net.minecraft.block.Block; +import net.minecraft.block.material.Material; +import net.minecraft.creativetab.CreativeTabs; +import net.minecraft.util.AxisAlignedBB; +import net.minecraft.world.World; +import net.minecraftforge.common.EnumPlantType; +import net.minecraftforge.common.ForgeDirection; +import net.minecraftforge.common.IPlantable; + +public class BlockTaintlessFlower extends Block implements IPlantable +{ + protected BlockTaintlessFlower(int par1, Material par2Material) + { + super(par1, par2Material); + this.setTickRandomly(true); + float f = 0.2F; + this.setBlockBounds(0.5F - f, 0.0F, 0.5F - f, 0.5F + f, f * 3.0F, 0.5F + f); + this.setCreativeTab(CreativeTabs.tabDecorations); + } + + protected BlockTaintlessFlower(int par1) + { + this(par1, Material.plants); + } + + /** + * Checks to see if its valid to put this block at the specified coordinates. Args: world, x, y, z + */ + public boolean canPlaceBlockAt(World par1World, int par2, int par3, int par4) + { + return super.canPlaceBlockAt(par1World, par2, par3, par4) && canBlockStay(par1World, par2, par3, par4); + } + + /** + * Gets passed in the blockID of the block below and supposed to return true if its allowed to grow on the type of + * blockID passed in. Args: blockID + */ + protected boolean canThisPlantGrowOnThisBlockID(int par1) + { + return par1 == Block.grass.blockID || par1 == Block.dirt.blockID || par1 == Block.tilledField.blockID; + } + + /** + * Lets the block know when one of its neighbor changes. Doesn't know which neighbor changed (coordinates passed are + * their own) Args: x, y, z, neighbor blockID + */ + public void onNeighborBlockChange(World par1World, int par2, int par3, int par4, int par5) + { + super.onNeighborBlockChange(par1World, par2, par3, par4, par5); + this.checkFlowerChange(par1World, par2, par3, par4); + } + + /** + * Ticks the block if it's been scheduled + */ + public void updateTick(World par1World, int par2, int par3, int par4, Random par5Random) + { + this.checkFlowerChange(par1World, par2, par3, par4); + } + + protected final void checkFlowerChange(World par1World, int par2, int par3, int par4) + { + if (!this.canBlockStay(par1World, par2, par3, par4)) + { + this.dropBlockAsItem(par1World, par2, par3, par4, par1World.getBlockMetadata(par2, par3, par4), 0); + par1World.setBlock(par2, par3, par4, 0, 0, 2); + } + } + + /** + * Can this block stay at this position. Similar to canPlaceBlockAt except gets checked often with plants. + */ + public boolean canBlockStay(World par1World, int par2, int par3, int par4) + { + Block soil = blocksList[par1World.getBlockId(par2, par3 - 1, par4)]; + return (par1World.getFullBlockLightValue(par2, par3, par4) >= 8 || par1World.canBlockSeeTheSky(par2, par3, par4)) && + (soil != null && soil.canSustainPlant(par1World, par2, par3 - 1, par4, ForgeDirection.UP, this)); + } + + /** + * Returns a bounding box from the pool of bounding boxes (this means this box can change after the pool has been + * cleared to be reused) + */ + public AxisAlignedBB getCollisionBoundingBoxFromPool(World par1World, int par2, int par3, int par4) + { + return null; + } + + /** + * Is this block (a) opaque and (b) a full 1m cube? This determines whether or not to render the shared face of two + * adjacent blocks and also whether the player can attach torches, redstone wire, etc to this block. + */ + public boolean isOpaqueCube() + { + return false; + } + + /** + * If this block doesn't render as an ordinary block it will return False (examples: signs, buttons, stairs, etc) + */ + public boolean renderAsNormalBlock() + { + return false; + } + + /** + * The type of render function that is called for this block + */ + public int getRenderType() + { + return 1; + } + + @Override + public EnumPlantType getPlantType(World world, int x, int y, int z) + { + if (blockID == crops.blockID ) return Crop; + if (blockID == deadBush.blockID ) return Desert; + if (blockID == waterlily.blockID ) return Water; + if (blockID == mushroomRed.blockID ) return Cave; + if (blockID == mushroomBrown.blockID) return Cave; + if (blockID == netherStalk.blockID ) return Nether; + if (blockID == sapling.blockID ) return Plains; + if (blockID == melonStem.blockID ) return Crop; + if (blockID == pumpkinStem.blockID ) return Crop; + if (blockID == tallGrass.blockID ) return Plains; + return Plains; + } + + @Override + public int getPlantID(World world, int x, int y, int z) + { + return blockID; + } + + @Override + public int getPlantMetadata(World world, int x, int y, int z) + { + return world.getBlockMetadata(x, y, z); + } +} \ No newline at end of file diff --git a/forge2/src/main/java/flaxbeard/thaumicexploration/block/BlockThinkTank.java b/forge2/src/main/java/flaxbeard/thaumicexploration/block/BlockThinkTank.java index 8a10dc6..9b3356a 100644 --- a/forge2/src/main/java/flaxbeard/thaumicexploration/block/BlockThinkTank.java +++ b/forge2/src/main/java/flaxbeard/thaumicexploration/block/BlockThinkTank.java @@ -76,36 +76,36 @@ public void onBlockAdded(World par1World, int par2, int par3, int par4) */ private void setDefaultDirection(World par1World, int par2, int par3, int par4) { - if (!par1World.isRemote) - { - int l = par1World.getBlockId(par2, par3, par4 - 1); - int i1 = par1World.getBlockId(par2, par3, par4 + 1); - int j1 = par1World.getBlockId(par2 - 1, par3, par4); - int k1 = par1World.getBlockId(par2 + 1, par3, par4); - byte b0 = 3; - - if (Block.opaqueCubeLookup[l] && !Block.opaqueCubeLookup[i1]) - { - b0 = 3; - } - - if (Block.opaqueCubeLookup[i1] && !Block.opaqueCubeLookup[l]) - { - b0 = 2; - } - - if (Block.opaqueCubeLookup[j1] && !Block.opaqueCubeLookup[k1]) - { - b0 = 5; - } - - if (Block.opaqueCubeLookup[k1] && !Block.opaqueCubeLookup[j1]) - { - b0 = 4; - } - - par1World.setBlockMetadataWithNotify(par2, par3, par4, b0, 2); - } +// if (!par1World.isRemote) +// { +// int l = par1World.getBlockId(par2, par3, par4 - 1); +// int i1 = par1World.getBlockId(par2, par3, par4 + 1); +// int j1 = par1World.getBlockId(par2 - 1, par3, par4); +// int k1 = par1World.getBlockId(par2 + 1, par3, par4); +// byte b0 = 3; +// +// if (Block.opaqueCubeLookup[l] && !Block.opaqueCubeLookup[i1]) +// { +// b0 = 3; +// } +// +// if (Block.opaqueCubeLookup[i1] && !Block.opaqueCubeLookup[l]) +// { +// b0 = 2; +// } +// +// if (Block.opaqueCubeLookup[j1] && !Block.opaqueCubeLookup[k1]) +// { +// b0 = 5; +// } +// +// if (Block.opaqueCubeLookup[k1] && !Block.opaqueCubeLookup[j1]) +// { +// b0 = 4; +// } +// +// par1World.setBlockMetadataWithNotify(par2, par3, par4, b0, 2); +// } } diff --git a/forge2/src/main/java/flaxbeard/thaumicexploration/client/ClientProxy.java b/forge2/src/main/java/flaxbeard/thaumicexploration/client/ClientProxy.java index 8f9b194..bdd80f2 100644 --- a/forge2/src/main/java/flaxbeard/thaumicexploration/client/ClientProxy.java +++ b/forge2/src/main/java/flaxbeard/thaumicexploration/client/ClientProxy.java @@ -18,6 +18,7 @@ import flaxbeard.thaumicexploration.client.render.BlockCrucibleSoulsRenderer; import flaxbeard.thaumicexploration.client.render.BlockEverfullUrnRenderer; import flaxbeard.thaumicexploration.client.render.BlockReplicatorRenderer; +import flaxbeard.thaumicexploration.client.render.BlockSkullCandleRenderer; import flaxbeard.thaumicexploration.client.render.ItemRenderThinkTank; import flaxbeard.thaumicexploration.client.render.TileEntityBoundChestRender; import flaxbeard.thaumicexploration.client.render.TileEntityBoundJarRender; @@ -25,6 +26,7 @@ import flaxbeard.thaumicexploration.client.render.TileEntityReplicatorRender; import flaxbeard.thaumicexploration.client.render.TileEntityThinkTankRender; import flaxbeard.thaumicexploration.common.CommonProxy; +import flaxbeard.thaumicexploration.entity.EntitySoulFX; import flaxbeard.thaumicexploration.tile.TileEntityBoundChest; import flaxbeard.thaumicexploration.tile.TileEntityBoundJar; import flaxbeard.thaumicexploration.tile.TileEntityCrucibleSouls; @@ -43,7 +45,8 @@ public void registerRenderers() TileEntitySpecialRenderer renderThinkTank = new TileEntityThinkTankRender(); ClientRegistry.bindTileEntitySpecialRenderer(TileEntityThinkTank.class, renderThinkTank); - + + RenderingRegistry.registerBlockHandler(ThaumicExploration.candleSkullRenderID, new BlockSkullCandleRenderer()); RenderingRegistry.registerBlockHandler(ThaumicExploration.everfullUrnRenderID, new BlockEverfullUrnRenderer()); RenderingRegistry.registerBlockHandler(ThaumicExploration.replicatorRenderID, new BlockReplicatorRenderer()); RenderingRegistry.registerBlockHandler(ThaumicExploration.crucibleSoulsRenderID, new BlockCrucibleSoulsRenderer()); @@ -55,6 +58,16 @@ public void setUnicode() { Minecraft.getMinecraft().fontRenderer.setUnicodeFlag(false); } + + @Override + public void crucibleBubble(World world, float x, float y, float z, float cr, float cg, float cb) + { + EntitySoulFX fb = new EntitySoulFX(world, x, y, z, 0.0D, 0.0D, 0.0D); + fb.setRBGColorF(cr, cg, cb); + FMLClientHandler.instance().getClient().effectRenderer.addEffect(fb); + } + + @Override public void spawnWaterOnPlayer(World worldObj, int xCoord, int yCoord, int zCoord, EntityPlayer player) { FXEssentiaTrail fx = new FXEssentiaTrail(worldObj, xCoord+0.5F, yCoord+1.1F, zCoord+0.5F, player.posX, player.posY, player.posZ, 5, Aspect.TOOL.getColor(), 1.0F); diff --git a/forge2/src/main/java/flaxbeard/thaumicexploration/client/render/BlockSkullCandleRenderer.java b/forge2/src/main/java/flaxbeard/thaumicexploration/client/render/BlockSkullCandleRenderer.java new file mode 100644 index 0000000..9c1e281 --- /dev/null +++ b/forge2/src/main/java/flaxbeard/thaumicexploration/client/render/BlockSkullCandleRenderer.java @@ -0,0 +1,115 @@ +package flaxbeard.thaumicexploration.client.render; + +import java.awt.Color; +import java.util.Random; + +import net.minecraft.block.Block; +import net.minecraft.client.renderer.RenderBlocks; +import net.minecraft.util.ResourceLocation; +import net.minecraft.world.IBlockAccess; + +import org.lwjgl.opengl.GL11; + +import thaumcraft.client.renderers.block.BlockRenderer; +import cpw.mods.fml.client.registry.ISimpleBlockRenderingHandler; +import flaxbeard.thaumicexploration.ThaumicExploration; +import flaxbeard.thaumicexploration.block.BlockSkullCandle; + +public class BlockSkullCandleRenderer + extends BlockRenderer + implements ISimpleBlockRenderingHandler +{ + + public void renderInventoryBlock(Block block, int metadata, int modelID, RenderBlocks renderer) + { + Color c = new Color(thaumcraft.common.lib.Utils.colors[metadata]); + float r = c.getRed() / 255.0F; + float g = c.getGreen() / 255.0F; + float b = c.getBlue() / 255.0F; + GL11.glColor3f(r, g, b); + block.setBlockBounds(BlockRenderer.W6, 0.0F, BlockRenderer.W6, BlockRenderer.W10, 0.5F, BlockRenderer.W10); + renderer.setRenderBoundsFromBlock(block); + drawFaces(renderer, block, ((BlockSkullCandle)block).icon, true); + GL11.glColor3f(1.0F, 1.0F, 1.0F); + + block.setBlockBounds(0.475F, 0.5F, 0.475F, 0.525F, BlockRenderer.W10, 0.525F); + renderer.setRenderBoundsFromBlock(block); + drawFaces(renderer, block, ((BlockSkullCandle)block).iconStub, true); + } + + + + public boolean renderWorldBlock(IBlockAccess world, int x, int y, int z, Block block, int modelId, RenderBlocks renderer) + { + int type = 0; + float xOffset=0; + float yOffset=0; + float zOffset=0; + if (world.getBlockMetadata(x, y, z) != 1) { + yOffset = BlockRenderer.W4; + renderer.overrideBlockTexture = ((BlockSkullCandle)block).icon2; + } + if (world.getBlockMetadata(x, y, z) == 2) + zOffset = 0.25F; + if (world.getBlockMetadata(x, y, z) == 3) + zOffset = -0.25F; + if (world.getBlockMetadata(x, y, z) == 4) + xOffset = 0.25F; + if (world.getBlockMetadata(x, y, z) == 5) + xOffset = -0.25F; + block.setBlockBounds(BlockRenderer.W6+xOffset, 0.0F+BlockRenderer.W8+yOffset, BlockRenderer.W6 + zOffset, BlockRenderer.W10+xOffset, 0.5F+BlockRenderer.W5+yOffset, BlockRenderer.W10 + zOffset); + renderer.setRenderBoundsFromBlock(block); + renderer.renderStandardBlock(block, x, y, z); + +// renderer.overrideBlockTexture = ((BlockSkullCandle)block).iconSkull; +// block.setBlockBounds(0.25F, 0.0F, 0.25F, 0.75F, 0.5F, 0.75F); +// renderer.setRenderBoundsFromBlock(block); +// renderer.renderStandardBlock(block, x, y, z); +// renderer.clearOverrideBlockTexture(); + Random rr = new Random(x + y * z); + int q = 4 + rr.nextInt(3); + for (int a = 0; a < q; a++) + { + boolean side = rr.nextBoolean(); + int loc = 1 + rr.nextInt(4); + int n = 1; + if (loc > 1 && loc < 4) + n = 2; + if (a % 2 == 0) + { + block.setBlockBounds(BlockRenderer.W5 + BlockRenderer.W1 * loc + xOffset, 0.0F+BlockRenderer.W8+yOffset, side ? BlockRenderer.W5 + zOffset : BlockRenderer.W10 + zOffset, BlockRenderer.W6 + BlockRenderer.W1 * loc + xOffset, BlockRenderer.W1 * (1 + rr.nextInt(n))+BlockRenderer.W8+yOffset, side ? BlockRenderer.W6 + zOffset: BlockRenderer.W11 + zOffset); + + + renderer.setRenderBoundsFromBlock(block); + renderer.renderStandardBlock(block, x, y, z); + } + else + { + block.setBlockBounds(side ? BlockRenderer.W5 + xOffset: BlockRenderer.W10 + xOffset, 0.0F+BlockRenderer.W8+yOffset, BlockRenderer.W5 + BlockRenderer.W1 * loc + zOffset, side ? BlockRenderer.W6 + xOffset: BlockRenderer.W11 + xOffset, BlockRenderer.W1 * (1 + rr.nextInt(n))+BlockRenderer.W8+yOffset, BlockRenderer.W6 + BlockRenderer.W1 * loc + zOffset); + + + renderer.setRenderBoundsFromBlock(block); + renderer.renderStandardBlock(block, x, y, z); + } + } + renderer.overrideBlockTexture = ((BlockSkullCandle)block).iconStub; + block.setBlockBounds(0.475F+xOffset, 0.5F+BlockRenderer.W5+yOffset, 0.475F + zOffset, 0.525F+xOffset, BlockRenderer.W10+BlockRenderer.W5+yOffset, 0.525F + zOffset); + renderer.setRenderBoundsFromBlock(block); + renderer.renderStandardBlockWithColorMultiplier(block, x, y, z, 1.0F, 1.0F, 1.0F); + + renderer.clearOverrideBlockTexture(); + block.setBlockBounds(0.0F, 0.0F, 0.0F, 1.0F, 1.0F, 1.0F); + renderer.setRenderBoundsFromBlock(block); + return true; + } + + public boolean shouldRender3DInInventory() + { + return true; + } + + public int getRenderId() + { + return ThaumicExploration.candleSkullRenderID; + } +} diff --git a/forge2/src/main/java/flaxbeard/thaumicexploration/common/CommonProxy.java b/forge2/src/main/java/flaxbeard/thaumicexploration/common/CommonProxy.java index f98213f..49aeb7f 100644 --- a/forge2/src/main/java/flaxbeard/thaumicexploration/common/CommonProxy.java +++ b/forge2/src/main/java/flaxbeard/thaumicexploration/common/CommonProxy.java @@ -50,5 +50,11 @@ public void spawnEssentiaAtLocation(World worldObj, double xCoord, // TODO Auto-generated method stub } + + public void crucibleBubble(World world, float x, float y, float z, + float cr, float cg, float cb) { + // TODO Auto-generated method stub + + } } \ No newline at end of file diff --git a/forge2/src/main/java/flaxbeard/thaumicexploration/enchantment/EnchantmentBinding.java b/forge2/src/main/java/flaxbeard/thaumicexploration/enchantment/EnchantmentBinding.java new file mode 100644 index 0000000..675130a --- /dev/null +++ b/forge2/src/main/java/flaxbeard/thaumicexploration/enchantment/EnchantmentBinding.java @@ -0,0 +1,59 @@ +package flaxbeard.thaumicexploration.enchantment; + +import cpw.mods.fml.common.Loader; +import flaxbeard.thaumicexploration.ThaumicExploration; +import flaxbeard.thaumicexploration.integration.TTIntegration; +import net.minecraft.enchantment.Enchantment; +import net.minecraft.enchantment.EnchantmentDamage; +import net.minecraft.enchantment.EnchantmentFireAspect; +import net.minecraft.enchantment.EnumEnchantmentType; +import net.minecraft.item.ItemStack; + +public class EnchantmentBinding extends Enchantment +{ + public EnchantmentBinding(int par1, int par2) + { + super(par1, par2, EnumEnchantmentType.weapon); + this.setName("binding"); + } + + /** + * Returns the minimal value of enchantability needed on the enchantment level passed. + */ + public int getMinEnchantability(int par1) + { + return 10 + 20 * (par1 - 1); + } + + /** + * Returns the maximum value of enchantability nedded on the enchantment level passed. + */ + public int getMaxEnchantability(int par1) + { + return super.getMinEnchantability(par1) + 50; + } + + @Override + public boolean canApplyTogether(Enchantment par1Enchantment) { + if (Loader.isModLoaded("ThaumicTinkerer")) { + if (!TTIntegration.canApplyTogether(par1Enchantment, ThaumicExploration.enchantmentBinding)) { + return false; + } + } + return !(par1Enchantment instanceof EnchantmentFireAspect); + + } + + @Override + public boolean canApplyAtEnchantingTable(ItemStack stack) { + return false; + } + + /** + * Returns the maximum level that the enchantment can have. + */ + public int getMaxLevel() + { + return 2; + } +} diff --git a/forge2/src/main/java/flaxbeard/thaumicexploration/enchantment/EnchantmentDisarm.java b/forge2/src/main/java/flaxbeard/thaumicexploration/enchantment/EnchantmentDisarm.java new file mode 100644 index 0000000..1a65e66 --- /dev/null +++ b/forge2/src/main/java/flaxbeard/thaumicexploration/enchantment/EnchantmentDisarm.java @@ -0,0 +1,60 @@ +package flaxbeard.thaumicexploration.enchantment; + +import cpw.mods.fml.common.Loader; +import flaxbeard.thaumicexploration.ThaumicExploration; +import flaxbeard.thaumicexploration.integration.TTIntegration; +import net.minecraft.enchantment.Enchantment; +import net.minecraft.enchantment.EnchantmentDamage; +import net.minecraft.enchantment.EnchantmentFireAspect; +import net.minecraft.enchantment.EnchantmentLootBonus; +import net.minecraft.enchantment.EnumEnchantmentType; +import net.minecraft.item.ItemStack; + +public class EnchantmentDisarm extends Enchantment +{ + public EnchantmentDisarm(int par1, int par2) + { + super(par1, par2, EnumEnchantmentType.weapon); + this.setName("disarm"); + } + + /** + * Returns the minimal value of enchantability needed on the enchantment level passed. + */ + public int getMinEnchantability(int par1) + { + return 10 + 20 * (par1 - 1); + } + + /** + * Returns the maximum value of enchantability nedded on the enchantment level passed. + */ + public int getMaxEnchantability(int par1) + { + return super.getMinEnchantability(par1) + 50; + } + + @Override + public boolean canApplyTogether(Enchantment par1Enchantment) { + if (Loader.isModLoaded("ThaumicTinkerer")) { + if (!TTIntegration.canApplyTogether(par1Enchantment, ThaumicExploration.enchantmentDisarm)) { + return false; + } + } + return !(par1Enchantment instanceof EnchantmentLootBonus); + + } + + @Override + public boolean canApplyAtEnchantingTable(ItemStack stack) { + return false; + } + + /** + * Returns the maximum level that the enchantment can have. + */ + public int getMaxLevel() + { + return 3; + } +} diff --git a/forge2/src/main/java/flaxbeard/thaumicexploration/enchantment/EnchantmentNightVision.java b/forge2/src/main/java/flaxbeard/thaumicexploration/enchantment/EnchantmentNightVision.java new file mode 100644 index 0000000..3a6b38a --- /dev/null +++ b/forge2/src/main/java/flaxbeard/thaumicexploration/enchantment/EnchantmentNightVision.java @@ -0,0 +1,48 @@ +package flaxbeard.thaumicexploration.enchantment; + +import net.minecraft.enchantment.Enchantment; +import net.minecraft.enchantment.EnchantmentOxygen; +import net.minecraft.enchantment.EnchantmentWaterWorker; +import net.minecraft.enchantment.EnumEnchantmentType; +import net.minecraft.item.ItemStack; +import cpw.mods.fml.common.Loader; +import flaxbeard.thaumicexploration.ThaumicExploration; +import flaxbeard.thaumicexploration.integration.TTIntegration; + +public class EnchantmentNightVision extends Enchantment +{ + public EnchantmentNightVision(int par1, int par2) + { + super(par1, par2, EnumEnchantmentType.armor_head); + this.setName("nightVision"); + } + + public int getMinEnchantability(int par1) + { + return 40; + } + + @Override + public boolean canApplyAtEnchantingTable(ItemStack stack) { + return false; + } + + @Override + public boolean canApplyTogether(Enchantment par1Enchantment) { + if (Loader.isModLoaded("ThaumicTinkerer")) { + if (!TTIntegration.canApplyTogether(par1Enchantment, ThaumicExploration.enchantmentNightVision)) { + return false; + } + } + return (!(par1Enchantment instanceof EnchantmentOxygen) && !(par1Enchantment instanceof EnchantmentWaterWorker)); + + } + + /** + * Returns the maximum level that the enchantment can have. + */ + public int getMaxLevel() + { + return 1; + } +} diff --git a/forge2/src/main/java/flaxbeard/thaumicexploration/entity/EntitySoulFX.java b/forge2/src/main/java/flaxbeard/thaumicexploration/entity/EntitySoulFX.java new file mode 100644 index 0000000..83a3227 --- /dev/null +++ b/forge2/src/main/java/flaxbeard/thaumicexploration/entity/EntitySoulFX.java @@ -0,0 +1,130 @@ +package flaxbeard.thaumicexploration.entity; + +import net.minecraft.client.Minecraft; +import net.minecraft.client.particle.EntityFX; +import net.minecraft.client.renderer.Tessellator; +import net.minecraft.util.ResourceLocation; +import net.minecraft.world.World; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; + +@SideOnly(Side.CLIENT) +public class EntitySoulFX extends EntityFX +{ + /** the scale of the flame FX */ + private float flameScale; + + public EntitySoulFX(World par1World, double par2, double par4, double par6, double par8, double par10, double par12) + { + super(par1World, par2, par4, par6, par8, par10, par12); + this.motionX = this.motionX * 0.009999999776482582D + par8; + this.motionY = this.motionY * 0.009999999776482582D + par10; + this.motionZ = this.motionZ * 0.009999999776482582D + par12; + double d6 = par2 + (double)((this.rand.nextFloat() - this.rand.nextFloat()) * 0.05F); + d6 = par4 + (double)((this.rand.nextFloat() - this.rand.nextFloat()) * 0.05F); + d6 = par6 + (double)((this.rand.nextFloat() - this.rand.nextFloat()) * 0.05F); + this.flameScale = this.particleScale; + this.particleRed = this.particleGreen = this.particleBlue = 1.0F; + this.particleMaxAge = (int)(8.0D / (Math.random() * 0.8D + 0.2D)) + 4; + this.noClip = true; + //this.setParticleTextureIndex(48); + this.setParticleTextureIndex(0); + this.particleTextureIndexX = 0; // + this.particleTextureIndexY = 0; + } + + + public int getBrightnessForRender(float par1) + { + float f1 = ((float)this.particleAge + par1) / (float)this.particleMaxAge; + + if (f1 < 0.0F) + { + f1 = 0.0F; + } + + if (f1 > 1.0F) + { + f1 = 1.0F; + } + + int i = super.getBrightnessForRender(par1); + int j = i & 255; + int k = i >> 16 & 255; + j += (int)(f1 * 15.0F * 16.0F); + + if (j > 240) + { + j = 240; + } + + return j | k << 16; + } + + /** + * Gets how bright this entity is. + */ + public float getBrightness(float par1) + { + float f1 = ((float)this.particleAge + par1) / (float)this.particleMaxAge; + + if (f1 < 0.0F) + { + f1 = 0.0F; + } + + if (f1 > 1.0F) + { + f1 = 1.0F; + } + + float f2 = super.getBrightness(par1); + return f2 * f1 + (1.0F - f1); + } + + @Override + public void renderParticle(Tessellator par1Tessellator, float f, float f1, float f2, float f3, float f4, float f5) + { + System.out.println("y do dis"); +// float f6 = ((float)this.particleAge + f) / (float)this.particleMaxAge; +// this.particleScale = this.flameScale * (1.0F - f6 * f6 * 0.5F); + par1Tessellator.setBrightness(100);//make sure you have this!! + par1Tessellator.setColorOpaque_F(1.0F, 1.0F, 1.0F); + par1Tessellator.draw(); + Minecraft.getMinecraft().getTextureManager().bindTexture(new ResourceLocation("thaumicexploration:textures/items/replicator.png")); + par1Tessellator.startDrawingQuads(); + par1Tessellator.setBrightness(100);//make sure you have this!! + par1Tessellator.setColorOpaque_F(1.0F, 1.0F, 1.0F); + super.renderParticle(par1Tessellator, f, f1, f2,f3, f4, f5); + par1Tessellator.draw(); + Minecraft.getMinecraft().getTextureManager().bindTexture(new ResourceLocation("textures/particle/particles.png")); + par1Tessellator.startDrawingQuads(); + } + + /** + * Called to update the entity's position/logic. + */ + public void onUpdate() + { + + this.prevPosX = this.posX; + this.prevPosY = this.posY; + this.prevPosZ = this.posZ; + + if (this.particleAge++ >= this.particleMaxAge) + { + this.setDead(); + } + + this.moveEntity(this.motionX, this.motionY, this.motionZ); + this.motionX *= 0.9599999785423279D; + this.motionY *= 0.9599999785423279D; + this.motionZ *= 0.9599999785423279D; + + if (this.onGround) + { + this.motionX *= 0.699999988079071D; + this.motionZ *= 0.699999988079071D; + } + } +} diff --git a/forge2/src/main/java/flaxbeard/thaumicexploration/event/DamageSourceTX.java b/forge2/src/main/java/flaxbeard/thaumicexploration/event/DamageSourceTX.java index f8faa5f..ec24812 100644 --- a/forge2/src/main/java/flaxbeard/thaumicexploration/event/DamageSourceTX.java +++ b/forge2/src/main/java/flaxbeard/thaumicexploration/event/DamageSourceTX.java @@ -7,7 +7,8 @@ public class DamageSourceTX extends DamageSource { public static DamageSource soulCrucible = (new DamageSourceTX("soulCrucible")).setDamageBypassesArmor(); - + public static DamageSource noTaint = new DamageSourceTX("noTaint").setDamageBypassesArmor().setMagicDamage(); + public DamageSourceTX(String par1Str) { super(par1Str); } diff --git a/forge2/src/main/java/flaxbeard/thaumicexploration/event/TXBootsEventHandler.java b/forge2/src/main/java/flaxbeard/thaumicexploration/event/TXBootsEventHandler.java index 6dd601c..9236321 100644 --- a/forge2/src/main/java/flaxbeard/thaumicexploration/event/TXBootsEventHandler.java +++ b/forge2/src/main/java/flaxbeard/thaumicexploration/event/TXBootsEventHandler.java @@ -2,23 +2,27 @@ import java.util.HashMap; -import net.minecraft.block.Block; import net.minecraft.block.material.Material; -import net.minecraft.client.Minecraft; -import net.minecraft.client.particle.EffectRenderer; import net.minecraft.enchantment.EnchantmentHelper; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.entity.player.PlayerCapabilities; import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; +import net.minecraft.potion.Potion; +import net.minecraft.potion.PotionEffect; import net.minecraft.util.Vec3; import net.minecraftforge.event.ForgeSubscribe; import net.minecraftforge.event.entity.EntityJoinWorldEvent; import net.minecraftforge.event.entity.living.LivingEvent; -import thaumcraft.client.fx.FXLightningBolt; +import thaumcraft.common.Thaumcraft; import thaumcraft.common.config.Config; +import thaumcraft.common.config.ConfigItems; +import thaumcraft.common.items.PotionFluxTaint; import thaumcraft.common.lib.Utils; +import thaumcraft.common.lib.world.ThaumcraftWorldGenerator; +import cpw.mods.fml.common.Loader; import flaxbeard.thaumicexploration.ThaumicExploration; +import flaxbeard.thaumicexploration.integration.TTIntegration; public class TXBootsEventHandler { @@ -31,14 +35,104 @@ public void livingTick(LivingEvent.LivingUpdateEvent event) if ((event.entity instanceof EntityPlayer)) { EntityPlayer player = (EntityPlayer)event.entity; - Utils.setWalkSpeed(player.capabilities, Utils.getWalkSpeed(genericPlayerCapabilities)); + //Utils.setWalkSpeed(player.capabilities, Utils.getWalkSpeed(genericPlayerCapabilities)); updateSpeed(player); checkAir(player); if (player.getCurrentItemOrArmor(4) != null) { if (player.getCurrentItemOrArmor(4).itemID == ThaumicExploration.maskEvil.itemID && player.username.equalsIgnoreCase("Succubism")) { player.worldObj.spawnParticle("heart", (double)(player.posX + Math.random()-0.5F), (double)(player.boundingBox.maxY + Math.random()/2), (double)(player.posZ + Math.random()-0.5F), 0.0D, 0.0D, 0.0D); } + } + + boolean isTainted = false; + for (int i = 0; i<10; i++) { + if (player.inventory.getStackInSlot(i) != null && player.inventory.getStackInSlot(i).itemID == ThaumicExploration.charmTaint.itemID) { + isTainted = true; + break; + } + } + + if (!player.getEntityData().hasKey("tainted")) { + System.out.println("Setting up player NBT"); + player.getEntityData().setBoolean("tainted", isTainted); + } + boolean wasTainted = player.getEntityData().getBoolean("tainted"); + if (wasTainted && !isTainted && !player.capabilities.disableDamage) { + player.attackEntityFrom(DamageSourceTX.noTaint, 999); + } + if (!wasTainted && isTainted) { + player.worldObj.playSoundEffect(player.posX, player.posY, player.posZ, "thaumcraft:zap", 1.0F, 1.0F); +// player.addPotionEffect(new PotionEffect(Potion.blindness.id,60)); +// player.addPotionEffect(new PotionEffect(Potion.confusion.id,160)); + } + player.getEntityData().setBoolean("tainted", isTainted); + + if (!(player.worldObj.getBiomeGenForCoords((int)player.posX, (int)player.posZ) == ThaumcraftWorldGenerator.biomeTaint)) { + if (isTainted) { + if (!player.getEntityData().hasKey("taintGracePeriod")) { + System.out.println("Setting up player grace period"); + player.getEntityData().setInteger("taintGracePeriod", 0); + } + int taintGP = player.getEntityData().getInteger("taintGracePeriod"); + taintGP++; + player.getEntityData().setInteger("taintGracePeriod", taintGP); + if (player.getActivePotionEffect(ThaumicExploration.potionTaintWithdrawl) == null && taintGP > 100) { + for (int i = 0; i<10; i++) { + if (player.inventory.getStackInSlot(i) != null && player.inventory.getStackInSlot(i).itemID == ConfigItems.itemResource.itemID && (player.inventory.getStackInSlot(i).getItemDamage() == 11 || player.inventory.getStackInSlot(i).getItemDamage() == 12)) { + player.inventory.decrStackSize(i, 1); + taintGP = 0; + player.getEntityData().setInteger("taintGracePeriod",0); + break; + } + } + + if (taintGP > 100) + player.addPotionEffect(new PotionEffect(ThaumicExploration.potionTaintWithdrawl.id,100,1)); + + } + } + + } + else + { + if (!player.worldObj.isRemote){ + if (isTainted) { + player.getEntityData().setInteger("taintGracePeriod", 0); + if (player.getFoodStats().getFoodLevel() < 4) { + if (!player.getEntityData().hasKey("taintFoodBuff")) { + System.out.println("Setting up player food NBT"); + player.getEntityData().setInteger("taintFoodBuff", 0); + } + int taint = player.getEntityData().getInteger("taintFoodBuff"); + taint++; + if (taint > 80) { + player.getFoodStats().addStats(1, 0.0F); + taint = 0; + if (player.worldObj.isRemote) { + Thaumcraft.proxy.swarmParticleFX(player.worldObj, player, 0.1F, 10.0F, 0.0F); + } + } + player.getEntityData().setInteger("taintFoodBuff", taint); + } + else + { + if (!player.getEntityData().hasKey("taintFoodBuff")) { + System.out.println("Setting up player food NBT"); + player.getEntityData().setInteger("taintFoodBuff", 0); + } + player.getEntityData().setInteger("taintFoodBuff", 0); + } + } + } + } + if (player.getActivePotionEffect(PotionFluxTaint.fluxTaint) != null) { + for (int i = 0; i<10; i++) { + if (player.inventory.getStackInSlot(i) != null && player.inventory.getStackInSlot(i).itemID == ThaumicExploration.charmTaint.itemID) { + player.removePotionEffect(PotionFluxTaint.fluxTaint.id); + break; + } + } } } @@ -141,15 +235,24 @@ public void playerJumps(LivingEvent.LivingJumpEvent event) if (((event.entity instanceof EntityPlayer)) && (((EntityPlayer)event.entity).inventory.armorItemInSlot(0) != null) && (((EntityPlayer)event.entity).inventory.armorItemInSlot(0).getItem().itemID == ThaumicExploration.bootsMeteor.itemID)) { if (((EntityPlayer)event.entity).isSneaking()) { Vec3 vector = event.entityLiving.getLook(0.5F); - double total = vector.zCoord + vector.xCoord; + double total = Math.abs(vector.zCoord + vector.xCoord); EntityPlayer player = (EntityPlayer)event.entity; - + double jump = 0; + if (Loader.isModLoaded("ThaumicTinkerer")) { + jump = TTIntegration.getAscentLevel((EntityPlayer)event.entity); + } + if(jump >= 1) { + jump = (jump + 2D)/4D; + } + if (vector.yCoord < total) vector.yCoord = total; - if (vector.yCoord > 0) - event.entityLiving.motionY += vector.yCoord/1.5F; - event.entityLiving.motionZ += vector.zCoord*4; - event.entityLiving.motionX += vector.xCoord*4; + + event.entityLiving.motionY += ((jump+1)*vector.yCoord)/1.5F; + event.entityLiving.motionZ += (jump+1)*vector.zCoord*4; + event.entityLiving.motionX += (jump+1)*vector.xCoord*4; + + } else { diff --git a/forge2/src/main/java/flaxbeard/thaumicexploration/event/TXEventHandler.java b/forge2/src/main/java/flaxbeard/thaumicexploration/event/TXEventHandler.java index e13b897..85503b5 100644 --- a/forge2/src/main/java/flaxbeard/thaumicexploration/event/TXEventHandler.java +++ b/forge2/src/main/java/flaxbeard/thaumicexploration/event/TXEventHandler.java @@ -6,25 +6,47 @@ import java.util.List; import net.minecraft.block.Block; -import net.minecraft.client.Minecraft; +import net.minecraft.enchantment.EnchantmentHelper; +import net.minecraft.entity.EntityCreature; +import net.minecraft.entity.EntityLiving; +import net.minecraft.entity.EntityLivingBase; +import net.minecraft.entity.ai.EntityAIAttackOnCollide; +import net.minecraft.entity.ai.EntityAICreeperSwell; +import net.minecraft.entity.ai.EntityAINearestAttackableTarget; +import net.minecraft.entity.ai.EntityAITaskEntry; +import net.minecraft.entity.item.EntityItem; +import net.minecraft.entity.monster.EntityCreeper; +import net.minecraft.entity.monster.EntityEnderman; +import net.minecraft.entity.monster.EntityZombie; import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.item.Item; import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; import net.minecraft.network.packet.Packet250CustomPayload; +import net.minecraft.potion.Potion; +import net.minecraft.potion.PotionEffect; import net.minecraft.world.World; import net.minecraftforge.event.ForgeSubscribe; +import net.minecraftforge.event.entity.EntityJoinWorldEvent; +import net.minecraftforge.event.entity.living.EnderTeleportEvent; +import net.minecraftforge.event.entity.living.LivingAttackEvent; import net.minecraftforge.event.entity.living.LivingDropsEvent; +import net.minecraftforge.event.entity.living.LivingEvent.LivingUpdateEvent; import net.minecraftforge.event.entity.living.LivingHurtEvent; import net.minecraftforge.event.entity.player.PlayerInteractEvent; +import net.minecraftforge.event.world.BlockEvent; import net.minecraftforge.event.world.WorldEvent; -import thaumcraft.common.Thaumcraft; import thaumcraft.common.config.ConfigBlocks; import thaumcraft.common.entities.ITaintedMob; import thaumcraft.common.lib.world.DamageSourceThaumcraft; +import thaumcraft.common.lib.world.ThaumcraftWorldGenerator; import thaumcraft.common.tiles.TileJarFillable; import cpw.mods.fml.common.network.PacketDispatcher; -import cpw.mods.fml.common.network.Player; import flaxbeard.thaumicexploration.ThaumicExploration; +import flaxbeard.thaumicexploration.ai.EntityAIAttackOnCollideReplacement; +import flaxbeard.thaumicexploration.ai.EntityAICreeperDummy; +import flaxbeard.thaumicexploration.ai.EntityAINearestAttackablePureTarget; +import flaxbeard.thaumicexploration.ai.EntityAINearestAttackableTargetNecromancy; import flaxbeard.thaumicexploration.data.TXWorldData; import flaxbeard.thaumicexploration.tile.TileEntityBoundChest; import flaxbeard.thaumicexploration.tile.TileEntityBoundJar; @@ -40,6 +62,29 @@ public void handleWorldLoad(WorldEvent.Load event) { } + @ForgeSubscribe + public void handleTaintSpawns(EntityJoinWorldEvent event) { + System.out.println("brainwashed0"); + if (event.entity instanceof ITaintedMob) { + EntityLiving mob = (EntityLiving) event.entity; + List tasksToRemove = new ArrayList(); + for ( Object entry : mob.targetTasks.taskEntries) + { + EntityAITaskEntry entry2 = (EntityAITaskEntry)entry; + if (entry2.action instanceof EntityAINearestAttackableTarget) + { + tasksToRemove.add((EntityAITaskEntry) entry); + } + } + for (EntityAITaskEntry entry : tasksToRemove) + { + mob.targetTasks.removeTask(entry.action); + } + System.out.println("brainwashed1"); + mob.targetTasks.addTask(1, new EntityAINearestAttackablePureTarget((EntityCreature) mob, EntityPlayer.class, 0, true)); + } + } + @ForgeSubscribe public void handleMobDrop(LivingDropsEvent event) { if (event.source == DamageSourceTX.soulCrucible) { @@ -47,6 +92,124 @@ public void handleMobDrop(LivingDropsEvent event) { } } + @ForgeSubscribe + public void handleTeleport(EnderTeleportEvent event) { + if (event.entityLiving instanceof EntityEnderman || event.entityLiving instanceof EntityPlayer) { + if (event.entityLiving.isPotionActive(ThaumicExploration.potionBinding)) { + event.setCanceled(true); + System.out.println("no teleporting, bad enderman."); + } + } + } + + + @ForgeSubscribe + public void stopCreeperExplosions(LivingUpdateEvent event) { + if (event.entityLiving.getCurrentItemOrArmor(4) != null) { + ItemStack heldItem = event.entityLiving.getCurrentItemOrArmor(4); + int nightVision = EnchantmentHelper.getEnchantmentLevel(ThaumicExploration.enchantmentNightVision.effectId, heldItem); + if(nightVision > 0 && (!event.entityLiving.isPotionActive(Potion.nightVision.id) || event.entityLiving.getActivePotionEffect(Potion.nightVision).duration < 202)) { + event.entityLiving.addPotionEffect(new PotionEffect(Potion.nightVision.id, 202, 1)); + } + } + if (event.entityLiving instanceof EntityCreeper && event.entityLiving.isPotionActive(ThaumicExploration.potionBinding)) { + EntityCreeper creeper = (EntityCreeper) event.entityLiving; + int size = creeper.tasks.taskEntries.size(); + for(int i = 0; i 0 && !event.drops.contains(Item.itemsList[Block.tallGrass.blockID]) && event.block.blockID == Block.tallGrass.blockID && event.world.getBiomeGenForCoords(event.x, event.z) == ThaumcraftWorldGenerator.biomeTaint) { +// event.drops.clear(); +// event.drops.add(new ItemStack(Item.arrow)); +// } +// } + + @ForgeSubscribe + public void handleEnchantmentAttack(LivingAttackEvent event) { + if ((event.entityLiving instanceof EntityEnderman || event.entityLiving instanceof EntityCreeper || event.entityLiving instanceof EntityPlayer)&& event.source.getSourceOfDamage() instanceof EntityLivingBase) { + EntityLivingBase attacker = (EntityLivingBase) event.source.getSourceOfDamage(); + ItemStack heldItem = attacker.getHeldItem(); + if(heldItem == null) + return; + + int binding = EnchantmentHelper.getEnchantmentLevel(ThaumicExploration.enchantmentBinding.effectId, heldItem); + if(binding > 1) { + event.entityLiving.addPotionEffect(new PotionEffect(ThaumicExploration.potionBinding.id, 50, 1)); + } + } + if (event.source.getSourceOfDamage() instanceof EntityLivingBase) { + EntityLivingBase attacker = (EntityLivingBase) event.source.getSourceOfDamage(); + ItemStack heldItem = attacker.getHeldItem(); + if(heldItem == null) + return; + + int binding = EnchantmentHelper.getEnchantmentLevel(ThaumicExploration.enchantmentBinding.effectId, heldItem); + if (binding > 0) { + event.entityLiving.addPotionEffect(new PotionEffect(Potion.moveSlowdown.id, 50, 1)); + } + } + if (event.source.getSourceOfDamage() instanceof EntityLivingBase) { + EntityLivingBase attacker = (EntityLivingBase) event.source.getSourceOfDamage(); + ItemStack heldItem = attacker.getHeldItem(); + if(heldItem == null) + return; + + int disarm = EnchantmentHelper.getEnchantmentLevel(ThaumicExploration.enchantmentDisarm.effectId, heldItem); + if (disarm > 0 && !(event.entityLiving instanceof EntityPlayer)) { + if (event.entityLiving.getHeldItem() != null && !event.entityLiving.worldObj.isRemote && event.entityLiving.worldObj.rand.nextInt(10-(2*disarm)) == 0) { + ItemStack itemstack = event.entityLiving.getHeldItem(); + event.entityLiving.setCurrentItemOrArmor(0, null); + World world = event.entityLiving.worldObj; + double x = event.entityLiving.posX; + double y = event.entityLiving.posY; + double z = event.entityLiving.posZ; + float f = world.rand.nextFloat() * 0.8F + 0.1F; + float f1 = world.rand.nextFloat() * 0.8F + 0.1F; + float f2 = world.rand.nextFloat(); + EntityItem entityitem; + int k1 = world.rand.nextInt(21) + 10; + + k1 = itemstack.stackSize; + + entityitem = new EntityItem(world, (double)((float)x + f), (double)((float)y + f1), (double)((float)z + f2), new ItemStack(itemstack.itemID, k1, itemstack.getItemDamage())); + float f3 = 0.05F; + entityitem.motionX = (double)((float)world.rand.nextGaussian() * f3); + entityitem.motionY = (double)((float)world.rand.nextGaussian() * f3 + 0.2F); + entityitem.motionZ = (double)((float)world.rand.nextGaussian() * f3); + + if (itemstack.hasTagCompound()) + { + entityitem.getEntityItem().setTagCompound((NBTTagCompound)itemstack.getTagCompound().copy()); + } + world.spawnEntityInWorld(entityitem); + } + } + } + } + @ForgeSubscribe public void handleTaint(LivingHurtEvent event) { if (event.entityLiving.worldObj.rand.nextInt(4) < 3) { diff --git a/forge2/src/main/java/flaxbeard/thaumicexploration/integration/TTIntegration.java b/forge2/src/main/java/flaxbeard/thaumicexploration/integration/TTIntegration.java new file mode 100644 index 0000000..c10d72e --- /dev/null +++ b/forge2/src/main/java/flaxbeard/thaumicexploration/integration/TTIntegration.java @@ -0,0 +1,71 @@ +package flaxbeard.thaumicexploration.integration; + +import java.lang.reflect.Method; + +import net.minecraft.enchantment.Enchantment; +import net.minecraft.enchantment.EnchantmentHelper; +import net.minecraft.entity.player.EntityPlayer; +import thaumcraft.api.aspects.Aspect; +import thaumcraft.api.aspects.AspectList; +import vazkii.tinkerer.common.enchantment.EnchantmentVampirism; +import vazkii.tinkerer.common.enchantment.core.EnchantmentManager; +import vazkii.tinkerer.common.lib.LibEnchantIDs; +import vazkii.tinkerer.common.lib.LibMisc; +import vazkii.tinkerer.common.lib.LibResearch; +import cpw.mods.fml.relauncher.ReflectionHelper; +import flaxbeard.thaumicexploration.ThaumicExploration; + +public class TTIntegration { + + public static void registerEnchants() { + if (okVersion()) { + try { + EnchantmentManager.registerExponentialCostData(ThaumicExploration.enchantmentBinding, "thaumicexploration:textures/tabs/binding.png", false, new AspectList().add(Aspect.ENTROPY, 15).add(Aspect.ORDER, 15), "ENCHBINDING"); + EnchantmentManager.registerExponentialCostData(ThaumicExploration.enchantmentNightVision, "thaumicexploration:textures/tabs/nightvision.png", false, new AspectList().add(Aspect.ENTROPY, 20).add(Aspect.FIRE, 10).add(Aspect.ORDER, 20), "ENCHNIGHTVISION"); + EnchantmentManager.registerExponentialCostData(ThaumicExploration.enchantmentDisarm, "thaumicexploration:textures/tabs/disarm.png", false, new AspectList().add(Aspect.AIR, 12).add(Aspect.ORDER, 7).add(Aspect.ENTROPY, 7), "ENCHDISARM"); + } + catch (Exception e) { + Method m = ReflectionHelper.findMethod(EnchantmentManager.class, null, new String[] { "registerExponentialCostData" }, Enchantment.class, String.class, boolean.class, AspectList.class, String.class); + try { + m.invoke(null, ThaumicExploration.enchantmentBinding, "thaumicexploration:textures/tabs/binding.png", false, new AspectList().add(Aspect.ENTROPY, 15).add(Aspect.ORDER, 15), "ENCHBINDING"); + m.invoke(null, ThaumicExploration.enchantmentNightVision, "thaumicexploration:textures/tabs/nightvision.png", false, new AspectList().add(Aspect.ENTROPY, 20).add(Aspect.FIRE, 10).add(Aspect.ORDER, 20), "ENCHNIGHTVISION"); + m.invoke(null, ThaumicExploration.enchantmentDisarm, "thaumicexploration:textures/tabs/disarm.png", false, new AspectList().add(Aspect.AIR, 12).add(Aspect.ORDER, 7).add(Aspect.ENTROPY, 7), "ENCHDISARM"); + + } catch (Exception x) { + x.printStackTrace(); + } + } + + } + } + public static boolean canApplyTogether(Enchantment par1Enchantment, Enchantment par2Enchantment) { + if (par2Enchantment == ThaumicExploration.enchantmentBinding) + return !(par1Enchantment instanceof EnchantmentVampirism); + return true; + } + + public static boolean okVersion() { + String ver = LibMisc.VERSION.substring(LibMisc.VERSION.lastIndexOf("-") + 1); + int version = Integer.parseInt(ver); + System.out.println("!!!!!!!THAUMIC TINKERER VERSION: " + version + "!!!!!!!"); + return (version > 71); + } + + public static String keyRepairer() { + return LibResearch.KEY_REPAIRER; + } + + public static int getAscentLevel(EntityPlayer player) { + int boost = EnchantmentHelper.getMaxEnchantmentLevel(LibEnchantIDs.idAscentBoost, player.inventory.armorInventory); + return boost; + } + + public static String enchantCategory() { + return LibResearch.CATEGORY_ENCHANTING; + } + + public static String keyEnchanter() { + return LibResearch.KEY_ENCHANTER; + } + +} diff --git a/forge2/src/main/java/flaxbeard/thaumicexploration/item/ItemFoodTalisman.java b/forge2/src/main/java/flaxbeard/thaumicexploration/item/ItemFoodTalisman.java new file mode 100644 index 0000000..ad61835 --- /dev/null +++ b/forge2/src/main/java/flaxbeard/thaumicexploration/item/ItemFoodTalisman.java @@ -0,0 +1,133 @@ +package flaxbeard.thaumicexploration.item; + +import java.util.List; + +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; + +import net.minecraft.creativetab.CreativeTabs; +import net.minecraft.entity.Entity; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.item.Item; +import net.minecraft.item.ItemFood; +import net.minecraft.item.ItemStack; +import net.minecraft.nbt.NBTTagCompound; +import net.minecraft.world.World; +import flaxbeard.thaumicexploration.misc.FakePlayerPotion; + +public class ItemFoodTalisman extends Item { + + public ItemFoodTalisman(int par1) { + super(par1); + this.maxStackSize = 1; + this.setMaxDamage(100); + } + + @Override + @SideOnly(Side.CLIENT) + public void getSubItems(int itemID, CreativeTabs tab, + List itemList) { + itemList.add(new ItemStack(itemID,1,100)); + } + + @Override + public void addInformation(ItemStack par1ItemStack, EntityPlayer par2EntityPlayer, List par3List, boolean par4) { + if (!par1ItemStack.hasTagCompound()) { + par1ItemStack.setTagCompound(new NBTTagCompound()); + } + if (!par1ItemStack.stackTagCompound.hasKey("saturation")) { + par1ItemStack.stackTagCompound.setFloat("saturation", 0); + } + if (!par1ItemStack.stackTagCompound.hasKey("food")) { + par1ItemStack.stackTagCompound.setFloat("food", 0); + } + par3List.add("Currently holds " + (int)par1ItemStack.stackTagCompound.getFloat("food") + " food points and " + (int)par1ItemStack.stackTagCompound.getFloat("saturation") + " saturation points."); + //super.addInformation(par1ItemStack, par2EntityPlayer, par3List, par4); + } + + @Override + public void onUpdate(ItemStack par1ItemStack, World par2World, Entity par3Entity, int par4, boolean par5) { + + if (par3Entity instanceof EntityPlayer && !par2World.isRemote && par3Entity.ticksExisted % 20 == 0) { + EntityPlayer player = (EntityPlayer)par3Entity; + //System.out.println("Saturation is " + player.getFoodStats().getSaturationLevel()); + if (!par1ItemStack.hasTagCompound()) { + par1ItemStack.setTagCompound(new NBTTagCompound()); + } + if (!par1ItemStack.stackTagCompound.hasKey("saturation")) { + par1ItemStack.stackTagCompound.setFloat("saturation", 0); + } + if (!par1ItemStack.stackTagCompound.hasKey("food")) { + par1ItemStack.stackTagCompound.setFloat("food", 0); + } + for (int i = 0; i<10; i++) { + if (player.inventory.getStackInSlot(i) != null) { + ItemStack food = player.inventory.getStackInSlot(i); + //System.out.println("y"); + if (isEdible(food, player)) { + float sat = ((ItemFood)food.getItem()).getSaturationModifier() * 2; + + float heal = ((ItemFood)food.getItem()).getHealAmount(); + if (par1ItemStack.stackTagCompound.getFloat("food")+(int)heal < 100) { + if (par1ItemStack.stackTagCompound.getFloat("saturation") + sat <= 100) { + par1ItemStack.stackTagCompound.setFloat("saturation", par1ItemStack.stackTagCompound.getFloat("saturation") + sat); + } + else + { + par1ItemStack.stackTagCompound.setFloat("saturation", 100); + } + //System.out.println(foodBonus + "is the bonus"); + if (food.stackSize <= 1) { + player.inventory.setInventorySlotContents(i, null); + } + player.inventory.decrStackSize(i, 1); + + player.playSound("random.eat", 0.5F + 0.5F * (float)player.worldObj.rand.nextInt(2), (player.worldObj.rand.nextFloat() - player.worldObj.rand.nextFloat()) * 0.2F + 1.0F); + par1ItemStack.stackTagCompound.setFloat("food", par1ItemStack.stackTagCompound.getFloat("food")+(int)heal); + } + } + } + } + if ((player.getFoodStats().getFoodLevel() < 20) && (100-par1ItemStack.stackTagCompound.getFloat("food")) > 0) { + float sat = par1ItemStack.stackTagCompound.getFloat("food"); + float finalSat = 0; + if (20 - player.getFoodStats().getFoodLevel() < sat) { + finalSat = sat - (20 - player.getFoodStats().getFoodLevel()); + sat = 20 - player.getFoodStats().getFoodLevel(); + } + player.getFoodStats().setFoodLevel( (int) (player.getFoodStats().getFoodLevel() + sat)); + par1ItemStack.stackTagCompound.setFloat("food", finalSat); + par1ItemStack.setItemDamage(par1ItemStack.getItemDamage()); + } + if ((player.getFoodStats().getSaturationLevel() < player.getFoodStats().getFoodLevel()) && par1ItemStack.stackTagCompound.getFloat("saturation") > 0) { + float sat = par1ItemStack.stackTagCompound.getFloat("saturation"); + float finalSat = 0; + if (player.getFoodStats().getFoodLevel() - player.getFoodStats().getSaturationLevel() < sat) { + finalSat = sat - (player.getFoodStats().getFoodLevel() - player.getFoodStats().getSaturationLevel()); + sat = player.getFoodStats().getFoodLevel() - player.getFoodStats().getSaturationLevel(); + } + player.getFoodStats().setFoodSaturationLevel( player.getFoodStats().getSaturationLevel() + sat); + par1ItemStack.stackTagCompound.setFloat("saturation", finalSat); + par1ItemStack.setItemDamage(par1ItemStack.getItemDamage()); + } + } + } + + private boolean isEdible(ItemStack food, EntityPlayer player) { + if (food.getItem() instanceof ItemFood) { + + for (int i = 1; i < 25; i++) { + EntityPlayer fakePlayer = new FakePlayerPotion(player.worldObj, "foodTabletPlayer"); + fakePlayer.setPosition(0.0F, 999.0F, 0.0F); + ((ItemFood)food.getItem()).onEaten(food.copy(), player.worldObj, fakePlayer); + if (fakePlayer.getActivePotionEffects().size() > 0) { + return false; + } + } + + return true; + } + return false; + } + +} diff --git a/forge2/src/main/java/flaxbeard/thaumicexploration/item/ItemSkullCandle.java b/forge2/src/main/java/flaxbeard/thaumicexploration/item/ItemSkullCandle.java new file mode 100644 index 0000000..064d2a5 --- /dev/null +++ b/forge2/src/main/java/flaxbeard/thaumicexploration/item/ItemSkullCandle.java @@ -0,0 +1,184 @@ +package flaxbeard.thaumicexploration.item; + +import java.util.List; + +import net.minecraft.block.Block; +import net.minecraft.block.BlockSkull; +import net.minecraft.client.renderer.texture.IconRegister; +import net.minecraft.creativetab.CreativeTabs; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.item.Item; +import net.minecraft.item.ItemStack; +import net.minecraft.tileentity.TileEntity; +import net.minecraft.tileentity.TileEntitySkull; +import net.minecraft.util.Icon; +import net.minecraft.util.MathHelper; +import net.minecraft.util.StatCollector; +import net.minecraft.world.World; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; +import flaxbeard.thaumicexploration.ThaumicExploration; + +public class ItemSkullCandle extends Item +{ + private static final String[] skullTypes = new String[] {"skeleton", "wither", "zombie", "char", "creeper"}; + public static final String[] field_94587_a = new String[] {"skeleton", "wither", "zombie", "steve", "creeper"}; + @SideOnly(Side.CLIENT) + private Icon[] field_94586_c; + + public ItemSkullCandle(int par1) + { + super(par1); + this.setCreativeTab(CreativeTabs.tabDecorations); + this.setMaxDamage(0); + this.setHasSubtypes(true); + } + + /** + * Callback for item usage. If the item does something special on right clicking, he will have one of those. Return + * True if something happen and false if it don't. This is for ITEMS, not BLOCKS + */ + public boolean onItemUse(ItemStack par1ItemStack, EntityPlayer par2EntityPlayer, World par3World, int par4, int par5, int par6, int par7, float par8, float par9, float par10) + { + if (par7 == 0) + { + return false; + } + else if (!par3World.getBlockMaterial(par4, par5, par6).isSolid()) + { + return false; + } + else + { + if (par7 == 1) + { + ++par5; + } + + if (par7 == 2) + { + --par6; + } + + if (par7 == 3) + { + ++par6; + } + + if (par7 == 4) + { + --par4; + } + + if (par7 == 5) + { + ++par4; + } + if (!par2EntityPlayer.canPlayerEdit(par4, par5, par6, par7, par1ItemStack)) + { + return false; + } + else if (!par3World.doesBlockHaveSolidTopSurface(par4, par5-1, par6)) + { + return false; + } + else + { + par3World.setBlock(par4, par5, par6, ThaumicExploration.skullCandle.blockID, 1, 2); + int i1 = 0; + + if (par7 == 1) + { + i1 = MathHelper.floor_double((double)(par2EntityPlayer.rotationYaw * 16.0F / 360.0F) + 0.5D) & 15; + } + + TileEntity tileentity = par3World.getBlockTileEntity(par4, par5, par6); + + if (tileentity != null && tileentity instanceof TileEntitySkull) + { + String s = ""; + + if (par1ItemStack.hasTagCompound() && par1ItemStack.getTagCompound().hasKey("SkullOwner")) + { + s = par1ItemStack.getTagCompound().getString("SkullOwner"); + } + + ((TileEntitySkull)tileentity).setSkullType(par1ItemStack.getItemDamage(), s); + ((TileEntitySkull)tileentity).setSkullRotation(i1); + //((BlockSkullCandle)ThaumicExploration.skullCandle).makeWither(par3World, par4, par5, par6, (TileEntitySkull)tileentity); + } + + --par1ItemStack.stackSize; + return true; + } + } + } + + @SideOnly(Side.CLIENT) + + /** + * returns a list of items with the same ID, but different meta (eg: dye returns 16 items) + */ + public void getSubItems(int par1, CreativeTabs par2CreativeTabs, List par3List) + { + for (int j = 0; j < skullTypes.length; ++j) + { + par3List.add(new ItemStack(par1, 1, j)); + } + } + + /** + * Returns the metadata of the block which this Item (ItemBlock) can place + */ + public int getMetadata(int par1) + { + return par1; + } + + @SideOnly(Side.CLIENT) + + /** + * Gets an icon index based on an item's damage value + */ + public Icon getIconFromDamage(int par1) + { + if (par1 < 0 || par1 >= skullTypes.length) + { + par1 = 0; + } + + return this.field_94586_c[par1]; + } + + /** + * Returns the unlocalized name of this item. This version accepts an ItemStack so different stacks can have + * different names based on their damage or NBT. + */ + public String getUnlocalizedName(ItemStack par1ItemStack) + { + int i = par1ItemStack.getItemDamage(); + + if (i < 0 || i >= skullTypes.length) + { + i = 0; + } + + return super.getUnlocalizedName() + "." + skullTypes[i]; + } + + public String getItemDisplayName(ItemStack par1ItemStack) + { + return par1ItemStack.getItemDamage() == 3 && par1ItemStack.hasTagCompound() && par1ItemStack.getTagCompound().hasKey("SkullOwner") ? StatCollector.translateToLocalFormatted("item.skull.player.name", new Object[] {par1ItemStack.getTagCompound().getString("SkullOwner")}): super.getItemDisplayName(par1ItemStack); + } + + @SideOnly(Side.CLIENT) + public void registerIcons(IconRegister par1IconRegister) + { + this.field_94586_c = new Icon[field_94587_a.length]; + + for (int i = 0; i < field_94587_a.length; ++i) + { + this.field_94586_c[i] = par1IconRegister.registerIcon(this.getIconString() + "_" + field_94587_a[i]); + } + } +} diff --git a/forge2/src/main/java/flaxbeard/thaumicexploration/item/ItemTaintSeedFood.java b/forge2/src/main/java/flaxbeard/thaumicexploration/item/ItemTaintSeedFood.java new file mode 100644 index 0000000..52e557a --- /dev/null +++ b/forge2/src/main/java/flaxbeard/thaumicexploration/item/ItemTaintSeedFood.java @@ -0,0 +1,62 @@ +package flaxbeard.thaumicexploration.item; + +import flaxbeard.thaumicexploration.ThaumicExploration; +import thaumcraft.common.config.ConfigBlocks; +import thaumcraft.common.lib.world.ThaumcraftWorldGenerator; +import net.minecraft.block.Block; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.item.ItemSeedFood; +import net.minecraft.item.ItemStack; +import net.minecraft.world.World; +import net.minecraftforge.common.EnumPlantType; +import net.minecraftforge.common.ForgeDirection; +import net.minecraftforge.common.IPlantable; + +public class ItemTaintSeedFood extends ItemSeedFood implements IPlantable +{ + /** Block ID of the crop this seed food should place. */ + private int cropId; + + /** Block ID of the soil this seed food should be planted on. */ + private int soilId; + + public ItemTaintSeedFood(int par1, int par2, float par3, int par4, int par5) + { + super(par1, par2, par3, par4, par5); + } + + /** + * Callback for item usage. If the item does something special on right clicking, he will have one of those. Return + * True if something happen and false if it don't. This is for ITEMS, not BLOCKS + */ + @Override + public boolean onItemUse(ItemStack par1ItemStack, EntityPlayer par2EntityPlayer, World par3World, int par4, int par5, int par6, int par7, float par8, float par9, float par10) + { + if (par7 != 1) + { + System.out.println("IDK"); + return false; + } + else if (par2EntityPlayer.canPlayerEdit(par4, par5, par6, par7, par1ItemStack) && par2EntityPlayer.canPlayerEdit(par4, par5 + 1, par6, par7, par1ItemStack)) + { + int i1 = par3World.getBlockId(par4, par5, par6); + Block soil = Block.blocksList[i1]; + + if (soil != null && ((soil.blockID == Block.grass.blockID && par3World.getBiomeGenForCoords(par4, par6) == ThaumcraftWorldGenerator.biomeTaint) || (soil.blockID == ConfigBlocks.blockTaint.blockID && par3World.getBlockMetadata(par4, par5, par6) == 1)) && par3World.isAirBlock(par4, par5 + 1, par6)) + { + par3World.setBlock(par4, par5 + 1, par6, ThaumicExploration.taintBerryCrop.blockID); + --par1ItemStack.stackSize; + return true; + } + else + { + return false; + } + } + else + { + return false; + } + } + +} \ No newline at end of file diff --git a/forge2/src/main/java/flaxbeard/thaumicexploration/misc/FakePlayerPotion.java b/forge2/src/main/java/flaxbeard/thaumicexploration/misc/FakePlayerPotion.java new file mode 100644 index 0000000..37bfc02 --- /dev/null +++ b/forge2/src/main/java/flaxbeard/thaumicexploration/misc/FakePlayerPotion.java @@ -0,0 +1,25 @@ +package flaxbeard.thaumicexploration.misc; + +import net.minecraft.network.packet.Packet41EntityEffect; +import net.minecraft.potion.Potion; +import net.minecraft.potion.PotionEffect; +import net.minecraft.world.World; +import net.minecraftforge.common.FakePlayer; + +public class FakePlayerPotion extends FakePlayer { + + public FakePlayerPotion(World world, String name) { + super(world, name); + // TODO Auto-generated constructor stub + } + + @Override + protected void onNewPotionEffect(PotionEffect par1PotionEffect) + { + if (!this.worldObj.isRemote) + { + Potion.potionTypes[par1PotionEffect.getPotionID()].applyAttributesModifiersToEntity(this, this.getAttributeMap(), par1PotionEffect.getAmplifier()); + } + } + +} diff --git a/forge2/src/main/java/flaxbeard/thaumicexploration/misc/TXPotion.java b/forge2/src/main/java/flaxbeard/thaumicexploration/misc/TXPotion.java new file mode 100644 index 0000000..c51a6d6 --- /dev/null +++ b/forge2/src/main/java/flaxbeard/thaumicexploration/misc/TXPotion.java @@ -0,0 +1,27 @@ +package flaxbeard.thaumicexploration.misc; + +import net.minecraft.client.Minecraft; +import net.minecraft.potion.Potion; +import net.minecraft.util.ResourceLocation; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; + +public class TXPotion extends Potion { + public TXPotion(int par1, boolean par2, int par3) { + super(par1, par2, par3); + } + + public Potion setIconIndex(int par1, int par2) { + super.setIconIndex(par1, par2); + return this; + } + private static final ResourceLocation icon = new ResourceLocation("thaumicexploration:textures/tabs/binding.png"); + @Override + @SideOnly(Side.CLIENT) + public boolean hasStatusIcon() + { + Minecraft.getMinecraft().renderEngine.bindTexture(icon); + return true; + } + +} diff --git a/forge2/src/main/java/flaxbeard/thaumicexploration/misc/TXTaintPotion.java b/forge2/src/main/java/flaxbeard/thaumicexploration/misc/TXTaintPotion.java new file mode 100644 index 0000000..cf25fb1 --- /dev/null +++ b/forge2/src/main/java/flaxbeard/thaumicexploration/misc/TXTaintPotion.java @@ -0,0 +1,39 @@ +package flaxbeard.thaumicexploration.misc; + +import net.minecraft.entity.EntityLivingBase; +import net.minecraft.entity.player.EntityPlayer; +import thaumcraft.client.lib.UtilsFX; +import thaumcraft.common.items.PotionFluxTaint; +import thaumcraft.common.lib.world.ThaumcraftWorldGenerator; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; +import flaxbeard.thaumicexploration.ThaumicExploration; +import flaxbeard.thaumicexploration.event.DamageSourceTX; + +public class TXTaintPotion extends PotionFluxTaint { + + public TXTaintPotion(int par1, boolean par2, int par3) { + super(par1, par2, par3); + setIconIndex(0, 0); + } + + @SideOnly(Side.CLIENT) + public int getStatusIconIndex() + { + UtilsFX.bindTexture("textures/misc/potions.png"); + return super.getStatusIconIndex(); + } + + @Override + public void performEffect(EntityLivingBase target, int par2) + { + if (target.worldObj.getBiomeGenForCoords((int)target.posX, (int)target.posZ) == ThaumcraftWorldGenerator.biomeTaint) { + target.removePotionEffect(ThaumicExploration.potionTaintWithdrawl.id); + } + if ((!target.isEntityUndead()) && ((target.getMaxHealth() > 1.0F) || ((target instanceof EntityPlayer)))) { + target.attackEntityFrom(DamageSourceTX.noTaint, 1.0F); + } + } + + +} diff --git a/forge2/src/main/java/flaxbeard/thaumicexploration/misc/WorldGenTX.java b/forge2/src/main/java/flaxbeard/thaumicexploration/misc/WorldGenTX.java new file mode 100644 index 0000000..4d256b3 --- /dev/null +++ b/forge2/src/main/java/flaxbeard/thaumicexploration/misc/WorldGenTX.java @@ -0,0 +1,87 @@ +package flaxbeard.thaumicexploration.misc; + +import java.util.ArrayList; +import java.util.Collection; +import java.util.HashMap; +import java.util.Random; + +import net.minecraft.block.Block; +import net.minecraft.tileentity.TileEntity; +import net.minecraft.util.MathHelper; +import net.minecraft.world.ChunkPosition; +import net.minecraft.world.World; +import net.minecraft.world.WorldType; +import net.minecraft.world.biome.BiomeGenBase; +import net.minecraft.world.chunk.Chunk; +import net.minecraft.world.chunk.IChunkProvider; +import net.minecraft.world.gen.feature.MapGenScatteredFeature; +import net.minecraft.world.gen.feature.WorldGenMinable; +import net.minecraft.world.gen.feature.WorldGenerator; +import net.minecraftforge.common.BiomeDictionary; +import thaumcraft.api.aspects.Aspect; +import thaumcraft.api.aspects.AspectList; +import thaumcraft.api.nodes.NodeModifier; +import thaumcraft.api.nodes.NodeType; +import thaumcraft.common.config.Config; +import thaumcraft.common.config.ConfigBlocks; +import thaumcraft.common.lib.Utils; +import thaumcraft.common.lib.world.WorldGenCustomFlowers; +import thaumcraft.common.lib.world.WorldGenGreatwoodTrees; +import thaumcraft.common.lib.world.WorldGenHilltopStones; +import thaumcraft.common.lib.world.WorldGenMound; +import thaumcraft.common.lib.world.WorldGenSilverwoodTrees; +import thaumcraft.common.lib.world.biomes.BiomeGenEerie; +import thaumcraft.common.lib.world.biomes.BiomeGenMagicalForest; +import thaumcraft.common.lib.world.biomes.BiomeGenTaint; +import thaumcraft.common.lib.world.biomes.BiomeHandler; +import thaumcraft.common.tiles.TileNode; +import cpw.mods.fml.common.IWorldGenerator; +import cpw.mods.fml.common.registry.GameRegistry; + +public class WorldGenTX + implements IWorldGenerator +{ + public static BiomeGenBase biomeTaint; + public static BiomeGenBase biomeEerie; + public static BiomeGenBase biomeMagicalForest; + static Collection c = Aspect.aspects.values(); + static ArrayList basicAspects = new ArrayList(); + static ArrayList complexAspects = new ArrayList(); + + public void initialize() + { + + } + + public void generate(Random random, int chunkX, int chunkZ, World world, IChunkProvider chunkGenerator, IChunkProvider chunkProvider) + { + worldGeneration(random, chunkX, chunkZ, world, true); + } + + public void worldGeneration(Random random, int chunkX, int chunkZ, World world, boolean newGen) + { + switch (world.provider.dimensionId) + { + case -1: + break; + case 1: + break; + default: + generateSurface(world, random, chunkX, chunkZ, newGen); + } + if (!newGen) { + world.getChunkFromChunkCoords(chunkX, chunkZ).setChunkModified(); + } + } + + + + HashMap structureNode = new HashMap(); + + private void generateSurface(World world, Random random, int chunkX, int chunkZ, boolean newGen) + { + + } + + +} diff --git a/forge2/src/main/java/flaxbeard/thaumicexploration/research/ModRecipes.java b/forge2/src/main/java/flaxbeard/thaumicexploration/research/ModRecipes.java index 6033c3a..075180b 100644 --- a/forge2/src/main/java/flaxbeard/thaumicexploration/research/ModRecipes.java +++ b/forge2/src/main/java/flaxbeard/thaumicexploration/research/ModRecipes.java @@ -4,6 +4,7 @@ import java.util.List; import net.minecraft.block.Block; +import net.minecraft.enchantment.Enchantment; import net.minecraft.item.Item; import net.minecraft.item.ItemStack; import net.minecraft.item.crafting.CraftingManager; @@ -12,6 +13,7 @@ import thaumcraft.api.aspects.Aspect; import thaumcraft.api.aspects.AspectList; import thaumcraft.api.crafting.CrucibleRecipe; +import thaumcraft.api.crafting.InfusionEnchantmentRecipe; import thaumcraft.api.crafting.InfusionRecipe; import thaumcraft.api.crafting.ShapedArcaneRecipe; import thaumcraft.common.config.ConfigBlocks; @@ -72,6 +74,11 @@ private static void initInfusionRecipes() { new ItemStack(ConfigItems.itemResource, 1,5), new ItemStack(Item.potion,1, 16456), new ItemStack(Item.appleGold), new ItemStack(Item.bucketWater)); + registerResearchItemI("BRAINCURE","BRAINCUREALT5", new ItemStack(ThaumicExploration.pureZombieBrain), 3, + new AspectList().add(Aspect.MAN, 4).add(Aspect.MIND, 6).add(Aspect.HEAL, 2), + new ItemStack(ConfigItems.itemResource, 1,5), + new ItemStack(Item.potion,1, 8200), new ItemStack(Item.appleGold), + new ItemStack(Item.bucketWater)); registerResearchItemI("WANDAMBER", new ItemStack(ThaumicExploration.amberCore), 5, new AspectList().add(Aspect.MAGIC, 14).add(Aspect.AURA, 4).add(Aspect.TRAP, 6), @@ -85,31 +92,56 @@ private static void initInfusionRecipes() { new ItemStack(Item.bone), new ItemStack(Item.ghastTear), new ItemStack(Block.slowSand), new ItemStack(ConfigBlocks.blockMetalDevice,1,1)); - for (int i = 0; i<16; i++) { - registerResearchItemI("CHESTSEAL", new ItemStack(ThaumicExploration.chestSeal, 1, i), 7, - new AspectList().add(Aspect.ELDRITCH, 6).add(Aspect.EXCHANGE,4).add(Aspect.VOID, 4).add(Aspect.TRAP, 4).add(Aspect.TRAVEL, 12), - new ItemStack(ThaumicExploration.blankSeal, 1, i), new ItemStack(Item.enderPearl), - new ItemStack(ConfigItems.itemResource,1,14), new ItemStack(ConfigItems.itemResource,1,14), - new ItemStack(Item.blazePowder), new ItemStack(Block.chest), new ItemStack(ConfigItems.itemResource,1,3)); - } +// for (int i = 0; i<16; i++) { +// registerResearchItemI("CHESTSEAL", new ItemStack(ThaumicExploration.chestSeal, 1, i), 7, +// new AspectList().add(Aspect.ELDRITCH, 6).add(Aspect.EXCHANGE,4).add(Aspect.VOID, 4).add(Aspect.TRAP, 4).add(Aspect.TRAVEL, 12), +// new ItemStack(ThaumicExploration.blankSeal, 1, i), new ItemStack(Item.enderPearl), +// new ItemStack(ConfigItems.itemResource,1,14), new ItemStack(ConfigItems.itemResource,1,14), +// new ItemStack(Item.blazePowder), new ItemStack(Block.chest), new ItemStack(ConfigItems.itemResource,1,3)); +// } registerResearchItemI("METEORBOOTS", new ItemStack(ThaumicExploration.bootsMeteor), 4, - new AspectList().add(Aspect.FIRE, 25).add(Aspect.ENERGY, 25), + new AspectList().add(Aspect.FIRE, 25).add(Aspect.ENERGY, 25).add(Aspect.TRAVEL, 25).add(Aspect.FLIGHT,25), new ItemStack(ConfigItems.itemBootsTraveller), new ItemStack(ConfigBlocks.blockCrystal, 1, 1), new ItemStack(Block.netherrack), new ItemStack(Block.netherrack), new ItemStack(Block.netherrack), new ItemStack(ConfigItems.itemFocusFire)); + registerResearchItemIE("ENCHBINDING","ENCHBINDING", Enchantment.enchantmentsList[ThaumicExploration.enchantmentBinding.effectId], 3, + new AspectList().add(Aspect.TRAP, 8).add(Aspect.ENTROPY, 4).add(Aspect.TRAVEL, 4), + new ItemStack(Item.swordIron), new ItemStack(ConfigItems.itemResource, 1, 14), new ItemStack(Block.slowSand)); + + registerResearchItemIE("ENCHDISARM","ENCHDISARM", Enchantment.enchantmentsList[ThaumicExploration.enchantmentDisarm.effectId], 5, + new AspectList().add(Aspect.WEAPON, 4).add(Aspect.SLIME, 8).add(Aspect.TRAP, 4), + new ItemStack(Item.swordIron), new ItemStack(ConfigItems.itemResource, 1, 14), new ItemStack(Item.slimeBall)); + + registerResearchItemIE("ENCHNIGHTVISION","ENCHNIGHTVISION", Enchantment.enchantmentsList[ThaumicExploration.enchantmentNightVision.effectId], 5, + new AspectList().add(Aspect.SENSES, 16).add(Aspect.DARKNESS, 8).add(Aspect.LIGHT, 16), + new ItemStack(Item.goldenCarrot), new ItemStack(ConfigItems.itemResource, 1, 14), new ItemStack(Item.goldenCarrot)); + + registerResearchItemI("TALISMANFOOD", new ItemStack(ThaumicExploration.talismanFood), 5, + new AspectList().add(Aspect.HUNGER, 30).add(Aspect.FLESH, 25).add(Aspect.CROP, 25).add(Aspect.EXCHANGE,10), + new ItemStack(Item.diamond), new ItemStack(Block.obsidian), + new ItemStack(Item.beefCooked), new ItemStack(Item.chickenCooked), + new ItemStack(Item.porkCooked), new ItemStack(Item.fishCooked), new ItemStack(Item.bread)); + + registerResearchItemI("REPLICATOR", new ItemStack(ThaumicExploration.replicator), 9, + new AspectList().add(Aspect.CRAFT, 50).add(Aspect.MECHANISM, 30).add(Aspect.TOOL, 30).add(Aspect.ORDER,20), + new ItemStack(ConfigBlocks.blockStoneDevice,1,2), new ItemStack(ConfigBlocks.blockTable,1,15), new ItemStack(Item.ingotGold), + new ItemStack(ConfigItems.itemResource,1,2), new ItemStack(Item.ingotGold), + new ItemStack(ConfigItems.itemResource,1,2), new ItemStack(Item.ingotGold), + new ItemStack(ConfigItems.itemResource,1,2)); + registerResearchItemI("COMETBOOTS", new ItemStack(ThaumicExploration.bootsComet), 4, - new AspectList().add(Aspect.WATER, 25).add(Aspect.ICE, 25), + new AspectList().add(Aspect.WATER, 25).add(Aspect.ICE, 25).add(Aspect.TRAVEL, 25).add(Aspect.MOTION,25), new ItemStack(ConfigItems.itemBootsTraveller), new ItemStack(ConfigBlocks.blockCrystal, 1, 2), new ItemStack(Block.blockSnow), new ItemStack(Block.blockSnow), new ItemStack(Block.blockSnow), new ItemStack(ConfigItems.itemFocusFrost)); - registerResearchItemI("CHESTSEAL", new ItemStack(ThaumicExploration.chestSeal, 1, 32767), 7, - new AspectList().add(Aspect.ELDRITCH, 6).add(Aspect.EXCHANGE,4).add(Aspect.VOID, 4).add(Aspect.TRAP, 4).add(Aspect.TRAVEL, 12), - new ItemStack(ThaumicExploration.blankSeal, 1, 32767), new ItemStack(Item.enderPearl), - new ItemStack(ConfigItems.itemResource,1,14), new ItemStack(ConfigItems.itemResource,1,14), - new ItemStack(Item.blazePowder), new ItemStack(Block.chest), new ItemStack(ConfigItems.itemResource,1,3)); +// registerResearchItemI("CHESTSEAL", new ItemStack(ThaumicExploration.chestSeal, 1, 32767), 7, +// new AspectList().add(Aspect.ELDRITCH, 6).add(Aspect.EXCHANGE,4).add(Aspect.VOID, 4).add(Aspect.TRAP, 4).add(Aspect.TRAVEL, 12), +// new ItemStack(ThaumicExploration.blankSeal, 1, 32767), new ItemStack(Item.enderPearl), +// new ItemStack(ConfigItems.itemResource,1,14), new ItemStack(ConfigItems.itemResource,1,14), +// new ItemStack(Item.blazePowder),new ItemStack(Block.chest), new ItemStack(ConfigItems.itemResource,1,3)); registerResearchItemI("THINKTANK", new ItemStack(ThaumicExploration.thinkTankJar), 6, new AspectList().add(Aspect.MIND, 40).add(Aspect.SENSES, 20).add(Aspect.UNDEAD, 30), @@ -124,26 +156,28 @@ private static void initInfusionRecipes() { new ItemStack(Item.brick),new ItemStack(Item.bucketWater), new ItemStack(Item.brick) ); - for (int i = 0; i<16; i++) { - registerResearchItemI("JARSEAL", new ItemStack(ThaumicExploration.jarSeal, 1, i), 7, - new AspectList().add(Aspect.ELDRITCH, 6).add(Aspect.EXCHANGE,4).add(Aspect.TRAP, 4).add(Aspect.TRAVEL, 12).add(Aspect.MAGIC, 2), - new ItemStack(ThaumicExploration.blankSeal, 1, i), new ItemStack(Item.enderPearl), - new ItemStack(ConfigItems.itemResource,1,14), new ItemStack(ConfigItems.itemResource,1,14), - new ItemStack(Item.blazePowder), new ItemStack(ConfigBlocks.blockJar), new ItemStack(ConfigItems.itemResource,1,3)); - } - registerResearchItemI("JARSEAL", new ItemStack(ThaumicExploration.jarSeal, 1, 32767), 7, - new AspectList().add(Aspect.ELDRITCH, 6).add(Aspect.EXCHANGE,4).add(Aspect.TRAP, 4).add(Aspect.TRAVEL, 12).add(Aspect.MAGIC, 2), - new ItemStack(ThaumicExploration.blankSeal, 1, 32767), new ItemStack(Item.enderPearl), - new ItemStack(ConfigItems.itemResource,1,14), new ItemStack(ConfigItems.itemResource,1,14), - new ItemStack(Item.blazePowder), new ItemStack(ConfigBlocks.blockJar), new ItemStack(ConfigItems.itemResource,1,3)); - +// for (int i = 0; i<16; i++) { +// registerResearchItemI("JARSEAL", new ItemStack(ThaumicExploration.jarSeal, 1, i), 7, +// new AspectList().add(Aspect.ELDRITCH, 6).add(Aspect.EXCHANGE,4).add(Aspect.TRAP, 4).add(Aspect.TRAVEL, 12).add(Aspect.MAGIC, 2), +// new ItemStack(ThaumicExploration.blankSeal, 1, i), new ItemStack(Item.enderPearl), +// new ItemStack(ConfigItems.itemResource,1,14), new ItemStack(ConfigItems.itemResource,1,14), +// new ItemStack(Item.blazePowder), new ItemStack(ConfigBlocks.blockJar), new ItemStack(ConfigItems.itemResource,1,3)); +// } +// registerResearchItemI("JARSEAL", new ItemStack(ThaumicExploration.jarSeal, 1, 32767), 7, +// new AspectList().add(Aspect.ELDRITCH, 6).add(Aspect.EXCHANGE,4).add(Aspect.TRAP, 4).add(Aspect.TRAVEL, 12).add(Aspect.MAGIC, 2), +// new ItemStack(ThaumicExploration.blankSeal, 1, 32767), new ItemStack(Item.enderPearl), +// new ItemStack(ConfigItems.itemResource,1,14), new ItemStack(ConfigItems.itemResource,1,14), +// new ItemStack(Item.blazePowder), new ItemStack(ConfigBlocks.blockJar), new ItemStack(ConfigItems.itemResource,1,3)); +// //Change Advanced golem recipe to require a pure brain - InfusionRecipe recipe = (InfusionRecipe) ConfigResearch.recipes.get("AdvancedGolem"); - ConfigResearch.recipes.remove(ConfigResearch.recipes.get("AdvancedGolem")); - ItemStack[] components = {new ItemStack(Item.redstone), new ItemStack(Item.glowstone), new ItemStack(Item.gunpowder), new ItemStack(ConfigBlocks.blockJar, 1, 0), new ItemStack(ThaumicExploration.pureZombieBrain) }; - recipe.components = components; - InfusionRecipe recipe2 = ThaumcraftApi.addInfusionCraftingRecipe("ADVANCEDGOLEM", recipe.recipeOutput, recipe.instability, recipe.aspects, recipe.recipeInput, recipe.components); - ConfigResearch.recipes.put("AdvancedGolem", recipe2); + if (ThaumicExploration.brainsGolem) { + InfusionRecipe recipe = (InfusionRecipe) ConfigResearch.recipes.get("AdvancedGolem"); + ConfigResearch.recipes.remove(ConfigResearch.recipes.get("AdvancedGolem")); + ItemStack[] components = {new ItemStack(Item.redstone), new ItemStack(Item.glowstone), new ItemStack(Item.gunpowder), new ItemStack(ConfigBlocks.blockJar, 1, 0), new ItemStack(ThaumicExploration.pureZombieBrain) }; + recipe.components = components; + InfusionRecipe recipe2 = ThaumcraftApi.addInfusionCraftingRecipe("ADVANCEDGOLEM", recipe.recipeOutput, recipe.instability, recipe.aspects, recipe.recipeInput, recipe.components); + ConfigResearch.recipes.put("AdvancedGolem", recipe2); + } } private static void initArcaneRecipes() { @@ -154,6 +188,13 @@ private static void initArcaneRecipes() { 'P', new ItemStack(ConfigBlocks.blockWoodenDevice,1,6), 'S', new ItemStack(ConfigItems.itemResource,1, 12), 'F', new ItemStack(Item.feather)); + + registerResearchItem("DREAMCATCHER", "DREAMCATCHER", new ItemStack(ThaumicExploration.charmNoTaint), new AspectList().add(Aspect.ORDER, 15).add(Aspect.ENTROPY, 15), + "GPG", "PSP", "FPF", + 'G', "gooTaint", + 'P', new ItemStack(ConfigBlocks.blockWoodenDevice,1,6), + 'S', new ItemStack(ConfigItems.itemResource,1, 12), + 'F', "tendrilTaint"); } private static void initCraftingRecipes() { @@ -167,8 +208,17 @@ private static void initCraftingRecipes() { private static void initCrucibleRecipes() { registerCrucibleRecipe("FLESHCURE","FLESHCURE", new ItemStack(Item.leather,2), new ItemStack(Item.rottenFlesh), new AspectList().add(Aspect.FLESH, 2).add(Aspect.CLOTH, 1)); + for (int i = 0; i<16; i++) { + registerCrucibleRecipe("CHESTSEAL","CHESTSEAL", new ItemStack(ThaumicExploration.chestSeal,1,i), new ItemStack(ThaumicExploration.blankSeal,1,i), + new AspectList().add(Aspect.ELDRITCH, 6).add(Aspect.EXCHANGE,4).add(Aspect.VOID, 4).add(Aspect.TRAP, 4).add(Aspect.TRAVEL, 12)); + } - + for (int i = 0; i<16; i++) { + registerCrucibleRecipe("JARSEAL","JARSEAL", new ItemStack(ThaumicExploration.jarSeal,1,i), new ItemStack(ThaumicExploration.blankSeal,1,i), + new AspectList().add(Aspect.ELDRITCH, 6).add(Aspect.EXCHANGE,4).add(Aspect.CRYSTAL, 4).add(Aspect.TRAP, 4).add(Aspect.TRAVEL, 12)); + } + //registerCrucibleRecipe("CHESTSEAL","CHESTSEAL", new ItemStack(ThaumicExploration.chestSeal,1,1), new ItemStack(ThaumicExploration.blankSeal,1,32767), + //new AspectList().add(Aspect.ELDRITCH, 6).add(Aspect.EXCHANGE,4).add(Aspect.VOID, 4).add(Aspect.TRAP, 4).add(Aspect.TRAVEL, 12)); } private static void registerResearchItem(String name, String research, ItemStack output, AspectList aspects, Object... stuff) { @@ -201,6 +251,11 @@ private static void registerResearchItemI(String name, String research, Object o ConfigResearch.recipes.put(research, recipe); } + private static void registerResearchItemIE(String name, String research, Enchantment output, int instability, AspectList aspects, ItemStack... stuff) { + InfusionEnchantmentRecipe recipe = ThaumcraftApi.addInfusionEnchantmentRecipe(name, output, instability, aspects, stuff); + ConfigResearch.recipes.put(research, recipe); + } + private static void registerResearchItemC(String string, List asList) { ConfigResearch.recipes.put(string, asList); diff --git a/forge2/src/main/java/flaxbeard/thaumicexploration/research/ModResearch.java b/forge2/src/main/java/flaxbeard/thaumicexploration/research/ModResearch.java index efd1766..95f2f89 100644 --- a/forge2/src/main/java/flaxbeard/thaumicexploration/research/ModResearch.java +++ b/forge2/src/main/java/flaxbeard/thaumicexploration/research/ModResearch.java @@ -10,6 +10,7 @@ import thaumcraft.api.aspects.AspectList; import thaumcraft.api.crafting.CrucibleRecipe; import thaumcraft.api.crafting.IArcaneRecipe; +import thaumcraft.api.crafting.InfusionEnchantmentRecipe; import thaumcraft.api.crafting.InfusionRecipe; import thaumcraft.api.research.ResearchCategories; import thaumcraft.api.research.ResearchItem; @@ -18,6 +19,7 @@ import thaumcraft.common.config.ConfigResearch; import cpw.mods.fml.common.Loader; import flaxbeard.thaumicexploration.ThaumicExploration; +import flaxbeard.thaumicexploration.integration.TTIntegration; public final class ModResearch { @@ -25,11 +27,7 @@ public static void initResearch() { registerResearchPages(); ResearchItem research; -// research = new TXResearchItem("THAUMATURGE", "ARTIFICE", new AspectList(), -4, 11, 0, new ItemStack(ThaumicExploration.blankSeal)).setAutoUnlock().setVirtual().registerResearchItem(); -// research = new TXResearchItem("TAINTURGE", "ARTIFICE", new AspectList(), -4, 11, 0, new ItemStack(ThaumicExploration.blankSeal)).setVirtual().registerResearchItem(); -// research = new TXResearchItem("TAINTURGE2", "ARTIFICE", new AspectList(), -4, 0, 2, new ItemStack(Item.rottenFlesh)).setParentsHidden("TAINTURGE").setAutoUnlock().setHidden().registerResearchItem(); - ResearchCategories.researchCategories.get("ARTIFICE").research.get("ENCHFABRIC").setParentsHidden("THAUMATURGE"); - ResearchCategories.researchCategories.get("GOLEMANCY").research.get("HUNGRYCHEST").setParentsHidden("THAUMATURGE"); + //Curing research = new TXResearchItem("FLESHCURE", "ALCHEMY", new AspectList().add(Aspect.ARMOR, 1).add(Aspect.FLESH, 2).add(Aspect.EXCHANGE, 1), -4, 0, 2, new ItemStack(Item.rottenFlesh)).setParents("TALLOW").setConcealed().registerResearchItem(); @@ -37,35 +35,63 @@ public static void initResearch() { if (Loader.isModLoaded("ThaumicTinkerer")) { research = new TXResearchItem("BRAINCURE", "ARTIFICE", new AspectList().add(Aspect.MIND, 2).add(Aspect.ORDER, 1).add(Aspect.MAN, 1).add(Aspect.UNDEAD, 1), -4, 10, 4, new ItemStack(ThaumicExploration.pureZombieBrain)).setParents("JARBRAIN","FLESHCURE","INFUSION").setConcealed().registerResearchItem(); research.setPages(new ResearchPage("1"), infusionPage("BRAINCURE")); - research = new TXResearchItem("THINKTANK", "ARTIFICE", new AspectList().add(Aspect.UNDEAD, 1).add(Aspect.MIND, 2).add(Aspect.SENSES, 1), -3, 12, 5, new ItemStack(ThaumicExploration.thinkTankJar)).setParents("BRAINCURE","RESEARCHER2").setParentsHidden("INFUSION").setConcealed().registerResearchItem(); - research.setPages(new ResearchPage("1"), infusionPage("THINKTANK"), new ResearchPage("2"), constructPage("BUILDTHINKTANK")); + if (ThaumicExploration.allowThinkTank) { + research = new TXResearchItem("THINKTANK", "ARTIFICE", new AspectList().add(Aspect.UNDEAD, 1).add(Aspect.MIND, 2).add(Aspect.SENSES, 1), -3, 12, 5, new ItemStack(ThaumicExploration.thinkTankJar)).setParents("BRAINCURE","RESEARCHER2").setParentsHidden("INFUSION").setConcealed().registerResearchItem(); + research.setPages(new ResearchPage("1"), infusionPage("THINKTANK"), new ResearchPage("2"), constructPage("BUILDTHINKTANK")); + } } else { research = new TXResearchItem("BRAINCURE", "ARTIFICE", new AspectList().add(Aspect.MIND, 2).add(Aspect.ORDER, 1).add(Aspect.MAN, 1).add(Aspect.UNDEAD, 1), -3, 10, 4, new ItemStack(ThaumicExploration.pureZombieBrain)).setParents("JARBRAIN","FLESHCURE").setParentsHidden("INFUSION").setConcealed().registerResearchItem(); research.setPages(new ResearchPage("1"),infusionPage("BRAINCURE") ); - research = new TXResearchItem("THINKTANK", "ARTIFICE", new AspectList().add(Aspect.UNDEAD, 1).add(Aspect.MIND, 2).add(Aspect.SENSES, 1), -2, 12, 5, new ItemStack(ThaumicExploration.thinkTankJar)).setParents("BRAINCURE","RESEARCHER2").setParentsHidden("INFUSION").setConcealed().registerResearchItem(); - research.setPages(new ResearchPage("1"), infusionPage("THINKTANK"), new ResearchPage("2"), constructPage("BUILDTHINKTANK")); + if (ThaumicExploration.allowThinkTank) { + research = new TXResearchItem("THINKTANK", "ARTIFICE", new AspectList().add(Aspect.UNDEAD, 1).add(Aspect.MIND, 2).add(Aspect.SENSES, 1), -2, 12, 5, new ItemStack(ThaumicExploration.thinkTankJar)).setParents("BRAINCURE","RESEARCHER2").setParentsHidden("INFUSION").setConcealed().registerResearchItem(); + research.setPages(new ResearchPage("1"), infusionPage("THINKTANK"), new ResearchPage("2"), constructPage("BUILDTHINKTANK")); + } } //Misc - if (Loader.isModLoaded("ThaumicTinkerer")) { - research = new TXResearchItem("URN", "ARTIFICE", new AspectList().add(Aspect.MAGIC, 1).add(Aspect.VOID, 1).add(Aspect.WATER, 2), -7,9 , 3, new ItemStack(ThaumicExploration.everfullUrn)).setParents("INFUSION").setParentsHidden("ARCANEEAR").setConcealed().registerResearchItem(); - research.setPages(new ResearchPage("1"), infusionPage("URN") ); + if (ThaumicExploration.allowUrn) { + if (Loader.isModLoaded("ThaumicTinkerer")) { + research = new TXResearchItem("URN", "ARTIFICE", new AspectList().add(Aspect.MAGIC, 1).add(Aspect.VOID, 1).add(Aspect.WATER, 2), -7,9 , 3, new ItemStack(ThaumicExploration.everfullUrn)).setParents("INFUSION").setParentsHidden("ARCANEEAR").setConcealed().registerResearchItem(); + research.setPages(new ResearchPage("1"), infusionPage("URN") ); + } + else + { + research = new TXResearchItem("URN", "ARTIFICE", new AspectList().add(Aspect.MAGIC, 1).add(Aspect.VOID, 1).add(Aspect.WATER, 2), -2,3 , 3, new ItemStack(ThaumicExploration.everfullUrn)).setParents("INFUSION").setParentsHidden("ARCANEEAR").setConcealed().registerResearchItem(); + research.setPages(new ResearchPage("1"), infusionPage("URN") ); + } + } + + if (ThaumicExploration.allowReplication) { + if (Loader.isModLoaded("ThaumicTinkerer")) { + research = new TXResearchItem("REPLICATOR", "ALCHEMY", new AspectList().add(Aspect.CRAFT, 2).add(Aspect.MECHANISM, 1).add(Aspect.ORDER, 1), 5,4 , 5, new ItemStack(ThaumicExploration.replicator)).setParents(TTIntegration.keyRepairer()).setParentsHidden("INFUSION").setConcealed().registerResearchItem(); + research.setPages(new ResearchPage("1"), new ResearchPage("2"), infusionPage("REPLICATOR") ); + } + else + { + research = new TXResearchItem("REPLICATOR", "ALCHEMY", new AspectList().add(Aspect.CRAFT, 2).add(Aspect.MECHANISM, 1).add(Aspect.ORDER, 1), 6,2 , 5, new ItemStack(ThaumicExploration.replicator)).setParents("TUBES").setParentsHidden("INFUSION").setConcealed().registerResearchItem(); + research.setPages(new ResearchPage("1"), new ResearchPage("2"), infusionPage("REPLICATOR") ); + } + } - else - { - research = new TXResearchItem("URN", "ARTIFICE", new AspectList().add(Aspect.MAGIC, 1).add(Aspect.VOID, 1).add(Aspect.WATER, 2), -2,3 , 3, new ItemStack(ThaumicExploration.everfullUrn)).setParents("INFUSION").setParentsHidden("ARCANEEAR").setConcealed().registerResearchItem(); - research.setPages(new ResearchPage("1"), infusionPage("URN") ); + + if (ThaumicExploration.allowCrucSouls) { + research = new TXResearchItem("CRUCSOULS", "ALCHEMY", new AspectList().add(Aspect.DEATH, 2).add(Aspect.HUNGER, 1).add(Aspect.SOUL, 1), 5,1 , 5, new ItemStack(ThaumicExploration.crucibleSouls)).setParents("DISTILESSENTIA").setParentsHidden("BRAINCURE","INFUSION").setConcealed().registerResearchItem(); + research.setPages(new ResearchPage("1"), new ResearchPage("2"), infusionPage("CRUCSOULS") ); + } + if (ThaumicExploration.allowFood) { + research = new TXResearchItem("TALISMANFOOD", "ARTIFICE", new AspectList().add(Aspect.HUNGER, 2).add(Aspect.FLESH, 1).add(Aspect.CROP, 1), -7,1 , 3, new ItemStack(ThaumicExploration.talismanFood)).setParents("INFUSION","TALLOW").setConcealed().registerResearchItem(); + research.setPages(new ResearchPage("1"), infusionPage("TALISMANFOOD")); } - research = new TXResearchItem("CRUCSOULS", "ALCHEMY", new AspectList().add(Aspect.DEATH, 2).add(Aspect.HUNGER, 1).add(Aspect.SOUL, 1), 5,1 , 5, new ItemStack(ThaumicExploration.crucibleSouls)).setParents("DISTILESSENTIA").setParentsHidden("BRAINCURE","INFUSION").setConcealed().registerResearchItem(); - research.setPages(new ResearchPage("1"), new ResearchPage("2"), infusionPage("CRUCSOULS") ); - - research = new TXResearchItem("METEORBOOTS", "ARTIFICE", new AspectList().add(Aspect.FIRE, 2).add(Aspect.ENERGY, 1).add(Aspect.TRAVEL, 1).add(Aspect.FLIGHT, 1), 1,8 , 4, new ItemStack(ThaumicExploration.bootsMeteor)).setParents("BOOTSTRAVELLER","FOCUSFIRE").setParentsHidden("INFUSION").setConcealed().registerResearchItem(); - research.setPages(new ResearchPage("1"), infusionPage("METEORBOOTS")); - research = new TXResearchItem("COMETBOOTS", "ARTIFICE", new AspectList().add(Aspect.WATER, 1).add(Aspect.ICE, 2).add(Aspect.TRAVEL, 1).add(Aspect.MOTION, 1), 3,7 , 4, new ItemStack(ThaumicExploration.bootsComet)).setParents("BOOTSTRAVELLER","FOCUSFROST").setParentsHidden("INFUSION").setConcealed().registerResearchItem(); - research.setPages(new ResearchPage("1"), infusionPage("COMETBOOTS")); + if (ThaumicExploration.allowBoots) { + research = new TXResearchItem("METEORBOOTS", "ARTIFICE", new AspectList().add(Aspect.FIRE, 2).add(Aspect.ENERGY, 1).add(Aspect.TRAVEL, 1).add(Aspect.FLIGHT, 1), 1,8 , 4, new ItemStack(ThaumicExploration.bootsMeteor)).setParents("BOOTSTRAVELLER","FOCUSFIRE").setParentsHidden("INFUSION").setConcealed().registerResearchItem(); + research.setPages(new ResearchPage("1"), infusionPage("METEORBOOTS")); + + research = new TXResearchItem("COMETBOOTS", "ARTIFICE", new AspectList().add(Aspect.WATER, 1).add(Aspect.ICE, 2).add(Aspect.TRAVEL, 1).add(Aspect.MOTION, 1), 3,7 , 4, new ItemStack(ThaumicExploration.bootsComet)).setParents("BOOTSTRAVELLER","FOCUSFROST").setParentsHidden("INFUSION").setConcealed().registerResearchItem(); + research.setPages(new ResearchPage("1"), infusionPage("COMETBOOTS")); + } //Taintiturgy ResourceLocation taint = new ResourceLocation("thaumicexploration:textures/tabs/taintResearch2.png"); @@ -74,9 +100,35 @@ public static void initResearch() { research = new TXResearchItem("DREAMCATCHER", "TAINT", new AspectList().add(Aspect.MIND, 1).add(Aspect.TOOL, 1).add(Aspect.TAINT, 2), 2,2 , 3, new ItemStack(ThaumicExploration.charmNoTaint)).setParents("TAINTBASICS").setConcealed().registerResearchItem(); research.setPages(new ResearchPage("1"), arcaneRecipePage("DREAMCATCHER")); - ResearchCategories.researchCategories.get("ALCHEMY").research.remove("ETHEREALBLOOM"); - research = new ResearchItem("ETHEREALBLOOM", "TAINT", new AspectList().add(Aspect.MAGIC, 1).add(Aspect.PLANT, 2).add(Aspect.HEAL, 1).add(Aspect.TAINT, 1), -2,2, 4, new ItemStack(Config.blockCustomPlantId, 1, 4)).setPages(new ResearchPage[] { new ResearchPage("tc.research_page.ETHEREALBLOOM.1"), new ResearchPage((CrucibleRecipe)ConfigResearch.recipes.get("EtherealBloom")), new ResearchPage("tc.research_page.ETHEREALBLOOM.2") }).setConcealed().setParents(new String[] { "CRUCIBLE", "INFUSION", "TAINTBASICS" }).registerResearchItem(); - + if (ThaumicExploration.taintBloom) { + ResearchCategories.researchCategories.get("ALCHEMY").research.remove("ETHEREALBLOOM"); + research = new ResearchItem("ETHEREALBLOOM", "TAINT", new AspectList().add(Aspect.MAGIC, 1).add(Aspect.PLANT, 2).add(Aspect.HEAL, 1).add(Aspect.TAINT, 1), -2,2, 4, new ItemStack(Config.blockCustomPlantId, 1, 4)).setPages(new ResearchPage[] { new ResearchPage("tc.research_page.ETHEREALBLOOM.1"), new ResearchPage((CrucibleRecipe)ConfigResearch.recipes.get("EtherealBloom")), new ResearchPage("tc.research_page.ETHEREALBLOOM.2") }).setConcealed().setParents(new String[] { "CRUCIBLE", "INFUSION", "TAINTBASICS" }).registerResearchItem(); + } + + if (Loader.isModLoaded("ThaumicTinkerer")) { + research = new TXResearchItem("ENCHBINDING", TTIntegration.enchantCategory(), new AspectList().add(Aspect.TRAP, 2).add(Aspect.ENTROPY, 1).add(Aspect.TRAVEL, 1), 6, -1, 2, new ResourceLocation("thaumicexploration:textures/tabs/binding.png")).setParents(TTIntegration.keyEnchanter()).setConcealed().registerResearchItem(); + research.setPages(new ResearchPage("1"), infusionEnchantPage("ENCHBINDING")); + research = new TXResearchItem("ENCHNIGHTVISION", TTIntegration.enchantCategory(), new AspectList().add(Aspect.SENSES, 2).add(Aspect.DARKNESS, 1).add(Aspect.LIGHT, 1), 5, 1, 2, new ResourceLocation("thaumicexploration:textures/tabs/nightVision.png")).setParents(TTIntegration.keyEnchanter()).setConcealed().registerResearchItem(); + research.setPages(new ResearchPage("1"), infusionEnchantPage("ENCHNIGHTVISION")); + research = new TXResearchItem("ENCHDISARM", TTIntegration.enchantCategory(), new AspectList().add(Aspect.SLIME, 2).add(Aspect.TRAP, 1).add(Aspect.WEAPON, 1), 3, 2, 2, new ResourceLocation("thaumicexploration:textures/tabs/disarm.png")).setParents(TTIntegration.keyEnchanter()).setConcealed().registerResearchItem(); + research.setPages(new ResearchPage("1"), infusionEnchantPage("ENCHDISARM")); + } + else + { + if (Loader.isModLoaded("ForbiddenMagic")) { + research = new TXResearchItem("ENCHBINDING", "ARTIFICE", new AspectList().add(Aspect.TRAP, 2).add(Aspect.ENTROPY, 1).add(Aspect.TRAVEL, 1), -8, 9, 2, new ResourceLocation("thaumicexploration:textures/tabs/binding.png")).setParents("INFUSIONENCHANTMENT").setConcealed().registerResearchItem(); + research.setPages(new ResearchPage("1"), infusionEnchantPage("ENCHBINDING")); + } + else + { + research = new TXResearchItem("ENCHBINDING", "ARTIFICE", new AspectList().add(Aspect.TRAP, 2).add(Aspect.ENTROPY, 1).add(Aspect.TRAVEL, 1), -8, 13, 2, new ResourceLocation("thaumicexploration:textures/tabs/binding.png")).setParents("INFUSIONENCHANTMENT").setConcealed().registerResearchItem(); + research.setPages(new ResearchPage("1"), infusionEnchantPage("ENCHBINDING")); + } + research = new TXResearchItem("ENCHNIGHTVISION", "ARTIFICE", new AspectList().add(Aspect.SENSES, 2).add(Aspect.DARKNESS, 1).add(Aspect.LIGHT, 1), -6, 13, 2, new ResourceLocation("thaumicexploration:textures/tabs/nightVision.png")).setParents("INFUSIONENCHANTMENT").setConcealed().registerResearchItem(); + research.setPages(new ResearchPage("1"), infusionEnchantPage("ENCHNIGHTVISION")); + research = new TXResearchItem("ENCHDISARM", "ARTIFICE", new AspectList().add(Aspect.SLIME, 2).add(Aspect.TRAP, 1).add(Aspect.WEAPON, 1), -4, 13, 2, new ResourceLocation("thaumicexploration:textures/tabs/disarm.png")).setParents("INFUSIONENCHANTMENT").setConcealed().registerResearchItem(); + research.setPages(new ResearchPage("1"), infusionEnchantPage("ENCHDISARM")); + } //Wandcraft research = new TXResearchItem("WANDAMBER", "THAUMATURGY", new AspectList().add(Aspect.TOOL, 1).add(Aspect.AURA, 2).add(Aspect.TRAP, 1).add(Aspect.MAGIC, 2), -11, 2, 4, new ItemStack(ThaumicExploration.amberCore)).setParents("ROD_obsidian","ROD_reed","ROD_blaze","ROD_ice","ROD_quartz","ROD_bone").setConcealed().registerResearchItem(); @@ -87,9 +139,9 @@ public static void initResearch() { ResourceLocation jarSeal = new ResourceLocation("thaumicexploration:textures/tabs/jarSeals.png"); if (ThaumicExploration.allowBoundInventories) { research = new TXResearchItem("CHESTSEAL", "ARTIFICE", new AspectList().add(Aspect.ELDRITCH, 2).add(Aspect.TRAP, 1).add(Aspect.TRAVEL, 2).add(Aspect.VOID,1), 5, 0, 4, chestSeal).setConcealed().setParentsHidden("MIRROR","TALLOW").registerResearchItem(); - research.setPages(new ResearchPage("1"),recipePage("BLANKSEAL"),infusionPage("CHESTSEAL")); + research.setPages(new ResearchPage("1"),recipePage("BLANKSEAL"),cruciblePage("CHESTSEAL")); research = new TXResearchItem("JARSEAL", "ARTIFICE", new AspectList().add(Aspect.ELDRITCH, 2).add(Aspect.TRAP, 1).add(Aspect.MAGIC, 1).add(Aspect.TRAVEL,2), 7, 0, 4, jarSeal).setConcealed().setParents("CHESTSEAL").registerResearchItem(); - research.setPages(new ResearchPage("1"),infusionPage("JARSEAL")); + research.setPages(new ResearchPage("1"),cruciblePage("JARSEAL")); } } @@ -113,6 +165,10 @@ private static ResearchPage infusionPage(String name) { return new ResearchPage((InfusionRecipe) ConfigResearch.recipes.get(name)); } + private static ResearchPage infusionEnchantPage(String name) { + return new ResearchPage((InfusionEnchantmentRecipe) ConfigResearch.recipes.get(name)); + } + private static ResearchPage constructPage(String name) { return new ResearchPage((List)ConfigResearch.recipes.get(name)); } diff --git a/forge2/src/main/java/flaxbeard/thaumicexploration/research/TXResearchItem.java b/forge2/src/main/java/flaxbeard/thaumicexploration/research/TXResearchItem.java index f90650f..0ea5349 100644 --- a/forge2/src/main/java/flaxbeard/thaumicexploration/research/TXResearchItem.java +++ b/forge2/src/main/java/flaxbeard/thaumicexploration/research/TXResearchItem.java @@ -9,6 +9,7 @@ import thaumcraft.api.research.ResearchPage.PageType; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; +import flaxbeard.thaumicexploration.ThaumicExploration; public class TXResearchItem extends ResearchItem { @@ -35,8 +36,14 @@ public String getName() { @Override @SideOnly(Side.CLIENT) public String getText() { + if (ThaumicExploration.prefix) { return StatCollector.translateToLocal("te.researchPrefix") + " " + StatCollector.translateToLocal("te.tag." + key); + } + else + { + return StatCollector.translateToLocal("te.tag." + key); + } } @Override diff --git a/forge2/src/main/java/flaxbeard/thaumicexploration/tile/TileEntityCrucibleSouls.java b/forge2/src/main/java/flaxbeard/thaumicexploration/tile/TileEntityCrucibleSouls.java index ee2a7bb..3fa0dfc 100644 --- a/forge2/src/main/java/flaxbeard/thaumicexploration/tile/TileEntityCrucibleSouls.java +++ b/forge2/src/main/java/flaxbeard/thaumicexploration/tile/TileEntityCrucibleSouls.java @@ -6,7 +6,6 @@ import net.minecraft.entity.EntityList; import net.minecraft.entity.EntityLivingBase; import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.item.Item; import net.minecraft.nbt.NBTTagCompound; import net.minecraft.network.INetworkManager; import net.minecraft.network.packet.Packet; @@ -20,10 +19,8 @@ import thaumcraft.api.aspects.AspectList; import thaumcraft.api.aspects.IAspectContainer; import thaumcraft.api.aspects.IEssentiaTransport; -import thaumcraft.client.fx.FXBoreParticles; -import thaumcraft.client.fx.FXBoreSparkle; import thaumcraft.common.config.ConfigBlocks; -import cpw.mods.fml.client.FMLClientHandler; +import thaumcraft.common.entities.monster.EntityThaumicSlime; import flaxbeard.thaumicexploration.ThaumicExploration; import flaxbeard.thaumicexploration.event.DamageSourceTX; @@ -255,15 +252,15 @@ public void updateEntity() { if (tag.entityName == name) { tag.aspects.aspects.keySet().iterator(); - int randomAspect = this.worldObj.rand.nextInt(tag.aspects.aspects.keySet().size()); + Iterator iterator = tag.aspects.aspects.keySet().iterator(); - + int i = 0; while (iterator.hasNext()) { Object next = iterator.next(); if (next != null) { for (int z = 0;z mobs = this.worldObj.getEntitiesWithinAABB(EntityLivingBase.class, AxisAlignedBB.getBoundingBox(this.xCoord-this.range, this.yCoord-this.yRange, this.zCoord-this.range, this.xCoord+this.range, this.yCoord+this.yRange, this.zCoord+this.range)); for (EntityLivingBase mob : mobs) { - if (!(mob instanceof EntityPlayer)) { + if (!(mob instanceof EntityPlayer) && !(mob instanceof EntityThaumicSlime)) { float myDistance=(float) Math.sqrt(Math.pow(this.xCoord-mob.posX,2) + Math.pow(this.yCoord-mob.posY,2) + Math.pow(this.zCoord-mob.posZ,2)); if (myDistance < distance) { this.drainTicks = (int) (mob.getMaxHealth()*10); diff --git a/forge2/src/main/java/flaxbeard/thaumicexploration/wand/WandRodNecromancerOnUpdate.java b/forge2/src/main/java/flaxbeard/thaumicexploration/wand/WandRodNecromancerOnUpdate.java new file mode 100644 index 0000000..04b81b8 --- /dev/null +++ b/forge2/src/main/java/flaxbeard/thaumicexploration/wand/WandRodNecromancerOnUpdate.java @@ -0,0 +1,66 @@ +package flaxbeard.thaumicexploration.wand; + +import java.util.List; + +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.item.ItemStack; +import net.minecraft.nbt.NBTTagCompound; +import net.minecraft.util.AxisAlignedBB; +import thaumcraft.api.wands.IWandRodOnUpdate; +import thaumcraft.common.entities.EntityAspectOrb; +import thaumcraft.common.items.wands.ItemWandCasting; +import thaumcraft.common.lib.InventoryHelper; +import thaumcraft.common.lib.world.DamageSourceThaumcraft; +import flaxbeard.thaumicexploration.ThaumicExploration; + +public class WandRodNecromancerOnUpdate implements IWandRodOnUpdate { + + private static final int intialClock = 6000; + + @Override + public void onUpdate(ItemStack itemstack, EntityPlayer par1EntityPlayer) { + if (!itemstack.hasTagCompound()) { + itemstack.setTagCompound(new NBTTagCompound()); + } + if (!itemstack.stackTagCompound.hasKey("eatTicks")) { + itemstack.stackTagCompound.setInteger("eatTicks",0); + itemstack.stackTagCompound.setInteger("eatClock",intialClock); + } + int eatTicks = itemstack.stackTagCompound.getInteger("eatTicks"); + int eatClock = itemstack.stackTagCompound.getInteger("eatClock"); + if (eatTicks > eatClock) { + par1EntityPlayer.attackEntityFrom(DamageSourceThaumcraft.taint, 1); + eatTicks = 0; + eatClock = eatClock / 2 ; + if (eatClock <= 1) { + eatClock = 1; + } + } + eatTicks++; + System.out.println(eatTicks); + AxisAlignedBB boundingBox = AxisAlignedBB.getBoundingBox(par1EntityPlayer.posX - 3, par1EntityPlayer.posY - 3, par1EntityPlayer.posZ - 3, par1EntityPlayer.posX + 3, par1EntityPlayer.posY + 3, par1EntityPlayer.posZ + 3); + List orbs = par1EntityPlayer.worldObj.getEntitiesWithinAABB(EntityAspectOrb.class, boundingBox); + + for(EntityAspectOrb orb : orbs) { + if (!orb.isDead) { + int slot = InventoryHelper.isWandInHotbarWithRoom(orb.getAspect(), orb.getAspectValue(), par1EntityPlayer); + if ((orb.orbCooldown == 0) && (par1EntityPlayer.xpCooldown == 0) && (orb.getAspect().isPrimal()) && (slot >= 0)) + { + ItemWandCasting wand = (ItemWandCasting)par1EntityPlayer.inventory.mainInventory[slot].getItem(); + if (wand.getRod(par1EntityPlayer.inventory.mainInventory[slot]) == ThaumicExploration.WAND_ROD_CRYSTAL) { + eatTicks = 0; + eatClock = intialClock; + wand.addVis(par1EntityPlayer.inventory.mainInventory[slot], orb.getAspect(), orb.getAspectValue()*3, true); + } + wand.addVis(par1EntityPlayer.inventory.mainInventory[slot], orb.getAspect(), orb.getAspectValue(), true); + + par1EntityPlayer.xpCooldown = 2; + orb.playSound("random.orb", 0.1F, 0.5F * ((par1EntityPlayer.worldObj.rand.nextFloat() - par1EntityPlayer.worldObj.rand.nextFloat()) * 0.7F + 1.8F)); + orb.setDead(); + } + } + } + itemstack.stackTagCompound.setInteger("eatTicks",eatTicks); + itemstack.stackTagCompound.setInteger("eatClock",eatClock); + } +} diff --git a/forge2/src/main/resources/assets/thaumicexploration/lang/en_US.lang b/forge2/src/main/resources/assets/thaumicexploration/lang/en_US.lang index 1da9be5..d4d2ff1 100644 --- a/forge2/src/main/resources/assets/thaumicexploration/lang/en_US.lang +++ b/forge2/src/main/resources/assets/thaumicexploration/lang/en_US.lang @@ -6,10 +6,23 @@ item.thaumicexploration:maskEvil.name=Mask of Cruelty item.thaumicexploration:bootsMeteor.name=Boots of the Meteor item.thaumicexploration:bootsComet.name=Boots of the Comet item.thaumicexploration:dreamcatcher.name=Wispy Dreamcatcher +item.thaumicexploration:ringTaint.name=Tainted Band +item.thaumicexploration:talismanFood.name=Talisman of Nourishment +item.thaumicexploration:taintBerry.name=Taintberry +----Creative Tab---- itemGroup.thaumicExploration=Thaumic Exploration +----Death Messages---- death.attack.witherMask=%1$s was withered away by %2$s +death.attack.noTaint=%1$s suffered from Taint withdrawl +potion.binding=Binding +potion.taintWithdrawl=Taint Withdrawl + +----Enchantment Names---- +enchantment.binding=Binding +enchantment.nightVision=Night Vision +enchantment.disarm=Disarming ----Wand Names---- item.Wand.amber.rod=Amber @@ -99,12 +112,12 @@ te.text.THINKTANK.2=This 'think tank' has very particular placement requirements --Chest Sealing te.name.CHESTSEAL=Seal of Chest Binding te.tag.CHESTSEAL=Magical inventory linking -te.text.CHESTSEAL.1=By enchanting a mundane seal made of tallow, you have discovered a way to bind chests, so that they share their contents. These seals can be dyed various colors for sorting purposes, but an unlimited number of bound chest networks can be created.

By right clicking on a chest with a chest binding seal, you can create a new network. Right clicking on a bound chest will link the seal to that network. Right clicking on an unbound chest with a linked seal will add that chest to the linked network. Note that only empty chests are able to be bound. +te.text.CHESTSEAL.1=By soaking a mundane seal made of tallow in a concoction of essentia, you have discovered a way to bind chests so that they share their contents. These seals can be dyed various colors for sorting purposes, but an unlimited number of bound chest networks can be created.

By right clicking on a chest with a chest binding seal, you can create a new network. Right clicking on a bound chest will link the seal to that network. Right clicking on an unbound chest with a linked seal will add that chest to the linked network. Note that only empty chests are able to be bound. --Jar Sealing te.name.JARSEAL=Seal of Jar Binding te.tag.JARSEAL=Essentia, essentia everywhere -te.text.JARSEAL.1=By adjusting the infusion of the tallow seal to account for essentia's mystical properties, you have found that you are able to bind essentia containers, in particular, warded jars. Much like your previous binding seals, the jar binding seal can be dyed and an unlimited amount of networks can be created.

See your notes on bound chest seals for information on how to create networks. Note that only empty jars are able to be bound. You can not bind void jars or jars with labels.

Sealed jars have a higher suction than unlabeled jars but lower than labeled jars. +te.text.JARSEAL.1=By adjusting the mixture of aspects that you soak the tallow seal in to account for essentia's mystical properties, you have found that you are able to bind essentia containers, in particular, warded jars. Much like your previous binding seals, the jar binding seal can be dyed and an unlimited amount of networks can be created.

See your notes on bound chest seals for information on how to create networks. Note that only empty jars are able to be bound. You can not bind void jars or jars with labels.

Sealed jars have a higher suction than unlabeled jars but lower than labeled jars. --Everfull Urn te.name.URN=Everfull Urn @@ -117,6 +130,12 @@ te.tag.CRUCSOULS=Caution: Keep out of reach of children. te.text.CRUCSOULS.1=You have discovered a way to take advantage of a previously untapped source of essentia - that of living creatures. Infusing an alchemical furnace with various occult reagents and precise quantities of essentia, will create a crucible of souls, a device that will seek out the nearest living creature and slowly drain their life force, retrieving essentia at the final blow. This comes at the cost of the normal loot the creature would drop. This essentia can then be piped out of any face except the top via essentia tubes. te.text.CRUCSOULS.2=The crucible of souls is very unstable, and has a high probability of converting some of the essentia to flux or breaking it down into its component parts. You should make preparations to dispose of this flux before it causes a problem.

You have managed to install a basic safeguard so the device will not attack humans, but keep your pets at a safe distance. +--Replicator +te.name.REPLICATOR=Thaumic Replicator +te.tag.REPLICATOR=Equivalent exchange +te.text.REPLICATOR.1=You have been able to break down blocks and items into essentia with an alchemical furnace, now finally you have found a way to do the opposite. You have created a device that can replicate simple building blocks using essentia.

By right clicking the Thaumic Replicator with a block, you can set the template. Right clicking with a wand starts the replication process. Simply look at the Replicator with Goggles of Revealing to see what essentia is neccesary, and place this essentia in nearby jars like you would for an infusion. +te.text.REPLICATOR.2=This essentia will then form into the block that you set as a template. This block must be removed before starting the process again. Right clicking will remove any blocks in the replicator and right clicking again will reset the template.

This process can also be automated by starting replication with a redstone signal and removing blocks with a hopper. + --Amber Wand Core te.name.WANDAMBER=Amber Wand Core te.tag.WANDAMBER=Regenerative vis storage @@ -127,6 +146,26 @@ te.name.DREAMCATCHER=Wispy Dreamcatcher te.tag.DREAMCATCHER=Filtered thoughts te.text.DREAMCATCHER.1=They say that dreamcatchers are meant to stop nightmares from reaching the mind. Though taint may not be a construct of your psyche, you think that perhaps the ill effects that taint has on the body could be combated using a modified dreamcatcher. If you hold this dreamcatcher in your hotbar, it will have a high probability of nullifying damage from taint or tainted creatures. Although this dreamcatcher does not nullify all damage, it will certainly make excursions into tainted land much less dangerous. +--Talisman of Nourishment +te.name.TALISMANFOOD=Talisman of Nourishment +te.tag.TALISMANFOOD=Everfull belly +te.text.TALISMANFOOD.1=You often find yourself needing to take breaks during marathon researching sessions to satisfy your hunger. Finally you have found a way to get past your need for food.

By infusing a diamond with the essence of hunger, you have created an item that is able to suck the nourishing energy from various food items in your hotbar and store this energy within. It will then automatically replenish your food meter if it is depleted.

This device will only work on simple food items, so foods that invoke effects such as Rotten Flesh and Golden Apples must be consumed normally. + +--Disarming Enchantment +te.name.ENCHDISARM=Enchantment: Disarming +te.tag.ENCHDISARM=Fighting dirty +te.text.ENCHDISARM.1=You have formulated an enchantment that has a slight chance of knocking a weapon from a creature's hands.

This enchantment can be applied to swords. When done so, struck creatures have a chance of dropping the weapon they are holding. This disarming effect does not work on other players. This enchantment has a better chance of success if it is a higher level. + +--Binding Enchantment +te.name.ENCHBINDING=Enchantment: Binding +te.tag.ENCHBINDING=Going somewhere? +te.text.ENCHBINDING.1=You have formulated an enchantment that binds a struck creature to a certain location.

This enchantment can be applied to swords. When a creature is struck with a sword enchanted with the first level of this enchantment, they will be slowed temporarily. Attacking an enderman with a sword that carries the second level of this enchantment will stop the enderman from teleporting away. Creepers struck with a blade that holds the second level of this enchantment will not be able to explode for a short time afterward. + +--Night Vision Enchantment +te.name.ENCHNIGHTVISION=Enchantment: Night Vision +te.tag.ENCHNIGHTVISION=Low-light vision +te.text.ENCHNIGHTVISION.1=You have formulated an enchantment that allows you to see in the dark.

This enchantment can be applied to headgear. When done so, the wearer is able to see in low light conditions, similarly to using a night vision potion. + --Boots of the Meteor te.name.METEORBOOTS=Boots of the Meteor te.tag.METEORBOOTS=Come on and slam diff --git a/forge2/src/main/resources/assets/thaumicexploration/textures/blocks/berries_0.png b/forge2/src/main/resources/assets/thaumicexploration/textures/blocks/berries_0.png new file mode 100644 index 0000000..3ebcaad Binary files /dev/null and b/forge2/src/main/resources/assets/thaumicexploration/textures/blocks/berries_0.png differ diff --git a/forge2/src/main/resources/assets/thaumicexploration/textures/blocks/berries_1.png b/forge2/src/main/resources/assets/thaumicexploration/textures/blocks/berries_1.png new file mode 100644 index 0000000..b15d63c Binary files /dev/null and b/forge2/src/main/resources/assets/thaumicexploration/textures/blocks/berries_1.png differ diff --git a/forge2/src/main/resources/assets/thaumicexploration/textures/blocks/berries_2.png b/forge2/src/main/resources/assets/thaumicexploration/textures/blocks/berries_2.png new file mode 100644 index 0000000..3912321 Binary files /dev/null and b/forge2/src/main/resources/assets/thaumicexploration/textures/blocks/berries_2.png differ diff --git a/forge2/src/main/resources/assets/thaumicexploration/textures/blocks/berries_3.png b/forge2/src/main/resources/assets/thaumicexploration/textures/blocks/berries_3.png new file mode 100644 index 0000000..dec77a4 Binary files /dev/null and b/forge2/src/main/resources/assets/thaumicexploration/textures/blocks/berries_3.png differ diff --git a/forge2/src/main/resources/assets/thaumicexploration/textures/blocks/candle.png b/forge2/src/main/resources/assets/thaumicexploration/textures/blocks/candle.png new file mode 100644 index 0000000..b55dbc6 Binary files /dev/null and b/forge2/src/main/resources/assets/thaumicexploration/textures/blocks/candle.png differ diff --git a/forge2/src/main/resources/assets/thaumicexploration/textures/blocks/candle.png.mcmeta b/forge2/src/main/resources/assets/thaumicexploration/textures/blocks/candle.png.mcmeta new file mode 100644 index 0000000..4f0718a --- /dev/null +++ b/forge2/src/main/resources/assets/thaumicexploration/textures/blocks/candle.png.mcmeta @@ -0,0 +1,3 @@ +{ + "animation": {} +} \ No newline at end of file diff --git a/forge2/src/main/resources/assets/thaumicexploration/textures/blocks/candle2.png b/forge2/src/main/resources/assets/thaumicexploration/textures/blocks/candle2.png new file mode 100644 index 0000000..cc2f94e Binary files /dev/null and b/forge2/src/main/resources/assets/thaumicexploration/textures/blocks/candle2.png differ diff --git a/forge2/src/main/resources/assets/thaumicexploration/textures/blocks/candle2.png.mcmeta b/forge2/src/main/resources/assets/thaumicexploration/textures/blocks/candle2.png.mcmeta new file mode 100644 index 0000000..4f0718a --- /dev/null +++ b/forge2/src/main/resources/assets/thaumicexploration/textures/blocks/candle2.png.mcmeta @@ -0,0 +1,3 @@ +{ + "animation": {} +} \ No newline at end of file diff --git a/forge2/src/main/resources/assets/thaumicexploration/textures/blocks/candlestub.png b/forge2/src/main/resources/assets/thaumicexploration/textures/blocks/candlestub.png new file mode 100644 index 0000000..3444281 Binary files /dev/null and b/forge2/src/main/resources/assets/thaumicexploration/textures/blocks/candlestub.png differ diff --git a/forge2/src/main/resources/assets/thaumicexploration/textures/blocks/skeleSkull.png b/forge2/src/main/resources/assets/thaumicexploration/textures/blocks/skeleSkull.png new file mode 100644 index 0000000..af42d4b Binary files /dev/null and b/forge2/src/main/resources/assets/thaumicexploration/textures/blocks/skeleSkull.png differ diff --git a/forge2/src/main/resources/assets/thaumicexploration/textures/items/taintBerry.png b/forge2/src/main/resources/assets/thaumicexploration/textures/items/taintBerry.png new file mode 100644 index 0000000..cd3e527 Binary files /dev/null and b/forge2/src/main/resources/assets/thaumicexploration/textures/items/taintBerry.png differ diff --git a/forge2/src/main/resources/assets/thaumicexploration/textures/items/talismanFood.png b/forge2/src/main/resources/assets/thaumicexploration/textures/items/talismanFood.png new file mode 100644 index 0000000..b671208 Binary files /dev/null and b/forge2/src/main/resources/assets/thaumicexploration/textures/items/talismanFood.png differ diff --git a/forge2/src/main/resources/assets/thaumicexploration/textures/tabs/binding.pdn b/forge2/src/main/resources/assets/thaumicexploration/textures/tabs/binding.pdn new file mode 100644 index 0000000..589494c Binary files /dev/null and b/forge2/src/main/resources/assets/thaumicexploration/textures/tabs/binding.pdn differ diff --git a/forge2/src/main/resources/assets/thaumicexploration/textures/tabs/binding.png b/forge2/src/main/resources/assets/thaumicexploration/textures/tabs/binding.png new file mode 100644 index 0000000..cb39531 Binary files /dev/null and b/forge2/src/main/resources/assets/thaumicexploration/textures/tabs/binding.png differ diff --git a/forge2/src/main/resources/assets/thaumicexploration/textures/tabs/disarm.png b/forge2/src/main/resources/assets/thaumicexploration/textures/tabs/disarm.png new file mode 100644 index 0000000..a9a0981 Binary files /dev/null and b/forge2/src/main/resources/assets/thaumicexploration/textures/tabs/disarm.png differ diff --git a/forge2/src/main/resources/assets/thaumicexploration/textures/tabs/nightVision.png b/forge2/src/main/resources/assets/thaumicexploration/textures/tabs/nightVision.png new file mode 100644 index 0000000..881b3d2 Binary files /dev/null and b/forge2/src/main/resources/assets/thaumicexploration/textures/tabs/nightVision.png differ diff --git a/forge2/src/main/resources/mcmod.info b/forge2/src/main/resources/mcmod.info index 5cefb78..fb00d0f 100644 --- a/forge2/src/main/resources/mcmod.info +++ b/forge2/src/main/resources/mcmod.info @@ -3,12 +3,12 @@ "modid": "ThaumicExploration", "name": "Thaumic Exploration", "description": "An add-on for Thaumcraft 4, adding a variety of content.", - "version": "0.3.0", + "version": "0.4.0", "mcversion": "1.6.4", "url": "https://github.com/Flaxbeard/Thaumic_Exploration", "updateUrl": "", "authors": ["Flaxbeard"], - "credits": "Special thanks to Vazkii, SoundLogic, and the guys at #minecraftforge IRC", + "credits": "Special thanks to ThaumLite, SoundLogic, and the guys at #minecraftforge IRC", "logoFile": "", "screenshots": [], "dependencies": ["Thaumcraft"]