diff --git a/.gitignore b/.gitignore index 118594f1..66c2c4f5 100644 --- a/.gitignore +++ b/.gitignore @@ -32,8 +32,11 @@ logs screenshots mods world +lib +libs *.txt *.json /server.properties *.dat +*.psd diff --git a/build.gradle b/build.gradle index 391da333..aca77576 100644 --- a/build.gradle +++ b/build.gradle @@ -29,7 +29,7 @@ project.ext.gitHash = repo.log().find().abbreviatedId boolean dev = project.hasProperty('chisel_dev') && project.chisel_dev.equalsIgnoreCase('true') ext.buildnumber = 0 -project.buildnumber = !dev && System.getenv('BUILD_NUMBER') != null ? System.getenv('BUILD_NUMBER') : project.ext.gitHash +project.buildnumber = System.getenv('BUILD_NUMBER') != null ? System.getenv('BUILD_NUMBER') : project.ext.gitHash version = "${mod_version}.${buildnumber}" group = "com.cricketcraft.chisel" // http://maven.apache.org/guides/mini/guide-naming-conventions.html diff --git a/changelog b/changelog index 832094d4..e54be4ec 100644 --- a/changelog +++ b/changelog @@ -1,3 +1,54 @@ +2.3.10: +New +- Added ARRRRRRR-cane stone blocks +- Added Factory varients using some old textures that were lying around +- Added Chrono Glass Variant +Changes +- Chiseled Torches now work as Forge microparts +- AntiBlocks will not allow mobs to spawn on them (like half blocks, or glass) +Fixes +- Fixed the Mossy configuration to properly disable/enable whether the player +can chisel cobble into mossy cobble, etc. +- Fixed a crash on dedicated servers +- Fixed an bug that allowed item duplication. We're sorry server ops :( +- Improved block loading performance significantly! + +2.3.9: +API +- Fixed issue where Chisel would crash if a user sent any message to the IMC + +2.3.8: +New +- Added a recipe for packed ice pillars +- Added some Tinker's Construct variations +- Added andesite, diorite, and granite, and a couple variations +- Added hex armor plating and large hex plating +- Added "Shingle" blocks +- Added "Imperial" and "Rebel" blocks +- Created our biggest fan :D +Changes +- Added iron/gold block variations to the Oredict +- Recolored antiblocks a little +- Chiseled pumpkins can now make snow-golems +- Custom particles will be disabled if the vanilla "Particles:" option is set to "Off" +- Added a search bar to Chisel's creative tab menus +- Unified some of the technical blocks as one variation +Fixes +- Fixed a bug when Tinker's Construct and Botania would crash on load +- Fixed one issue with CTM not rendering the texture properly +- Corrected masonry texture references +- Chiseled bookshelves drop the correct book now +- Fixed compatibility with Project Red's Marble Bricks +- Fixed stair placement, and tooltip bugs +- Chiseled half-slabs noe behave like vanilla's when it comes to redstone +- Pumpkins and Jack o Lanterns now play the correct sounds +- Fixed an old crash with Railcraft +- Fixed missing localizations for road lines +- Fixed a bug when rendering several types of Pillars +- Fixed a bug that accidentally let the auto-chisel chisel things it shouldn't +API +- Extended CTM to the API... however this still need some work + 2.3.7: Changes - Updated russian translation diff --git a/gradle.properties b/gradle.properties index c263bfde..359f6427 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,6 +1,6 @@ -mod_version=2.3.7 +mod_version=2.3.10 minecraft_version=1.7.10 -forge_version=10.13.2.1277 +forge_version=10.13.2.1291 waila_version=1.5.8a ccl_version=1.1.1.110 diff --git a/src/api/java/thaumcraft/api/BlockCoordinates.java b/src/api/java/thaumcraft/api/BlockCoordinates.java new file mode 100644 index 00000000..27a28f8f --- /dev/null +++ b/src/api/java/thaumcraft/api/BlockCoordinates.java @@ -0,0 +1,108 @@ +package thaumcraft.api; + +import net.minecraft.nbt.NBTTagCompound; +import net.minecraft.tileentity.TileEntity; + +public class BlockCoordinates implements Comparable +{ + public int x; + + /** the y coordinate */ + public int y; + + /** the z coordinate */ + public int z; + + public BlockCoordinates() {} + + public BlockCoordinates(int par1, int par2, int par3) + { + this.x = par1; + this.y = par2; + this.z = par3; + } + + public BlockCoordinates(TileEntity tile) + { + this.x = tile.xCoord; + this.y = tile.yCoord; + this.z = tile.zCoord; + } + + public BlockCoordinates(BlockCoordinates par1ChunkCoordinates) + { + this.x = par1ChunkCoordinates.x; + this.y = par1ChunkCoordinates.y; + this.z = par1ChunkCoordinates.z; + } + + public boolean equals(Object par1Obj) + { + if (!(par1Obj instanceof BlockCoordinates)) + { + return false; + } + else + { + BlockCoordinates coordinates = (BlockCoordinates)par1Obj; + return this.x == coordinates.x && this.y == coordinates.y && this.z == coordinates.z ; + } + } + + public int hashCode() + { + return this.x + this.y << 8 + this.z << 16; + } + + /** + * Compare the coordinate with another coordinate + */ + public int compareWorldCoordinate(BlockCoordinates par1) + { + return this.y == par1.y ? (this.z == par1.z ? this.x - par1.x : this.z - par1.z) : this.y - par1.y; + } + + public void set(int par1, int par2, int par3, int d) + { + this.x = par1; + this.y = par2; + this.z = par3; + } + + /** + * Returns the squared distance between this coordinates and the coordinates given as argument. + */ + public float getDistanceSquared(int par1, int par2, int par3) + { + float f = (float)(this.x - par1); + float f1 = (float)(this.y - par2); + float f2 = (float)(this.z - par3); + return f * f + f1 * f1 + f2 * f2; + } + + /** + * Return the squared distance between this coordinates and the ChunkCoordinates given as argument. + */ + public float getDistanceSquaredToWorldCoordinates(BlockCoordinates par1ChunkCoordinates) + { + return this.getDistanceSquared(par1ChunkCoordinates.x, par1ChunkCoordinates.y, par1ChunkCoordinates.z); + } + + public int compareTo(Object par1Obj) + { + return this.compareWorldCoordinate((BlockCoordinates)par1Obj); + } + + public void readNBT(NBTTagCompound nbt) { + this.x = nbt.getInteger("b_x"); + this.y = nbt.getInteger("b_y"); + this.z = nbt.getInteger("b_z"); + } + + public void writeNBT(NBTTagCompound nbt) { + nbt.setInteger("b_x",x); + nbt.setInteger("b_y",y); + nbt.setInteger("b_z",z); + } + +} diff --git a/src/api/java/thaumcraft/api/IArchitect.java b/src/api/java/thaumcraft/api/IArchitect.java new file mode 100644 index 00000000..c733af5e --- /dev/null +++ b/src/api/java/thaumcraft/api/IArchitect.java @@ -0,0 +1,27 @@ +package thaumcraft.api; + +import java.util.ArrayList; + +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.item.ItemStack; +import net.minecraft.world.World; + +public interface IArchitect { + + /** + * Returns a list of blocks that should be highlighted in world. + */ + public ArrayList getArchitectBlocks(ItemStack stack, World world, + int x, int y, int z, int side, EntityPlayer player); + + /** + * which axis should be displayed. + */ + public boolean showAxis(ItemStack stack, World world, EntityPlayer player, int side, EnumAxis axis); + + public enum EnumAxis { + X, // east / west + Y, // up / down + Z; // north / south + } +} diff --git a/src/api/java/thaumcraft/api/IGoggles.java b/src/api/java/thaumcraft/api/IGoggles.java new file mode 100644 index 00000000..2f53d816 --- /dev/null +++ b/src/api/java/thaumcraft/api/IGoggles.java @@ -0,0 +1,22 @@ +package thaumcraft.api; + +import net.minecraft.entity.EntityLivingBase; +import net.minecraft.item.ItemStack; + +/** + * + * @author Azanor + * + * Equipped head slot items that extend this class will be able to perform most functions that + * goggles of revealing can apart from view nodes which is handled by IRevealer. + * + */ + +public interface IGoggles { + + /* + * If this method returns true things like block essentia contents will be shown. + */ + public boolean showIngamePopups(ItemStack itemstack, EntityLivingBase player); + +} diff --git a/src/api/java/thaumcraft/api/IRepairable.java b/src/api/java/thaumcraft/api/IRepairable.java new file mode 100644 index 00000000..48c6dff9 --- /dev/null +++ b/src/api/java/thaumcraft/api/IRepairable.java @@ -0,0 +1,13 @@ +package thaumcraft.api; + + + +/** + * @author Azanor + * Items, armor and tools with this interface can receive the Repair enchantment. + * Repairs 1 point of durability every 10 seconds (2 for repair II) + */ +public interface IRepairable { + + +} diff --git a/src/api/java/thaumcraft/api/IRepairableExtended.java b/src/api/java/thaumcraft/api/IRepairableExtended.java new file mode 100644 index 00000000..33827124 --- /dev/null +++ b/src/api/java/thaumcraft/api/IRepairableExtended.java @@ -0,0 +1,17 @@ +package thaumcraft.api; + +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.item.ItemStack; + + + +/** + * @author Azanor + * Items, armor and tools with this interface can receive the Repair enchantment. + * Repairs 1 point of durability every 10 seconds (2 for repair II) + */ +public interface IRepairableExtended extends IRepairable { + + public boolean doRepair(ItemStack stack, EntityPlayer player, int enchantlevel); + +} diff --git a/src/api/java/thaumcraft/api/IRunicArmor.java b/src/api/java/thaumcraft/api/IRunicArmor.java new file mode 100644 index 00000000..5dd31100 --- /dev/null +++ b/src/api/java/thaumcraft/api/IRunicArmor.java @@ -0,0 +1,22 @@ +package thaumcraft.api; + +import net.minecraft.item.ItemStack; + +/** + * + * @author Azanor + * + * Armor or bauble slot items that implement this interface can provide runic shielding. + * Recharging, hardening, etc. is handled internally by thaumcraft. + * + */ + +public interface IRunicArmor { + + /** + * returns how much charge this item can provide. This is the base shielding value - any hardening is stored and calculated internally. + */ + public int getRunicCharge(ItemStack itemstack); + + +} diff --git a/src/api/java/thaumcraft/api/IScribeTools.java b/src/api/java/thaumcraft/api/IScribeTools.java new file mode 100644 index 00000000..8800fa57 --- /dev/null +++ b/src/api/java/thaumcraft/api/IScribeTools.java @@ -0,0 +1,14 @@ +package thaumcraft.api; + + +/** + * + * @author Azanor + * + * Interface used to identify scribing tool items used in research table + * + */ + +public interface IScribeTools { + +} diff --git a/src/api/java/thaumcraft/api/IVisDiscountGear.java b/src/api/java/thaumcraft/api/IVisDiscountGear.java new file mode 100644 index 00000000..3793ea3e --- /dev/null +++ b/src/api/java/thaumcraft/api/IVisDiscountGear.java @@ -0,0 +1,20 @@ +package thaumcraft.api; + +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.item.ItemStack; +import thaumcraft.api.aspects.Aspect; + + + + +/** + * @author Azanor + * ItemArmor with this interface will grant a discount to the vis cost of actions the wearer performs with casting wands. + * The amount returned is the percentage by which the cost is discounted. There is a built-int max discount of 50%, but + * individual items really shouldn't have a discount more than 5% + */ +public interface IVisDiscountGear { + + int getVisDiscount(ItemStack stack, EntityPlayer player, Aspect aspect); + +} diff --git a/src/api/java/thaumcraft/api/IWarpingGear.java b/src/api/java/thaumcraft/api/IWarpingGear.java new file mode 100644 index 00000000..e7415ab7 --- /dev/null +++ b/src/api/java/thaumcraft/api/IWarpingGear.java @@ -0,0 +1,22 @@ +package thaumcraft.api; + +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.item.ItemStack; + +/** + * + * @author Azanor + * + * Armor, held items or bauble slot items that implement this interface add warp when equipped or held. + * + */ + +public interface IWarpingGear { + + /** + * returns how much warp this item adds while worn or held. + */ + public int getWarp(ItemStack itemstack, EntityPlayer player); + + +} diff --git a/src/api/java/thaumcraft/api/ItemApi.java b/src/api/java/thaumcraft/api/ItemApi.java new file mode 100644 index 00000000..25dda282 --- /dev/null +++ b/src/api/java/thaumcraft/api/ItemApi.java @@ -0,0 +1,70 @@ +package thaumcraft.api; + +import net.minecraft.block.Block; +import net.minecraft.item.Item; +import net.minecraft.item.ItemStack; +import cpw.mods.fml.common.FMLLog; + +/** + * @author Azanor + * + * This is used to gain access to the items in my mod. + * I only give some examples and it will probably still + * require a bit of work for you to get hold of everything you need. + * + */ +public class ItemApi { + + public static ItemStack getItem(String itemString, int meta) { + ItemStack item = null; + + try { + String itemClass = "thaumcraft.common.config.ConfigItems"; + Object obj = Class.forName(itemClass).getField(itemString).get(null); + if (obj instanceof Item) { + item = new ItemStack((Item) obj,1,meta); + } else if (obj instanceof ItemStack) { + item = (ItemStack) obj; + } + } catch (Exception ex) { + FMLLog.warning("[Thaumcraft] Could not retrieve item identified by: " + itemString); + } + + return item; + } + + public static ItemStack getBlock(String itemString, int meta) { + ItemStack item = null; + + try { + String itemClass = "thaumcraft.common.config.ConfigBlocks"; + Object obj = Class.forName(itemClass).getField(itemString).get(null); + if (obj instanceof Block) { + item = new ItemStack((Block) obj,1,meta); + } else if (obj instanceof ItemStack) { + item = (ItemStack) obj; + } + } catch (Exception ex) { + FMLLog.warning("[Thaumcraft] Could not retrieve block identified by: " + itemString); + } + + return item; + } + + /** + * + * Some examples + * + * Casting Wands: + * itemWandCasting + * + * Resources: + * itemEssence, itemWispEssence, itemResource, itemShard, itemNugget, + * itemNuggetChicken, itemNuggetBeef, itemNuggetPork, itemTripleMeatTreat + * + * Research: + * itemResearchNotes, itemInkwell, itemThaumonomicon + * + */ + +} diff --git a/src/api/java/thaumcraft/api/ItemRunic.java b/src/api/java/thaumcraft/api/ItemRunic.java new file mode 100644 index 00000000..80251f59 --- /dev/null +++ b/src/api/java/thaumcraft/api/ItemRunic.java @@ -0,0 +1,21 @@ +package thaumcraft.api; + +import net.minecraft.item.Item; +import net.minecraft.item.ItemStack; + +public class ItemRunic extends Item implements IRunicArmor { + + int charge; + + public ItemRunic (int charge) + { + super(); + this.charge = charge; + } + + @Override + public int getRunicCharge(ItemStack itemstack) { + return charge; + } + +} diff --git a/src/api/java/thaumcraft/api/ThaumcraftApi.java b/src/api/java/thaumcraft/api/ThaumcraftApi.java new file mode 100644 index 00000000..fbf78801 --- /dev/null +++ b/src/api/java/thaumcraft/api/ThaumcraftApi.java @@ -0,0 +1,588 @@ +package thaumcraft.api; + +import java.util.ArrayList; +import java.util.Arrays; +import java.util.HashMap; +import java.util.List; +import java.util.concurrent.ConcurrentHashMap; + +import net.minecraft.block.Block; +import net.minecraft.enchantment.Enchantment; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.item.Item; +import net.minecraft.item.Item.ToolMaterial; +import net.minecraft.item.ItemArmor.ArmorMaterial; +import net.minecraft.item.ItemStack; +import net.minecraftforge.common.util.EnumHelper; +import net.minecraftforge.oredict.OreDictionary; +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.api.crafting.ShapelessArcaneRecipe; +import thaumcraft.api.internal.DummyInternalMethodHandler; +import thaumcraft.api.internal.IInternalMethodHandler; +import thaumcraft.api.internal.WeightedRandomLoot; +import thaumcraft.api.research.IScanEventHandler; +import thaumcraft.api.research.ResearchCategories; +import thaumcraft.api.research.ResearchCategoryList; +import thaumcraft.api.research.ResearchItem; +import thaumcraft.api.research.ResearchPage; + + +/** + * @author Azanor + * + * + * IMPORTANT: If you are adding your own aspects to items it is a good idea to do it AFTER Thaumcraft adds its aspects, otherwise odd things may happen. + * + */ +public class ThaumcraftApi { + + //Materials + public static ToolMaterial toolMatThaumium = EnumHelper.addToolMaterial("THAUMIUM", 3, 400, 7F, 2, 22); + public static ToolMaterial toolMatVoid = EnumHelper.addToolMaterial("VOID", 4, 150, 8F, 3, 10); + public static ToolMaterial toolMatElemental = EnumHelper.addToolMaterial("THAUMIUM_ELEMENTAL", 3, 1500, 10F, 3, 18); + public static ArmorMaterial armorMatThaumium = EnumHelper.addArmorMaterial("THAUMIUM", 25, new int[] { 2, 6, 5, 2 }, 25); + public static ArmorMaterial armorMatSpecial = EnumHelper.addArmorMaterial("SPECIAL", 25, new int[] { 1, 3, 2, 1 }, 25); + public static ArmorMaterial armorMatThaumiumFortress = EnumHelper.addArmorMaterial("FORTRESS", 40, new int[] { 3, 7, 6, 3 }, 25); + public static ArmorMaterial armorMatVoid = EnumHelper.addArmorMaterial("VOID", 10, new int[] { 3, 7, 6, 3 }, 10); + public static ArmorMaterial armorMatVoidFortress = EnumHelper.addArmorMaterial("VOIDFORTRESS", 18, new int[] { 4, 8, 7, 4 }, 10); + + //Enchantment references + public static int enchantFrugal; + public static int enchantPotency; + public static int enchantWandFortune; + public static int enchantHaste; + public static int enchantRepair; + + //Miscellaneous + /** + * Portable Hole Block-id Blacklist. + * Simply add the block-id's of blocks you don't want the portable hole to go through. + */ + public static ArrayList portableHoleBlackList = new ArrayList(); + + //Internal (Do not alter this unless you like pretty explosions) + //Calling methods from this will only work properly once Thaumcraft is past the FMLPreInitializationEvent phase. + public static IInternalMethodHandler internalMethods = new DummyInternalMethodHandler(); + + //RESEARCH///////////////////////////////////////// + public static ArrayList scanEventhandlers = new ArrayList(); + public static ArrayList scanEntities = new ArrayList(); + public static class EntityTagsNBT { + public EntityTagsNBT(String name, Object value) { + this.name = name; + this.value = value; + } + public String name; + public Object value; + } + public static class EntityTags { + public EntityTags(String entityName, AspectList aspects, EntityTagsNBT... nbts) { + this.entityName = entityName; + this.nbts = nbts; + this.aspects = aspects; + } + public String entityName; + public EntityTagsNBT[] nbts; + public AspectList aspects; + } + + /** + * not really working atm, so ignore it for now + * @param scanEventHandler + */ + public static void registerScanEventhandler(IScanEventHandler scanEventHandler) { + scanEventhandlers.add(scanEventHandler); + } + + /** + * This is used to add aspects to entities which you can then scan using a thaumometer. + * Also used to calculate vis drops from mobs. + * @param entityName + * @param aspects + * @param nbt you can specify certain nbt keys and their values + * to differentiate between mobs.
For example the normal and wither skeleton: + *
ThaumcraftApi.registerEntityTag("Skeleton", (new AspectList()).add(Aspect.DEATH, 5)); + *
ThaumcraftApi.registerEntityTag("Skeleton", (new AspectList()).add(Aspect.DEATH, 8), new NBTTagByte("SkeletonType",(byte) 1)); + */ + public static void registerEntityTag(String entityName, AspectList aspects, EntityTagsNBT... nbt ) { + scanEntities.add(new EntityTags(entityName,aspects,nbt)); + } + + //RECIPES///////////////////////////////////////// + private static ArrayList craftingRecipes = new ArrayList(); + private static HashMap smeltingBonus = new HashMap(); + + /** + * This method is used to determine what bonus items are generated when the infernal furnace smelts items + * @param in The input of the smelting operation. e.g. new ItemStack(Block.oreGold) + * @param out The bonus item that can be produced from the smelting operation e.g. new ItemStack(nuggetGold,0,0). + * Stacksize should be 0 unless you want to guarantee that at least 1 item is always produced. + */ + public static void addSmeltingBonus(ItemStack in, ItemStack out) { + smeltingBonus.put( + Arrays.asList(in.getItem(),in.getItemDamage()), + new ItemStack(out.getItem(),0,out.getItemDamage())); + } + + /** + * This method is used to determine what bonus items are generated when the infernal furnace smelts items + * @param in The ore dictionary input of the smelting operation. e.g. "oreGold" + * @param out The bonus item that can be produced from the smelting operation e.g. new ItemStack(nuggetGold,0,0). + * Stacksize should be 0 unless you want to guarantee that at least 1 item is always produced. + */ + public static void addSmeltingBonus(String in, ItemStack out) { + smeltingBonus.put( in, new ItemStack(out.getItem(),0,out.getItemDamage())); + } + + /** + * Returns the bonus item produced from a smelting operation in the infernal furnace + * @param in The input of the smelting operation. e.g. new ItemStack(oreGold) + * @return the The bonus item that can be produced + */ + public static ItemStack getSmeltingBonus(ItemStack in) { + ItemStack out = smeltingBonus.get(Arrays.asList(in.getItem(),in.getItemDamage())); + if (out==null) { + out = smeltingBonus.get(Arrays.asList(in.getItem(),OreDictionary.WILDCARD_VALUE)); + } + if (out==null) { + String od = OreDictionary.getOreName( OreDictionary.getOreID(in)); + out = smeltingBonus.get(od); + } + return out; + } + + public static List getCraftingRecipes() { + return craftingRecipes; + } + + /** + * @param research the research key required for this recipe to work. Leave blank if it will work without research + * @param result the recipe output + * @param aspects the vis cost per aspect. + * @param recipe The recipe. Format is exactly the same as vanilla recipes. Input itemstacks are NBT sensitive. + */ + public static ShapedArcaneRecipe addArcaneCraftingRecipe(String research, ItemStack result, AspectList aspects, Object ... recipe) + { + ShapedArcaneRecipe r= new ShapedArcaneRecipe(research, result, aspects, recipe); + craftingRecipes.add(r); + return r; + } + + /** + * @param research the research key required for this recipe to work. Leave blank if it will work without research + * @param result the recipe output + * @param aspects the vis cost per aspect + * @param recipe The recipe. Format is exactly the same as vanilla shapeless recipes. Input itemstacks are NBT sensitive. + */ + public static ShapelessArcaneRecipe addShapelessArcaneCraftingRecipe(String research, ItemStack result, AspectList aspects, Object ... recipe) + { + ShapelessArcaneRecipe r = new ShapelessArcaneRecipe(research, result, aspects, recipe); + craftingRecipes.add(r); + return r; + } + + /** + * @param research the research key required for this recipe to work. Leave blank if it will work without research + * @param result the recipe output. It can either be an itemstack or an nbt compound tag that will be added to the central item + * @param instability a number that represents the N in 1000 chance for the infusion altar to spawn an + * instability effect each second while the crafting is in progress + * @param aspects the essentia cost per aspect. + * @param aspects input the central item to be infused + * @param recipe An array of items required to craft this. Input itemstacks are NBT sensitive. + * Infusion crafting components are automatically "fuzzy" and the oredict will be checked for possible matches. + * + */ + public static InfusionRecipe addInfusionCraftingRecipe(String research, Object result, int instability, AspectList aspects, ItemStack input,ItemStack[] recipe) + { + if (!(result instanceof ItemStack || result instanceof Object[])) return null; + InfusionRecipe r= new InfusionRecipe(research, result, instability, aspects, input, recipe); + craftingRecipes.add(r); + return r; + } + + /** + * @param research the research key required for this recipe to work. Leave blank if it will work without research + * @param enchantment the enchantment that will be applied to the item + * @param instability a number that represents the N in 1000 chance for the infusion altar to spawn an + * instability effect each second while the crafting is in progress + * @param aspects the essentia cost per aspect. + * @param recipe An array of items required to craft this. Input itemstacks are NBT sensitive. + * Infusion crafting components are automatically "fuzzy" and the oredict will be checked for possible matches. + * + */ + public static InfusionEnchantmentRecipe addInfusionEnchantmentRecipe(String research, Enchantment enchantment, int instability, AspectList aspects, ItemStack[] recipe) + { + InfusionEnchantmentRecipe r= new InfusionEnchantmentRecipe(research, enchantment, instability, aspects, recipe); + craftingRecipes.add(r); + return r; + } + + /** + * @param stack the recipe result + * @return the recipe + */ + public static InfusionRecipe getInfusionRecipe(ItemStack res) { + for (Object r:getCraftingRecipes()) { + if (r instanceof InfusionRecipe) { + if (((InfusionRecipe)r).getRecipeOutput() instanceof ItemStack) { + if (((ItemStack) ((InfusionRecipe)r).getRecipeOutput()).isItemEqual(res)) + return (InfusionRecipe)r; + } + } + } + return null; + } + + + /** + * @param key the research key required for this recipe to work. + * @param result the output result + * @param catalyst an itemstack of the catalyst or a string if it is an ore dictionary item + * @param cost the vis cost + * @param tags the aspects required to craft this + */ + public static CrucibleRecipe addCrucibleRecipe(String key, ItemStack result, Object catalyst, AspectList tags) { + CrucibleRecipe rc = new CrucibleRecipe(key, result, catalyst, tags); + getCraftingRecipes().add(rc); + return rc; + } + + + /** + * @param stack the recipe result + * @return the recipe + */ + public static CrucibleRecipe getCrucibleRecipe(ItemStack stack) { + for (Object r:getCraftingRecipes()) { + if (r instanceof CrucibleRecipe) { + if (((CrucibleRecipe)r).getRecipeOutput().isItemEqual(stack)) + return (CrucibleRecipe)r; + } + } + return null; + } + + /** + * @param hash the unique recipe code + * @return the recipe + */ + public static CrucibleRecipe getCrucibleRecipeFromHash(int hash) { + for (Object r:getCraftingRecipes()) { + if (r instanceof CrucibleRecipe) { + if (((CrucibleRecipe)r).hash==hash) + return (CrucibleRecipe)r; + } + } + return null; + } + + /** + * Used by the thaumonomicon drilldown feature. + * @param stack the item + * @return the thaumcraft recipe key that produces that item. + */ + private static HashMap keyCache = new HashMap(); + + public static Object[] getCraftingRecipeKey(EntityPlayer player, ItemStack stack) { + int[] key = new int[] {Item.getIdFromItem(stack.getItem()),stack.getItemDamage()}; + if (keyCache.containsKey(key)) { + if (keyCache.get(key)==null) return null; + if (ThaumcraftApiHelper.isResearchComplete(player.getCommandSenderName(), (String)(keyCache.get(key))[0])) + return keyCache.get(key); + else + return null; + } + for (ResearchCategoryList rcl:ResearchCategories.researchCategories.values()) { + for (ResearchItem ri:rcl.research.values()) { + if (ri.getPages()==null) continue; + for (int a=0;a objectTags = new ConcurrentHashMap(); + public static ConcurrentHashMap groupedObjectTags = new ConcurrentHashMap(); + + /** + * Checks to see if the passed item/block already has aspects associated with it. + * @param id + * @param meta + * @return + */ + public static boolean exists(Item item, int meta) { + AspectList tmp = ThaumcraftApi.objectTags.get(Arrays.asList(item,meta)); + if (tmp==null) { + tmp = ThaumcraftApi.objectTags.get(Arrays.asList(item,OreDictionary.WILDCARD_VALUE)); + if (meta==OreDictionary.WILDCARD_VALUE && tmp==null) { + int index=0; + do { + tmp = ThaumcraftApi.objectTags.get(Arrays.asList(item,index)); + index++; + } while (index<16 && tmp==null); + } + if (tmp==null) return false; + } + + return true; + } + + /** + * Used to assign apsects to the given item/block. Here is an example of the declaration for cobblestone:

+ * ThaumcraftApi.registerObjectTag(new ItemStack(Blocks.cobblestone), (new AspectList()).add(Aspect.ENTROPY, 1).add(Aspect.EARTH, 1)); + * @param item the item passed. Pass OreDictionary.WILDCARD_VALUE if all damage values of this item/block should have the same aspects + * @param aspects A ObjectTags object of the associated aspects + */ + public static void registerObjectTag(ItemStack item, AspectList aspects) { + if (aspects==null) aspects=new AspectList(); + try { + objectTags.put(Arrays.asList(item.getItem(),item.getItemDamage()), aspects); + } catch (Exception e) {} + } + + + /** + * Used to assign apsects to the given item/block. Here is an example of the declaration for cobblestone:

+ * ThaumcraftApi.registerObjectTag(new ItemStack(Blocks.cobblestone), new int[]{0,1}, (new AspectList()).add(Aspect.ENTROPY, 1).add(Aspect.EARTH, 1)); + * @param item + * @param meta A range of meta values if you wish to lump several item meta's together as being the "same" item (i.e. stair orientations) + * @param aspects A ObjectTags object of the associated aspects + */ + public static void registerObjectTag(ItemStack item, int[] meta, AspectList aspects) { + if (aspects==null) aspects=new AspectList(); + try { + objectTags.put(Arrays.asList(item.getItem(),meta[0]), aspects); + for (int m:meta) { + groupedObjectTags.put(Arrays.asList(item.getItem(),m), meta); + } + + } catch (Exception e) {} + } + + /** + * Used to assign apsects to the given ore dictionary item. + * @param oreDict the ore dictionary name + * @param aspects A ObjectTags object of the associated aspects + */ + public static void registerObjectTag(String oreDict, AspectList aspects) { + if (aspects==null) aspects=new AspectList(); + ArrayList ores = OreDictionary.getOres(oreDict); + if (ores!=null && ores.size()>0) { + for (ItemStack ore:ores) { + try { + objectTags.put(Arrays.asList(ore.getItem(), ore.getItemDamage()), aspects); + } catch (Exception e) {} + } + } + } + + /** + * Used to assign aspects to the given item/block. + * Attempts to automatically generate aspect tags by checking registered recipes. + * Here is an example of the declaration for pistons:

+ * ThaumcraftApi.registerComplexObjectTag(new ItemStack(Blocks.cobblestone), (new AspectList()).add(Aspect.MECHANISM, 2).add(Aspect.MOTION, 4)); + * IMPORTANT - this should only be used if you are not happy with the default aspects the object would be assigned. + * @param item, pass OreDictionary.WILDCARD_VALUE to meta if all damage values of this item/block should have the same aspects + * @param aspects A ObjectTags object of the associated aspects + */ + public static void registerComplexObjectTag(ItemStack item, AspectList aspects ) { + if (!exists(item.getItem(),item.getItemDamage())) { + AspectList tmp = ThaumcraftApiHelper.generateTags(item.getItem(), item.getItemDamage()); + if (tmp != null && tmp.size()>0) { + for(Aspect tag:tmp.getAspects()) { + aspects.add(tag, tmp.getAmount(tag)); + } + } + registerObjectTag(item,aspects); + } else { + AspectList tmp = ThaumcraftApiHelper.getObjectAspects(item); + for(Aspect tag:aspects.getAspects()) { + tmp.merge(tag, tmp.getAmount(tag)); + } + registerObjectTag(item,tmp); + } + } + + //WARP /////////////////////////////////////////////////////////////////////////////////////// + private static HashMap warpMap = new HashMap(); + + /** + * This method is used to determine how much warp is gained if the item is crafted. The warp + * added is "sticky" warp + * @param craftresult The item crafted + * @param amount how much warp is gained + */ + public static void addWarpToItem(ItemStack craftresult, int amount) { + warpMap.put(Arrays.asList(craftresult.getItem(),craftresult.getItemDamage()),amount); + } + + /** + * This method is used to determine how much permanent warp is gained if the research is completed + * @param in The item crafted + * @param amount how much warp is gained + */ + public static void addWarpToResearch(String research, int amount) { + warpMap.put(research, amount); + } + + /** + * Returns how much warp is gained from the item or research passed in + * @param in itemstack or string + * @return how much warp it will give + */ + public static int getWarp(Object in) { + if (in==null) return 0; + if (in instanceof ItemStack && warpMap.containsKey(Arrays.asList(((ItemStack)in).getItem(),((ItemStack)in).getItemDamage()))) { + return warpMap.get(Arrays.asList(((ItemStack)in).getItem(),((ItemStack)in).getItemDamage())); + } else + if (in instanceof String && warpMap.containsKey((String)in)) { + return warpMap.get((String)in); + } + return 0; + } + + //LOOT BAGS ////////////////////////////////////////////////////////////////////////////////////////// + + /** + * Used to add possible loot to treasure bags. As a reference, the weight of gold coins are 2000 + * and a diamond is 50. + * The weights are the same for all loot bag types - the only difference is how many items the bag + * contains. + * @param item + * @param weight + * @param bagTypes array of which type of bag to add this loot to. Multiple types can be specified + * 0 = common, 1 = uncommon, 2 = rare + */ + public static void addLootBagItem(ItemStack item, int weight, int... bagTypes) { + if (bagTypes==null || bagTypes.length==0) + WeightedRandomLoot.lootBagCommon.add(new WeightedRandomLoot(item,weight)); + else { + for (int rarity:bagTypes) { + switch(rarity) { + case 0: WeightedRandomLoot.lootBagCommon.add(new WeightedRandomLoot(item,weight)); break; + case 1: WeightedRandomLoot.lootBagUncommon.add(new WeightedRandomLoot(item,weight)); break; + case 2: WeightedRandomLoot.lootBagRare.add(new WeightedRandomLoot(item,weight)); break; + } + } + } + } + + //CROPS ////////////////////////////////////////////////////////////////////////////////////////// + + /** + * To define mod crops you need to use FMLInterModComms in your @Mod.Init method. + * There are two 'types' of crops you can add. Standard crops and clickable crops. + * + * Standard crops work like normal vanilla crops - they grow until a certain metadata + * value is reached and you harvest them by destroying the block and collecting the blocks. + * You need to create and ItemStack that tells the golem what block id and metadata represents + * the crop when fully grown. Sending a metadata of [OreDictionary.WILDCARD_VALUE] will mean the metadata won't get + * checked. + * Example for vanilla wheat: + * FMLInterModComms.sendMessage("Thaumcraft", "harvestStandardCrop", new ItemStack(Block.crops,1,7)); + * + * Clickable crops are crops that you right click to gather their bounty instead of destroying them. + * As for standard crops, you need to create and ItemStack that tells the golem what block id + * and metadata represents the crop when fully grown. The golem will trigger the blocks onBlockActivated method. + * Sending a metadata of [OreDictionary.WILDCARD_VALUE] will mean the metadata won't get checked. + * Example (this will technically do nothing since clicking wheat does nothing, but you get the idea): + * FMLInterModComms.sendMessage("Thaumcraft", "harvestClickableCrop", new ItemStack(Block.crops,1,7)); + * + * Stacked crops (like reeds) are crops that you wish the bottom block should remain after harvesting. + * As for standard crops, you need to create and ItemStack that tells the golem what block id + * and metadata represents the crop when fully grown. Sending a metadata of [OreDictionary.WILDCARD_VALUE] will mean the actualy md won't get + * checked. If it has the order upgrade it will only harvest if the crop is more than one block high. + * Example: + * FMLInterModComms.sendMessage("Thaumcraft", "harvestStackedCrop", new ItemStack(Block.reed,1,7)); + */ + + //NATIVE CLUSTERS ////////////////////////////////////////////////////////////////////////////////// + + /** + * You can define certain ores that will have a chance to produce native clusters via FMLInterModComms + * in your @Mod.Init method using the "nativeCluster" string message. + * The format should be: + * "[ore item/block id],[ore item/block metadata],[cluster item/block id],[cluster item/block metadata],[chance modifier float]" + * + * NOTE: The chance modifier is a multiplier applied to the default chance for that cluster to be produced (default 27.5% for a pickaxe of the core) + * + * Example for vanilla iron ore to produce one of my own native iron clusters (assuming default id's) at double the default chance: + * FMLInterModComms.sendMessage("Thaumcraft", "nativeCluster","15,0,25016,16,2.0"); + */ + + //LAMP OF GROWTH BLACKLIST /////////////////////////////////////////////////////////////////////////// + /** + * You can blacklist crops that should not be effected by the Lamp of Growth via FMLInterModComms + * in your @Mod.Init method using the "lampBlacklist" itemstack message. + * Sending a metadata of [OreDictionary.WILDCARD_VALUE] will mean the metadata won't get checked. + * Example for vanilla wheat: + * FMLInterModComms.sendMessage("Thaumcraft", "lampBlacklist", new ItemStack(Block.crops,1,OreDictionary.WILDCARD_VALUE)); + */ + + //DIMENSION BLACKLIST /////////////////////////////////////////////////////////////////////////// + /** + * You can blacklist a dimension to not spawn certain thaumcraft features + * in your @Mod.Init method using the "dimensionBlacklist" string message in the format "[dimension]:[level]" + * The level values are as follows: + * [0] stop all tc spawning and generation + * [1] allow ore and node generation (and node special features) + * [2] allow mob spawning + * [3] allow ore and node gen + mob spawning (and node special features) + * Example: + * FMLInterModComms.sendMessage("Thaumcraft", "dimensionBlacklist", "15:1"); + */ + + //BIOME BLACKLIST /////////////////////////////////////////////////////////////////////////// + /** + * You can blacklist a biome to not spawn certain thaumcraft features + * in your @Mod.Init method using the "biomeBlacklist" string message in the format "[biome id]:[level]" + * The level values are as follows: + * [0] stop all tc spawning and generation + * [1] allow ore and node generation (and node special features) + * [2] allow mob spawning + * [3] allow ore and node gen + mob spawning (and node special features) + * Example: + * FMLInterModComms.sendMessage("Thaumcraft", "biomeBlacklist", "180:2"); + */ + + //CHAMPION MOB WHITELIST /////////////////////////////////////////////////////////////////////////// + /** + * You can whitelist an entity class so it can rarely spawn champion versions in your @Mod.Init method using + * the "championWhiteList" string message in the format "[Entity]:[level]" + * The entity must extend EntityMob. + * [Entity] is in a similar format to what is used for mob spawners and such (see EntityList.class for vanilla examples). + * The [level] value indicate how rare the champion version will be - the higher the number the more common. + * The number roughly equals the [n] in 100 chance of a mob being a champion version. + * You can give 0 or negative numbers to allow champions to spawn with a very low chance only in particularly dangerous places. + * However anything less than about -2 will probably result in no spawns at all. + * Example: + * FMLInterModComms.sendMessage("Thaumcraft", "championWhiteList", "Thaumcraft.Wisp:1"); + */ +} diff --git a/src/api/java/thaumcraft/api/ThaumcraftApiHelper.java b/src/api/java/thaumcraft/api/ThaumcraftApiHelper.java new file mode 100644 index 00000000..77d55885 --- /dev/null +++ b/src/api/java/thaumcraft/api/ThaumcraftApiHelper.java @@ -0,0 +1,467 @@ +package thaumcraft.api; + +import java.util.HashMap; +import java.util.Iterator; + +import net.minecraft.block.Block; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.item.Item; +import net.minecraft.item.ItemStack; +import net.minecraft.tileentity.TileEntity; +import net.minecraft.util.MathHelper; +import net.minecraft.util.MovingObjectPosition; +import net.minecraft.util.Vec3; +import net.minecraft.world.IBlockAccess; +import net.minecraft.world.World; +import net.minecraftforge.common.util.ForgeDirection; +import net.minecraftforge.oredict.OreDictionary; +import thaumcraft.api.aspects.Aspect; +import thaumcraft.api.aspects.AspectList; +import thaumcraft.api.aspects.IEssentiaTransport; + +public class ThaumcraftApiHelper { + + public static AspectList cullTags(AspectList temp) { + AspectList temp2 = new AspectList(); + for (Aspect tag:temp.getAspects()) { + if (tag!=null) + temp2.add(tag, temp.getAmount(tag)); + } + while (temp2!=null && temp2.size()>6) { + Aspect lowest = null; + float low = Short.MAX_VALUE; + for (Aspect tag:temp2.getAspects()) { + if (tag==null) continue; + float ta=temp2.getAmount(tag); + if (tag.isPrimal()) { + ta *= .9f; + } else { + if (!tag.getComponents()[0].isPrimal()) { + ta *= 1.1f; + if (!tag.getComponents()[0].getComponents()[0].isPrimal()) { + ta *= 1.05f; + } + if (!tag.getComponents()[0].getComponents()[1].isPrimal()) { + ta *= 1.05f; + } + } + if (!tag.getComponents()[1].isPrimal()) { + ta *= 1.1f; + if (!tag.getComponents()[1].getComponents()[0].isPrimal()) { + ta *= 1.05f; + } + if (!tag.getComponents()[1].getComponents()[1].isPrimal()) { + ta *= 1.05f; + } + } + } + + if (ta allAspects= new HashMap(); + private static HashMap allCompoundAspects= new HashMap(); + + public static AspectList getAllAspects(int amount) { + if (allAspects.get(amount)==null) { + AspectList al = new AspectList(); + for (Aspect aspect:Aspect.aspects.values()) { + al.add(aspect, amount); + } + allAspects.put(amount, al); + } + return allAspects.get(amount); + } + + public static AspectList getAllCompoundAspects(int amount) { + if (allCompoundAspects.get(amount)==null) { + AspectList al = new AspectList(); + for (Aspect aspect:Aspect.getCompoundAspects()) { + al.add(aspect, amount); + } + allCompoundAspects.put(amount, al); + } + return allCompoundAspects.get(amount); + } + + + /** + * Use to subtract vis from a wand for most operations + * Wands store vis differently so "real" vis costs need to be multiplied by 100 before calling this method + * @param wand the wand itemstack + * @param player the player using the wand + * @param cost the cost of the operation. + * @param doit actually subtract the vis from the wand if true - if false just simulate the result + * @param crafting is this a crafting operation or not - if + * false then things like frugal and potency will apply to the costs + * @return was the vis successfully subtracted + */ + public static boolean consumeVisFromWand(ItemStack wand, EntityPlayer player, + AspectList cost, boolean doit, boolean crafting) { + return ThaumcraftApi.internalMethods.consumeVisFromWand(wand, player, cost, doit, crafting); + } + + /** + * Subtract vis for use by a crafting mechanic. Costs are calculated slightly + * differently and things like the frugal enchant is ignored + * Must NOT be multiplied by 100 - send the actual vis cost + * @param wand the wand itemstack + * @param player the player using the wand + * @param cost the cost of the operation. + * @param doit actually subtract the vis from the wand if true - if false just simulate the result + * @return was the vis successfully subtracted + */ + public static boolean consumeVisFromWandCrafting(ItemStack wand, EntityPlayer player, + AspectList cost, boolean doit) { + return ThaumcraftApi.internalMethods.consumeVisFromWandCrafting(wand, player, cost, doit); + } + + /** + * Subtract vis from a wand the player is carrying. Works like consumeVisFromWand in that actual vis + * costs should be multiplied by 100. The costs are handled like crafting however and things like + * frugal don't effect them + * @param player the player using the wand + * @param cost the cost of the operation. + * @return was the vis successfully subtracted + */ + public static boolean consumeVisFromInventory(EntityPlayer player, AspectList cost) { + return ThaumcraftApi.internalMethods.consumeVisFromInventory(player, cost); + } + + + /** + * This adds permanents or temporary warp to a player. It will automatically be synced clientside + * @param player the player using the wand + * @param amount how much warp to add. Negative amounts are only valid for temporary warp + * @param temporary add temporary warp instead of permanent + */ + public static void addWarpToPlayer(EntityPlayer player, int amount, boolean temporary) { + ThaumcraftApi.internalMethods.addWarpToPlayer(player, amount, temporary); + } + + /** + * This "sticky" warp to a player. Sticky warp is permanent warp that can be removed. + * It will automatically be synced clientside + * @param player the player using the wand + * @param amount how much warp to add. Can have negative amounts. + */ + public static void addStickyWarpToPlayer(EntityPlayer player, int amount) { + ThaumcraftApi.internalMethods.addStickyWarpToPlayer(player, amount); + } + + public static MovingObjectPosition rayTraceIgnoringSource(World world, Vec3 v1, Vec3 v2, + boolean bool1, boolean bool2, boolean bool3) + { + if (!Double.isNaN(v1.xCoord) && !Double.isNaN(v1.yCoord) && !Double.isNaN(v1.zCoord)) + { + if (!Double.isNaN(v2.xCoord) && !Double.isNaN(v2.yCoord) && !Double.isNaN(v2.zCoord)) + { + int i = MathHelper.floor_double(v2.xCoord); + int j = MathHelper.floor_double(v2.yCoord); + int k = MathHelper.floor_double(v2.zCoord); + int l = MathHelper.floor_double(v1.xCoord); + int i1 = MathHelper.floor_double(v1.yCoord); + int j1 = MathHelper.floor_double(v1.zCoord); + Block block = world.getBlock(l, i1, j1); + int k1 = world.getBlockMetadata(l, i1, j1); + + MovingObjectPosition movingobjectposition2 = null; + k1 = 200; + + while (k1-- >= 0) + { + if (Double.isNaN(v1.xCoord) || Double.isNaN(v1.yCoord) || Double.isNaN(v1.zCoord)) + { + return null; + } + + if (l == i && i1 == j && j1 == k) + { + continue; + } + + boolean flag6 = true; + boolean flag3 = true; + boolean flag4 = true; + double d0 = 999.0D; + double d1 = 999.0D; + double d2 = 999.0D; + + if (i > l) + { + d0 = (double)l + 1.0D; + } + else if (i < l) + { + d0 = (double)l + 0.0D; + } + else + { + flag6 = false; + } + + if (j > i1) + { + d1 = (double)i1 + 1.0D; + } + else if (j < i1) + { + d1 = (double)i1 + 0.0D; + } + else + { + flag3 = false; + } + + if (k > j1) + { + d2 = (double)j1 + 1.0D; + } + else if (k < j1) + { + d2 = (double)j1 + 0.0D; + } + else + { + flag4 = false; + } + + double d3 = 999.0D; + double d4 = 999.0D; + double d5 = 999.0D; + double d6 = v2.xCoord - v1.xCoord; + double d7 = v2.yCoord - v1.yCoord; + double d8 = v2.zCoord - v1.zCoord; + + if (flag6) + { + d3 = (d0 - v1.xCoord) / d6; + } + + if (flag3) + { + d4 = (d1 - v1.yCoord) / d7; + } + + if (flag4) + { + d5 = (d2 - v1.zCoord) / d8; + } + + boolean flag5 = false; + byte b0; + + if (d3 < d4 && d3 < d5) + { + if (i > l) + { + b0 = 4; + } + else + { + b0 = 5; + } + + v1.xCoord = d0; + v1.yCoord += d7 * d3; + v1.zCoord += d8 * d3; + } + else if (d4 < d5) + { + if (j > i1) + { + b0 = 0; + } + else + { + b0 = 1; + } + + v1.xCoord += d6 * d4; + v1.yCoord = d1; + v1.zCoord += d8 * d4; + } + else + { + if (k > j1) + { + b0 = 2; + } + else + { + b0 = 3; + } + + v1.xCoord += d6 * d5; + v1.yCoord += d7 * d5; + v1.zCoord = d2; + } + + Vec3 vec32 = Vec3.createVectorHelper(v1.xCoord, v1.yCoord, v1.zCoord); + l = (int)(vec32.xCoord = (double)MathHelper.floor_double(v1.xCoord)); + + if (b0 == 5) + { + --l; + ++vec32.xCoord; + } + + i1 = (int)(vec32.yCoord = (double)MathHelper.floor_double(v1.yCoord)); + + if (b0 == 1) + { + --i1; + ++vec32.yCoord; + } + + j1 = (int)(vec32.zCoord = (double)MathHelper.floor_double(v1.zCoord)); + + if (b0 == 3) + { + --j1; + ++vec32.zCoord; + } + + Block block1 = world.getBlock(l, i1, j1); + int l1 = world.getBlockMetadata(l, i1, j1); + + if (!bool2 || block1.getCollisionBoundingBoxFromPool(world, l, i1, j1) != null) + { + if (block1.canCollideCheck(l1, bool1)) + { + MovingObjectPosition movingobjectposition1 = block1.collisionRayTrace(world, l, i1, j1, v1, v2); + + if (movingobjectposition1 != null) + { + return movingobjectposition1; + } + } + else + { + movingobjectposition2 = new MovingObjectPosition(l, i1, j1, b0, v1, false); + } + } + } + + return bool3 ? movingobjectposition2 : null; + } + else + { + return null; + } + } + else + { + return null; + } + } +} diff --git a/src/api/java/thaumcraft/api/TileThaumcraft.java b/src/api/java/thaumcraft/api/TileThaumcraft.java new file mode 100644 index 00000000..56ccae87 --- /dev/null +++ b/src/api/java/thaumcraft/api/TileThaumcraft.java @@ -0,0 +1,63 @@ +package thaumcraft.api; + +import net.minecraft.nbt.NBTTagCompound; +import net.minecraft.network.NetworkManager; +import net.minecraft.network.Packet; +import net.minecraft.network.play.server.S35PacketUpdateTileEntity; +import net.minecraft.tileentity.TileEntity; + +/** + * + * @author azanor + * + * Custom tile entity class I use for most of my tile entities. Setup in such a way that only + * the nbt data within readCustomNBT / writeCustomNBT will be sent to the client when the tile + * updates. Apart from all the normal TE data that gets sent that is. + * + */ +public class TileThaumcraft extends TileEntity { + + //NBT stuff + + @Override + public void readFromNBT(NBTTagCompound nbttagcompound) + { + super.readFromNBT(nbttagcompound); + readCustomNBT(nbttagcompound); + } + + public void readCustomNBT(NBTTagCompound nbttagcompound) + { + //TODO + } + + @Override + public void writeToNBT(NBTTagCompound nbttagcompound) + { + super.writeToNBT(nbttagcompound); + writeCustomNBT(nbttagcompound); + } + + public void writeCustomNBT(NBTTagCompound nbttagcompound) + { + //TODO + } + + //Client Packet stuff + @Override + public Packet getDescriptionPacket() { + NBTTagCompound nbttagcompound = new NBTTagCompound(); + this.writeCustomNBT(nbttagcompound); + return new S35PacketUpdateTileEntity(this.xCoord, this.yCoord, this.zCoord, -999, nbttagcompound); + } + + @Override + public void onDataPacket(NetworkManager net, S35PacketUpdateTileEntity pkt) { + super.onDataPacket(net, pkt); + this.readCustomNBT(pkt.func_148857_g()); + } + + + + +} diff --git a/src/api/java/thaumcraft/api/WorldCoordinates.java b/src/api/java/thaumcraft/api/WorldCoordinates.java new file mode 100644 index 00000000..6c620af5 --- /dev/null +++ b/src/api/java/thaumcraft/api/WorldCoordinates.java @@ -0,0 +1,117 @@ +package thaumcraft.api; + +import net.minecraft.nbt.NBTTagCompound; +import net.minecraft.tileentity.TileEntity; + +public class WorldCoordinates implements Comparable +{ + public int x; + + /** the y coordinate */ + public int y; + + /** the z coordinate */ + public int z; + + public int dim; + + public WorldCoordinates() {} + + public WorldCoordinates(int par1, int par2, int par3, int d) + { + this.x = par1; + this.y = par2; + this.z = par3; + this.dim = d; + } + + public WorldCoordinates(TileEntity tile) + { + this.x = tile.xCoord; + this.y = tile.yCoord; + this.z = tile.zCoord; + this.dim = tile.getWorldObj().provider.dimensionId; + } + + public WorldCoordinates(WorldCoordinates par1ChunkCoordinates) + { + this.x = par1ChunkCoordinates.x; + this.y = par1ChunkCoordinates.y; + this.z = par1ChunkCoordinates.z; + this.dim = par1ChunkCoordinates.dim; + } + + public boolean equals(Object par1Obj) + { + if (!(par1Obj instanceof WorldCoordinates)) + { + return false; + } + else + { + WorldCoordinates coordinates = (WorldCoordinates)par1Obj; + return this.x == coordinates.x && this.y == coordinates.y && this.z == coordinates.z && this.dim == coordinates.dim ; + } + } + + public int hashCode() + { + return this.x + this.y << 8 + this.z << 16 + this.dim << 24; + } + + /** + * Compare the coordinate with another coordinate + */ + public int compareWorldCoordinate(WorldCoordinates par1) + { + return this.dim == par1.dim ? ( + this.y == par1.y ? (this.z == par1.z ? this.x - par1.x : this.z - par1.z) : this.y - par1.y) : -1; + } + + public void set(int par1, int par2, int par3, int d) + { + this.x = par1; + this.y = par2; + this.z = par3; + this.dim = d; + } + + /** + * Returns the squared distance between this coordinates and the coordinates given as argument. + */ + public float getDistanceSquared(int par1, int par2, int par3) + { + float f = (float)(this.x - par1); + float f1 = (float)(this.y - par2); + float f2 = (float)(this.z - par3); + return f * f + f1 * f1 + f2 * f2; + } + + /** + * Return the squared distance between this coordinates and the ChunkCoordinates given as argument. + */ + public float getDistanceSquaredToWorldCoordinates(WorldCoordinates par1ChunkCoordinates) + { + return this.getDistanceSquared(par1ChunkCoordinates.x, par1ChunkCoordinates.y, par1ChunkCoordinates.z); + } + + public int compareTo(Object par1Obj) + { + return this.compareWorldCoordinate((WorldCoordinates)par1Obj); + } + + public void readNBT(NBTTagCompound nbt) { + this.x = nbt.getInteger("w_x"); + this.y = nbt.getInteger("w_y"); + this.z = nbt.getInteger("w_z"); + this.dim = nbt.getInteger("w_d"); + } + + public void writeNBT(NBTTagCompound nbt) { + nbt.setInteger("w_x",x); + nbt.setInteger("w_y",y); + nbt.setInteger("w_z",z); + nbt.setInteger("w_d",dim); + } + +} diff --git a/src/api/java/thaumcraft/api/aspects/Aspect.java b/src/api/java/thaumcraft/api/aspects/Aspect.java new file mode 100644 index 00000000..3c33a4a7 --- /dev/null +++ b/src/api/java/thaumcraft/api/aspects/Aspect.java @@ -0,0 +1,201 @@ +package thaumcraft.api.aspects; + +import java.util.ArrayList; +import java.util.Collection; +import java.util.LinkedHashMap; + +import net.minecraft.util.ResourceLocation; +import net.minecraft.util.StatCollector; + +import org.apache.commons.lang3.text.WordUtils; + +public class Aspect { + + String tag; + Aspect[] components; + int color; + private String chatcolor; + ResourceLocation image; + int blend; + + /** + * Use this constructor to register your own aspects. + * @param tag the key that will be used to reference this aspect, as well as its latin display name + * @param color color to display the tag in + * @param components the aspects this one is formed from + * @param image ResourceLocation pointing to a 32x32 icon of the aspect + * @param blend GL11 blendmode (1 or 771). Used for rendering nodes. Default is 1 + */ + public Aspect(String tag, int color, Aspect[] components, ResourceLocation image, int blend) { + if (aspects.containsKey(tag)) throw new IllegalArgumentException(tag+" already registered!"); + this.tag = tag; + this.components = components; + this.color = color; + this.image = image; + this.blend = blend; + aspects.put(tag, this); + } + + /** + * Shortcut constructor I use for the default aspects - you shouldn't be using this. + */ + public Aspect(String tag, int color, Aspect[] components) { + this(tag,color,components,new ResourceLocation("thaumcraft","textures/aspects/"+tag.toLowerCase()+".png"),1); + } + + /** + * Shortcut constructor I use for the default aspects - you shouldn't be using this. + */ + public Aspect(String tag, int color, Aspect[] components, int blend) { + this(tag,color,components,new ResourceLocation("thaumcraft","textures/aspects/"+tag.toLowerCase()+".png"),blend); + } + + /** + * Shortcut constructor I use for the primal aspects - + * you shouldn't use this as making your own primal aspects will break all the things. + */ + public Aspect(String tag, int color, String chatcolor, int blend) { + this(tag,color,(Aspect[])null, blend); + this.setChatcolor(chatcolor); + } + + public int getColor() { + return color; + } + + public String getName() { + return WordUtils.capitalizeFully(tag); + } + + public String getLocalizedDescription() { + return StatCollector.translateToLocal("tc.aspect."+tag); + } + + public String getTag() { + return tag; + } + + public void setTag(String tag) { + this.tag = tag; + } + + public Aspect[] getComponents() { + return components; + } + + public void setComponents(Aspect[] components) { + this.components = components; + } + + public ResourceLocation getImage() { + return image; + } + + public static Aspect getAspect(String tag) { + return aspects.get(tag); + } + + public int getBlend() { + return blend; + } + + public void setBlend(int blend) { + this.blend = blend; + } + + public boolean isPrimal() { + return getComponents()==null || getComponents().length!=2; + } + + /////////////////////////////// + public static ArrayList getPrimalAspects() { + ArrayList primals = new ArrayList(); + Collection pa = aspects.values(); + for (Aspect aspect:pa) { + if (aspect.isPrimal()) primals.add(aspect); + } + return primals; + } + + public static ArrayList getCompoundAspects() { + ArrayList compounds = new ArrayList(); + Collection pa = aspects.values(); + for (Aspect aspect:pa) { + if (!aspect.isPrimal()) compounds.add(aspect); + } + return compounds; + } + + public String getChatcolor() { + return chatcolor; + } + + public void setChatcolor(String chatcolor) { + this.chatcolor = chatcolor; + } + + + /////////////////////////////// + public static LinkedHashMap aspects = new LinkedHashMap(); + + //PRIMAL + public static final Aspect AIR = new Aspect("aer",0xffff7e,"e",1); + public static final Aspect EARTH = new Aspect("terra",0x56c000,"2",1); + public static final Aspect FIRE = new Aspect("ignis",0xff5a01,"c",1); + public static final Aspect WATER = new Aspect("aqua",0x3cd4fc,"3",1); + public static final Aspect ORDER = new Aspect("ordo",0xd5d4ec,"7",1); + public static final Aspect ENTROPY = new Aspect("perditio",0x404040,"8",771); + + //SECONDARY + public static final Aspect VOID = new Aspect("vacuos",0x888888, new Aspect[] {AIR, ENTROPY},771); + public static final Aspect LIGHT = new Aspect("lux",0xfff663, new Aspect[] {AIR, FIRE}); + public static final Aspect WEATHER = new Aspect("tempestas",0xFFFFFF, new Aspect[] {AIR, WATER}); + public static final Aspect MOTION = new Aspect("motus",0xcdccf4, new Aspect[] {AIR, ORDER}); + public static final Aspect COLD = new Aspect("gelum",0xe1ffff, new Aspect[] {FIRE, ENTROPY}); + public static final Aspect CRYSTAL = new Aspect("vitreus",0x80ffff, new Aspect[] {EARTH, ORDER}); + public static final Aspect LIFE = new Aspect("victus",0xde0005, new Aspect[] {WATER, EARTH}); + public static final Aspect POISON = new Aspect("venenum",0x89f000, new Aspect[] {WATER, ENTROPY}); + public static final Aspect ENERGY = new Aspect("potentia",0xc0ffff, new Aspect[] {ORDER, FIRE}); + public static final Aspect EXCHANGE = new Aspect("permutatio",0x578357, new Aspect[] {ENTROPY, ORDER}); +// public static final Aspect ?? = new Aspect("??",0xcdccf4, new Aspect[] {AIR, EARTH}); +// public static final Aspect ?? = new Aspect("??",0xcdccf4, new Aspect[] {FIRE, EARTH}); +// public static final Aspect ?? = new Aspect("??",0xcdccf4, new Aspect[] {FIRE, WATER}); +// public static final Aspect ?? = new Aspect("??",0xcdccf4, new Aspect[] {ORDER, WATER}); +// public static final Aspect ?? = new Aspect("??",0xcdccf4, new Aspect[] {EARTH, ENTROPY}); + + //TERTIARY + public static final Aspect METAL = new Aspect("metallum",0xb5b5cd, new Aspect[] {EARTH, CRYSTAL}); + public static final Aspect DEATH = new Aspect("mortuus",0x887788, new Aspect[] {LIFE, ENTROPY}); + public static final Aspect FLIGHT = new Aspect("volatus",0xe7e7d7, new Aspect[] {AIR, MOTION}); + public static final Aspect DARKNESS = new Aspect("tenebrae",0x222222, new Aspect[] {VOID, LIGHT}); + public static final Aspect SOUL = new Aspect("spiritus",0xebebfb, new Aspect[] {LIFE, DEATH}); + public static final Aspect HEAL = new Aspect("sano",0xff2f34, new Aspect[] {LIFE, ORDER}); + public static final Aspect TRAVEL = new Aspect("iter",0xe0585b, new Aspect[] {MOTION, EARTH}); + public static final Aspect ELDRITCH = new Aspect("alienis",0x805080, new Aspect[] {VOID, DARKNESS}); + public static final Aspect MAGIC = new Aspect("praecantatio",0x9700c0, new Aspect[] {VOID, ENERGY}); + public static final Aspect AURA = new Aspect("auram",0xffc0ff, new Aspect[] {MAGIC, AIR}); + public static final Aspect TAINT = new Aspect("vitium",0x800080, new Aspect[] {MAGIC, ENTROPY}); + public static final Aspect SLIME = new Aspect("limus",0x01f800, new Aspect[] {LIFE, WATER}); + public static final Aspect PLANT = new Aspect("herba",0x01ac00, new Aspect[] {LIFE, EARTH}); + public static final Aspect TREE = new Aspect("arbor",0x876531, new Aspect[] {AIR, PLANT}); + public static final Aspect BEAST = new Aspect("bestia",0x9f6409, new Aspect[] {MOTION, LIFE}); + public static final Aspect FLESH = new Aspect("corpus",0xee478d, new Aspect[] {DEATH, BEAST}); + public static final Aspect UNDEAD = new Aspect("exanimis",0x3a4000, new Aspect[] {MOTION, DEATH}); + public static final Aspect MIND = new Aspect("cognitio",0xffc2b3, new Aspect[] {EARTH, SOUL}); + public static final Aspect SENSES = new Aspect("sensus",0x0fd9ff, new Aspect[] {AIR, SOUL}); + public static final Aspect MAN = new Aspect("humanus",0xffd7c0, new Aspect[] {BEAST, MIND}); + public static final Aspect CROP = new Aspect("messis",0xe1b371, new Aspect[] {PLANT, MAN}); + public static final Aspect MINE = new Aspect("perfodio",0xdcd2d8, new Aspect[] {MAN, EARTH}); + public static final Aspect TOOL = new Aspect("instrumentum",0x4040ee, new Aspect[] {MAN, ORDER}); + public static final Aspect HARVEST = new Aspect("meto",0xeead82, new Aspect[] {CROP, TOOL}); + public static final Aspect WEAPON = new Aspect("telum",0xc05050, new Aspect[] {TOOL, ENTROPY}); + public static final Aspect ARMOR = new Aspect("tutamen",0x00c0c0, new Aspect[] {TOOL, EARTH}); + public static final Aspect HUNGER = new Aspect("fames",0x9a0305, new Aspect[] {LIFE, VOID}); + public static final Aspect GREED = new Aspect("lucrum",0xe6be44, new Aspect[] {MAN, HUNGER}); + public static final Aspect CRAFT = new Aspect("fabrico",0x809d80, new Aspect[] {MAN, TOOL}); + public static final Aspect CLOTH = new Aspect("pannus",0xeaeac2, new Aspect[] {TOOL, BEAST}); + public static final Aspect MECHANISM = new Aspect("machina",0x8080a0, new Aspect[] {MOTION, TOOL}); + public static final Aspect TRAP = new Aspect("vinculum",0x9a8080, new Aspect[] {MOTION, ENTROPY}); + + +} diff --git a/src/api/java/thaumcraft/api/aspects/AspectList.java b/src/api/java/thaumcraft/api/aspects/AspectList.java new file mode 100644 index 00000000..b5781410 --- /dev/null +++ b/src/api/java/thaumcraft/api/aspects/AspectList.java @@ -0,0 +1,292 @@ +package thaumcraft.api.aspects; + +import java.io.Serializable; +import java.util.LinkedHashMap; + +import net.minecraft.item.ItemStack; +import net.minecraft.nbt.NBTTagCompound; +import net.minecraft.nbt.NBTTagList; +import thaumcraft.api.ThaumcraftApiHelper; + +public class AspectList implements Serializable { + + public LinkedHashMap aspects = new LinkedHashMap();//aspects associated with this object + + + /** + * this creates a new aspect list with preloaded values based off the aspects of the given item. + * @param the itemstack of the given item + */ + public AspectList(ItemStack stack) { + try { + AspectList temp = ThaumcraftApiHelper.getObjectAspects(stack); + if (temp!=null) + for (Aspect tag:temp.getAspects()) { + add(tag,temp.getAmount(tag)); + } + } catch (Exception e) {} + } + + public AspectList() { + } + + public AspectList copy() { + AspectList out = new AspectList(); + for (Aspect a:this.getAspects()) + out.add(a, this.getAmount(a)); + return out; + } + + /** + * @return the amount of different aspects in this collection + */ + public int size() { + return aspects.size(); + } + + /** + * @return the amount of total vis in this collection + */ + public int visSize() { + int q = 0; + + for (Aspect as:aspects.keySet()) { + q+=this.getAmount(as); + } + + return q; + } + + /** + * @return an array of all the aspects in this collection + */ + public Aspect[] getAspects() { + Aspect[] q = new Aspect[1]; + return aspects.keySet().toArray(q); + } + + /** + * @return an array of all the aspects in this collection + */ + public Aspect[] getPrimalAspects() { + AspectList t = new AspectList(); + for (Aspect as:aspects.keySet()) { + if (as.isPrimal()) { + t.add(as,1); + } + } + Aspect[] q = new Aspect[1]; + return t.aspects.keySet().toArray(q); + } + + /** + * @return an array of all the aspects in this collection sorted by name + */ + public Aspect[] getAspectsSorted() { + try { + Aspect[] out = aspects.keySet().toArray(new Aspect[]{}); + boolean change=false; + do { + change=false; + for(int a=0;a0) { + out[a] = e2; + out[a+1] = e1; + change = true; + break; + } + } + } while (change==true); + return out; + } catch (Exception e) { + return this.getAspects(); + } + } + + /** + * @return an array of all the aspects in this collection sorted by amount + */ + public Aspect[] getAspectsSortedAmount() { + try { + Aspect[] out = aspects.keySet().toArray(new Aspect[1]); + boolean change=false; + do { + change=false; + for(int a=0;a0 && e2>0 && e2>e1) { + Aspect ea = out[a]; + Aspect eb = out[a+1]; + out[a] = eb; + out[a+1] = ea; + change = true; + break; + } + } + } while (change==true); + return out; + } catch (Exception e) { + return this.getAspects(); + } + } + + /** + * @param key + * @return the amount associated with the given aspect in this collection + */ + public int getAmount(Aspect key) { + return aspects.get(key)==null?0:aspects.get(key); + } + + /** + * Reduces the amount of an aspect in this collection by the given amount. + * @param key + * @param amount + * @return + */ + public boolean reduce(Aspect key, int amount) { + if (getAmount(key)>=amount) { + int am = getAmount(key)-amount; + aspects.put(key, am); + return true; + } + return false; + } + + /** + * Reduces the amount of an aspect in this collection by the given amount. + * If reduced to 0 or less the aspect will be removed completely. + * @param key + * @param amount + * @return + */ + public AspectList remove(Aspect key, int amount) { + int am = getAmount(key)-amount; + if (am<=0) aspects.remove(key); else + this.aspects.put(key, am); + return this; + } + + /** + * Simply removes the aspect from the list + * @param key + * @param amount + * @return + */ + public AspectList remove(Aspect key) { + aspects.remove(key); + return this; + } + + /** + * Adds this aspect and amount to the collection. + * If the aspect exists then its value will be increased by the given amount. + * @param aspect + * @param amount + * @return + */ + public AspectList add(Aspect aspect, int amount) { + if (this.aspects.containsKey(aspect)) { + int oldamount = this.aspects.get(aspect); + amount+=oldamount; + } + this.aspects.put( aspect, amount ); + return this; + } + + + /** + * Adds this aspect and amount to the collection. + * If the aspect exists then only the highest of the old or new amount will be used. + * @param aspect + * @param amount + * @return + */ + public AspectList merge(Aspect aspect, int amount) { + if (this.aspects.containsKey(aspect)) { + int oldamount = this.aspects.get(aspect); + if (amount0?aspects:null; + } + return null; + } + + @Override + public void setAspects(ItemStack itemstack, AspectList aspects) { + if (!itemstack.hasTagCompound()) itemstack.setTagCompound(new NBTTagCompound()); + aspects.writeToNBT(itemstack.getTagCompound()); + } +*/ \ No newline at end of file diff --git a/src/api/java/thaumcraft/api/aspects/IEssentiaTransport.java b/src/api/java/thaumcraft/api/aspects/IEssentiaTransport.java new file mode 100644 index 00000000..fecbc160 --- /dev/null +++ b/src/api/java/thaumcraft/api/aspects/IEssentiaTransport.java @@ -0,0 +1,100 @@ +package thaumcraft.api.aspects; + +import net.minecraftforge.common.util.ForgeDirection; + + +/** + * @author Azanor + * This interface is used by tiles that use or transport vis. + * Only tiles that implement this interface will be able to connect to vis conduits or other thaumic devices + */ +public interface IEssentiaTransport { + /** + * Is this tile able to connect to other vis users/sources on the specified side? + * @param face + * @return + */ + public boolean isConnectable(ForgeDirection face); + + /** + * Is this side used to input essentia? + * @param face + * @return + */ + boolean canInputFrom(ForgeDirection face); + + /** + * Is this side used to output essentia? + * @param face + * @return + */ + boolean canOutputTo(ForgeDirection face); + + /** + * Sets the amount of suction this block will apply + * @param suction + */ + public void setSuction(Aspect aspect, int amount); + + /** + * Returns the type of suction this block is applying. + * @param loc + * the location from where the suction is being checked + * @return + * a return type of null indicates the suction is untyped and the first thing available will be drawn + */ + public Aspect getSuctionType(ForgeDirection face); + + /** + * Returns the strength of suction this block is applying. + * @param loc + * the location from where the suction is being checked + * @return + */ + public int getSuctionAmount(ForgeDirection face); + + /** + * remove the specified amount of essentia from this transport tile + * @return how much was actually taken + */ + public int takeEssentia(Aspect aspect, int amount, ForgeDirection face); + + /** + * add the specified amount of essentia to this transport tile + * @return how much was actually added + */ + public int addEssentia(Aspect aspect, int amount, ForgeDirection face); + + /** + * What type of essentia this contains + * @param face + * @return + */ + public Aspect getEssentiaType(ForgeDirection face); + + /** + * How much essentia this block contains + * @param face + * @return + */ + public int getEssentiaAmount(ForgeDirection face); + + + + /** + * Essentia will not be drawn from this container unless the suction exceeds this amount. + * @return the amount + */ + public int getMinimumSuction(); + + /** + * Return true if you want the conduit to extend a little further into the block. + * Used by jars and alembics that have smaller than normal hitboxes + * @return + */ + boolean renderExtendedTube(); + + + +} + diff --git a/src/api/java/thaumcraft/api/crafting/CrucibleRecipe.java b/src/api/java/thaumcraft/api/crafting/CrucibleRecipe.java new file mode 100644 index 00000000..595b6e53 --- /dev/null +++ b/src/api/java/thaumcraft/api/crafting/CrucibleRecipe.java @@ -0,0 +1,91 @@ +package thaumcraft.api.crafting; + +import java.util.ArrayList; + +import net.minecraft.item.ItemStack; +import net.minecraftforge.oredict.OreDictionary; +import thaumcraft.api.ThaumcraftApiHelper; +import thaumcraft.api.aspects.Aspect; +import thaumcraft.api.aspects.AspectList; + +public class CrucibleRecipe { + + private ItemStack recipeOutput; + + public Object catalyst; + public AspectList aspects; + public String key; + + public int hash; + + public CrucibleRecipe(String researchKey, ItemStack result, Object cat, AspectList tags) { + recipeOutput = result; + this.aspects = tags; + this.key = researchKey; + this.catalyst = cat; + if (cat instanceof String) { + this.catalyst = OreDictionary.getOres((String) cat); + } + String hc = researchKey + result.toString(); + for (Aspect tag:tags.getAspects()) { + hc += tag.getTag()+tags.getAmount(tag); + } + if (cat instanceof ItemStack) { + hc += ((ItemStack)cat).toString(); + } else + if (cat instanceof ArrayList && ((ArrayList)catalyst).size()>0) { + for (ItemStack is :(ArrayList)catalyst) { + hc += is.toString(); + } + } + + hash = hc.hashCode(); + } + + + + public boolean matches(AspectList itags, ItemStack cat) { + if (catalyst instanceof ItemStack && + !ThaumcraftApiHelper.itemMatches((ItemStack) catalyst,cat,false)) { + return false; + } else + if (catalyst instanceof ArrayList && ((ArrayList)catalyst).size()>0) { + ItemStack[] ores = ((ArrayList)catalyst).toArray(new ItemStack[]{}); + if (!ThaumcraftApiHelper.containsMatch(false, new ItemStack[]{cat},ores)) return false; + } + if (itags==null) return false; + for (Aspect tag:aspects.getAspects()) { + if (itags.getAmount(tag))catalyst).size()>0) { + ItemStack[] ores = ((ArrayList)catalyst).toArray(new ItemStack[]{}); + if (ThaumcraftApiHelper.containsMatch(false, new ItemStack[]{cat},ores)) return true; + } + return false; + } + + public AspectList removeMatching(AspectList itags) { + AspectList temptags = new AspectList(); + temptags.aspects.putAll(itags.aspects); + + for (Aspect tag:aspects.getAspects()) { + temptags.remove(tag, aspects.getAmount(tag)); + } + + itags = temptags; + return itags; + } + + public ItemStack getRecipeOutput() { + return recipeOutput; + } + + +} diff --git a/src/api/java/thaumcraft/api/crafting/IArcaneRecipe.java b/src/api/java/thaumcraft/api/crafting/IArcaneRecipe.java new file mode 100644 index 00000000..bb5036d2 --- /dev/null +++ b/src/api/java/thaumcraft/api/crafting/IArcaneRecipe.java @@ -0,0 +1,35 @@ +package thaumcraft.api.crafting; + +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.inventory.IInventory; +import net.minecraft.item.ItemStack; +import net.minecraft.world.World; +import thaumcraft.api.aspects.AspectList; + +public interface IArcaneRecipe +{ + + + /** + * Used to check if a recipe matches current crafting inventory + * @param player + */ + boolean matches(IInventory var1, World world, EntityPlayer player); + + /** + * Returns an Item that is the result of this recipe + */ + ItemStack getCraftingResult(IInventory var1); + + /** + * Returns the size of the recipe area + */ + int getRecipeSize(); + + ItemStack getRecipeOutput(); + AspectList getAspects(); + AspectList getAspects(IInventory var1); + String getResearch(); + + +} diff --git a/src/api/java/thaumcraft/api/crafting/IInfusionStabiliser.java b/src/api/java/thaumcraft/api/crafting/IInfusionStabiliser.java new file mode 100644 index 00000000..d137ff24 --- /dev/null +++ b/src/api/java/thaumcraft/api/crafting/IInfusionStabiliser.java @@ -0,0 +1,19 @@ +package thaumcraft.api.crafting; + +import net.minecraft.world.World; + +/** + * + * @author Azanor + * + * Blocks that implement this interface act as infusion crafting stabilisers like candles and skulls + * + */ +public interface IInfusionStabiliser { + + /** + * returns true if the block can stabilise things + */ + public boolean canStabaliseInfusion(World world, int x, int y, int z); + +} diff --git a/src/api/java/thaumcraft/api/crafting/InfusionEnchantmentRecipe.java b/src/api/java/thaumcraft/api/crafting/InfusionEnchantmentRecipe.java new file mode 100644 index 00000000..bdc5f505 --- /dev/null +++ b/src/api/java/thaumcraft/api/crafting/InfusionEnchantmentRecipe.java @@ -0,0 +1,154 @@ +package thaumcraft.api.crafting; + +import java.util.ArrayList; +import java.util.Iterator; +import java.util.Map; + +import net.minecraft.enchantment.Enchantment; +import net.minecraft.enchantment.EnchantmentHelper; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.item.ItemStack; +import net.minecraft.world.World; +import net.minecraftforge.oredict.OreDictionary; +import thaumcraft.api.ThaumcraftApiHelper; +import thaumcraft.api.aspects.AspectList; + +public class InfusionEnchantmentRecipe +{ + + public AspectList aspects; + public String research; + public ItemStack[] components; + public Enchantment enchantment; + public int recipeXP; + public int instability; + + public InfusionEnchantmentRecipe(String research, Enchantment input, int inst, + AspectList aspects2, ItemStack[] recipe) { + this.research = research; + this.enchantment = input; + this.aspects = aspects2; + this.components = recipe; + this.instability = inst; + this.recipeXP = Math.max(1, input.getMinEnchantability(1)/3); + } + + /** + * Used to check if a recipe matches current crafting inventory + * @param player + */ + public boolean matches(ArrayList input, ItemStack central, World world, EntityPlayer player) { + if (research.length()>0 && !ThaumcraftApiHelper.isResearchComplete(player.getCommandSenderName(), research)) { + return false; + } + + if (!enchantment.canApply(central) || !central.getItem().isItemTool(central)) { + return false; + } + + Map map1 = EnchantmentHelper.getEnchantments(central); + Iterator iterator = map1.keySet().iterator(); + while (iterator.hasNext()) + { + int j1 = ((Integer)iterator.next()).intValue(); + Enchantment ench = Enchantment.enchantmentsList[j1]; + if (j1 == enchantment.effectId && + EnchantmentHelper.getEnchantmentLevel(j1, central)>=ench.getMaxLevel()) + return false; + if (enchantment.effectId != ench.effectId && + (!enchantment.canApplyTogether(ench) || + !ench.canApplyTogether(enchantment))) { + return false; + } + } + + ItemStack i2 = null; + + ArrayList ii = new ArrayList(); + for (ItemStack is:input) { + ii.add(is.copy()); + } + + for (ItemStack comp:components) { + boolean b=false; + for (int a=0;a input, ItemStack central, World world, EntityPlayer player) { + if (getRecipeInput()==null) return false; + + if (research.length()>0 && !ThaumcraftApiHelper.isResearchComplete(player.getCommandSenderName(), research)) { + return false; + } + + ItemStack i2 = central.copy(); + if (getRecipeInput().getItemDamage()==OreDictionary.WILDCARD_VALUE) { + i2.setItemDamage(OreDictionary.WILDCARD_VALUE); + } + + if (!areItemStacksEqual(i2, getRecipeInput(), true)) return false; + + ArrayList ii = new ArrayList(); + for (ItemStack is:input) { + ii.add(is.copy()); + } + + for (ItemStack comp:getComponents()) { + boolean b=false; + for (int a=0;a itemMap = new HashMap(); + + for (; idx < recipe.length; idx += 2) + { + Character chr = (Character)recipe[idx]; + Object in = recipe[idx + 1]; + + if (in instanceof ItemStack) + { + itemMap.put(chr, ((ItemStack)in).copy()); + } + else if (in instanceof Item) + { + itemMap.put(chr, new ItemStack((Item)in)); + } + else if (in instanceof Block) + { + itemMap.put(chr, new ItemStack((Block)in, 1, OreDictionary.WILDCARD_VALUE)); + } + else if (in instanceof String) + { + itemMap.put(chr, OreDictionary.getOres((String)in)); + } + else + { + String ret = "Invalid shaped ore recipe: "; + for (Object tmp : recipe) + { + ret += tmp + ", "; + } + ret += output; + throw new RuntimeException(ret); + } + } + + input = new Object[width * height]; + int x = 0; + for (char chr : shape.toCharArray()) + { + input[x++] = itemMap.get(chr); + } + } + + @Override + public ItemStack getCraftingResult(IInventory var1){ return output.copy(); } + + @Override + public int getRecipeSize(){ return input.length; } + + @Override + public ItemStack getRecipeOutput(){ return output; } + + @Override + public boolean matches(IInventory inv, World world, EntityPlayer player) + { + if (research.length()>0 && !ThaumcraftApiHelper.isResearchComplete(player.getCommandSenderName(), research)) { + return false; + } + for (int x = 0; x <= MAX_CRAFT_GRID_WIDTH - width; x++) + { + for (int y = 0; y <= MAX_CRAFT_GRID_HEIGHT - height; ++y) + { + if (checkMatch(inv, x, y, false)) + { + return true; + } + + if (mirrored && checkMatch(inv, x, y, true)) + { + return true; + } + } + } + + return false; + } + + private boolean checkMatch(IInventory inv, int startX, int startY, boolean mirror) + { + for (int x = 0; x < MAX_CRAFT_GRID_WIDTH; x++) + { + for (int y = 0; y < MAX_CRAFT_GRID_HEIGHT; y++) + { + int subX = x - startX; + int subY = y - startY; + Object target = null; + + if (subX >= 0 && subY >= 0 && subX < width && subY < height) + { + if (mirror) + { + target = input[width - subX - 1 + subY * width]; + } + else + { + target = input[subX + subY * width]; + } + } + + ItemStack slot = ThaumcraftApiHelper.getStackInRowAndColumn(inv, x, y); + + if (target instanceof ItemStack) + { + if (!checkItemEquals((ItemStack)target, slot)) + { + return false; + } + } + else if (target instanceof ArrayList) + { + boolean matched = false; + + for (ItemStack item : (ArrayList)target) + { + matched = matched || checkItemEquals(item, slot); + } + + if (!matched) + { + return false; + } + } + else if (target == null && slot != null) + { + return false; + } + } + } + + return true; + } + + private boolean checkItemEquals(ItemStack target, ItemStack input) + { + if (input == null && target != null || input != null && target == null) + { + return false; + } + return (target.getItem() == input.getItem() && + (!target.hasTagCompound() || ThaumcraftApiHelper.areItemStackTagsEqualForCrafting(input,target)) && + (target.getItemDamage() == OreDictionary.WILDCARD_VALUE|| target.getItemDamage() == input.getItemDamage())); + } + + public ShapedArcaneRecipe setMirrored(boolean mirror) + { + mirrored = mirror; + return this; + } + + /** + * Returns the input for this recipe, any mod accessing this value should never + * manipulate the values in this array as it will effect the recipe itself. + * @return The recipes input vales. + */ + public Object[] getInput() + { + return this.input; + } + + @Override + public AspectList getAspects() { + return aspects; + } + + @Override + public AspectList getAspects(IInventory inv) { + return aspects; + } + + @Override + public String getResearch() { + return research; + } +} diff --git a/src/api/java/thaumcraft/api/crafting/ShapelessArcaneRecipe.java b/src/api/java/thaumcraft/api/crafting/ShapelessArcaneRecipe.java new file mode 100644 index 00000000..3b1eaeb8 --- /dev/null +++ b/src/api/java/thaumcraft/api/crafting/ShapelessArcaneRecipe.java @@ -0,0 +1,161 @@ +package thaumcraft.api.crafting; + +import java.util.ArrayList; +import java.util.Iterator; + +import net.minecraft.block.Block; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.inventory.IInventory; +import net.minecraft.item.Item; +import net.minecraft.item.ItemStack; +import net.minecraft.world.World; +import net.minecraftforge.oredict.OreDictionary; +import thaumcraft.api.ThaumcraftApiHelper; +import thaumcraft.api.aspects.AspectList; + +public class ShapelessArcaneRecipe implements IArcaneRecipe +{ + private ItemStack output = null; + private ArrayList input = new ArrayList(); + + public AspectList aspects = null; + public String research; + + public ShapelessArcaneRecipe(String research, Block result, AspectList aspects, Object... recipe){ this(research,new ItemStack(result),aspects, recipe); } + public ShapelessArcaneRecipe(String research, Item result, AspectList aspects, Object... recipe){ this(research,new ItemStack(result),aspects, recipe); } + + public ShapelessArcaneRecipe(String research, ItemStack result, AspectList aspects, Object... recipe) + { + output = result.copy(); + this.research = research; + this.aspects = aspects; + for (Object in : recipe) + { + if (in instanceof ItemStack) + { + input.add(((ItemStack)in).copy()); + } + else if (in instanceof Item) + { + input.add(new ItemStack((Item)in)); + } + else if (in instanceof Block) + { + input.add(new ItemStack((Block)in)); + } + else if (in instanceof String) + { + input.add(OreDictionary.getOres((String)in)); + } + else + { + String ret = "Invalid shapeless ore recipe: "; + for (Object tmp : recipe) + { + ret += tmp + ", "; + } + ret += output; + throw new RuntimeException(ret); + } + } + } + + @Override + public int getRecipeSize(){ return input.size(); } + + @Override + public ItemStack getRecipeOutput(){ return output; } + + @Override + public ItemStack getCraftingResult(IInventory var1){ return output.copy(); } + + @Override + public boolean matches(IInventory var1, World world, EntityPlayer player) + { + if (research.length()>0 && !ThaumcraftApiHelper.isResearchComplete(player.getCommandSenderName(), research)) { + return false; + } + + ArrayList required = new ArrayList(input); + + for (int x = 0; x < 9; x++) + { + ItemStack slot = var1.getStackInSlot(x); + + if (slot != null) + { + boolean inRecipe = false; + Iterator req = required.iterator(); + + while (req.hasNext()) + { + boolean match = false; + + Object next = req.next(); + + if (next instanceof ItemStack) + { + match = checkItemEquals((ItemStack)next, slot); + } + else if (next instanceof ArrayList) + { + for (ItemStack item : (ArrayList)next) + { + match = match || checkItemEquals(item, slot); + } + } + + if (match) + { + inRecipe = true; + required.remove(next); + break; + } + } + + if (!inRecipe) + { + return false; + } + } + } + + return required.isEmpty(); + } + + private boolean checkItemEquals(ItemStack target, ItemStack input) + { + if (input == null && target != null || input != null && target == null) + { + return false; + } + return (target.getItem() == input.getItem() && + (!target.hasTagCompound() || ThaumcraftApiHelper.areItemStackTagsEqualForCrafting(input,target)) && + (target.getItemDamage() == OreDictionary.WILDCARD_VALUE|| target.getItemDamage() == input.getItemDamage())); + } + + /** + * Returns the input for this recipe, any mod accessing this value should never + * manipulate the values in this array as it will effect the recipe itself. + * @return The recipes input vales. + */ + public ArrayList getInput() + { + return this.input; + } + + @Override + public AspectList getAspects() { + return aspects; + } + + @Override + public AspectList getAspects(IInventory inv) { + return aspects; + } + + @Override + public String getResearch() { + return research; + } +} diff --git a/src/api/java/thaumcraft/api/damagesource/DamageSourceIndirectThaumcraftEntity.java b/src/api/java/thaumcraft/api/damagesource/DamageSourceIndirectThaumcraftEntity.java new file mode 100644 index 00000000..1562d052 --- /dev/null +++ b/src/api/java/thaumcraft/api/damagesource/DamageSourceIndirectThaumcraftEntity.java @@ -0,0 +1,32 @@ +package thaumcraft.api.damagesource; + +import net.minecraft.entity.Entity; +import net.minecraft.util.DamageSource; +import net.minecraft.util.EntityDamageSourceIndirect; + +public class DamageSourceIndirectThaumcraftEntity extends EntityDamageSourceIndirect { + + private boolean fireDamage; + private float hungerDamage; + private boolean isUnblockable; + + + public DamageSourceIndirectThaumcraftEntity(String par1Str, + Entity par2Entity, Entity par3Entity) { + super(par1Str, par2Entity, par3Entity); + } + + + public DamageSource setFireDamage() + { + this.fireDamage = true; + return this; + } + + public DamageSource setDamageBypassesArmor() + { + this.isUnblockable = true; + this.hungerDamage = 0.0F; + return this; + } +} diff --git a/src/api/java/thaumcraft/api/damagesource/DamageSourceThaumcraft.java b/src/api/java/thaumcraft/api/damagesource/DamageSourceThaumcraft.java new file mode 100644 index 00000000..bb55672b --- /dev/null +++ b/src/api/java/thaumcraft/api/damagesource/DamageSourceThaumcraft.java @@ -0,0 +1,47 @@ +package thaumcraft.api.damagesource; + +import net.minecraft.entity.EntityLivingBase; +import net.minecraft.util.DamageSource; +import net.minecraft.util.EntityDamageSource; + +public class DamageSourceThaumcraft extends DamageSource +{ + + public static DamageSource taint = new DamageSourceThaumcraft("taint").setDamageBypassesArmor().setMagicDamage(); + public static DamageSource tentacle = new DamageSourceThaumcraft("tentacle"); + public static DamageSource swarm = new DamageSourceThaumcraft("swarm"); + public static DamageSource dissolve = new DamageSourceThaumcraft("dissolve").setDamageBypassesArmor(); + + protected DamageSourceThaumcraft(String par1Str) { + super(par1Str); + } + + /** This kind of damage can be blocked or not. */ + private boolean isUnblockable = false; + private boolean isDamageAllowedInCreativeMode = false; + private float hungerDamage = 0.3F; + + /** This kind of damage is based on fire or not. */ + private boolean fireDamage; + + /** This kind of damage is based on a projectile or not. */ + private boolean projectile; + + /** + * Whether this damage source will have its damage amount scaled based on the current difficulty. + */ + private boolean difficultyScaled; + private boolean magicDamage = false; + private boolean explosion = false; + + public static DamageSource causeSwarmDamage(EntityLivingBase par0EntityLiving) + { + return new EntityDamageSource("swarm", par0EntityLiving); + } + + public static DamageSource causeTentacleDamage(EntityLivingBase par0EntityLiving) + { + return new EntityDamageSource("tentacle", par0EntityLiving); + } + +} diff --git a/src/api/java/thaumcraft/api/entities/IEldritchMob.java b/src/api/java/thaumcraft/api/entities/IEldritchMob.java new file mode 100644 index 00000000..79fc75b5 --- /dev/null +++ b/src/api/java/thaumcraft/api/entities/IEldritchMob.java @@ -0,0 +1,5 @@ +package thaumcraft.api.entities; + +public interface IEldritchMob { + +} diff --git a/src/api/java/thaumcraft/api/entities/ITaintedMob.java b/src/api/java/thaumcraft/api/entities/ITaintedMob.java new file mode 100644 index 00000000..83fb1fcb --- /dev/null +++ b/src/api/java/thaumcraft/api/entities/ITaintedMob.java @@ -0,0 +1,5 @@ +package thaumcraft.api.entities; + +public interface ITaintedMob { + +} diff --git a/src/api/java/thaumcraft/api/internal/DummyInternalMethodHandler.java b/src/api/java/thaumcraft/api/internal/DummyInternalMethodHandler.java new file mode 100644 index 00000000..9af8c30e --- /dev/null +++ b/src/api/java/thaumcraft/api/internal/DummyInternalMethodHandler.java @@ -0,0 +1,78 @@ +package thaumcraft.api.internal; + +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.item.Item; +import net.minecraft.item.ItemStack; +import thaumcraft.api.aspects.Aspect; +import thaumcraft.api.aspects.AspectList; + +public class DummyInternalMethodHandler implements IInternalMethodHandler { + + @Override + public void generateVisEffect(int dim, int x, int y, int z, int x2, int y2, int z2, int color) { + + } + + @Override + public boolean isResearchComplete(String username, String researchkey) { + return false; + } + + @Override + public boolean hasDiscoveredAspect(String username, Aspect aspect) { + return false; + } + + @Override + public AspectList getDiscoveredAspects(String username) { + return null; + } + + @Override + public ItemStack getStackInRowAndColumn(Object instance, int row, int column) { + return null; + } + + @Override + public AspectList getObjectAspects(ItemStack is) { + return null; + } + + @Override + public AspectList getBonusObjectTags(ItemStack is, AspectList ot) { + return null; + } + + @Override + public AspectList generateTags(Item item, int meta) { + return null; + } + + @Override + public boolean consumeVisFromWand(ItemStack wand, EntityPlayer player, + AspectList cost, boolean doit, boolean crafting) { + return false; + } + + @Override + public boolean consumeVisFromWandCrafting(ItemStack wand, + EntityPlayer player, AspectList cost, boolean doit) { + return false; + } + + @Override + public boolean consumeVisFromInventory(EntityPlayer player, AspectList cost) { + return false; + } + + @Override + public void addWarpToPlayer(EntityPlayer player, int amount, boolean temporary) { + } + + @Override + public void addStickyWarpToPlayer(EntityPlayer player, int amount) { + } + + + +} diff --git a/src/api/java/thaumcraft/api/internal/IInternalMethodHandler.java b/src/api/java/thaumcraft/api/internal/IInternalMethodHandler.java new file mode 100644 index 00000000..73fce669 --- /dev/null +++ b/src/api/java/thaumcraft/api/internal/IInternalMethodHandler.java @@ -0,0 +1,25 @@ +package thaumcraft.api.internal; + +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.item.Item; +import net.minecraft.item.ItemStack; +import thaumcraft.api.aspects.Aspect; +import thaumcraft.api.aspects.AspectList; + +public interface IInternalMethodHandler { + + public void generateVisEffect(int dim, int x, int y, int z, int x2, int y2, int z2, int color); + public boolean isResearchComplete(String username, String researchkey); + public ItemStack getStackInRowAndColumn(Object instance, int row, int column); + public AspectList getObjectAspects(ItemStack is); + public AspectList getBonusObjectTags(ItemStack is,AspectList ot); + public AspectList generateTags(Item item, int meta); + public boolean consumeVisFromWand(ItemStack wand, EntityPlayer player, AspectList cost, boolean doit, boolean crafting); + public boolean consumeVisFromWandCrafting(ItemStack wand,EntityPlayer player, AspectList cost, boolean doit); + public boolean consumeVisFromInventory(EntityPlayer player, AspectList cost); + public void addWarpToPlayer(EntityPlayer player, int amount,boolean temporary); + public void addStickyWarpToPlayer(EntityPlayer player, int amount); + public boolean hasDiscoveredAspect(String username, Aspect aspect); + public AspectList getDiscoveredAspects(String username); + +} diff --git a/src/api/java/thaumcraft/api/internal/WeightedRandomLoot.java b/src/api/java/thaumcraft/api/internal/WeightedRandomLoot.java new file mode 100644 index 00000000..4ac6ee7d --- /dev/null +++ b/src/api/java/thaumcraft/api/internal/WeightedRandomLoot.java @@ -0,0 +1,24 @@ +package thaumcraft.api.internal; + +import java.util.ArrayList; + +import net.minecraft.item.ItemStack; +import net.minecraft.util.WeightedRandom; + + +public class WeightedRandomLoot extends WeightedRandom.Item { + + /** The Item/Block ID to generate in the bag. */ + public ItemStack item; + + public WeightedRandomLoot(ItemStack stack, int weight) + { + super(weight); + this.item = stack; + } + + public static ArrayList lootBagCommon = new ArrayList(); + public static ArrayList lootBagUncommon = new ArrayList(); + public static ArrayList lootBagRare = new ArrayList(); + +} diff --git a/src/api/java/thaumcraft/api/nodes/INode.java b/src/api/java/thaumcraft/api/nodes/INode.java new file mode 100644 index 00000000..61da1f77 --- /dev/null +++ b/src/api/java/thaumcraft/api/nodes/INode.java @@ -0,0 +1,53 @@ +package thaumcraft.api.nodes; + +import thaumcraft.api.aspects.Aspect; +import thaumcraft.api.aspects.AspectList; +import thaumcraft.api.aspects.IAspectContainer; + +public interface INode extends IAspectContainer { + + /** + * Unique identifier to distinguish nodes. Normal node id's are based on world id and coordinates + * @return + */ + public String getId(); + + public AspectList getAspectsBase(); + + /** + * Return the type of node + * @return + */ + public NodeType getNodeType(); + + /** + * Set the type of node + * @return + */ + public void setNodeType(NodeType nodeType); + + /** + * Set the node modifier + * @return + */ + public void setNodeModifier(NodeModifier nodeModifier); + + /** + * Return the node modifier + * @return + */ + public NodeModifier getNodeModifier(); + + /** + * Return the maximum capacity of each aspect the node can hold + * @return + */ + public int getNodeVisBase(Aspect aspect); + + /** + * Set the maximum capacity of each aspect the node can hold + * @return + */ + public void setNodeVisBase(Aspect aspect, short nodeVisBase); + +} diff --git a/src/api/java/thaumcraft/api/nodes/IRevealer.java b/src/api/java/thaumcraft/api/nodes/IRevealer.java new file mode 100644 index 00000000..14a19b54 --- /dev/null +++ b/src/api/java/thaumcraft/api/nodes/IRevealer.java @@ -0,0 +1,22 @@ +package thaumcraft.api.nodes; + +import net.minecraft.entity.EntityLivingBase; +import net.minecraft.item.ItemStack; + +/** + * + * @author Azanor + * + * Equipped head slot items that extend this class will make nodes visible in world. + * + */ + +public interface IRevealer { + + /* + * If this method returns true the nodes will be visible. + */ + public boolean showNodes(ItemStack itemstack, EntityLivingBase player); + + +} diff --git a/src/api/java/thaumcraft/api/nodes/NodeModifier.java b/src/api/java/thaumcraft/api/nodes/NodeModifier.java new file mode 100644 index 00000000..885b8678 --- /dev/null +++ b/src/api/java/thaumcraft/api/nodes/NodeModifier.java @@ -0,0 +1,6 @@ +package thaumcraft.api.nodes; + +public enum NodeModifier +{ + BRIGHT, PALE, FADING +} \ No newline at end of file diff --git a/src/api/java/thaumcraft/api/nodes/NodeType.java b/src/api/java/thaumcraft/api/nodes/NodeType.java new file mode 100644 index 00000000..355324b5 --- /dev/null +++ b/src/api/java/thaumcraft/api/nodes/NodeType.java @@ -0,0 +1,6 @@ +package thaumcraft.api.nodes; + +public enum NodeType +{ + NORMAL, UNSTABLE, DARK, TAINTED, HUNGRY, PURE +} \ No newline at end of file diff --git a/src/api/java/thaumcraft/api/package-info.java b/src/api/java/thaumcraft/api/package-info.java new file mode 100644 index 00000000..0de39267 --- /dev/null +++ b/src/api/java/thaumcraft/api/package-info.java @@ -0,0 +1,4 @@ +@API(owner = "Thaumcraft", apiVersion = "4.2.0.0", provides = "Thaumcraft|API") +package thaumcraft.api; + +import cpw.mods.fml.common.API; diff --git a/src/api/java/thaumcraft/api/potions/PotionFluxTaint.java b/src/api/java/thaumcraft/api/potions/PotionFluxTaint.java new file mode 100644 index 00000000..b950de0e --- /dev/null +++ b/src/api/java/thaumcraft/api/potions/PotionFluxTaint.java @@ -0,0 +1,67 @@ +package thaumcraft.api.potions; + +import net.minecraft.client.Minecraft; +import net.minecraft.entity.EntityLivingBase; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.potion.Potion; +import net.minecraft.util.ResourceLocation; +import thaumcraft.api.damagesource.DamageSourceThaumcraft; +import thaumcraft.api.entities.ITaintedMob; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; + +public class PotionFluxTaint extends Potion +{ + public static PotionFluxTaint instance = null; // will be instantiated at runtime + private int statusIconIndex = -1; + + public PotionFluxTaint(int par1, boolean par2, int par3) + { + super(par1,par2,par3); + setIconIndex(0, 0); + } + + public static void init() + { + instance.setPotionName("potion.fluxtaint"); + instance.setIconIndex(3, 1); + instance.setEffectiveness(0.25D); + } + + @Override + public boolean isBadEffect() { + return true; + } + + @Override + @SideOnly(Side.CLIENT) + public int getStatusIconIndex() { + Minecraft.getMinecraft().renderEngine.bindTexture(rl); + return super.getStatusIconIndex(); + } + + static final ResourceLocation rl = new ResourceLocation("thaumcraft","textures/misc/potions.png"); + + @Override + public void performEffect(EntityLivingBase target, int par2) { + if (target instanceof ITaintedMob) { + target.heal(1); + } else + if (!target.isEntityUndead() && !(target instanceof EntityPlayer)) + { + target.attackEntityFrom(DamageSourceThaumcraft.taint, 1); + } + else + if (!target.isEntityUndead() && (target.getMaxHealth() > 1 || (target instanceof EntityPlayer))) + { + target.attackEntityFrom(DamageSourceThaumcraft.taint, 1); + } + } + + public boolean isReady(int par1, int par2) + { + int k = 40 >> par2; + return k > 0 ? par1 % k == 0 : true; + } + +} diff --git a/src/api/java/thaumcraft/api/potions/PotionVisExhaust.java b/src/api/java/thaumcraft/api/potions/PotionVisExhaust.java new file mode 100644 index 00000000..cd7fc18c --- /dev/null +++ b/src/api/java/thaumcraft/api/potions/PotionVisExhaust.java @@ -0,0 +1,48 @@ +package thaumcraft.api.potions; + +import net.minecraft.client.Minecraft; +import net.minecraft.entity.EntityLivingBase; +import net.minecraft.potion.Potion; +import net.minecraft.util.ResourceLocation; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; + +public class PotionVisExhaust extends Potion +{ + public static PotionVisExhaust instance = null; // will be instantiated at runtime + private int statusIconIndex = -1; + + public PotionVisExhaust(int par1, boolean par2, int par3) + { + super(par1,par2,par3); + setIconIndex(0, 0); + } + + public static void init() + { + instance.setPotionName("potion.visexhaust"); + instance.setIconIndex(5, 1); + instance.setEffectiveness(0.25D); + } + + @Override + public boolean isBadEffect() { + return true; + } + + @Override + @SideOnly(Side.CLIENT) + public int getStatusIconIndex() { + Minecraft.getMinecraft().renderEngine.bindTexture(rl); + return super.getStatusIconIndex(); + } + + static final ResourceLocation rl = new ResourceLocation("thaumcraft","textures/misc/potions.png"); + + @Override + public void performEffect(EntityLivingBase target, int par2) { + + } + + +} diff --git a/src/api/java/thaumcraft/api/research/IScanEventHandler.java b/src/api/java/thaumcraft/api/research/IScanEventHandler.java new file mode 100644 index 00000000..d0efac5f --- /dev/null +++ b/src/api/java/thaumcraft/api/research/IScanEventHandler.java @@ -0,0 +1,9 @@ +package thaumcraft.api.research; + +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.item.ItemStack; +import net.minecraft.world.World; + +public interface IScanEventHandler { + ScanResult scanPhenomena(ItemStack stack, World world, EntityPlayer player); +} diff --git a/src/api/java/thaumcraft/api/research/ResearchCategories.java b/src/api/java/thaumcraft/api/research/ResearchCategories.java new file mode 100644 index 00000000..82309b36 --- /dev/null +++ b/src/api/java/thaumcraft/api/research/ResearchCategories.java @@ -0,0 +1,101 @@ +package thaumcraft.api.research; + +import java.util.Collection; +import java.util.LinkedHashMap; + +import net.minecraft.util.ResourceLocation; +import net.minecraft.util.StatCollector; + +import org.apache.logging.log4j.Level; + +import cpw.mods.fml.common.FMLLog; + +public class ResearchCategories { + + //Research + public static LinkedHashMap researchCategories = new LinkedHashMap (); + + /** + * @param key + * @return the research item linked to this key + */ + public static ResearchCategoryList getResearchList(String key) { + return researchCategories.get(key); + } + + /** + * @param key + * @return the name of the research category linked to this key. + * Must be stored as localization information in the LanguageRegistry. + */ + public static String getCategoryName(String key) { + return StatCollector.translateToLocal("tc.research_category."+key); + } + + /** + * @param key the research key + * @return the ResearchItem object. + */ + public static ResearchItem getResearch(String key) { + Collection rc = researchCategories.values(); + for (Object cat:rc) { + Collection rl = ((ResearchCategoryList)cat).research.values(); + for (Object ri:rl) { + if ((((ResearchItem)ri).key).equals(key)) return (ResearchItem)ri; + } + } + return null; + } + + /** + * This should only be done at the PostInit stage + * @param key the key used for this category + * @param icon the icon to be used for the research category tab + * @param background the resource location of the background image to use for this category + * @return the name of the research linked to this key + */ + public static void registerCategory(String key, ResourceLocation icon, ResourceLocation background) { + if (getResearchList(key)==null) { + ResearchCategoryList rl = new ResearchCategoryList(icon, background); + researchCategories.put(key, rl); + } + } + + public static void addResearch(ResearchItem ri) { + ResearchCategoryList rl = getResearchList(ri.category); + if (rl!=null && !rl.research.containsKey(ri.key)) { + + if (!ri.isVirtual()) { + for (ResearchItem rr:rl.research.values()) { + if (rr.displayColumn == ri.displayColumn && rr.displayRow == ri.displayRow) { + FMLLog.log(Level.FATAL, "[Thaumcraft] Research ["+ri.getName()+"] not added as it overlaps with existing research ["+rr.getName()+"]"); + return; + } + } + } + + + rl.research.put(ri.key, ri); + + if (ri.displayColumn < rl.minDisplayColumn) + { + rl.minDisplayColumn = ri.displayColumn; + } + + if (ri.displayRow < rl.minDisplayRow) + { + rl.minDisplayRow = ri.displayRow; + } + + if (ri.displayColumn > rl.maxDisplayColumn) + { + rl.maxDisplayColumn = ri.displayColumn; + } + + if (ri.displayRow > rl.maxDisplayRow) + { + rl.maxDisplayRow = ri.displayRow; + } + } + } +} diff --git a/src/api/java/thaumcraft/api/research/ResearchCategoryList.java b/src/api/java/thaumcraft/api/research/ResearchCategoryList.java new file mode 100644 index 00000000..7eed0101 --- /dev/null +++ b/src/api/java/thaumcraft/api/research/ResearchCategoryList.java @@ -0,0 +1,37 @@ +package thaumcraft.api.research; + +import java.util.HashMap; +import java.util.Map; + +import net.minecraft.util.ResourceLocation; + +public class ResearchCategoryList { + + /** Is the smallest column used on the GUI. */ + public int minDisplayColumn; + + /** Is the smallest row used on the GUI. */ + public int minDisplayRow; + + /** Is the biggest column used on the GUI. */ + public int maxDisplayColumn; + + /** Is the biggest row used on the GUI. */ + public int maxDisplayRow; + + /** display variables **/ + public ResourceLocation icon; + public ResourceLocation background; + + public ResearchCategoryList(ResourceLocation icon, ResourceLocation background) { + this.icon = icon; + this.background = background; + } + + //Research + public Map research = new HashMap(); + + + + +} diff --git a/src/api/java/thaumcraft/api/research/ResearchItem.java b/src/api/java/thaumcraft/api/research/ResearchItem.java new file mode 100644 index 00000000..1d5fd8bf --- /dev/null +++ b/src/api/java/thaumcraft/api/research/ResearchItem.java @@ -0,0 +1,369 @@ +package thaumcraft.api.research; + +import net.minecraft.item.ItemStack; +import net.minecraft.util.ResourceLocation; +import net.minecraft.util.StatCollector; +import thaumcraft.api.aspects.Aspect; +import thaumcraft.api.aspects.AspectList; + +public class ResearchItem +{ + /** + * A short string used as a key for this research. Must be unique + */ + public final String key; + + /** + * A short string used as a reference to the research category to which this must be added. + */ + public final String category; + + /** + * The aspect tags and their values required to complete this research + */ + public final AspectList tags; + + /** + * This links to any research that needs to be completed before this research can be discovered or learnt. + */ + public String[] parents = null; + + /** + * Like parent above, but a line will not be displayed in the thaumonomicon linking them. Just used to prevent clutter. + */ + public String[] parentsHidden = null; + /** + * any research linked to this that will be unlocked automatically when this research is complete + */ + public String[] siblings = null; + + /** + * the horizontal position of the research icon + */ + public final int displayColumn; + + /** + * the vertical position of the research icon + */ + public final int displayRow; + + /** + * the icon to be used for this research + */ + public final ItemStack icon_item; + + /** + * the icon to be used for this research + */ + public final ResourceLocation icon_resource; + + /** + * How large the research grid is. Valid values are 1 to 3. + */ + private int complexity; + + /** + * Special research has a spiky border. Used for important research milestones. + */ + private boolean isSpecial; + + /** + * Research that can be directly purchased with RP in normal research difficulty. + */ + private boolean isSecondary; + + /** + * This indicates if the research should use a circular icon border. Usually used for "passive" research + * that doesn't have recipes and grants passive effects, or that unlock automatically. + */ + private boolean isRound; + + /** + * Stub research cannot be discovered by normal means, but can be unlocked via the sibling system. + */ + private boolean isStub; + + /** + * This indicated that the research is completely hidden and cannot be discovered by any + * player-controlled means. The recipes will never show up in the thaumonomicon. + * Usually used to unlock "hidden" recipes via sibling unlocking, like + * the various cap and rod combos for wands. + */ + private boolean isVirtual; + + + + /** + * Concealed research does not display in the thaumonomicon until parent researches are discovered. + */ + private boolean isConcealed; + + /** + * Hidden research can only be discovered via scanning or knowledge fragments + */ + private boolean isHidden; + + /** + * This is the same as isHidden, except it cannot be discovered with knowledge fragments, only scanning. + */ + private boolean isLost; + + /** + * These research items will automatically unlock for all players on game start + */ + private boolean isAutoUnlock; + + /** + * Scanning these items will have a chance of revealing hidden knowledge in the thaumonomicon + */ + private ItemStack[] itemTriggers; + + /** + * Scanning these entities will have a chance of revealing hidden knowledge in the thaumonomicon + */ + private String[] entityTriggers; + + /** + * Scanning things with these aspects will have a chance of revealing hidden knowledge in the thaumonomicon + */ + private Aspect[] aspectTriggers; + + private ResearchPage[] pages = null; + + public ResearchItem(String key, String category) + { + this.key = key; + this.category = category; + this.tags = new AspectList(); + this.icon_resource = null; + this.icon_item = null; + this.displayColumn = 0; + this.displayRow = 0; + this.setVirtual(); + + } + + public ResearchItem(String key, String category, AspectList tags, int col, int row, int complex, ResourceLocation icon) + { + this.key = key; + this.category = category; + this.tags = tags; + this.icon_resource = icon; + this.icon_item = null; + this.displayColumn = col; + this.displayRow = row; + this.complexity = complex; + if (complexity < 1) this.complexity = 1; + if (complexity > 3) this.complexity = 3; + } + + public ResearchItem(String key, String category, AspectList tags, int col, int row, int complex, ItemStack icon) + { + this.key = key; + this.category = category; + this.tags = tags; + this.icon_item = icon; + this.icon_resource = null; + this.displayColumn = col; + this.displayRow = row; + this.complexity = complex; + if (complexity < 1) this.complexity = 1; + if (complexity > 3) this.complexity = 3; + } + + public ResearchItem setSpecial() + { + this.isSpecial = true; + return this; + } + + public ResearchItem setStub() + { + this.isStub = true; + return this; + } + + public ResearchItem setLost() + { + this.isLost = true; + return this; + } + + public ResearchItem setConcealed() + { + this.isConcealed = true; + return this; + } + + public ResearchItem setHidden() + { + this.isHidden = true; + return this; + } + + public ResearchItem setVirtual() + { + this.isVirtual = true; + return this; + } + + public ResearchItem setParents(String... par) + { + this.parents = par; + return this; + } + + + + public ResearchItem setParentsHidden(String... par) + { + this.parentsHidden = par; + return this; + } + + public ResearchItem setSiblings(String... sib) + { + this.siblings = sib; + return this; + } + + public ResearchItem setPages(ResearchPage... par) + { + this.pages = par; + return this; + } + + public ResearchPage[] getPages() { + return pages; + } + + public ResearchItem setItemTriggers(ItemStack... par) + { + this.itemTriggers = par; + return this; + } + + public ResearchItem setEntityTriggers(String... par) + { + this.entityTriggers = par; + return this; + } + + public ResearchItem setAspectTriggers(Aspect... par) + { + this.aspectTriggers = par; + return this; + } + + public ItemStack[] getItemTriggers() { + return itemTriggers; + } + + public String[] getEntityTriggers() { + return entityTriggers; + } + + public Aspect[] getAspectTriggers() { + return aspectTriggers; + } + + public ResearchItem registerResearchItem() + { + ResearchCategories.addResearch(this); + return this; + } + + public String getName() + { + return StatCollector.translateToLocal("tc.research_name."+key); + } + + public String getText() + { + return StatCollector.translateToLocal("tc.research_text."+key); + } + + public boolean isSpecial() + { + return this.isSpecial; + } + + public boolean isStub() + { + return this.isStub; + } + + public boolean isLost() + { + return this.isLost; + } + + public boolean isConcealed() + { + return this.isConcealed; + } + + public boolean isHidden() + { + return this.isHidden; + } + + public boolean isVirtual() + { + return this.isVirtual; + } + + public boolean isAutoUnlock() { + return isAutoUnlock; + } + + public ResearchItem setAutoUnlock() + { + this.isAutoUnlock = true; + return this; + } + + public boolean isRound() { + return isRound; + } + + public ResearchItem setRound() { + this.isRound = true; + return this; + } + + public boolean isSecondary() { + return isSecondary; + } + + public ResearchItem setSecondary() { + this.isSecondary = true; + return this; + } + + public int getComplexity() { + return complexity; + } + + public ResearchItem setComplexity(int complexity) { + this.complexity = complexity; + return this; + } + + /** + * @return the aspect aspects ordinal with the highest value. Used to determine scroll color and similar things + */ + public Aspect getResearchPrimaryTag() { + Aspect aspect=null; + int highest=0; + if (tags!=null) + for (Aspect tag:tags.getAspects()) { + if (tags.getAmount(tag)>highest) { + aspect=tag; + highest=tags.getAmount(tag); + }; + } + return aspect; + } + +} diff --git a/src/api/java/thaumcraft/api/research/ResearchPage.java b/src/api/java/thaumcraft/api/research/ResearchPage.java new file mode 100644 index 00000000..fdada843 --- /dev/null +++ b/src/api/java/thaumcraft/api/research/ResearchPage.java @@ -0,0 +1,193 @@ +package thaumcraft.api.research; + +import java.util.List; + +import net.minecraft.item.ItemStack; +import net.minecraft.item.crafting.FurnaceRecipes; +import net.minecraft.item.crafting.IRecipe; +import net.minecraft.util.ResourceLocation; +import net.minecraft.util.StatCollector; +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; + +public class ResearchPage { + public static enum PageType + { + TEXT, + TEXT_CONCEALED, + IMAGE, + CRUCIBLE_CRAFTING, + ARCANE_CRAFTING, + ASPECTS, + NORMAL_CRAFTING, + INFUSION_CRAFTING, + COMPOUND_CRAFTING, + INFUSION_ENCHANTMENT, + SMELTING + } + + public PageType type = PageType.TEXT; + + public String text=null; + public String research=null; + public ResourceLocation image=null; + public AspectList aspects=null; + public Object recipe=null; + public ItemStack recipeOutput=null; + + /** + * @param text this can (but does not have to) be a reference to a localization variable, not the actual text. + */ + public ResearchPage(String text) { + this.type = PageType.TEXT; + this.text = text; + } + + /** + * @param research this page will only be displayed if the player has discovered this research + * @param text this can (but does not have to) be a reference to a localization variable, not the actual text. + */ + public ResearchPage(String research, String text) { + this.type = PageType.TEXT_CONCEALED; + this.research = research; + this.text = text; + } + + /** + * @param recipe a vanilla crafting recipe. + */ + public ResearchPage(IRecipe recipe) { + this.type = PageType.NORMAL_CRAFTING; + this.recipe = recipe; + this.recipeOutput = recipe.getRecipeOutput(); + } + + /** + * @param recipe a collection of vanilla crafting recipes. + */ + public ResearchPage(IRecipe[] recipe) { + this.type = PageType.NORMAL_CRAFTING; + this.recipe = recipe; + } + + /** + * @param recipe a collection of arcane crafting recipes. + */ + public ResearchPage(IArcaneRecipe[] recipe) { + this.type = PageType.ARCANE_CRAFTING; + this.recipe = recipe; + } + + /** + * @param recipe a collection of arcane crafting recipes. + */ + public ResearchPage(CrucibleRecipe[] recipe) { + this.type = PageType.CRUCIBLE_CRAFTING; + this.recipe = recipe; + } + + /** + * @param recipe a collection of infusion crafting recipes. + */ + public ResearchPage(InfusionRecipe[] recipe) { + this.type = PageType.INFUSION_CRAFTING; + this.recipe = recipe; + } + + /** + * @param recipe a compound crafting recipe. + */ + public ResearchPage(List recipe) { + this.type = PageType.COMPOUND_CRAFTING; + this.recipe = recipe; + } + + /** + * @param recipe an arcane worktable crafting recipe. + */ + public ResearchPage(IArcaneRecipe recipe) { + this.type = PageType.ARCANE_CRAFTING; + this.recipe = recipe; + this.recipeOutput = recipe.getRecipeOutput(); + } + + /** + * @param recipe an alchemy crafting recipe. + */ + public ResearchPage(CrucibleRecipe recipe) { + this.type = PageType.CRUCIBLE_CRAFTING; + this.recipe = recipe; + this.recipeOutput = recipe.getRecipeOutput(); + } + + /** + * @param recipe a furnace smelting crafting recipe. + */ + public ResearchPage(ItemStack input) { + this.type = PageType.SMELTING; + this.recipe = input; + this.recipeOutput = FurnaceRecipes.smelting().getSmeltingResult(input); + } + + /** + * @param recipe an infusion crafting recipe. + */ + public ResearchPage(InfusionRecipe recipe) { + this.type = PageType.INFUSION_CRAFTING; + this.recipe = recipe; + if (recipe.getRecipeOutput() instanceof ItemStack) { + this.recipeOutput = (ItemStack) recipe.getRecipeOutput(); + } else { + this.recipeOutput = recipe.getRecipeInput(); + } + } + + /** + * @param recipe an infusion crafting recipe. + */ + public ResearchPage(InfusionEnchantmentRecipe recipe) { + this.type = PageType.INFUSION_ENCHANTMENT; + this.recipe = recipe; +// if (recipe.recipeOutput instanceof ItemStack) { +// this.recipeOutput = (ItemStack) recipe.recipeOutput; +// } else { +// this.recipeOutput = recipe.recipeInput; +// } + } + + /** + * @param image + * @param caption this can (but does not have to) be a reference to a localization variable, not the actual text. + */ + public ResearchPage(ResourceLocation image, String caption) { + this.type = PageType.IMAGE; + this.image = image; + this.text = caption; + } + + /** + * This function should really not be called directly - used internally + */ + public ResearchPage(AspectList as) { + this.type = PageType.ASPECTS; + this.aspects = as; + } + + /** + * returns a localized text of the text field (if one exists). Returns the text field itself otherwise. + * @return + */ + public String getTranslatedText() { + String ret=""; + if (text != null) { + ret = StatCollector.translateToLocal(text); + if (ret.isEmpty()) ret = text; + } + return ret; + } + + +} diff --git a/src/api/java/thaumcraft/api/research/ScanResult.java b/src/api/java/thaumcraft/api/research/ScanResult.java new file mode 100644 index 00000000..e1498f31 --- /dev/null +++ b/src/api/java/thaumcraft/api/research/ScanResult.java @@ -0,0 +1,39 @@ +package thaumcraft.api.research; + +import net.minecraft.entity.Entity; + +public class ScanResult { + public byte type = 0; //1=blocks,2=entities,3=phenomena + public int id; + public int meta; + public Entity entity; + public String phenomena; + + public ScanResult(byte type, int blockId, int blockMeta, Entity entity, + String phenomena) { + super(); + this.type = type; + this.id = blockId; + this.meta = blockMeta; + this.entity = entity; + this.phenomena = phenomena; + } + + @Override + public boolean equals(Object obj) { + if (obj instanceof ScanResult) { + ScanResult sr = (ScanResult) obj; + if (type != sr.type) + return false; + if (type == 1 + && (id != sr.id || meta != sr.meta)) + return false; + if (type == 2 && entity.getEntityId() != sr.entity.getEntityId()) + return false; + if (type == 3 && !phenomena.equals(sr.phenomena)) + return false; + } + return true; + } + +} diff --git a/src/api/java/thaumcraft/api/visnet/TileVisNode.java b/src/api/java/thaumcraft/api/visnet/TileVisNode.java new file mode 100644 index 00000000..204879e6 --- /dev/null +++ b/src/api/java/thaumcraft/api/visnet/TileVisNode.java @@ -0,0 +1,188 @@ +package thaumcraft.api.visnet; + +import java.lang.ref.WeakReference; +import java.util.ArrayList; +import java.util.HashMap; + +import thaumcraft.api.TileThaumcraft; +import thaumcraft.api.WorldCoordinates; +import thaumcraft.api.aspects.Aspect; + +/** + * @author Azanor + * + * The tile entity used by nodes in the vis energy network. A node is either a source (like an aura node), + * a transport relay or vis receiver (like the infernal furnace). + * + */ +public abstract class TileVisNode extends TileThaumcraft { + + WeakReference parent = null; + ArrayList> children = new ArrayList>(); + + /** + * @return the WorldCoordinates location of where this node is located + */ + public WorldCoordinates getLocation() { + return new WorldCoordinates(this); + } + + /** + * @return the number of blocks away this node will check for parent nodes to connect to. + */ + public abstract int getRange(); + + /** + * @return true if this is the source or root node of the vis network. + */ + public abstract boolean isSource(); + + /** + * This method should never be called directly. Use VisNetHandler.drainVis() instead + * @param aspect what aspect to drain + * @param vis how much to drain + * @return how much was actually drained + */ + public int consumeVis(Aspect aspect, int vis) { + if (VisNetHandler.isNodeValid(getParent())) { + int out = getParent().get().consumeVis(aspect, vis); + if (out>0) { + triggerConsumeEffect(aspect); + } + return out; + } + return 0; + } + + public void removeThisNode() { + for (WeakReference n:getChildren()) { + if (n!=null && n.get()!=null) { + n.get().removeThisNode(); + } + } + + children = new ArrayList>(); + if (VisNetHandler.isNodeValid(this.getParent())) { + this.getParent().get().nodeRefresh=true; + } + this.setParent(null); + this.parentChanged(); + + if (this.isSource()) { + HashMap> sourcelist = VisNetHandler.sources.get(worldObj.provider.dimensionId); + if (sourcelist==null) { + sourcelist = new HashMap>(); + } + sourcelist.remove(getLocation()); + VisNetHandler.sources.put( worldObj.provider.dimensionId, sourcelist ); + } + + worldObj.markBlockForUpdate(xCoord, yCoord, zCoord); + } + + + + @Override + public void invalidate() { + removeThisNode(); + super.invalidate(); + } + + public void triggerConsumeEffect(Aspect aspect) { } + + /** + * @return + */ + public WeakReference getParent() { + return parent; + } + + /** + * @return + */ + public WeakReference getRootSource() { + return VisNetHandler.isNodeValid(getParent()) ? + getParent().get().getRootSource() : this.isSource() ? + new WeakReference(this) : null; + } + + /** + * @param parent + */ + public void setParent(WeakReference parent) { + this.parent = parent; + } + + /** + * @return + */ + public ArrayList> getChildren() { + return children; + } + + @Override + public boolean canUpdate() { + return true; + } + + protected int nodeCounter = 0; + private boolean nodeRegged = false; + public boolean nodeRefresh = false; + + @Override + public void updateEntity() { + + if (!worldObj.isRemote && ((nodeCounter++) % 40==0 || nodeRefresh)) { + //check for changes + if (!nodeRefresh && children.size()>0) { + for (WeakReference n:children) { + if (n==null || n.get()==null || !VisNetHandler.canNodeBeSeen(this, n.get())) { + nodeRefresh=true; + break; + } + } + } + + //refresh linked nodes + if (nodeRefresh) { + for (WeakReference n:children) { + if (n.get()!=null) { + n.get().nodeRefresh=true; + } + } + children.clear(); + parent=null; + } + + //redo stuff + if (isSource() && !nodeRegged) { + VisNetHandler.addSource(getWorldObj(), this); + nodeRegged = true; + } else + if (!isSource() && !VisNetHandler.isNodeValid(getParent())) { + setParent(VisNetHandler.addNode(getWorldObj(), this)); + nodeRefresh=true; + } + + if (nodeRefresh) { + worldObj.markBlockForUpdate(xCoord, yCoord, zCoord); + parentChanged(); + } + nodeRefresh=false; + } + + } + + public void parentChanged() { } + + /** + * @return the type of shard this is attuned to: + * none -1, air 0, fire 1, water 2, earth 3, order 4, entropy 5 + * Should return -1 for most implementations + */ + public byte getAttunement() { + return -1; + } + + +} diff --git a/src/api/java/thaumcraft/api/visnet/VisNetHandler.java b/src/api/java/thaumcraft/api/visnet/VisNetHandler.java new file mode 100644 index 00000000..7ac4c699 --- /dev/null +++ b/src/api/java/thaumcraft/api/visnet/VisNetHandler.java @@ -0,0 +1,282 @@ +package thaumcraft.api.visnet; + +import java.lang.ref.WeakReference; +import java.util.ArrayList; +import java.util.HashMap; + +import net.minecraft.util.MovingObjectPosition; +import net.minecraft.util.MovingObjectPosition.MovingObjectType; +import net.minecraft.util.Vec3; +import net.minecraft.world.World; +import thaumcraft.api.ThaumcraftApi; +import thaumcraft.api.ThaumcraftApiHelper; +import thaumcraft.api.WorldCoordinates; +import thaumcraft.api.aspects.Aspect; + +public class VisNetHandler { + + // NODE DRAINING + /** + * This method drains vis from a relay or source near the passed in + * location. The amount received can be less than the amount requested so + * take that into account. + * + * @param world + * @param x the x position of the draining block or entity + * @param y the y position of the draining block or entity + * @param z the z position of the draining block or entity + * @param aspect what aspect to drain + * @param amount how much to drain + * @return how much was actually drained + */ + public static int drainVis(World world, int x, int y, int z, Aspect aspect, int amount) { + + int drainedAmount = 0; + + WorldCoordinates drainer = new WorldCoordinates(x, y, z, + world.provider.dimensionId); + if (!nearbyNodes.containsKey(drainer)) { + calculateNearbyNodes(world, x, y, z); + } + + ArrayList> nodes = nearbyNodes.get(drainer); + if (nodes!=null && nodes.size()>0) + for (WeakReference noderef : nodes) { + + TileVisNode node = noderef.get(); + + if (node == null) continue; + + int a = node.consumeVis(aspect, amount); + drainedAmount += a; + amount -= a; + if (a>0) { + int color = Aspect.getPrimalAspects().indexOf(aspect); + generateVisEffect(world.provider.dimensionId, x, y, z, node.xCoord, node.yCoord, node.zCoord, color); + } + if (amount <= 0) { + break; + } + } + + return drainedAmount; + } + + public static void generateVisEffect(int dim, int x, int y, int z, int x2, int y2, int z2, int color) { + ThaumcraftApi.internalMethods.generateVisEffect(dim, x, y, z, x2, y2, z2, color); + } + + public static HashMap>> sources = new HashMap>>(); + + public static void addSource(World world, TileVisNode vs) { + HashMap> sourcelist = sources + .get(world.provider.dimensionId); + if (sourcelist == null) { + sourcelist = new HashMap>(); + } + sourcelist.put(vs.getLocation(), new WeakReference(vs)); + sources.put(world.provider.dimensionId, sourcelist); + nearbyNodes.clear(); + } + + public static boolean isNodeValid(WeakReference node) { + if (node == null || node.get() == null || node.get().isInvalid()) + return false; + return true; + } + + public static WeakReference addNode(World world, TileVisNode vn) { + WeakReference ref = new WeakReference(vn); + + HashMap> sourcelist = sources + .get(world.provider.dimensionId); + if (sourcelist == null) { + sourcelist = new HashMap>(); + return null; + } + + ArrayList nearby = new ArrayList(); + + for (WeakReference root : sourcelist.values()) { + if (!isNodeValid(root)) + continue; + + TileVisNode source = root.get(); + + float r = inRange(world, vn.getLocation(), source.getLocation(), + vn.getRange()); + if (r > 0) { + nearby.add(new Object[] { source, r - vn.getRange() * 2 }); + } + + nearby = findClosestNodes(vn, source, nearby); + cache.clear(); + } + + float dist = Float.MAX_VALUE; + TileVisNode closest = null; + if (nearby.size() > 0) { + for (Object[] o : nearby) { + if ((Float) o[1] < dist && + (vn.getAttunement() == -1 || ((TileVisNode) o[0]).getAttunement() == -1 || + vn.getAttunement() == ((TileVisNode) o[0]).getAttunement())//) { + && canNodeBeSeen(vn,(TileVisNode)o[0])) { + dist = (Float) o[1]; + closest = (TileVisNode) o[0]; + } + } + } + if (closest != null) { + closest.getChildren().add(ref); + nearbyNodes.clear(); + return new WeakReference(closest); + } + + return null; + } + + static ArrayList cache = new ArrayList(); + public static ArrayList findClosestNodes(TileVisNode target, + TileVisNode parent, ArrayList in) { + + if (cache.size() > 512 || cache.contains(new WorldCoordinates(parent))) return in; + cache.add(new WorldCoordinates(parent)); + + for (WeakReference childWR : parent.getChildren()) { + TileVisNode child = childWR.get(); + + if (child != null && !child.equals(target) && !child.equals(parent)) { + float r2 = inRange(child.getWorldObj(), child.getLocation(), + target.getLocation(), target.getRange()); + if (r2 > 0) { + in.add(new Object[] { child, r2 }); + } + + in = findClosestNodes(target, child, in); + } + } + return in; + } + + private static float inRange(World world, WorldCoordinates cc1, + WorldCoordinates cc2, int range) { + float distance = cc1.getDistanceSquaredToWorldCoordinates(cc2); + return distance > range * range ? -1 : distance; + } + + private static HashMap>> nearbyNodes = new HashMap>>(); + + private static void calculateNearbyNodes(World world, int x, int y, int z) { + + HashMap> sourcelist = sources + .get(world.provider.dimensionId); + if (sourcelist == null) { + sourcelist = new HashMap>(); + return; + } + + ArrayList> cn = new ArrayList>(); + WorldCoordinates drainer = new WorldCoordinates(x, y, z, + world.provider.dimensionId); + + ArrayList nearby = new ArrayList(); + + for (WeakReference root : sourcelist.values()) { + + if (!isNodeValid(root)) + continue; + + TileVisNode source = root.get(); + + TileVisNode closest = null; + float range = Float.MAX_VALUE; + + float r = inRange(world, drainer, source.getLocation(), + source.getRange()); + if (r > 0) { + range = r; + closest = source; + } + + ArrayList> children = new ArrayList>(); + children = getAllChildren(source,children); + + for (WeakReference child : children) { + TileVisNode n = child.get(); + if (n != null && !n.equals(root)) { + + float r2 = inRange(n.getWorldObj(), n.getLocation(), + drainer, n.getRange()); + if (r2 > 0 && r2 < range) { + range = r2; + closest = n; + } + } + } + + if (closest != null) { + + cn.add(new WeakReference(closest)); + } + } + + nearbyNodes.put(drainer, cn); + } + + private static ArrayList> getAllChildren(TileVisNode source, ArrayList> list) { + for (WeakReference child : source.getChildren()) { + TileVisNode n = child.get(); + + if (n != null && n.getWorldObj()!=null && isChunkLoaded(n.getWorldObj(), n.xCoord, n.zCoord)) { + list.add(child); + list = getAllChildren(n,list); + } + } + return list; + } + + public static boolean isChunkLoaded(World world, int x, int z) { + int xx = x >> 4; + int zz = z >> 4; + return world.getChunkProvider().chunkExists(xx, zz); + } + + public static boolean canNodeBeSeen(TileVisNode source,TileVisNode target) + { + MovingObjectPosition mop = ThaumcraftApiHelper.rayTraceIgnoringSource(source.getWorldObj(), + Vec3.createVectorHelper(source.xCoord+.5, source.yCoord+.5,source.zCoord+.5), + Vec3.createVectorHelper(target.xCoord+.5, target.yCoord+.5,target.zCoord+.5), + false, true, false); + return mop == null || (mop.typeOfHit==MovingObjectType.BLOCK && + mop.blockX==target.xCoord && mop.blockY==target.yCoord && mop.blockZ==target.zCoord); + } + + // public static HashMap> + // noderef = new HashMap>(); + // + // public static TileVisNode getClosestNodeWithinRadius(World world, int x, + // int y, int z, int radius) { + // TileVisNode out = null; + // WorldCoordinates wc = null; + // float cd = Float.MAX_VALUE; + // for (int sx = x - radius; sx <= x + radius; sx++) { + // for (int sy = y - radius; sy <= y + radius; sy++) { + // for (int sz = z - radius; sz <= z + radius; sz++) { + // wc = new WorldCoordinates(sx,sy,sz,world.provider.dimensionId); + // if (noderef.containsKey(wc)) { + // float d = wc.getDistanceSquared(x, y, z); + // if (d=types.length) { + FocusUpgradeType[] temp = new FocusUpgradeType[id+1]; + System.arraycopy(types, 0, temp, 0, types.length); + types = temp; + } + + types[id] = this; + } + + public String getLocalizedName() { + return StatCollector.translateToLocal(name); + } + + public String getLocalizedText() { + return StatCollector.translateToLocal(text); + } + + @Override + public boolean equals(Object obj) { + if (obj instanceof FocusUpgradeType) { + return this.id == ((FocusUpgradeType)obj).id; + } else return false; + } + + // basic upgrade types + public static FocusUpgradeType potency = new FocusUpgradeType( 0, + new ResourceLocation("thaumcraft", "textures/foci/potency.png"), + "focus.upgrade.potency.name","focus.upgrade.potency.text", + new AspectList().add(Aspect.WEAPON,1)); + + public static FocusUpgradeType frugal = new FocusUpgradeType( 1, + new ResourceLocation("thaumcraft", "textures/foci/frugal.png"), + "focus.upgrade.frugal.name","focus.upgrade.frugal.text", + new AspectList().add(Aspect.HUNGER,1)); + + public static FocusUpgradeType treasure = new FocusUpgradeType( 2, + new ResourceLocation("thaumcraft", "textures/foci/treasure.png"), + "focus.upgrade.treasure.name","focus.upgrade.treasure.text", + new AspectList().add(Aspect.GREED,1)); + + public static FocusUpgradeType enlarge = new FocusUpgradeType( 3, + new ResourceLocation("thaumcraft", "textures/foci/enlarge.png"), + "focus.upgrade.enlarge.name","focus.upgrade.enlarge.text", + new AspectList().add(Aspect.TRAVEL,1)); + + public static FocusUpgradeType alchemistsfire = new FocusUpgradeType( 4, + new ResourceLocation("thaumcraft", "textures/foci/alchemistsfire.png"), + "focus.upgrade.alchemistsfire.name","focus.upgrade.alchemistsfire.text", + new AspectList().add(Aspect.ENERGY,1).add(Aspect.SLIME,1)); + + public static FocusUpgradeType alchemistsfrost = new FocusUpgradeType( 5, + new ResourceLocation("thaumcraft", "textures/foci/alchemistsfrost.png"), + "focus.upgrade.alchemistsfrost.name","focus.upgrade.alchemistsfrost.text", + new AspectList().add(Aspect.COLD,1).add(Aspect.TRAP,1)); + + public static FocusUpgradeType architect = new FocusUpgradeType( 6, + new ResourceLocation("thaumcraft", "textures/foci/architect.png"), + "focus.upgrade.architect.name","focus.upgrade.architect.text", + new AspectList().add(Aspect.CRAFT,1)); + + public static FocusUpgradeType extend = new FocusUpgradeType( 7, + new ResourceLocation("thaumcraft", "textures/foci/extend.png"), + "focus.upgrade.extend.name","focus.upgrade.extend.text", + new AspectList().add(Aspect.EXCHANGE,1)); + + public static FocusUpgradeType silktouch = new FocusUpgradeType( 8, + new ResourceLocation("thaumcraft", "textures/foci/silktouch.png"), + "focus.upgrade.silktouch.name","focus.upgrade.silktouch.text", + new AspectList().add(Aspect.GREED,1)); + + +} diff --git a/src/api/java/thaumcraft/api/wands/IWandRodOnUpdate.java b/src/api/java/thaumcraft/api/wands/IWandRodOnUpdate.java new file mode 100644 index 00000000..4ef8c849 --- /dev/null +++ b/src/api/java/thaumcraft/api/wands/IWandRodOnUpdate.java @@ -0,0 +1,16 @@ +package thaumcraft.api.wands; + +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.item.ItemStack; + +/** + * + * @author azanor + * + * Implemented by a class that you wish to be called whenever a wand with this rod performs its + * update tick. + * + */ +public interface IWandRodOnUpdate { + void onUpdate(ItemStack itemstack, EntityPlayer player); +} diff --git a/src/api/java/thaumcraft/api/wands/IWandTriggerManager.java b/src/api/java/thaumcraft/api/wands/IWandTriggerManager.java new file mode 100644 index 00000000..7c299deb --- /dev/null +++ b/src/api/java/thaumcraft/api/wands/IWandTriggerManager.java @@ -0,0 +1,15 @@ +package thaumcraft.api.wands; + +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.item.ItemStack; +import net.minecraft.world.World; + +public interface IWandTriggerManager { + + /** + * This class will be called by wands with the proper parameters. It is up to you to decide what to do with them. + */ + public boolean performTrigger(World world, ItemStack wand, EntityPlayer player, + int x, int y, int z, int side, int event); + +} diff --git a/src/api/java/thaumcraft/api/wands/IWandable.java b/src/api/java/thaumcraft/api/wands/IWandable.java new file mode 100644 index 00000000..aeb9bac7 --- /dev/null +++ b/src/api/java/thaumcraft/api/wands/IWandable.java @@ -0,0 +1,25 @@ +package thaumcraft.api.wands; + +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.item.ItemStack; +import net.minecraft.world.World; + +/** + * + * @author azanor + * + * Add this to a tile entity that you wish wands to interact with in some way. + * + */ + +public interface IWandable { + + public int onWandRightClick(World world, ItemStack wandstack, EntityPlayer player, int x, int y, int z, int side, int md); + + public ItemStack onWandRightClick(World world, ItemStack wandstack, EntityPlayer player); + + public void onUsingWandTick(ItemStack wandstack, EntityPlayer player, int count); + + public void onWandStoppedUsing(ItemStack wandstack, World world, EntityPlayer player, int count); + +} diff --git a/src/api/java/thaumcraft/api/wands/ItemFocusBasic.java b/src/api/java/thaumcraft/api/wands/ItemFocusBasic.java new file mode 100644 index 00000000..e8938e91 --- /dev/null +++ b/src/api/java/thaumcraft/api/wands/ItemFocusBasic.java @@ -0,0 +1,276 @@ +package thaumcraft.api.wands; + +import java.text.DecimalFormat; +import java.util.LinkedHashMap; +import java.util.List; + +import net.minecraft.entity.Entity; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.item.EnumRarity; +import net.minecraft.item.Item; +import net.minecraft.item.ItemStack; +import net.minecraft.nbt.NBTTagCompound; +import net.minecraft.nbt.NBTTagList; +import net.minecraft.util.EnumChatFormatting; +import net.minecraft.util.IIcon; +import net.minecraft.util.MovingObjectPosition; +import net.minecraft.util.StatCollector; +import net.minecraft.world.World; +import thaumcraft.api.aspects.Aspect; +import thaumcraft.api.aspects.AspectList; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; + +public class ItemFocusBasic extends Item { + + public ItemFocusBasic () + { + super(); + maxStackSize = 1; + canRepair=false; + this.setMaxDamage(0); + } + + public IIcon icon; + + @SideOnly(Side.CLIENT) + @Override + public IIcon getIconFromDamage(int par1) { + return icon; + } + + @Override + public boolean isDamageable() { + return false; + } + + @Override + public void addInformation(ItemStack stack,EntityPlayer player, List list, boolean par4) { + AspectList al = this.getVisCost(stack); + if (al!=null && al.size()>0) { + list.add(StatCollector.translateToLocal(isVisCostPerTick(stack)?"item.Focus.cost2":"item.Focus.cost1")); + for (Aspect aspect:al.getAspectsSorted()) { + DecimalFormat myFormatter = new DecimalFormat("#####.##"); + String amount = myFormatter.format(al.getAmount(aspect)/100f); + list.add(" \u00A7"+aspect.getChatcolor()+aspect.getName()+"\u00A7r x "+ amount); + } + } + addFocusInformation(stack,player,list,par4); + } + + public void addFocusInformation(ItemStack focusstack,EntityPlayer player, List list, boolean par4) { + LinkedHashMap map = new LinkedHashMap(); + for (short id:this.getAppliedUpgrades(focusstack)) { + if (id>=0) { + int amt = 1; + if (map.containsKey(id)) { + amt = map.get(id) + 1; + } + map.put(id, amt); + } + } + for (Short id:map.keySet()) { + list.add(EnumChatFormatting.DARK_PURPLE +FocusUpgradeType.types[id].getLocalizedName()+ + (map.get(id)>1?" "+StatCollector.translateToLocal("enchantment.level." + map.get(id)):"")); + } + } + + /** + * Purely for display on the focus tooltip (see addInformation method above) + */ + public boolean isVisCostPerTick(ItemStack focusstack) { + return false; + } + + @Override + public EnumRarity getRarity(ItemStack focusstack) + { + return EnumRarity.rare; + } + + /** + * What color will the focus orb be rendered on the held wand + */ + public int getFocusColor(ItemStack focusstack) { + return 0; + } + + + /** + * Does the focus have ornamentation like the focus of the nine hells. Ornamentation is a standard icon rendered in a cross around the focus + */ + public IIcon getOrnament(ItemStack focusstack) { + // TODO Auto-generated method stub + return null; + } + + /** + * An icon to be rendered inside the focus itself + */ + public IIcon getFocusDepthLayerIcon(ItemStack focusstack) { + // TODO Auto-generated method stub + return null; + } + + public enum WandFocusAnimation { + WAVE, CHARGE; + } + + public WandFocusAnimation getAnimation(ItemStack focusstack) { + return WandFocusAnimation.WAVE; + } + + /** + * Just insert two alphanumeric characters before this string in your focus item class + */ + public String getSortingHelper(ItemStack focusstack) { + String out=""; + for (short id:this.getAppliedUpgrades(focusstack)) { + out = out + id; + } + return out; + } + + + /** + * How much vis does this focus consume per activation. + */ + public AspectList getVisCost(ItemStack focusstack) { + return null; + } + + /** + * This returns how many milliseconds must pass before the focus can be activated again. + */ + public int getActivationCooldown(ItemStack focusstack) { + return 0; + } + + /** + * Used by foci like equal trade to determine their area in artchitect mode + */ + public int getMaxAreaSize(ItemStack focusstack) { + return 1; + } + + /** + * What upgrades can be applied to this focus for ranks 1 to 5 + */ + public FocusUpgradeType[] getPossibleUpgradesByRank(ItemStack focusstack, int rank) { + return null; + } + + /** + * What upgrades does the focus currently have + */ + public short[] getAppliedUpgrades(ItemStack focusstack) { + short[] l = new short[] {-1,-1,-1,-1,-1}; + NBTTagList nbttaglist = getFocusUpgradeTagList(focusstack); + if (nbttaglist == null) + { + return l; + } + else + { + for (int j = 0; j < nbttaglist.tagCount(); ++j) + { + if (j>=5) break; + l[j] = nbttaglist.getCompoundTagAt(j).getShort("id"); + } + + return l; + } + } + + public boolean applyUpgrade(ItemStack focusstack, FocusUpgradeType type, int rank) { + short[] upgrades = getAppliedUpgrades(focusstack); + if (upgrades[rank-1]!=-1 || rank<1 || rank>5) { + return false; + } + upgrades[rank-1] = type.id; + setFocusUpgradeTagList(focusstack, upgrades); + return true; + } + + /** + * Use this method to define custom logic about which upgrades can be applied. This can be used to set up upgrade "trees" + * that make certain upgrades available only when others are unlocked first, when certain research is completed, or similar logic. + * + */ + public boolean canApplyUpgrade(ItemStack focusstack, EntityPlayer player, FocusUpgradeType type, int rank) { + return true; + } + + /** + * Does this focus have the passed upgrade type + */ + public boolean isUpgradedWith(ItemStack focusstack, FocusUpgradeType focusUpgradetype) { + return getUpgradeLevel(focusstack,focusUpgradetype)>0; + } + + /** + * What level is the passed upgrade type on the focus. If it is not present it returns 0 + */ + public int getUpgradeLevel(ItemStack focusstack, FocusUpgradeType focusUpgradetype) { + short[] list = getAppliedUpgrades(focusstack); + int level=0; + for (short id:list) { + if (id == focusUpgradetype.id) + { + level++; + } + } + return level; + } + + public ItemStack onFocusRightClick(ItemStack wandstack, World world,EntityPlayer player, MovingObjectPosition movingobjectposition) { + // TODO Auto-generated method stub + return null; + } + + public void onUsingFocusTick(ItemStack wandstack, EntityPlayer player,int count) { + // TODO Auto-generated method stub + } + + public void onPlayerStoppedUsingFocus(ItemStack wandstack, World world, EntityPlayer player, int count) { + // TODO Auto-generated method stub + + } + + public boolean onFocusBlockStartBreak(ItemStack wandstack, int x, int y,int z, EntityPlayer player) { + // TODO Auto-generated method stub + return false; + } + + /** + * Internal helper methods + */ + private NBTTagList getFocusUpgradeTagList(ItemStack focusstack) + { + return focusstack.stackTagCompound == null ? null : focusstack.stackTagCompound.getTagList("upgrade", 10); + } + + private void setFocusUpgradeTagList(ItemStack focusstack, short[] upgrades) { + if (!focusstack.hasTagCompound()) + focusstack.setTagCompound(new NBTTagCompound()); + NBTTagCompound nbttagcompound = focusstack.getTagCompound(); + NBTTagList tlist = new NBTTagList(); + nbttagcompound.setTag("upgrade", tlist); + for (short id : upgrades) { + NBTTagCompound f = new NBTTagCompound(); + f.setShort("id", id); + tlist.appendTag(f); + } + } + + @Override + public void onUpdate(ItemStack stack, World world, Entity entity, int p_77663_4_, boolean p_77663_5_) { + if (stack.stackTagCompound !=null && stack.stackTagCompound.hasKey("ench")) { + stack.stackTagCompound.removeTag("ench"); + } + super.onUpdate(stack, world, entity, p_77663_4_, p_77663_5_); + } + + + +} diff --git a/src/api/java/thaumcraft/api/wands/StaffRod.java b/src/api/java/thaumcraft/api/wands/StaffRod.java new file mode 100644 index 00000000..e7ae90f0 --- /dev/null +++ b/src/api/java/thaumcraft/api/wands/StaffRod.java @@ -0,0 +1,48 @@ +package thaumcraft.api.wands; + +import net.minecraft.item.ItemStack; +import net.minecraft.util.ResourceLocation; + +/** + * + * @author Azanor + * + * This class is used to keep the material information for the various rods. + * It is also used to generate the wand recipes ingame. + * + */ +public class StaffRod extends WandRod { + + boolean runes=false; + + public StaffRod(String tag, int capacity, ItemStack item, int craftCost) { + super(tag+"_staff", capacity, item, craftCost); + this.texture = new ResourceLocation("thaumcraft","textures/models/wand_rod_"+tag+".png"); + } + + public StaffRod(String tag, int capacity, ItemStack item, int craftCost, + IWandRodOnUpdate onUpdate, ResourceLocation texture) { + super(tag+"_staff", capacity, item, craftCost, onUpdate, texture); + } + + public StaffRod(String tag, int capacity, ItemStack item, int craftCost, + IWandRodOnUpdate onUpdate) { + super(tag+"_staff", capacity, item, craftCost, onUpdate); + this.texture = new ResourceLocation("thaumcraft","textures/models/wand_rod_"+tag+".png"); + } + + public StaffRod(String tag, int capacity, ItemStack item, int craftCost, + ResourceLocation texture) { + super(tag+"_staff", capacity, item, craftCost, texture); + } + + public boolean hasRunes() { + return runes; + } + + public void setRunes(boolean hasRunes) { + this.runes = hasRunes; + } + + +} diff --git a/src/api/java/thaumcraft/api/wands/WandCap.java b/src/api/java/thaumcraft/api/wands/WandCap.java new file mode 100644 index 00000000..17b4581c --- /dev/null +++ b/src/api/java/thaumcraft/api/wands/WandCap.java @@ -0,0 +1,129 @@ +package thaumcraft.api.wands; + +import java.util.LinkedHashMap; +import java.util.List; + +import net.minecraft.item.ItemStack; +import net.minecraft.util.ResourceLocation; +import thaumcraft.api.aspects.Aspect; + +/** + * This class is used to keep the material information for the various caps. + * It is also used to generate the wand recipes ingame. + * @author Azanor + * + */ +public class WandCap { + + private String tag; + + /** + * Cost to craft this wand. Combined with the rod cost. + */ + private int craftCost; + + /** + * the amount by which all aspect costs are multiplied + */ + float baseCostModifier; + + /** + * specifies a list of primal aspects that use the special discount figure instead of the normal discount. + */ + List specialCostModifierAspects; + + /** + * the amount by which the specified aspect costs are multiplied + */ + float specialCostModifier; + + /** + * The texture that will be used for the ingame wand cap + */ + ResourceLocation texture; + + /** + * the actual item that makes up this cap and will be used to generate the wand recipes + */ + ItemStack item; + + public static LinkedHashMap caps = new LinkedHashMap(); + + public WandCap (String tag, float discount, ItemStack item, int craftCost) { + this.setTag(tag); + this.baseCostModifier = discount; + this.specialCostModifierAspects = null; + texture = new ResourceLocation("thaumcraft","textures/models/wand_cap_"+getTag()+".png"); + this.item=item; + this.setCraftCost(craftCost); + caps.put(tag, this); + } + + public WandCap (String tag, float discount, List specialAspects, float discountSpecial, ItemStack item, int craftCost) { + this.setTag(tag); + this.baseCostModifier = discount; + this.specialCostModifierAspects = specialAspects; + this.specialCostModifier = discountSpecial; + texture = new ResourceLocation("thaumcraft","textures/models/wand_cap_"+getTag()+".png"); + this.item=item; + this.setCraftCost(craftCost); + caps.put(tag, this); + } + + public float getBaseCostModifier() { + return baseCostModifier; + } + + public List getSpecialCostModifierAspects() { + return specialCostModifierAspects; + } + + public float getSpecialCostModifier() { + return specialCostModifier; + } + + public ResourceLocation getTexture() { + return texture; + } + + public void setTexture(ResourceLocation texture) { + this.texture = texture; + } + + public String getTag() { + return tag; + } + + public void setTag(String tag) { + this.tag = tag; + } + + + public ItemStack getItem() { + return item; + } + + public void setItem(ItemStack item) { + this.item = item; + } + + public int getCraftCost() { + return craftCost; + } + + public void setCraftCost(int craftCost) { + this.craftCost = craftCost; + } + + /** + * The research a player needs to have finished to be able to craft a wand with this cap. + */ + public String getResearch() { + return "CAP_"+getTag(); + } + + // Some examples: + // WandCap WAND_CAP_IRON = new WandCap("iron", 1.1f, Arrays.asList(Aspect.ORDER),1, new ItemStack(ConfigItems.itemWandCap,1,0),1); + // WandCap WAND_CAP_GOLD = new WandCap("gold", 1f, new ItemStack(ConfigItems.itemWandCap,1,1),3); + +} diff --git a/src/api/java/thaumcraft/api/wands/WandRod.java b/src/api/java/thaumcraft/api/wands/WandRod.java new file mode 100644 index 00000000..85954e46 --- /dev/null +++ b/src/api/java/thaumcraft/api/wands/WandRod.java @@ -0,0 +1,158 @@ +package thaumcraft.api.wands; + +import java.util.LinkedHashMap; + +import net.minecraft.item.ItemStack; +import net.minecraft.util.ResourceLocation; + +/** + * + * @author Azanor + * + * This class is used to keep the material information for the various rods. + * It is also used to generate the wand recipes ingame. + * + */ +public class WandRod { + + + private String tag; + + /** + * Cost to craft this wand. Combined with the rod cost. + */ + private int craftCost; + + /** + * The amount of vis that can be stored - this number is actually multiplied + * by 100 for use by the wands internals + */ + int capacity; + + /** + * The texture that will be used for the ingame wand rod + */ + protected ResourceLocation texture; + + /** + * the actual item that makes up this rod and will be used to generate the wand recipes + */ + ItemStack item; + + /** + * A class that will be called whenever the wand onUpdate tick is run + */ + IWandRodOnUpdate onUpdate; + + /** + * Does the rod glow in the dark? + */ + boolean glow; + + public static LinkedHashMap rods = new LinkedHashMap(); + + public WandRod (String tag, int capacity, ItemStack item, int craftCost, ResourceLocation texture) { + this.setTag(tag); + this.capacity = capacity; + this.texture = texture; + this.item=item; + this.setCraftCost(craftCost); + rods.put(tag, this); + } + + public WandRod (String tag, int capacity, ItemStack item, int craftCost, IWandRodOnUpdate onUpdate, ResourceLocation texture) { + this.setTag(tag); + this.capacity = capacity; + this.texture = texture; + this.item=item; + this.setCraftCost(craftCost); + rods.put(tag, this); + this.onUpdate = onUpdate; + } + + public WandRod (String tag, int capacity, ItemStack item, int craftCost) { + this.setTag(tag); + this.capacity = capacity; + this.texture = new ResourceLocation("thaumcraft","textures/models/wand_rod_"+getTag()+".png"); + this.item=item; + this.setCraftCost(craftCost); + rods.put(tag, this); + } + + public WandRod (String tag, int capacity, ItemStack item, int craftCost, IWandRodOnUpdate onUpdate) { + this.setTag(tag); + this.capacity = capacity; + this.texture = new ResourceLocation("thaumcraft","textures/models/wand_rod_"+getTag()+".png"); + this.item=item; + this.setCraftCost(craftCost); + rods.put(tag, this); + this.onUpdate = onUpdate; + } + + public String getTag() { + return tag; + } + + public void setTag(String tag) { + this.tag = tag; + } + + public int getCapacity() { + return capacity; + } + + public void setCapacity(int capacity) { + this.capacity = capacity; + } + + public ResourceLocation getTexture() { + return texture; + } + + public void setTexture(ResourceLocation texture) { + this.texture = texture; + } + + public ItemStack getItem() { + return item; + } + + public void setItem(ItemStack item) { + this.item = item; + } + + public int getCraftCost() { + return craftCost; + } + + public void setCraftCost(int craftCost) { + this.craftCost = craftCost; + } + + public IWandRodOnUpdate getOnUpdate() { + return onUpdate; + } + + public void setOnUpdate(IWandRodOnUpdate onUpdate) { + this.onUpdate = onUpdate; + } + + public boolean isGlowing() { + return glow; + } + + public void setGlowing(boolean hasGlow) { + this.glow = hasGlow; + } + + /** + * The research a player needs to have finished to be able to craft a wand with this rod. + */ + public String getResearch() { + return "ROD_"+getTag(); + } + + // Some examples: + // WandRod WAND_ROD_WOOD = new WandRod("wood",25,new ItemStack(Item.stick),1); + // WandRod WAND_ROD_BLAZE = new WandRod("blaze",100,new ItemStack(Item.blazeRod),7,new WandRodBlazeOnUpdate()); +} diff --git a/src/api/java/thaumcraft/api/wands/WandTriggerRegistry.java b/src/api/java/thaumcraft/api/wands/WandTriggerRegistry.java new file mode 100644 index 00000000..7224e12f --- /dev/null +++ b/src/api/java/thaumcraft/api/wands/WandTriggerRegistry.java @@ -0,0 +1,126 @@ +package thaumcraft.api.wands; + +import java.util.Arrays; +import java.util.HashMap; +import java.util.List; + +import net.minecraft.block.Block; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.item.ItemStack; +import net.minecraft.world.World; + +/** + * This class serves a similar function to IWandable in that it allows wands to interact + * with object in the world. In this case it is most useful for adding interaction with non-mod + * blocks where you can't control what happens in their code. + * Example where it is used is in crafting the thaumonomicon from a bookshelf and the + * crucible from a cauldron + * + * @author azanor + * + */ +public class WandTriggerRegistry { + + private static HashMap> triggers = new HashMap>(); + private static final String DEFAULT = "default"; + + /** + * Registers an action to perform when a casting wand right clicks on a specific block. + * A manager class needs to be created that implements IWandTriggerManager. + * @param manager + * @param event a logical number that you can use to differentiate different events or actions + * @param block + * @param meta send -1 as a wildcard value for all possible meta values + * @param modid a unique identifier. It is best to register your own triggers using your mod id to avoid conflicts with mods that register triggers for the same block + */ + public static void registerWandBlockTrigger(IWandTriggerManager manager, int event, Block block, int meta, String modid) { + if (!triggers.containsKey(modid)) { + triggers.put(modid, new HashMap()); + } + HashMap temp = triggers.get(modid); + temp.put(Arrays.asList(block,meta),Arrays.asList(manager,event)); + triggers.put(modid, temp); + } + + /** + * for legacy support + */ + public static void registerWandBlockTrigger(IWandTriggerManager manager, int event, Block block, int meta) { + registerWandBlockTrigger(manager, event, block, meta, DEFAULT); + } + + /** + * Checks all trigger registries if one exists for the given block and meta + * @param block + * @param meta + * @return + */ + public static boolean hasTrigger(Block block, int meta) { + for (String modid:triggers.keySet()) { + HashMap temp = triggers.get(modid); + if (temp.containsKey(Arrays.asList(block,meta)) || + temp.containsKey(Arrays.asList(block,-1))) return true; + } + return false; + } + + /** + * modid sensitive version + */ + public static boolean hasTrigger(Block block, int meta, String modid) { + if (!triggers.containsKey(modid)) return false; + HashMap temp = triggers.get(modid); + if (temp.containsKey(Arrays.asList(block,meta)) || + temp.containsKey(Arrays.asList(block,-1))) return true; + return false; + } + + + /** + * This is called by the onItemUseFirst function in wands. + * Parameters and return value functions like you would expect for that function. + * @param world + * @param wand + * @param player + * @param x + * @param y + * @param z + * @param side + * @param block + * @param meta + * @return + */ + public static boolean performTrigger(World world, ItemStack wand, EntityPlayer player, + int x, int y, int z, int side, Block block, int meta) { + + for (String modid:triggers.keySet()) { + HashMap temp = triggers.get(modid); + List l = temp.get(Arrays.asList(block,meta)); + if (l==null) l = temp.get(Arrays.asList(block,-1)); + if (l==null) continue; + + IWandTriggerManager manager = (IWandTriggerManager) l.get(0); + int event = (Integer) l.get(1); + boolean result = manager.performTrigger(world, wand, player, x, y, z, side, event); + if (result) return true; + } + return false; + } + + /** + * modid sensitive version + */ + public static boolean performTrigger(World world, ItemStack wand, EntityPlayer player, + int x, int y, int z, int side, Block block, int meta, String modid) { + if (!triggers.containsKey(modid)) return false; + HashMap temp = triggers.get(modid); + List l = temp.get(Arrays.asList(block,meta)); + if (l==null) l = temp.get(Arrays.asList(block,-1)); + if (l==null) return false; + + IWandTriggerManager manager = (IWandTriggerManager) l.get(0); + int event = (Integer) l.get(1); + return manager.performTrigger(world, wand, player, x, y, z, side, event); + } + +} diff --git a/src/main/java/com/cricketcraft/chisel/Chisel.java b/src/main/java/com/cricketcraft/chisel/Chisel.java index 0c30017c..80205632 100644 --- a/src/main/java/com/cricketcraft/chisel/Chisel.java +++ b/src/main/java/com/cricketcraft/chisel/Chisel.java @@ -2,6 +2,9 @@ package com.cricketcraft.chisel; import java.io.File; +import com.cricketcraft.chisel.entity.EntityChiselSnowman; + +import cpw.mods.fml.common.registry.EntityRegistry; import net.minecraft.block.Block; import net.minecraft.item.Item; import net.minecraftforge.common.MinecraftForge; @@ -13,6 +16,7 @@ import org.apache.logging.log4j.Logger; import com.cricketcraft.chisel.block.BlockCarvable; import com.cricketcraft.chisel.compat.Compatibility; import com.cricketcraft.chisel.compat.IMCHandler; +import com.cricketcraft.chisel.compat.fmp.FMPCompat; import com.cricketcraft.chisel.config.Configurations; import com.cricketcraft.chisel.init.ChiselBlocks; import com.cricketcraft.chisel.init.ChiselTabs; @@ -26,15 +30,16 @@ import com.cricketcraft.chisel.world.GeneratorChisel; import cpw.mods.fml.client.event.ConfigChangedEvent; import cpw.mods.fml.common.FMLCommonHandler; import cpw.mods.fml.common.FMLLog; +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; import cpw.mods.fml.common.SidedProxy; import cpw.mods.fml.common.event.FMLInitializationEvent; import cpw.mods.fml.common.event.FMLInterModComms; +import cpw.mods.fml.common.event.FMLInterModComms.IMCEvent; import cpw.mods.fml.common.event.FMLInterModComms.IMCMessage; import cpw.mods.fml.common.event.FMLMissingMappingsEvent; -import cpw.mods.fml.common.event.FMLInterModComms.IMCEvent; import cpw.mods.fml.common.event.FMLMissingMappingsEvent.MissingMapping; import cpw.mods.fml.common.event.FMLPostInitializationEvent; import cpw.mods.fml.common.event.FMLPreInitializationEvent; @@ -120,6 +125,9 @@ public class Chisel { Features.preInit(); PacketHandler.init(); ChiselController.INSTANCE.preInit(); + if (Loader.isModLoaded("ForgeMultipart")) { + new FMPCompat().init(); + } proxy.preInit(); } @@ -136,6 +144,8 @@ public class Chisel { addWorldgen(Features.DIORITE, ChiselBlocks.diorite, Configurations.dioriteAmount, 40, 100, 0.5); GameRegistry.registerWorldGenerator(GeneratorChisel.INSTANCE, 1000); + EntityRegistry.registerModEntity(EntityChiselSnowman.class, "snowman", 0, this, 80, 1, true); + proxy.init(); MinecraftForge.EVENT_BUS.register(this); FMLCommonHandler.instance().bus().register(instance); diff --git a/src/main/java/com/cricketcraft/chisel/Features.java b/src/main/java/com/cricketcraft/chisel/Features.java index 0eddf39b..85ae64cc 100644 --- a/src/main/java/com/cricketcraft/chisel/Features.java +++ b/src/main/java/com/cricketcraft/chisel/Features.java @@ -7,6 +7,7 @@ import com.cricketcraft.chisel.carving.CarvableVariation; import com.cricketcraft.chisel.carving.Carving; import com.cricketcraft.chisel.carving.CarvingGroup; import com.cricketcraft.chisel.client.render.SubmapManagerFakeController; +import com.cricketcraft.chisel.compat.fmp.ItemBlockChiselTorchPart; import com.cricketcraft.chisel.config.Configurations; import com.cricketcraft.chisel.entity.EntityBallOMoss; import com.cricketcraft.chisel.entity.EntityCloudInABottle; @@ -100,9 +101,18 @@ public enum Features { andesite.carverHelper.setChiselBlockName("andesite"); andesite.carverHelper.addVariation("tile.andesite.0.desc", 0, "andesite/andesite"); andesite.carverHelper.addVariation("tile.andesite.1.desc", 1, "andesite/andesitePolished"); - andesite.carverHelper.addVariation("tile.andesite.2.desc", 2, "andesite/andesitePillar"); + andesite.carverHelper.addVariation("tile.andesite.2.desc", 2, "andesite/andesitePillar"); + andesite.carverHelper.addVariation("tile.andesite.3.desc", 3, "andesite/andesiteLBrick"); + andesite.carverHelper.addVariation("tile.andesite.4.desc", 4, "andesite/andesiteOrnate"); + andesite.carverHelper.addVariation("tile.andesite.5.desc", 5, "andesite/andesitePrism"); + andesite.carverHelper.addVariation("tile.andesite.6.desc", 6, "andesite/andesiteTiles"); andesite.carverHelper.registerAll(andesite, "andesite"); - Carving.chisel.registerOre("andesite", "andesite"); + Carving.chisel.registerOre("andesite", "blockAndesite"); + } + + @Override + void addRecipes() { + GameRegistry.addRecipe(new ShapelessOreRecipe(new ItemStack(andesite, 2), diorite, "cobblestone")); } }, @@ -153,7 +163,11 @@ public enum Features { arcane.carverHelper.addVariation("tile.arcane.4.desc", 4, "arcane/runesGlow"); arcane.carverHelper.addVariation("tile.arcane.5.desc", 5, "arcane/bigBrick"); arcane.carverHelper.addVariation("tile.arcane.6.desc", 6, "arcane/conduitGlowAnim"); - arcane.carverHelper.addVariation("tile.arcane.7.desc", 7, "arcane/BorderBrain"); + arcane.carverHelper.addVariation("tile.arcane.7.desc", 7, "arcane/BorderBrain"); + arcane.carverHelper.addVariation("tile.arcane.8.desc", 8, "arcane/ArcaneBorder"); + arcane.carverHelper.addVariation("tile.arcane.9.desc", 9, "arcane/arcaneMatrix"); + arcane.carverHelper.addVariation("tile.arcane.10.desc", 10, "arcane/thaumcraftLogo"); + arcane.carverHelper.addVariation("tile.arcane.11.desc", 11, "arcane/entropiedEntritchRock"); arcane.carverHelper.registerAll(arcane, "arcane"); Carving.chisel.registerOre("arcane", "arcane"); } @@ -390,8 +404,10 @@ public enum Features { void addItems() { ItemChisel chisel = (ItemChisel) new ItemChisel(ChiselType.IRON).setCreativeTab(ChiselTabs.tabChisel); ItemChisel diamondChisel = (ItemChisel) new ItemChisel(ChiselType.DIAMOND).setCreativeTab(ChiselTabs.tabChisel); + ItemChisel obsidianChisel = (ItemChisel) new ItemChisel(ChiselType.OBSIDIAN).setCreativeTab(ChiselTabs.tabChisel); GameRegistry.registerItem(chisel, "chisel"); GameRegistry.registerItem(diamondChisel, "diamondChisel"); + GameRegistry.registerItem(obsidianChisel, "obsidianChisel"); } @Override @@ -399,9 +415,11 @@ public enum Features { if (Configurations.chiselRecipe) { GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ChiselItems.chisel), " YY", " YY", "X ", 'X', "stickWood", 'Y', "ingotIron")); GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ChiselItems.diamondChisel), " YY", " YY", "x ", 'x', "stickWood", 'Y', "gemDiamond")); + GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ChiselItems.obsidianChisel), " YY", " YY", "x ", 'x', "stickWood", 'Y', Blocks.obsidian)); } else { GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ChiselItems.chisel), " Y", "X ", 'X', "stickWood", 'Y', "ingotIron")); GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ChiselItems.diamondChisel), " Y", "X ", 'X', "stickWood", 'Y', "gemDiamond")); + GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ChiselItems.obsidianChisel), " Y", "X ", 'X', "stickWood", 'Y', Blocks.obsidian)); } } }, @@ -558,7 +576,7 @@ public enum Features { diamond_block.carverHelper.addVariation("tile.diamond.10.desc", 10, "diamond/terrain-diamond-fourornate"); diamond_block.carverHelper.addVariation("tile.diamond.11.desc", 11, "diamond/terrain-diamond-zelda"); diamond_block.carverHelper.addVariation("tile.diamond.12.desc", 12, "diamond/terrain-diamond-ornatelayer"); - diamond_block.carverHelper.registerAll(diamond_block, "diamond_block"); + diamond_block.carverHelper.registerAll(diamond_block, "diamond_block"); Carving.chisel.registerOre("diamond_block", "diamond"); } }, @@ -572,9 +590,18 @@ public enum Features { diorite.carverHelper.addVariation("tile.diorite.0.desc", 0, "diorite/diorite"); diorite.carverHelper.addVariation("tile.diorite.1.desc", 1, "diorite/dioritePolished"); diorite.carverHelper.addVariation("tile.diorite.2.desc", 2, "diorite/dioritePillar"); + diorite.carverHelper.addVariation("tile.diorite.3.desc", 3, "diorite/dioriteLBrick"); + diorite.carverHelper.addVariation("tile.diorite.4.desc", 4, "diorite/dioriteOrnate"); + diorite.carverHelper.addVariation("tile.diorite.5.desc", 5, "diorite/dioritePrism"); + diorite.carverHelper.addVariation("tile.diorite.6.desc", 6, "diorite/dioriteTiles"); diorite.carverHelper.registerAll(diorite, "diorite"); Carving.chisel.registerOre("diorite", "diorite"); } + + @Override + void addRecipes() { + GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(diorite, 2), "cq", "qc", 'c', "cobblestone", 'q', "gemQuartz")); + } }, DIRT { @@ -629,6 +656,17 @@ public enum Features { } }, + END_STONE { + + @Override + void addBlocks() { + //BlockCarvable end_stone = (BlockCarvable) new BlockCarvable(Material.rock).setHardness(2.0F).setResistance(10.0F).setCreativeTab(ChiselTabs.tabStoneChiselBlocks); + Carving.chisel.addVariation("end_stone", Blocks.end_stone , 0, 0); + //end_stone.carverHelper.registerAll(emerald_block, "endStone"); + Carving.chisel.registerOre("end_stone", "end_stone"); + } + }, + FACTORY { @Override @@ -654,6 +692,15 @@ public enum Features { factoryblock.carverHelper.addVariation("tile.factory.15.desc", 15, "factory/column"); factoryblock.carverHelper.registerAll(factoryblock, "factoryblock"); Carving.chisel.registerOre("factoryblock", "factoryblock"); + + BlockCarvable factoryblock2 = (BlockCarvable) new BlockCarvable(Material.iron).setCreativeTab(ChiselTabs.tabMetalChiselBlocks).setHardness(2.0F).setResistance(10F) + .setStepSound(Chisel.soundMetalFootstep); + factoryblock2.carverHelper.addVariation("tile.factory2.0.desc", 0, "factory/iceiceice"); + factoryblock2.carverHelper.addVariation("tile.factory2.1.desc", 1, "factory/vent"); + factoryblock2.carverHelper.addVariation("tile.factory2.2.desc", 2, "factory/tilemosaic"); + factoryblock2.carverHelper.addVariation("tile.factory2.3.desc", 3, "factory/wireframeblue"); + factoryblock2.carverHelper.registerAll(factoryblock2, "factoryblock2"); + factoryblock2.carverHelper.registerVariations("factoryblock", factoryblock2); } @Override @@ -726,7 +773,7 @@ public enum Features { */).setCreativeTab(ChiselTabs.tabMetalChiselBlocks).setHardness(2.0F).setResistance(10F); futura.carverHelper.addVariation("tile.futura.0.desc", 0, "futura/WIP/screenMetallicWIP"); futura.carverHelper.addVariation("tile.futura.1.desc", 1, "futura/WIP/screenCyanWIP"); - futura.carverHelper.addVariation("tile.futura.2.desc", 2, "futura/WIP/controllerWIP", futura, 2, new SubmapManagerFakeController()); + futura.carverHelper.addVariation("tile.futura.2.desc", 2, "futura/WIP/controllerWIP", new SubmapManagerFakeController()); futura.carverHelper.addVariation("tile.futura.3.desc", 3, "futura/WIP/wavyWIP"); futura.carverHelper.registerAll(futura, "futura"); Carving.chisel.registerOre("futura", "futura"); @@ -761,6 +808,11 @@ public enum Features { glass.carverHelper.addVariation("tile.glass.15.desc", 15, "glass/a1-glasswindow-ironfencemodern"); glass.carverHelper.registerAll(glass, "glass"); Carving.chisel.registerOre("glass", "glass"); + + BlockCarvableGlass glass2 = (BlockCarvableGlass) new BlockCarvableGlass().setCreativeTab(ChiselTabs.tabOtherChiselBlocks).setHardness(0.3F).setStepSound(Block.soundTypeGlass); + glass2.carverHelper.addVariation("tile.glass2.0.desc", 0, "glass/chrono"); + glass2.carverHelper.registerBlock(glass2, "glass2"); + glass2.carverHelper.registerVariations("glass", glass2); } }, @@ -895,8 +947,20 @@ public enum Features { gold_block.carverHelper.addVariation("tile.gold.12.desc", 12, "gold/terrain-gold-space"); gold_block.carverHelper.addVariation("tile.gold.13.desc", 13, "gold/terrain-gold-spaceblack"); gold_block.carverHelper.addVariation("tile.gold.14.desc", 14, "gold/terrain-gold-simple"); - gold_block.carverHelper.registerAll(gold_block, "gold_block"); - Carving.chisel.registerOre("gold_block", "gold"); + + BlockCarvable gold2 = (BlockCarvable) new BlockBeaconBase(Material.iron).setStepSound(Block.soundTypeMetal).setCreativeTab(ChiselTabs.tabModdedChiselBlocks).setHardness(5F) + .setResistance(10F); + gold2.carverHelper.addVariation("tile.metalOre.0.desc", 0, "metals/gold/caution"); + gold2.carverHelper.addVariation("tile.metalOre.1.desc", 1, "metals/gold/crate"); + gold2.carverHelper.addVariation("tile.metalOre.2.desc", 2, "metals/gold/thermal"); + gold2.carverHelper.addVariation("tile.metalOre.3.desc", 3, "metals/gold/adv"); + gold2.carverHelper.addVariation("tile.metalOre.4.desc", 4, "metals/gold/egregious"); + gold2.carverHelper.addVariation("tile.metalOre.5.desc", 5, "metals/gold/bolted"); + gold2.carverHelper.registerBlock(gold2, "gold2"); + gold2.carverHelper.registerVariations("gold_block", gold2); + + gold_block.carverHelper.registerAll(gold_block, "gold_block"); + Carving.chisel.registerOre("gold_block", "blockGold"); } }, @@ -909,9 +973,18 @@ public enum Features { granite.carverHelper.addVariation("tile.granite.0.desc", 0, "granite/granite"); granite.carverHelper.addVariation("tile.granite.1.desc", 1, "granite/granitePolished"); granite.carverHelper.addVariation("tile.granite.2.desc", 2, "granite/granitePillar"); + granite.carverHelper.addVariation("tile.granite.3.desc", 3, "granite/graniteLBrick"); + granite.carverHelper.addVariation("tile.granite.4.desc", 4, "granite/graniteOrnate"); + granite.carverHelper.addVariation("tile.granite.5.desc", 5, "granite/granitePrism"); + granite.carverHelper.addVariation("tile.granite.6.desc", 6, "granite/graniteTiles"); granite.carverHelper.registerAll(granite, "granite"); Carving.chisel.registerOre("granite", "granite"); } + + @Override + void addRecipes() { + GameRegistry.addRecipe(new ShapelessOreRecipe(granite, diorite, "gemQuartz")); + } }, GRIMSTONE { @@ -948,12 +1021,21 @@ public enum Features { @Override void addBlocks() { - BlockCarvable hexPlating = (BlockCarvable) new BlockCarvableGlow("hexPlating/hexAnim").setCreativeTab(ChiselTabs.tabMetalChiselBlocks).setHardness(2.0F).setResistance(10.0F); - for (int i = 0; i < 16; i++) { - hexPlating.carverHelper.addVariation("tile.hexPlating." + ItemDye.field_150921_b[i] + ".desc", i, "hexPlating/hexBase"); - } - hexPlating.carverHelper.registerAll(hexPlating, "hexPlating"); - Carving.chisel.registerOre("hexPlating", "hexPlating"); + BlockCarvable hexPlating = (BlockCarvable) new BlockCarvableGlow("hexPlating/hexAnim").setCreativeTab(ChiselTabs.tabMetalChiselBlocks).setHardness(2.0F).setResistance(10.0F); + for (int i = 0; i < 16; i++) { + hexPlating.carverHelper.addVariation("tile.hexPlating." + ItemDye.field_150921_b[i] + ".desc", i, "hexPlating/hexBase"); + } + hexPlating.carverHelper.registerAll(hexPlating, "hexPlating"); + Carving.chisel.registerOre("hexPlating", "hexPlating"); + + BlockCarvable hexLargePlating = (BlockCarvable) new BlockCarvableGlow("hexPlating/hexAnim").setCreativeTab(ChiselTabs.tabMetalChiselBlocks).setHardness(2.0F).setResistance(10.0F); + for (int i = 0; i < 16; i++) { + hexLargePlating.carverHelper.addVariation("tile.hexPlating." + ItemDye.field_150921_b[i] + ".desc", i, "hexPlating/hexNew"); + } + + hexLargePlating.carverHelper.registerBlock(hexLargePlating, "hexLargePlating"); + hexLargePlating.carverHelper.registerVariations("hexPlating", hexLargePlating); + Carving.chisel.registerOre("hexPlating", "hexPlating"); } @Override @@ -1123,8 +1205,20 @@ public enum Features { iron_block.carverHelper.addVariation("tile.iron.13.desc", 13, "iron/terrain-iron-spaceblack"); iron_block.carverHelper.addVariation("tile.iron.14.desc", 14, "iron/terrain-iron-vents"); iron_block.carverHelper.addVariation("tile.iron.15.desc", 15, "iron/terrain-iron-simple"); - iron_block.carverHelper.registerAll(iron_block, "iron_block"); - Carving.chisel.registerOre("iron_block", "iron"); + + BlockCarvable iron2 = (BlockCarvable) new BlockBeaconBase(Material.iron).setStepSound(Block.soundTypeMetal).setCreativeTab(ChiselTabs.tabModdedChiselBlocks).setHardness(5F) + .setResistance(10F); + iron2.carverHelper.addVariation("tile.metalOre.0.desc", 0, "metals/iron/caution"); + iron2.carverHelper.addVariation("tile.metalOre.1.desc", 1, "metals/iron/crate"); + iron2.carverHelper.addVariation("tile.metalOre.2.desc", 2, "metals/iron/thermal"); + iron2.carverHelper.addVariation("tile.metalOre.3.desc", 3, "metals/iron/adv"); + iron2.carverHelper.addVariation("tile.metalOre.4.desc", 4, "metals/iron/egregious"); + iron2.carverHelper.addVariation("tile.metalOre.5.desc", 5, "metals/iron/bolted"); + iron2.carverHelper.registerBlock(iron2, "iron2"); + iron2.carverHelper.registerVariations("iron_block", iron2); + + iron_block.carverHelper.registerAll(iron_block, "iron_block"); + Carving.chisel.registerOre("iron_block", "blockIron"); } }, @@ -1136,7 +1230,7 @@ public enum Features { jackolantern[metadata] = (BlockCarvablePumpkin) new BlockCarvablePumpkin(true).setCreativeTab(ChiselTabs.tabOtherChiselBlocks).setHardness(1.0F).setBlockName("litpumpkin") .setCreativeTab(ChiselTabs.tabOtherChiselBlocks).setLightLevel(1.0f); jackolantern[metadata].setInformation("pumpkin/pumpkin_face_" + (metadata + 1) + "_on"); - GameRegistry.registerBlock(jackolantern[metadata], ("jackolantern" + (metadata + 1))); + GameRegistry.registerBlock(jackolantern[metadata], ItemCarvablePumpkin.class, ("jackolantern" + (metadata + 1))); Carving.chisel.addVariation("jackolantern", jackolantern[metadata], 0, (metadata + 1)); } Carving.chisel.addVariation("jackolantern", Blocks.lit_pumpkin, 0, 0); @@ -1192,7 +1286,8 @@ public enum Features { lapis_block.carverHelper.addVariation("tile.lapis.6.desc", 6, "lapis/a1-blocklapis-panel"); lapis_block.carverHelper.addVariation("tile.lapis.7.desc", 7, "lapis/a1-blocklapis-smooth"); lapis_block.carverHelper.addVariation("tile.lapis.8.desc", 8, "lapis/a1-blocklapis-ornatelayer"); - lapis_block.carverHelper.registerAll(lapis_block, "lapis_block"); + + lapis_block.carverHelper.registerAll(lapis_block, "lapis_block"); Carving.chisel.registerOre("lapis_block", "lapis"); } }, @@ -1541,6 +1636,38 @@ public enum Features { } }, + NATION { + + @Override + void addBlocks() { + BlockCarvable imperial = (BlockCarvable) new BlockCarvable(Material.rock).setCreativeTab(ChiselTabs.tabMetalChiselBlocks).setHardness(2.0F).setResistance(10F); + imperial.carverHelper.addVariation("tile.nation.0.desc", 0, "nation/imperialCamo"); + imperial.carverHelper.addVariation("tile.nation.1.desc", 1, "nation/imperialCamoSecluded"); + imperial.carverHelper.addVariation("tile.nation.2.desc", 2, "nation/imperialPlate"); + imperial.carverHelper.addVariation("tile.nation.3.desc", 3, "nation/imperialCautionWhite"); + imperial.carverHelper.addVariation("tile.nation.4.desc", 4, "nation/imperialCautionOrange"); + //imperial.carverHelper.registerBlock(imperial, "imperial"); + imperial.carverHelper.registerAll(imperial, "nation"); + + BlockCarvable rebel = (BlockCarvable) new BlockCarvable(Material.rock).setCreativeTab(ChiselTabs.tabMetalChiselBlocks).setHardness(2.0F).setResistance(10F); + rebel.carverHelper.addVariation("tile.nation.0.desc", 0, "nation/rebelCamo"); + rebel.carverHelper.addVariation("tile.nation.1.desc", 1, "nation/rebelCamoSecluded"); + rebel.carverHelper.addVariation("tile.nation.2.desc", 2, "nation/rebelPlate"); + rebel.carverHelper.addVariation("tile.nation.3.desc", 3, "nation/rebelCautionWhite"); + rebel.carverHelper.addVariation("tile.nation.4.desc", 4, "nation/rebelCautionRed"); + rebel.carverHelper.registerBlock(rebel, "rebel"); + rebel.carverHelper.registerVariations("nation", rebel); + + Carving.chisel.registerOre("nation", "nation"); + } + + @Override + void addRecipes() { + GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ChiselBlocks.nation, 32, 0), new Object[] { "xyx", "yzy", "xyx", 'x', "stone", 'y', + Items.iron_ingot, 'z', Items.gold_nugget })); + } + }, + NETHER_BRICK { @Override @@ -1591,7 +1718,8 @@ public enum Features { netherrack.carverHelper.addVariation("tile.hellrock.12.desc", 12, "netherrack/a1-netherrack-meatrock"); netherrack.carverHelper.addVariation("tile.hellrock.13.desc", 13, "netherrack/a1-netherrack-red"); netherrack.carverHelper.addVariation("tile.hellrock.14.desc", 14, "netherrack/a1-netherrack-wells"); - netherrack.carverHelper.registerAll(netherrack, "netherrack"); + + netherrack.carverHelper.registerAll(netherrack, "netherrack"); Carving.chisel.registerOre("netherrack", "netherrack"); } }, @@ -1618,7 +1746,8 @@ public enum Features { obsidian.carverHelper.addVariation("tile.obsidian.13.desc", 13, "obsidian/tiles"); obsidian.carverHelper.addVariation("tile.obsidian.14.desc", 14, "obsidian/greek"); obsidian.carverHelper.addVariation("tile.obsidian.15.desc", 15, "obsidian/crate"); - obsidian.carverHelper.registerAll(obsidian, "obsidian"); + + obsidian.carverHelper.registerAll(obsidian, "obsidian"); Carving.chisel.registerOre("obsidian", "obsidian"); } }, @@ -1648,6 +1777,10 @@ public enum Features { packedice.carverHelper.registerAll(packedice, "packedice"); Carving.chisel.registerOre("packedice", "packedice"); } + @Override + void addRecipes() { + GameRegistry.addRecipe(new ItemStack(ChiselBlocks.packedice_pillar, 6, 0), "XX", "XX", "XX", 'X', new ItemStack(ChiselBlocks.packedice, 1, OreDictionary.WILDCARD_VALUE)); + } }, PACKEDICE_PILLAR { @@ -1774,7 +1907,7 @@ public enum Features { pumpkin[metadata] = (BlockCarvablePumpkin) new BlockCarvablePumpkin(false).setCreativeTab(ChiselTabs.tabOtherChiselBlocks).setHardness(1.0F).setBlockName("pumpkin") .setCreativeTab(ChiselTabs.tabOtherChiselBlocks); pumpkin[metadata].setInformation("pumpkin/pumpkin_face_" + (metadata + 1) + "_off"); - GameRegistry.registerBlock(pumpkin[metadata], "pumpkin" + (metadata + 1)); + GameRegistry.registerBlock(pumpkin[metadata], ItemCarvablePumpkin.class, "pumpkin" + (metadata + 1)); Carving.chisel.addVariation("pumpkin", pumpkin[metadata], 0, (metadata + 1)); } Carving.chisel.addVariation("pumpkin", Blocks.pumpkin, 0, 0); @@ -1824,7 +1957,9 @@ public enum Features { Carving.chisel.addVariation("RCAbyssalBlock", abyssal, 4, 4); Carving.chisel.addVariation("RCAbyssalBlock", abyssal, 5, 5); Carving.chisel.registerOre("RCAbyssalBlock", "RCAbyssalBlock"); - }; + } + + ; }, RC_BLEACHED_BONE(RAILCRAFT.getRequiredMod(), RAILCRAFT) { @@ -1915,7 +2050,9 @@ public enum Features { Carving.chisel.addVariation("RCQuarriedBlock", quarried, 4, 4); Carving.chisel.addVariation("RCQuarriedBlock", quarried, 5, 5); Carving.chisel.registerOre("RCQuarriedBlock", "RCQuarriedBlock"); - }; + } + + ; }, RC_SANDY_STONE(RAILCRAFT.getRequiredMod(), RAILCRAFT) { @@ -1958,7 +2095,8 @@ public enum Features { redstone_block.carverHelper.addVariation("tile.redstone_block.13.desc", 13, "redstone/supaplex"); redstone_block.carverHelper.addVariation("tile.redstone_block.14.desc", 14, "redstone/a1-blockredstone-skullred"); redstone_block.carverHelper.addVariation("tile.redstone_block.15.desc", 15, "redstone/a1-blockredstone-redstonezelda"); - redstone_block.carverHelper.registerAll(redstone_block, "redstone_block"); + + redstone_block.carverHelper.registerAll(redstone_block, "redstone_block"); Carving.chisel.registerOre("redstone_block", "redstone"); } }, @@ -2004,7 +2142,8 @@ public enum Features { sandstone.carverHelper.addVariation("tile.sandstone.13.desc", 13, "sandstone/blocks"); sandstone.carverHelper.addVariation("tile.sandstone.14.desc", 14, "sandstone/mosaic"); sandstone.carverHelper.addVariation("tile.sandstone.15.desc", 15, "sandstone/horizontal-tiles"); - sandstone.carverHelper.registerAll(sandstone, "sandstone"); + + sandstone.carverHelper.registerAll(sandstone, "sandstone"); Carving.chisel.registerOre("sandstone", "sandstone"); } @@ -2124,8 +2263,7 @@ public enum Features { @Override void addBlocks() { BlockSnakestoneObsidian obsidian_snakestone = (BlockSnakestoneObsidian) new BlockSnakestoneObsidian("Chisel:snakestone/obsidian/").setBlockName("chisel.obsidianSnakestone") - .setHardness(50.0F) - .setResistance(2000.0F); + .setHardness(50.0F).setResistance(2000.0F); GameRegistry.registerBlock(obsidian_snakestone, ItemCarvable.class, "obsidian_snakestone"); Carving.chisel.addVariation("obsidian", obsidian_snakestone, 1, 16); Carving.chisel.addVariation("obsidian", obsidian_snakestone, 13, 17); @@ -2161,13 +2299,17 @@ public enum Features { Carving.chisel.addVariation("stonebricksmooth", Blocks.stone, 0, -1); } for (int i = 0; i < 4; i++) { - if (i == 1) { - if (Configurations.allowMossy) - Carving.chisel.addVariation("stonebricksmooth", Blocks.stonebrick, i, i); - } else { + if ((i == 1) && (Configurations.allowMossy)) { + Carving.chisel.addVariation("stonebricksmooth", Blocks.stonebrick, i, i); + } else if (i != 1) { Carving.chisel.addVariation("stonebricksmooth", Blocks.stonebrick, i, i); } } + + stonebricksmooth.carverHelper.addVariation("tile.stonebricksmooth.0.desc", 0, "stonebrick2/masonBricksPlain"); + stonebricksmooth.carverHelper.addVariation("tile.stonebricksmooth.1.desc", 1, "stonebrick2/masonBricksFelsic"); + stonebricksmooth.carverHelper.addVariation("tile.stonebricksmooth.2.desc", 2, "stonebrick2/masonBricksMafic"); + stonebricksmooth.carverHelper.addVariation("tile.stonebricksmooth.3.desc", 3, "stonebrick2/masonBricksMixed"); stonebricksmooth.carverHelper.addVariation("tile.stonebricksmooth.4.desc", 4, "stonebrick/smallbricks"); stonebricksmooth.carverHelper.addVariation("tile.stonebricksmooth.5.desc", 5, "stonebrick/largebricks"); stonebricksmooth.carverHelper.addVariation("tile.stonebricksmooth.6.desc", 6, "stonebrick/smallchaotic"); @@ -2180,16 +2322,11 @@ public enum Features { stonebricksmooth.carverHelper.addVariation("tile.stonebricksmooth.13.desc", 13, "stonebrick/sunken"); stonebricksmooth.carverHelper.addVariation("tile.stonebricksmooth.14.desc", 14, "stonebrick/ornatepanel"); stonebricksmooth.carverHelper.addVariation("tile.stonebricksmooth.15.desc", 15, "stonebrick/poison"); - stonebricksmooth.carverHelper.registerAll(stonebricksmooth, "stonebricksmooth"); - BlockCarvable stonebricksmooth2 = (BlockCarvable) new BlockCarvable(Material.rock).setCreativeTab(ChiselTabs.tabStoneChiselBlocks).setHardness(1.5F).setResistance(10.0F) - .setStepSound(Block.soundTypeStone); - stonebricksmooth2.carverHelper.addVariation("tile.stonebricksmooth2.0.desc", 0, "stonebrick2/masonryPlain"); - stonebricksmooth2.carverHelper.addVariation("tile.stonebricksmooth2.1.desc", 1, "stonebrick2/masonryFelsic"); - stonebricksmooth2.carverHelper.addVariation("tile.stonebricksmooth2.2.desc", 2, "stonebrick2/masonryMafic"); - stonebricksmooth2.carverHelper.addVariation("tile.stonebricksmooth2.3.desc", 3, "stonebrick2/masonryMixed"); - stonebricksmooth2.carverHelper.registerAll(stonebricksmooth2, "stonebricksmooth2"); - Carving.chisel.registerOre("stonebricksmooth2", "stonebricksmooth"); + stonebricksmooth.carverHelper.registerAll(stonebricksmooth, "stonebricksmooth"); + Carving.chisel.registerOre("stonebricksmooth", "stonebricksmooth"); + + //Carving.chisel.addVariation("stonebricksmooth", GameRegistry.findBlock("Chisel-2", "tile.TFTowerStone"), 0, 0); } }, @@ -2227,23 +2364,31 @@ public enum Features { technical.carverHelper.addVariation("tile.technical.13.desc", 13, "technical/grate"); technical.carverHelper.addVariation("tile.technical.14.desc", 14, "technical/malfunctionFan"); technical.carverHelper.addVariation("tile.technical.15.desc", 15, "technical/grateRusty"); - technical.carverHelper.registerAll(technical, "technical"); + technical.carverHelper.registerAll(technical, "technical"); BlockCarvableGlass technical2 = (BlockCarvableGlass) new BlockCarvableGlass().setHardness(2.0F).setResistance(10F); technical2.carverHelper.addVariation("tile.technical.0.desc", 0, "technical/scaffoldTransparent"); technical2.carverHelper.addVariation("tile.technical.4.desc", 1, "technical/fanFastTransparent"); technical2.carverHelper.addVariation("tile.technical.6.desc", 2, "technical/fanStillTransparent"); technical2.carverHelper.addVariation("tile.technical.14.desc", 3, "technical/fanStillTransparent"); - technical2.carverHelper.registerAll(technical2, "technical2"); - Carving.chisel.registerOre("technical", "technical"); + technical2.carverHelper.registerBlock(technical2, "technical2"); + technical2.carverHelper.registerVariations("technical", technical2); + + BlockCarvable technical3 = (BlockCarvable) new BlockCarvable(Material.rock).setCreativeTab(ChiselTabs.tabMetalChiselBlocks).setHardness(2.0F).setResistance(10F); + technical3.carverHelper.addVariation("tile.technical3.0.desc", 0, "technical/massiveFan"); + technical3.carverHelper.addVariation("tile.technical3.1.desc", 1, "technical/massiveHexPlating"); + technical2.carverHelper.registerBlock(technical3, "technical3"); + technical2.carverHelper.registerVariations("technical", technical3); + + Carving.chisel.registerOre("technical", "technical"); } @Override void addRecipes() { GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ChiselBlocks.technical, Configurations.factoryBlockAmount, 0), new Object[] { "xyx", "yxy", "xyx", 'x', "stone", 'y', Items.iron_ingot })); - GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ChiselBlocks.technical2, Configurations.factoryBlockAmount, 0), new Object[] { "xyx", "yzy", "xyx", 'x', "stone", 'y', - "ingotIron", 'z', Blocks.glass })); + /*GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ChiselBlocks.technical2, Configurations.factoryBlockAmount, 0), new Object[] { "xyx", "yzy", "xyx", 'x', "stone", 'y', + "ingotIron", 'z', Blocks.glass })); //*/ } }, @@ -2305,7 +2450,9 @@ public enum Features { mossy_templeblock.carverHelper.addVariation("tile.mossy_templeblock.15.desc", 15, "templemossy/smalltiles-light"); mossy_templeblock.carverHelper.registerAll(mossy_templeblock, "mossy_templeblock"); Carving.chisel.registerOre("mossy_templeblock", "mossy_templeblock"); - }; + } + + ; }, TIN { @@ -2392,14 +2539,18 @@ public enum Features { void addBlocks() { Carving.chisel.addVariation("torch", Blocks.torch, 0, 0); for (int type = 0; type < 10; type++) { - if (type == 8 || type == 9) - torch[type] = new BlockCarvableTorch().disableParticles(); - else - torch[type] = new BlockCarvableTorch(); - - torch[type].setInformation("torch" + (type + 1)); - GameRegistry.registerBlock(torch[type], "torch" + (type + 1)); - Carving.chisel.addVariation("torch", torch[type], 0, (type + 1)); + String name = "torch" + (type + 1); + BlockCarvableTorch t = new BlockCarvableTorch(type, name); + if (type == 8 || type == 9) { + t.disableParticles(); + } + if (Loader.isModLoaded("ForgeMultipart")) { + GameRegistry.registerBlock(t, ItemBlockChiselTorchPart.class, name, t); + } else { + GameRegistry.registerBlock(t, name); + } + Carving.chisel.addVariation("torch", t, 0, (type + 1)); + torches[type] = t; } Carving.chisel.registerOre("torch", "torch"); } @@ -2457,16 +2608,27 @@ public enum Features { }, VALENTINES { - @Override void addBlocks() { + + @Override + void addBlocks() { BlockCarvable valentines = (BlockCarvable) new BlockCarvable(Material.wood).setStepSound(Block.soundTypeStone).setCreativeTab(ChiselTabs.tabOtherChiselBlocks).setHardness(2F) .setResistance(10F); - valentines.carverHelper.addVariation("tile.valentines.0.desc", 0, "valentines/bricks"); + valentines.carverHelper.addVariation("tile.valentines.0.desc", 0, "valentines/1"); valentines.carverHelper.addVariation("tile.valentines.1.desc", 1, "valentines/companion"); + valentines.carverHelper.addVariation("tile.valentines.2.desc", 2, "valentines/2"); + valentines.carverHelper.addVariation("tile.valentines.3.desc", 3, "valentines/3"); + valentines.carverHelper.addVariation("tile.valentines.4.desc", 4, "valentines/4"); + valentines.carverHelper.addVariation("tile.valentines.5.desc", 5, "valentines/5"); + valentines.carverHelper.addVariation("tile.valentines.6.desc", 6, "valentines/6"); + valentines.carverHelper.addVariation("tile.valentines.7.desc", 7, "valentines/7"); + valentines.carverHelper.addVariation("tile.valentines.8.desc", 8, "valentines/8"); + valentines.carverHelper.addVariation("tile.valentines.9.desc", 9, "valentines/9"); valentines.carverHelper.registerAll(valentines, "valentines"); Carving.chisel.registerOre("valentines", "blockValentines"); } - @Override void addRecipes() { + @Override + void addRecipes() { GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ChiselBlocks.valentines, 8, 0), "***", "*X*", "***", '*', "stone", 'X', new ItemStack(Items.dye, 1, 9))); } }, @@ -2502,6 +2664,16 @@ public enum Features { voidstone2.carverHelper.registerAll(voidstone2, "voidstone2"); Carving.chisel.registerOre("voidstone2", "voidstone2"); + + BlockCarvable voidstoneRunic = (BlockCarvable) new BlockCarvable(Material.rock).setCreativeTab(ChiselTabs.tabStoneChiselBlocks).setHardness(5.0F).setResistance(10.0F); + voidstoneRunic.carverHelper.setChiselBlockName("Voidstone Runic"); + + for (int i = 1; i < 16; i++) + voidstoneRunic.carverHelper.addVariation("tile.voidstoneRunic." + i + ".desc", i, "voidstone/runes/rune" + sGNames[i].replaceAll(" ", "")); + voidstoneRunic.carverHelper.registerAll(voidstoneRunic, "voidstoneRunic"); + voidstoneRunic.carverHelper.registerVariations("voidstone", voidstoneRunic); + + Carving.chisel.registerOre("voidstoneRunic", "voidstoneRunic"); } @Override @@ -2653,7 +2825,6 @@ public enum Features { return true; } }, - ; private static final String[] dyeOres = { "dyeBlack", "dyeRed", "dyeGreen", "dyeBrown", "dyeBlue", "dyePurple", "dyeCyan", "dyeLightGray", "dyeGray", "dyePink", "dyeLime", "dyeYellow", diff --git a/src/main/java/com/cricketcraft/chisel/block/BlockCarvableAntiBlock.java b/src/main/java/com/cricketcraft/chisel/block/BlockCarvableAntiBlock.java index 885fa8f0..25ff99e9 100644 --- a/src/main/java/com/cricketcraft/chisel/block/BlockCarvableAntiBlock.java +++ b/src/main/java/com/cricketcraft/chisel/block/BlockCarvableAntiBlock.java @@ -1,6 +1,8 @@ package com.cricketcraft.chisel.block; import net.minecraft.block.material.Material; +import net.minecraft.entity.EnumCreatureType; +import net.minecraft.world.IBlockAccess; import com.cricketcraft.chisel.Chisel; import com.cricketcraft.chisel.api.ICarvable; @@ -26,4 +28,8 @@ public class BlockCarvableAntiBlock extends BlockCarvableColor implements ICarva return false; } */ + @Override + public boolean canCreatureSpawn(EnumCreatureType type, IBlockAccess world, int x, int y, int z) { + return false; + } } diff --git a/src/main/java/com/cricketcraft/chisel/block/BlockCarvableBookshelf.java b/src/main/java/com/cricketcraft/chisel/block/BlockCarvableBookshelf.java index 95e3cdce..5d809a1e 100644 --- a/src/main/java/com/cricketcraft/chisel/block/BlockCarvableBookshelf.java +++ b/src/main/java/com/cricketcraft/chisel/block/BlockCarvableBookshelf.java @@ -35,15 +35,20 @@ public class BlockCarvableBookshelf extends BlockCarvable { } @Override - public int quantityDropped(Random par1Random) { + public int quantityDropped(Random random) { return 3; } @Override - public Item getItemDropped(int par1, Random par2Random, int par3) { + public Item getItemDropped(int ammount, Random random, int meta) { return Items.book; } + @Override + public int damageDropped(int damage){ + return 0; + } + @Override public float getEnchantPowerBonus(World world, int x, int y, int z) { return 1; diff --git a/src/main/java/com/cricketcraft/chisel/block/BlockCarvablePillar.java b/src/main/java/com/cricketcraft/chisel/block/BlockCarvablePillar.java index f2736c4a..4231ed0b 100644 --- a/src/main/java/com/cricketcraft/chisel/block/BlockCarvablePillar.java +++ b/src/main/java/com/cricketcraft/chisel/block/BlockCarvablePillar.java @@ -31,7 +31,12 @@ public class BlockCarvablePillar extends BlockCarvable { } public IIcon getCtmIcon(int index, int metadata) { - CarvableVariation var = carverHelper.variations.get(metadata); + //Workaround to prevent crash with invalid meta + CarvableVariation var = null; + if(metadata <= carverHelper.variations.size()) + var = carverHelper.variations.get(metadata); + else + var = carverHelper.variations.get(0); if (index >= 4) return var.iconTop; diff --git a/src/main/java/com/cricketcraft/chisel/block/BlockCarvablePumpkin.java b/src/main/java/com/cricketcraft/chisel/block/BlockCarvablePumpkin.java index 7d9e6157..2099f89f 100644 --- a/src/main/java/com/cricketcraft/chisel/block/BlockCarvablePumpkin.java +++ b/src/main/java/com/cricketcraft/chisel/block/BlockCarvablePumpkin.java @@ -1,7 +1,12 @@ package com.cricketcraft.chisel.block; +import com.cricketcraft.chisel.entity.EntityChiselSnowman; +import com.cricketcraft.chisel.init.ChiselBlocks; +import net.minecraft.block.Block; import net.minecraft.block.BlockPumpkin; import net.minecraft.client.renderer.texture.IIconRegister; +import net.minecraft.entity.monster.EntityIronGolem; +import net.minecraft.init.Blocks; import net.minecraft.item.ItemStack; import net.minecraft.util.IIcon; import net.minecraft.world.IBlockAccess; @@ -13,6 +18,7 @@ import com.cricketcraft.chisel.carving.CarvableVariation; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; +import net.minecraft.world.World; public class BlockCarvablePumpkin extends BlockPumpkin implements ICarvable { @@ -25,11 +31,72 @@ public class BlockCarvablePumpkin extends BlockPumpkin implements ICarvable { public BlockCarvablePumpkin(boolean isOn) { super(isOn); + this.setStepSound(Block.soundTypeWood); if (isOn) setLightLevel(10.0F); carverHelper = new CarvableHelper(); } + @Override + public void onBlockAdded(World world, int x, int y, int z){ + if(world.getBlock(x, y - 1, z) == Blocks.snow && world.getBlock(x, y - 2, z) == Blocks.snow){ + if(!world.isRemote){ + //Let's grab the pumpkin before we start + ItemStack pumpkin = new ItemStack(world.getBlock(x, y, z), world.getBlockMetadata(x, y, z)); + + world.setBlock(x, y, z, Blocks.air, 0, 2); + world.setBlock(x, y - 1, z, Blocks.air, 0, 2); + world.setBlock(x, y - 2, z, Blocks.air, 0, 2); + EntityChiselSnowman snowman = new EntityChiselSnowman(world); + snowman.setCurrentItemOrArmor(2, pumpkin); + snowman.setLocationAndAngles((double) x + 0.5D, (double) y - 1.95D, (double) z + 0.5D, 0.0F, 0.0F); + world.spawnEntityInWorld(snowman); + world.notifyBlockChange(x, y, z, Blocks.air); + world.notifyBlockChange(x, y - 1, z, Blocks.air); + world.notifyBlockChange(x, y - 2, z, Blocks.air); + } + + //Spawn some lovely particles + for(int c = 0; c < 120; ++c){ + world.spawnParticle("snowshovel", (double)x + world.rand.nextDouble(), (double) (y - 2) + world.rand.nextDouble() * 2.5D, (double) z + world.rand.nextDouble(), 0.0D, 0.0D, 0.0D); + } + } else if(world.getBlock(x, y - 1, z) == Blocks.iron_block || world.getBlock(x, y - 2, z) == Blocks.iron_block){ + boolean flag = world.getBlock(x - 1, y - 1, z) == Blocks.iron_block && world.getBlock(x + 1, y - 1, z) == Blocks.iron_block; + boolean flag1 = world.getBlock(x, y - 1, z - 1) == Blocks.iron_block && world.getBlock(x, y - 1, z + 1) == Blocks.iron_block; + + if(flag || flag1){ + world.setBlock(x, y, z, Blocks.air, 0, 2); + world.setBlock(x, y - 1, z, Blocks.air, 0, 2); + world.setBlock(x, y - 2, z, Blocks.air, 0, 2); + + if(flag){ + world.setBlock(x - 1, y - 1, z, Blocks.air, 0, 2); + world.setBlock(x + 1, y - 1, z, Blocks.air, 0, 2); + } else { + world.setBlock(x, y - 1, z - 1, Blocks.air, 0, 2); + world.setBlock(x, y - 1, z + 1, Blocks.air, 0, 2); + } + + EntityIronGolem ironGolem = new EntityIronGolem(world); + ironGolem.setPlayerCreated(true); + ironGolem.setLocationAndAngles((double) x + 0.5D, (double) y - 1.95D, (double) z + 0.5D, 0.0F, 0.0F); + world.spawnEntityInWorld(ironGolem); + + world.notifyBlockChange(x, y, z, Blocks.air); + world.notifyBlockChange(x, y - 1, z, Blocks.air); + world.notifyBlockChange(x, y - 2, z, Blocks.air); + + if(flag){ + world.notifyBlockChange(x - 1, y - 1, z, Blocks.air); + world.notifyBlockChange(x + 1, y - 1, z, Blocks.air); + } else { + world.notifyBlockChange(x, y - 1, z - 1, Blocks.air); + world.notifyBlockChange(x, y - 1, z + 1, Blocks.air); + } + } + } + } + @Override @SideOnly(Side.CLIENT) public IIcon getIcon(int side, int meta) { diff --git a/src/main/java/com/cricketcraft/chisel/block/BlockCarvableSlab.java b/src/main/java/com/cricketcraft/chisel/block/BlockCarvableSlab.java index 34dc90df..a82cdc02 100644 --- a/src/main/java/com/cricketcraft/chisel/block/BlockCarvableSlab.java +++ b/src/main/java/com/cricketcraft/chisel/block/BlockCarvableSlab.java @@ -1,9 +1,18 @@ package com.cricketcraft.chisel.block; +import static net.minecraftforge.common.util.ForgeDirection.DOWN; +import static net.minecraftforge.common.util.ForgeDirection.UP; + import java.util.List; import java.util.Random; import net.minecraft.block.Block; +import net.minecraft.block.BlockCompressedPowered; +import net.minecraft.block.BlockFarmland; +import net.minecraft.block.BlockHopper; +import net.minecraft.block.BlockSlab; +import net.minecraft.block.BlockSnow; +import net.minecraft.block.BlockStairs; import net.minecraft.creativetab.CreativeTabs; import net.minecraft.entity.Entity; import net.minecraft.item.Item; @@ -13,6 +22,7 @@ import net.minecraft.util.IIcon; import net.minecraft.util.MovingObjectPosition; import net.minecraft.world.IBlockAccess; import net.minecraft.world.World; +import net.minecraftforge.common.util.ForgeDirection; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; @@ -103,5 +113,20 @@ public class BlockCarvableSlab extends BlockCarvable { if (isBottom) super.getSubBlocks(block, tabs, list); } + /** + * Checks if the block is a solid face on the given side, used by placement logic. + * + * @param world The current world + * @param x X Position + * @param y Y position + * @param z Z position + * @param side The side to check + * @return True if the block is solid on the specified side. + */ + @Override + public boolean isSideSolid(IBlockAccess world, int x, int y, int z, ForgeDirection side) + { + return !isBottom && (side == UP); + } } diff --git a/src/main/java/com/cricketcraft/chisel/block/BlockCarvableStairs.java b/src/main/java/com/cricketcraft/chisel/block/BlockCarvableStairs.java index a730288e..1a359292 100644 --- a/src/main/java/com/cricketcraft/chisel/block/BlockCarvableStairs.java +++ b/src/main/java/com/cricketcraft/chisel/block/BlockCarvableStairs.java @@ -69,6 +69,10 @@ public class BlockCarvableStairs extends BlockStairs implements ICarvable { meta += par1World.getBlockMetadata(par2, par3, par4) % 8; // add upside-down-ness + if (par6ItemStack.getItemDamage() >= 8) { + meta += 8; + } + par1World.setBlockMetadataWithNotify(par2, par3, par4, meta, 2); } @@ -84,6 +88,6 @@ public class BlockCarvableStairs extends BlockStairs implements ICarvable { @Override public CarvableVariation getVariation(ItemStack stack) { - return carverHelper.getVariation(stack.getItemDamage()); + return carverHelper.getVariation(blockMeta + (stack.getItemDamage() / 8)); } } diff --git a/src/main/java/com/cricketcraft/chisel/block/BlockCarvableTorch.java b/src/main/java/com/cricketcraft/chisel/block/BlockCarvableTorch.java index 230668cb..613bdb9f 100644 --- a/src/main/java/com/cricketcraft/chisel/block/BlockCarvableTorch.java +++ b/src/main/java/com/cricketcraft/chisel/block/BlockCarvableTorch.java @@ -22,13 +22,16 @@ public class BlockCarvableTorch extends BlockTorch implements ICarvable { public CarvableHelper carverHelper; private String texLocation; protected boolean emitsParticles = true; + public int idx; - public BlockCarvableTorch() { + public BlockCarvableTorch(int idx, String tex) { super(); carverHelper = new CarvableHelper(); setCreativeTab(ChiselTabs.tabOtherChiselBlocks); setLightLevel(0.9375F); setBlockName("torch"); + this.idx = idx; + this.texLocation = tex; } @Override @@ -45,11 +48,7 @@ public class BlockCarvableTorch extends BlockTorch implements ICarvable { public void registerBlockIcons(IIconRegister icon) { this.blockIcon = icon.registerIcon(Chisel.MOD_ID + ":torch/" + texLocation); } - - public void setInformation(String textureLocation) { - this.texLocation = textureLocation; - } - + public BlockCarvableTorch disableParticles() { this.emitsParticles = false; return this; diff --git a/src/main/java/com/cricketcraft/chisel/block/BlockPresent.java b/src/main/java/com/cricketcraft/chisel/block/BlockPresent.java index feff0d69..b362f260 100644 --- a/src/main/java/com/cricketcraft/chisel/block/BlockPresent.java +++ b/src/main/java/com/cricketcraft/chisel/block/BlockPresent.java @@ -31,7 +31,7 @@ import cpw.mods.fml.relauncher.SideOnly; public class BlockPresent extends Block implements ICarvable { public CarvableHelper carverHelper; - + private float minX, minY, minZ, maxX, maxY, maxZ; public BlockPresent() { @@ -48,7 +48,7 @@ public class BlockPresent extends Block implements ICarvable { public String getModelTexture(int type) { return "textures/blocks/present/presentChest" + type; } - + @SuppressWarnings({ "unchecked", "rawtypes" }) @Override public void getSubBlocks(Item item, CreativeTabs tab, List list) { @@ -118,12 +118,16 @@ public class BlockPresent extends Block implements ICarvable { @Override public AxisAlignedBB getSelectedBoundingBoxFromPool(World world, int x, int y, int z) { + if(world.getTileEntity(x, y, z) instanceof TileEntityPresent) return getBoundingBox((TileEntityPresent) world.getTileEntity(x, y, z)); + else return null; } @Override public AxisAlignedBB getCollisionBoundingBoxFromPool(World world, int x, int y, int z) { + if(world.getTileEntity(x, y, z) instanceof TileEntityPresent) return getBoundingBox((TileEntityPresent) world.getTileEntity(x, y, z)); + else return null; } public AxisAlignedBB getBoundingBox(TileEntityPresent me) { @@ -169,7 +173,7 @@ public class BlockPresent extends Block implements ICarvable { } } } - + @Override public boolean hasTileEntity(int metadata) { return true; @@ -193,7 +197,7 @@ public class BlockPresent extends Block implements ICarvable { } return 0; } - + @Override public int damageDropped(int meta) { return meta; diff --git a/src/main/java/com/cricketcraft/chisel/block/BlockSnakestoneObsidian.java b/src/main/java/com/cricketcraft/chisel/block/BlockSnakestoneObsidian.java index 84310e2b..0ea09f4d 100644 --- a/src/main/java/com/cricketcraft/chisel/block/BlockSnakestoneObsidian.java +++ b/src/main/java/com/cricketcraft/chisel/block/BlockSnakestoneObsidian.java @@ -1,16 +1,15 @@ package com.cricketcraft.chisel.block; -import java.util.Random; - +import com.cricketcraft.chisel.client.GeneralChiselClient; import net.minecraft.client.renderer.texture.IIconRegister; import net.minecraft.util.IIcon; import net.minecraft.world.World; -import com.cricketcraft.chisel.client.GeneralChiselClient; +import java.util.Random; public class BlockSnakestoneObsidian extends BlockSnakestone { - public IIcon[] particles = new IIcon[8]; + public static IIcon[] particles = new IIcon[8]; public BlockSnakestoneObsidian(String iconPrefix) { super(iconPrefix); diff --git a/src/main/java/com/cricketcraft/chisel/block/tileentity/TileEntityAutoChisel.java b/src/main/java/com/cricketcraft/chisel/block/tileentity/TileEntityAutoChisel.java index 64507435..fa00f93f 100644 --- a/src/main/java/com/cricketcraft/chisel/block/tileentity/TileEntityAutoChisel.java +++ b/src/main/java/com/cricketcraft/chisel/block/tileentity/TileEntityAutoChisel.java @@ -141,8 +141,7 @@ public class TileEntityAutoChisel extends TileEntity implements ISidedInventory // if we have the stack upgrade, boost the stack size to the max possible, otherwise just one chiseled.stackSize = hasUpgrade(Upgrade.STACK) ? canBeMade : 1; - // if we can place the result in the output - if (canMerge(chiseled)) { + if (canChisel(chiseled)) { // if our output is empty, just use the current result if (output == null) { setInventorySlotContents(OUTPUT, chiseled); @@ -187,7 +186,7 @@ public class TileEntityAutoChisel extends TileEntity implements ISidedInventory return false; } - private boolean canMerge(ItemStack toMerge) { + private boolean canChisel(ItemStack toMerge) { // if the output slot is empty we can merge without checking if (inventory[OUTPUT] == null) { return true; @@ -198,7 +197,7 @@ public class TileEntityAutoChisel extends TileEntity implements ISidedInventory return !toMerge.getHasSubtypes() || toMerge.getItemDamage() == inventory[OUTPUT].getItemDamage(); } - return false; + return ((IChiselItem)inventory[CHISEL].getItem()).canChisel(worldObj, inventory[CHISEL], General.getVariation(inventory[TARGET])); } private boolean hasChisel() { diff --git a/src/main/java/com/cricketcraft/chisel/block/tileentity/TileEntityPresent.java b/src/main/java/com/cricketcraft/chisel/block/tileentity/TileEntityPresent.java index 944c62e1..d24e2505 100644 --- a/src/main/java/com/cricketcraft/chisel/block/tileentity/TileEntityPresent.java +++ b/src/main/java/com/cricketcraft/chisel/block/tileentity/TileEntityPresent.java @@ -21,6 +21,8 @@ import com.cricketcraft.chisel.network.message.MessagePresentConnect; public class TileEntityPresent extends TileEntity implements IInventory, IDoubleChest { private TileEntityPresent connection = null; + // If cachedDir is non-null, but connection is null, this present must be + // connected to an unloaded present. This is handled appropriately. private ForgeDirection cachedDir = null; private boolean isParent; private final ItemStack[] inventory = new ItemStack[27]; @@ -29,14 +31,10 @@ public class TileEntityPresent extends TileEntity implements IInventory, IDouble @Override public void updateEntity() { - if (isConnected() && connection.isInvalid()) { - disconnect(); - } - - if (autoSearch && worldObj != null /* ugh */) { + if (!isConnected() && autoSearch && worldObj != null /* ugh */) { if (cachedDir != null) { connectTo(cachedDir); - } else { + } else if (!worldObj.isRemote){ findConnections(); } autoSearch = false; @@ -48,7 +46,7 @@ public class TileEntityPresent extends TileEntity implements IInventory, IDouble } private boolean connectTo(TileEntityPresent present, ForgeDirection dir) { - if (present.getBlockMetadata() == getBlockMetadata() && !present.isConnected() && Math.abs(present.xCoord - xCoord + present.yCoord - yCoord + present.zCoord - zCoord) == 1) { + if (present.getBlockMetadata() == getBlockMetadata() && !present.isConnected() && (present.cachedDir == null || present.cachedDir == dir.getOpposite()) && Math.abs(present.xCoord - xCoord + present.yCoord - yCoord + present.zCoord - zCoord) == 1) { connection = present; connection.connection = this; connection.cachedDir = dir.getOpposite(); @@ -63,22 +61,31 @@ public class TileEntityPresent extends TileEntity implements IInventory, IDouble } public boolean connectTo(ForgeDirection dir) { - TileEntity te = worldObj.getTileEntity(xCoord + dir.offsetX, yCoord + dir.offsetY, zCoord + dir.offsetZ); + int x = xCoord + dir.offsetX, y = yCoord + dir.offsetY, z = zCoord + dir.offsetZ; + TileEntity te = getTileSafe(x, y, z); if (te instanceof TileEntityPresent) { return connectTo((TileEntityPresent) te, dir); } - return false; + return !exists(x, y, z); } - public void disconnect() { + /** + * @param preserveDir + * If true, this is only a virtual disconnect, meaning the other + * chest still exists, but is still loaded, so maintain a + * cachedDir for reconnection upon chunk load. + */ + public void disconnect(boolean preserveDir) { if (isConnected()) { - this.connection.cachedDir = null; + if (!preserveDir) { + this.connection.cachedDir = null; + this.cachedDir = null; + } this.connection.connection = null; this.connection.markDirty(); - this.cachedDir = null; this.connection = null; this.markDirty(); - PacketHandler.INSTANCE.sendToDimension(new MessagePresentConnect(this, ForgeDirection.UNKNOWN, false), worldObj.provider.dimensionId); + PacketHandler.INSTANCE.sendToDimension(new MessagePresentConnect(this, ForgeDirection.UNKNOWN, false, preserveDir), worldObj.provider.dimensionId); } } @@ -104,16 +111,21 @@ public class TileEntityPresent extends TileEntity implements IInventory, IDouble public void findConnections() { if (!isConnected()) { + if (cachedDir != null) { + if (connectTo(cachedDir)) { + return; + } + } for (ForgeDirection dir : ForgeDirection.VALID_DIRECTIONS) { if (dir != ForgeDirection.UP && dir != ForgeDirection.DOWN) { if (connectTo(dir)) { - break; + return; } } } } } - + public TileEntityPresent getParent() { return isParent || connection == null ? this : connection; } @@ -124,15 +136,12 @@ public class TileEntityPresent extends TileEntity implements IInventory, IDouble } @Override - public void writeToNBT(NBTTagCompound tag) - { + public void writeToNBT(NBTTagCompound tag) { super.writeToNBT(tag); NBTTagList nbttaglist = new NBTTagList(); - for (int i = 0; i < getTrueSizeInventory(); ++i) - { - if (inventory[i] != null) - { + for (int i = 0; i < getTrueSizeInventory(); ++i) { + if (inventory[i] != null) { NBTTagCompound nbttagcompound1 = new NBTTagCompound(); nbttagcompound1.setByte("Slot", (byte) i); inventory[i].writeToNBT(nbttagcompound1); @@ -149,18 +158,15 @@ public class TileEntityPresent extends TileEntity implements IInventory, IDouble } @Override - public void readFromNBT(NBTTagCompound tag) - { + public void readFromNBT(NBTTagCompound tag) { super.readFromNBT(tag); NBTTagList nbttaglist = tag.getTagList("Items", 10); - for (int i = 0; i < nbttaglist.tagCount(); ++i) - { + for (int i = 0; i < nbttaglist.tagCount(); ++i) { NBTTagCompound nbttagcompound1 = nbttaglist.getCompoundTagAt(i); int j = nbttagcompound1.getByte("Slot") & 255; - if (j >= 0 && j < getTrueSizeInventory()) - { + if (j >= 0 && j < getTrueSizeInventory()) { inventory[j] = ItemStack.loadItemStackFromNBT(nbttagcompound1); } } @@ -173,7 +179,7 @@ public class TileEntityPresent extends TileEntity implements IInventory, IDouble } autoSearch = true; } - + @Override public Packet getDescriptionPacket() { NBTTagCompound tag = new NBTTagCompound(); @@ -185,13 +191,29 @@ public class TileEntityPresent extends TileEntity implements IInventory, IDouble public void onDataPacket(NetworkManager net, S35PacketUpdateTileEntity packet) { readFromNBT(packet.func_148857_g()); } - + @Override public boolean shouldRefresh(Block oldBlock, Block newBlock, int oldMeta, int newMeta, World world, int x, int y, int z) { // prevent losing TE data when in-world chiseling return oldBlock != newBlock; } + @Override + public void invalidate() { + super.invalidate(); + if (isConnected()) { + disconnect(false); + } + } + + @Override + public void onChunkUnload() { + super.onChunkUnload(); + if (isConnected()) { + disconnect(true); + } + } + private int getAdjustedSlot(int slot) { slot %= getSizeInventory(); if (isConnected() && !isParent) { @@ -199,7 +221,32 @@ public class TileEntityPresent extends TileEntity implements IInventory, IDouble } return slot; } - + + private TileEntity getTileSafe(int x, int y, int z) { + if (exists(x, y, z)) { + return worldObj.getTileEntity(x, y, z); + } + return null; + } + + // private Block getBlockSafe(int x, int y, int z) { + // if (exists(x, y, z)) { + // return worldObj.getBlock(x, y, z); + // } + // return null; + // } + // + // private int getMetaSafe(int x, int y, int z) { + // if (exists(x, y, z)) { + // return worldObj.getBlockMetadata(x, y, z); + // } + // return 0; + // } + // + private boolean exists(int x, int y, int z) { + return worldObj.blockExists(x, y, z); + } + /* IInventory */ @Override @@ -218,41 +265,34 @@ public class TileEntityPresent extends TileEntity implements IInventory, IDouble } @Override - public ItemStack decrStackSize(int slot, int amount) - { + public ItemStack decrStackSize(int slot, int amount) { slot = getAdjustedSlot(slot); ItemStack[] inv = inventory; if (isConnected() && slot >= getTrueSizeInventory()) { inv = connection.inventory; slot %= getTrueSizeInventory(); + connection.markDirty(); } - if (inv[slot] != null) - { + if (inv[slot] != null) { ItemStack itemstack; - if (inv[slot].stackSize <= amount) - { + if (inv[slot].stackSize <= amount) { itemstack = inv[slot]; inv[slot] = null; this.markDirty(); return itemstack; - } - else - { + } else { itemstack = inv[slot].splitStack(amount); - if (inv[slot].stackSize == 0) - { + if (inv[slot].stackSize == 0) { inv[slot] = null; } this.markDirty(); return itemstack; } - } - else - { + } else { return null; } } @@ -269,6 +309,7 @@ public class TileEntityPresent extends TileEntity implements IInventory, IDouble inventory[slot] = stack; } else if (isConnected()) { connection.inventory[slot % getTrueSizeInventory()] = stack; + connection.markDirty(); } } @@ -306,21 +347,21 @@ public class TileEntityPresent extends TileEntity implements IInventory, IDouble public boolean isItemValidForSlot(int p_94041_1_, ItemStack p_94041_2_) { return true; } - + /* IDoubleChest */ - + @Override public int getTrueSizeInventory() { return inventory.length; } - + @Override public ItemStack getTrueStackInSlot(int slot) { return inventory[slot % getTrueSizeInventory()]; } - + @Override public void putStackInTrueSlot(int slot, ItemStack stack) { - inventory[slot % getTrueSizeInventory()] = stack; + inventory[slot % getTrueSizeInventory()] = stack; } } diff --git a/src/main/java/com/cricketcraft/chisel/carving/CarvableHelper.java b/src/main/java/com/cricketcraft/chisel/carving/CarvableHelper.java index 581aa14d..0f50eb8f 100644 --- a/src/main/java/com/cricketcraft/chisel/carving/CarvableHelper.java +++ b/src/main/java/com/cricketcraft/chisel/carving/CarvableHelper.java @@ -6,10 +6,12 @@ import java.util.List; import net.minecraft.block.Block; import net.minecraft.block.BlockPane; import net.minecraft.block.material.Material; +import net.minecraft.client.Minecraft; import net.minecraft.client.renderer.texture.IIconRegister; import net.minecraft.creativetab.CreativeTabs; import net.minecraft.item.ItemStack; import net.minecraft.util.IIcon; +import net.minecraft.util.ResourceLocation; import net.minecraft.world.IBlockAccess; import net.minecraftforge.oredict.OreDictionary; @@ -18,10 +20,11 @@ import org.apache.commons.lang3.ArrayUtils; import com.cricketcraft.chisel.Chisel; import com.cricketcraft.chisel.api.client.CTM; import com.cricketcraft.chisel.client.render.TextureSubmap; -import com.cricketcraft.chisel.compat.FMPIntegration; +import com.cricketcraft.chisel.compat.fmp.FMPIMC; import com.cricketcraft.chisel.item.ItemCarvable; import com.cricketcraft.chisel.utils.GeneralClient; +import cpw.mods.fml.common.FMLCommonHandler; import cpw.mods.fml.common.registry.GameRegistry; public class CarvableHelper { @@ -84,27 +87,48 @@ public class CarvableHelper { public boolean forbidChiseling = false; public String blockName; - public void addVariation(String description, int metadata, Block bb) { - addVariation(description, metadata, null, bb, 0); + public void addVariation(String description, int metadata, Block bb) { + addVariation(description, metadata, null, bb, 0, Chisel.MOD_ID); + } + + public void addVariation(String description, int metadata, Block bb, int blockMeta) { + addVariation(description, metadata, null, bb, blockMeta, Chisel.MOD_ID); + } + + public void addVariation(String description, int metadata, Block bb, int blockMeta, Material material) { + addVariation(description, metadata, null, bb, blockMeta, Chisel.MOD_ID); + } + + public void addVariation(String description, int metadata, String texture) { + addVariation(description, metadata, texture, (ISubmapManager) null); + } + + public void addVariation(String description, int metadata, String texture, ISubmapManager manager) { + addVariation(description, metadata, texture, null, 0, Chisel.MOD_ID, manager); + } + + public void addVariation(String description, int metadata, Block bb, String modid) { + addVariation(description, metadata, null, bb, 0, modid); } - public void addVariation(String description, int metadata, Block bb, int blockMeta) { - addVariation(description, metadata, null, bb, blockMeta); + public void addVariation(String description, int metadata, Block bb, int blockMeta, String modid) { + addVariation(description, metadata, null, bb, blockMeta, modid); } - public void addVariation(String description, int metadata, Block bb, int blockMeta, Material material) { - addVariation(description, metadata, null, bb, blockMeta); + public void addVariation(String description, int metadata, Block bb, int blockMeta, Material material, String modid) { + addVariation(description, metadata, null, bb, blockMeta, modid); } - public void addVariation(String description, int metadata, String texture) { - addVariation(description, metadata, texture, null, 0); + public void addVariation(String description, int metadata, String texture, String modid) { + addVariation(description, metadata, texture, null, 0, modid); } - public void addVariation(String description, int metadata, String texture, Block block, int blockMeta) { - addVariation(description, metadata, texture, block, blockMeta, null); + public void addVariation(String description, int metadata, String texture, Block block, int blockMeta, String modid) { + addVariation(description, metadata, texture, block, blockMeta, modid, null); } - public void addVariation(String description, int metadata, String texture, Block block, int blockMeta, ISubmapManager customManager) { + public void addVariation(String description, int metadata, String texture, Block block, int blockMeta, String modid, ISubmapManager customManager) { + if (variations.size() >= 16) return; @@ -118,7 +142,7 @@ public class CarvableHelper { variation.metadata = metadata; variation.blockName = blockName; - if (texture != null) { + if (texture != null && FMLCommonHandler.instance().getSide().isClient()) { variation.texture = texture; String path = "/assets/" + Chisel.MOD_ID + "/textures/blocks/" + variation.texture; variation.type = (TextureType) TextureType.getTypeFor(path); @@ -136,6 +160,17 @@ public class CarvableHelper { map[metadata] = variation; } + // This is ugly, but faster than class.getResource + private boolean exists(String modid, String path, String postfix) { + ResourceLocation rl = new ResourceLocation(modid, "textures/blocks/" + path + postfix + ".png"); + try { + Minecraft.getMinecraft().getResourceManager().getAllResources(rl); + return true; + } catch (Throwable t) { + return false; + } + } + public CarvableVariation getVariation(int metadata) { if (metadata < 0 || metadata > 15) metadata = 0; @@ -245,7 +280,7 @@ public class CarvableHelper { boolean p; boolean n; - boolean reverse = side == 2 || side == 4; + boolean reverse = side == 2 || side == 5; if (side < 4) { p = ctm.isConnected(world, x - 1, y, z, side, block, metadata); @@ -262,40 +297,40 @@ public class CarvableHelper { else if (n) return variation.seamsCtmVert.icons[reverse ? 3 : 2]; return variation.seamsCtmVert.icons[0]; - case V9: - case V4: - int variationSize = (variation.type == TextureType.V9) ? 3 : 2; + case V9: + case V4: + int variationSize = (variation.type == TextureType.V9) ? 3 : 2; - int xModulus = x % variationSize; - int zModulus = z % variationSize; - // This ensures that blocks placed near 0,0 or it's axis' do not misbehave - int textureX = (xModulus < 0) ? (xModulus + variationSize) : xModulus; - int textureZ = (zModulus < 0) ? (zModulus + variationSize) : zModulus; - // Always invert the y index - int textureY = (variationSize - (y % variationSize) - 1); + int xModulus = x % variationSize; + int zModulus = z % variationSize; + //This ensures that blocks placed near 0,0 or it's axis' do not misbehave + int textureX = (xModulus < 0) ? (xModulus + variationSize) : xModulus; + int textureZ = (zModulus < 0) ? (zModulus + variationSize) : zModulus; + //Always invert the y index + int textureY = (variationSize - (y % variationSize) - 1); - if (side == 2 || side == 5) { - // For WEST, SOUTH reverse the indexes for both X and Z - textureX = (variationSize - textureX - 1); - textureZ = (variationSize - textureZ - 1); - } else if (side == 0) { - // For DOWN, reverse the indexes for only Z - textureZ = (variationSize - textureZ - 1); - } + if (side == 2 || side == 5) { + //For WEST, SOUTH reverse the indexes for both X and Z + textureX = (variationSize - textureX - 1); + textureZ = (variationSize - textureZ - 1); + } /*else if (side == 0) { + //For DOWN, reverse the indexes for only Z + textureZ = (variationSize - textureZ - 1); + }//*/ - int index; - if (side == 0 || side == 1) { - // DOWN || UP - index = textureX + textureZ * variationSize; - } else if (side == 2 || side == 3) { - // NORTH || SOUTH - index = textureX + textureY * variationSize; - } else { - // WEST || EAST - index = textureZ + textureY * variationSize; - } + int index; + if (side == 0 || side == 1) { + // DOWN || UP + index = textureX + textureZ * variationSize; + } else if (side == 2 || side == 3) { + // NORTH || SOUTH + index = textureX + textureY * variationSize; + } else { + // WEST || EAST + index = textureZ + textureY * variationSize; + } - return variation.variations9.icons[index]; + return variation.variations9.icons[index]; case CTMX: return variation.icon; case R16: @@ -347,7 +382,7 @@ public class CarvableHelper { public void registerVariation(String name, CarvableVariation variation, Block block, int blockMeta) { if (block.renderAsNormalBlock() || block.isOpaqueCube() || block.isNormalCube()) { - FMPIntegration.registerFMP(block, blockMeta); + FMPIMC.registerFMP(block, blockMeta); } if (forbidChiseling) diff --git a/src/main/java/com/cricketcraft/chisel/client/GeneralChiselClient.java b/src/main/java/com/cricketcraft/chisel/client/GeneralChiselClient.java index 95494049..56bda997 100644 --- a/src/main/java/com/cricketcraft/chisel/client/GeneralChiselClient.java +++ b/src/main/java/com/cricketcraft/chisel/client/GeneralChiselClient.java @@ -31,7 +31,7 @@ public class GeneralChiselClient { public static int tick = 0; public static void spawnLavastoneFX(World world, BlockLavastone block, int x, int y, int z) { - if (Configurations.particlesTickrate != 0 && tick++ % Configurations.particlesTickrate != 0) + if (Configurations.particlesTickrate != 0 && tick++ % Configurations.particlesTickrate != 0 || Minecraft.getMinecraft().gameSettings.particleSetting != 0) return; float f = 0.15F; @@ -79,7 +79,7 @@ public class GeneralChiselClient { } public static void spawnHolystoneFX(World world, BlockHolystone block, int x, int y, int z) { - if (Configurations.particlesTickrate != 0 && tick++ % Configurations.particlesTickrate != 0) + if (Configurations.particlesTickrate != 0 && tick++ % Configurations.particlesTickrate != 0 || Minecraft.getMinecraft().gameSettings.particleSetting != 0) return; float f = 0.15F; @@ -165,14 +165,14 @@ public class GeneralChiselClient { } public static void spawnSnakestoneObsidianFX(World world, BlockSnakestoneObsidian block, int x, int y, int z) { - if (Configurations.particlesTickrate != 0 || tick++ % Configurations.particlesTickrate != 0) { + if (Configurations.particlesTickrate != 0 || tick++ % Configurations.particlesTickrate != 0 || Minecraft.getMinecraft().gameSettings.particleSetting != 0) { EntitySnakestoneObsidianFX res = new EntitySnakestoneObsidianFX(world, block, x, y, z); Minecraft.getMinecraft().effectRenderer.addEffect(res); } } public static void spawnBallOMossFX(World world, double x, double y, double z) { - if (Configurations.particlesTickrate == 0 || tick++ % Configurations.particlesTickrate == 0) { + if (Configurations.particlesTickrate == 0 || tick++ % Configurations.particlesTickrate == 0 || Minecraft.getMinecraft().gameSettings.particleSetting != 0) { EntityBallOMossFX res = new EntityBallOMossFX(world, x, y, z); Minecraft.getMinecraft().effectRenderer.addEffect(res); } @@ -180,7 +180,7 @@ public class GeneralChiselClient { public static EntityDiggingFX addBlockHitEffects(World world, int x, int y, int z, int side) { Block block = world.getBlock(x, y, z); - if (block.isAir(world, x, y, z)) + if (block.isAir(world, x, y, z) || Minecraft.getMinecraft().gameSettings.particleSetting != 0) return null; EffectRenderer renderer = Minecraft.getMinecraft().effectRenderer; @@ -257,9 +257,10 @@ public class GeneralChiselClient { } public static void spawnAutoChiselFX(TileEntityAutoChisel te, ItemStack base) { - if (base != null) { + if (base != null && Minecraft.getMinecraft().gameSettings.particleSetting == 0) { for (int i = 0; i < 10; i++) { - EntityDiggingFX particle = new EntityDiggingFX(te.getWorldObj(), te.xCoord + 0.5, te.yCoord + 0.95, te.zCoord + 0.5, 0, 0, 0, Block.getBlockFromItem(base.getItem()), base.getItemDamage()); + EntityDiggingFX particle = new EntityDiggingFX(te.getWorldObj(), te.xCoord + 0.5, te.yCoord + 0.95, te.zCoord + 0.5, 0, 0, 0, Block.getBlockFromItem(base.getItem()), + base.getItemDamage()); particle.setVelocity((te.getWorldObj().rand.nextDouble() / 4) - 0.125, te.getWorldObj().rand.nextDouble() / 8, (te.getWorldObj().rand.nextDouble() / 4) - 0.125); Minecraft.getMinecraft().effectRenderer.addEffect(particle); } diff --git a/src/main/java/com/cricketcraft/chisel/client/gui/GuiChisel.java b/src/main/java/com/cricketcraft/chisel/client/gui/GuiChisel.java index 58c8074d..91fa00f3 100644 --- a/src/main/java/com/cricketcraft/chisel/client/gui/GuiChisel.java +++ b/src/main/java/com/cricketcraft/chisel/client/gui/GuiChisel.java @@ -6,6 +6,7 @@ import net.minecraft.client.resources.I18n; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.entity.player.InventoryPlayer; import net.minecraft.inventory.Slot; +import net.minecraft.item.ItemStack; import org.lwjgl.opengl.GL11; @@ -56,6 +57,15 @@ public class GuiChisel extends GuiContainer { } } + @Override + public void updateScreen() { + super.updateScreen(); + ItemStack held = player.getCurrentEquippedItem(); + if (held == null || !(held.getItem() instanceof IChiselItem)) { + mc.displayGuiScreen(null); + } + } + private void setButtonText() { ((GuiButton) buttonList.get(0)).displayString = I18n.format(container.inventory.getInventoryName() + ".mode." + currentMode.name().toLowerCase()); } diff --git a/src/main/java/com/cricketcraft/chisel/client/player/PlayerSpecials.java b/src/main/java/com/cricketcraft/chisel/client/player/PlayerSpecials.java new file mode 100644 index 00000000..7e77dc31 --- /dev/null +++ b/src/main/java/com/cricketcraft/chisel/client/player/PlayerSpecials.java @@ -0,0 +1,154 @@ +package com.cricketcraft.chisel.client.player; + +import java.util.Collection; +import java.util.UUID; + +import net.minecraft.client.Minecraft; +import net.minecraft.client.renderer.ItemRenderer; +import net.minecraft.client.renderer.OpenGlHelper; +import net.minecraft.client.renderer.Tessellator; +import net.minecraft.client.renderer.texture.TextureMap; +import net.minecraft.entity.Entity; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.item.ItemStack; +import net.minecraft.util.EnumChatFormatting; +import net.minecraft.util.IIcon; +import net.minecraftforge.client.event.RenderLivingEvent; +import net.minecraftforge.client.event.RenderPlayerEvent; +import net.minecraftforge.common.MinecraftForge; + +import org.lwjgl.opengl.GL11; + +import com.cricketcraft.chisel.init.ChiselItems; +import com.google.common.collect.ArrayListMultimap; +import com.google.common.collect.Lists; +import com.google.common.collect.Multimap; + +import cpw.mods.fml.common.eventhandler.EventPriority; +import cpw.mods.fml.common.eventhandler.SubscribeEvent; + +public class PlayerSpecials { + + private interface IDevRenderer { + + void renderPlayer(EntityPlayer player, boolean post); + + void renderExtras(EntityPlayer player, boolean post); + } + + private class RenderHolstered implements IDevRenderer { + + private ItemStack toRender; + + private RenderHolstered(ItemStack toRender) { + this.toRender = toRender; + } + + @Override + public void renderExtras(EntityPlayer player, boolean post) { + if (!post) { + GL11.glPushMatrix(); + Minecraft.getMinecraft().renderEngine.bindTexture(TextureMap.locationItemsTexture); + if (player.isSneaking()) { + GL11.glRotatef(28.64789F, 1.0F, 0.0F, 0.0F); + } + boolean armor = player.getCurrentArmor(1) != null; + GL11.glRotatef(180.0F, 1.0F, 0.0F, 0.0F); + GL11.glRotatef(90.0F, 0.0F, 1.0F, 0.0F); + GL11.glTranslatef(-0.25F, -0.85F, armor ? 0.2F : 0.28F); + GL11.glScalef(0.5F, 0.5F, 0.5F); + GL11.glColor3f(1.0F, 1.0F, 1.0F); + int light = 0xF000F0; + int lightmapX = light % 0x10000; + int lightmapY = light / 0x10000; + OpenGlHelper.setLightmapTextureCoords(OpenGlHelper.lightmapTexUnit, lightmapX, lightmapY); + + IIcon icon = toRender.getIconIndex(); + ItemRenderer.renderItemIn2D(Tessellator.instance, icon.getMaxU(), icon.getMinV(), icon.getMinU(), icon.getMaxV(), icon.getIconWidth(), icon.getIconHeight(), 1.0F / 16.0F); + GL11.glPopMatrix(); + } + } + + @Override + public void renderPlayer(EntityPlayer player, boolean post) { + } + } + + private class RenderTranslucent implements IDevRenderer { + + @Override + public void renderExtras(EntityPlayer player, boolean post) { + } + + @Override + public void renderPlayer(EntityPlayer player, boolean post) { + if (!post) { + GL11.glColor4f(1.0F, 1.0F, 1.0F, 0.75F); + GL11.glEnable(GL11.GL_BLEND); + GL11.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA); + } else { + GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F); + GL11.glDisable(GL11.GL_BLEND); + } + } + } + + public static final PlayerSpecials INSTANCE = new PlayerSpecials(); + + private Multimap renderMap = ArrayListMultimap.create(); + + private PlayerSpecials() { + RenderHolstered backChisel = new RenderHolstered(new ItemStack(ChiselItems.obsidianChisel)); + RenderTranslucent translucent = new RenderTranslucent(); + + renderMap.putAll(UUID.fromString("a7529984-8cb2-4fb9-b799-97980f770101"), Lists.newArrayList(backChisel, translucent)); // Cricket + renderMap.putAll(UUID.fromString("a1d2532b-ee11-4ca3-b4c5-76e168d4c98e"), Lists.newArrayList(backChisel, translucent)); // TheCricket26 + renderMap.putAll(UUID.fromString("5399b615-3440-4c66-939d-ab1375952ac3"), Lists.newArrayList(backChisel, translucent)); // Drullkus + + renderMap.put(UUID.fromString("671516b1-4fb3-4c03-aa7c-9c88cfab3ae8"), new RenderHolstered(new ItemStack(ChiselItems.diamondChisel))); // tterrag + + MinecraftForge.EVENT_BUS.register(this); + } + + public static void init() { + } + + @SubscribeEvent(priority = EventPriority.HIGHEST) + public void onPlayerRenderPre(RenderLivingEvent.Pre event) { + if(nameIsGood(event.entity)){ + GL11.glColor4f(1.0F, 1.0F, 1.0F, 0.75F); + GL11.glEnable(GL11.GL_BLEND); + GL11.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA); + } + } + + @SubscribeEvent + public void onPlayerRenderPost(RenderLivingEvent.Post event) { + if(nameIsGood(event.entity)){ + GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F); + GL11.glDisable(GL11.GL_BLEND); + } + } + + @SubscribeEvent + public void onPlayerRenderSpecialPre(RenderPlayerEvent.Specials.Pre event) { + Collection renders = renderMap.get(event.entityPlayer.getUniqueID()); + for (IDevRenderer r : renders) { + r.renderExtras(event.entityPlayer, false); + } + } + + @SubscribeEvent + public void onPlayerRenderSpecialPost(RenderPlayerEvent.Specials.Post event) { + Collection renders = renderMap.get(event.entityPlayer.getUniqueID()); + for (IDevRenderer r : renders) { + r.renderExtras(event.entityPlayer, true); + } + } + + private boolean nameIsGood(Entity entity){ + if(EnumChatFormatting.getTextWithoutFormattingCodes(entity.getCommandSenderName()).equals("Cricket") || EnumChatFormatting.getTextWithoutFormattingCodes(entity.getCommandSenderName()).equals("TheCricket26")) + return true; + return false; + } +} diff --git a/src/main/java/com/cricketcraft/chisel/client/render/BlockMarblePillarRenderer.java b/src/main/java/com/cricketcraft/chisel/client/render/BlockMarblePillarRenderer.java index 621a74c7..17fbce21 100644 --- a/src/main/java/com/cricketcraft/chisel/client/render/BlockMarblePillarRenderer.java +++ b/src/main/java/com/cricketcraft/chisel/client/render/BlockMarblePillarRenderer.java @@ -95,7 +95,7 @@ public class BlockMarblePillarRenderer implements ISimpleBlockRenderingHandler { renderer.uvRotateEast = 2; renderer.uvRotateWest = 1; renderer.uvRotateTop = 1; - renderer.uvRotateBottom = 1; + renderer.uvRotateBottom = 2; block.sides[4] = block.getCtmIcon(4, metadata); block.sides[5] = block.getCtmIcon(4, metadata); diff --git a/src/main/java/com/cricketcraft/chisel/client/render/RenderChiselSnowman.java b/src/main/java/com/cricketcraft/chisel/client/render/RenderChiselSnowman.java new file mode 100644 index 00000000..55953901 --- /dev/null +++ b/src/main/java/com/cricketcraft/chisel/client/render/RenderChiselSnowman.java @@ -0,0 +1,65 @@ +package com.cricketcraft.chisel.client.render; + +import com.cricketcraft.chisel.entity.EntityChiselSnowman; +import net.minecraft.block.Block; +import net.minecraft.client.model.ModelSnowMan; +import net.minecraft.client.renderer.RenderBlocks; +import net.minecraft.client.renderer.entity.RenderLiving; +import net.minecraft.entity.Entity; +import net.minecraft.entity.EntityLivingBase; +import net.minecraft.item.ItemBlock; +import net.minecraft.item.ItemStack; +import net.minecraft.util.ResourceLocation; +import net.minecraftforge.client.IItemRenderer; +import net.minecraftforge.client.MinecraftForgeClient; +import static net.minecraftforge.client.IItemRenderer.ItemRenderType.*; +import static net.minecraftforge.client.IItemRenderer.ItemRendererHelper.*; +import org.lwjgl.opengl.GL11; + +public class RenderChiselSnowman extends RenderLiving{ + + private static final ResourceLocation snowManTextures = new ResourceLocation("textures/entity/snowman.png"); + private ModelSnowMan snowMan; + + public RenderChiselSnowman() { + super(new ModelSnowMan(), 0.5F); + snowMan = (ModelSnowMan)super.mainModel; + setRenderPassModel(this.snowMan); + } + + @Override + protected void renderEquippedItems(EntityLivingBase entityLivingBase, float size){ + this.renderEquippedItems((EntityChiselSnowman) entityLivingBase, size); + } + + @Override + protected ResourceLocation getEntityTexture(Entity entity) { + return this.getEntityTexture((EntityChiselSnowman) entity); + } + + protected ResourceLocation getEntityTexture(EntityChiselSnowman snowman){ + return snowManTextures; + } + + protected void renderEquippedItems(EntityChiselSnowman snowman, float size){ + super.renderEquippedItems(snowman, size); + ItemStack itemStack = snowman.getEquipmentInSlot(2); + + if(itemStack.getItem() instanceof ItemBlock){ + GL11.glPushMatrix(); + this.snowMan.head.postRender(0.0625F); + + IItemRenderer customRenderer = MinecraftForgeClient.getItemRenderer(itemStack, EQUIPPED); + boolean is3D = (customRenderer != null && customRenderer.shouldUseRenderHelper(EQUIPPED, itemStack, BLOCK_3D)); + + if(is3D || RenderBlocks.renderItemIn3d(Block.getBlockFromItem(itemStack.getItem()).getRenderType())){ + float f1 = 0.625F; + GL11.glTranslatef(0.0F, -0.34375F, 0.0F); + GL11.glRotatef(90.0F, 0.0F, 1.0F, 0.0F); + GL11.glScalef(f1, -f1, f1); + } + this.renderManager.itemRenderer.renderItem(snowman, itemStack, 0); + GL11.glPopMatrix(); + } + } +} diff --git a/src/main/java/com/cricketcraft/chisel/compat/Compatibility.java b/src/main/java/com/cricketcraft/chisel/compat/Compatibility.java index b3d2ef4a..ec426cd6 100644 --- a/src/main/java/com/cricketcraft/chisel/compat/Compatibility.java +++ b/src/main/java/com/cricketcraft/chisel/compat/Compatibility.java @@ -1,8 +1,11 @@ package com.cricketcraft.chisel.compat; +import java.util.Map; + import net.minecraft.block.Block; import com.cricketcraft.chisel.carving.Carving; +import com.google.common.collect.Maps; import cpw.mods.fml.common.Loader; import cpw.mods.fml.common.event.FMLPostInitializationEvent; @@ -12,10 +15,22 @@ public class Compatibility { public static String[] rockColorNames = { "gray", "lightgray", "brown", "tan", "reddish", "bluish", "greenish" }; - public static void init(FMLPostInitializationEvent event) { + public static Map tconMap = Maps.newHashMap(); + + static + { + tconMap.put(0, "obsidian"); + tconMap.put(1, "sandstone"); + tconMap.put(2, "netherrack"); + tconMap.put(3, "stonebricksmooth"); + tconMap.put(12, "end_stone"); + } + + public static void init(FMLPostInitializationEvent event) { /* Proj Red */ addSupport("ProjRed|Exploration", "projectred.exploration.stone", "marble", 0, 99); + addSupport("ProjRed|Exploration", "projectred.exploration.stone", "marble", 1, 99); /* Bluepower */ addSupport("bluepower", "marble", "marble", 0, 99); @@ -44,7 +59,23 @@ public class Compatibility { addSupport("PFAAGeologica", "mediumStoneBrickStairs.limestone", "limestoneStairs", 0, 99); addSupport("PFAAGeologica", "strongStoneBrick", "stoneBrick", 3, 99); addSupport("PFAAGeologica", "strongCobble", "cobblestone", 3, 99); - } + + /* Thaumcraft TODO There is probably a cleaner way of doing this */ + if (Loader.isModLoaded("Thaumcraft")) { + loadThaumcraftAspects(); + } + + for (Integer i : tconMap.keySet()) + { + addSupport("TConstruct", "decoration.multibrick", tconMap.get(i), i, 99); + addSupport("TConstruct", "decoration.multibrickfancy", tconMap.get(i), i, 99); + } + + addSupport("TConstruct", "decoration.multibrickfancy", "stonebricksmooth", 14, 99); + addSupport("TConstruct", "decoration.multibrickfancy", "stonebricksmooth", 15, 99); + + addSupport("Botania", "endStoneBrick", "end_stone", 12, 0); + } public static void addSupport(String modname, String blockname, String name, int metadata, int order) { if (Loader.isModLoaded(modname) && GameRegistry.findBlock(modname, blockname) != null) { @@ -55,4 +86,9 @@ public class Compatibility { public static void addSupport(String name, Block block, int metadata, int order) { Carving.chisel.addVariation(name, block, metadata, order); } + + private static void loadThaumcraftAspects() { +// ThaumcraftApi.registerObjectTag(new ItemStack(ChiselBlocks.cobblestone, 1, OreDictionary.WILDCARD_VALUE), (new AspectList()).add(Aspect.ENTROPY, 1).add(Aspect.EARTH, 1)); +// ThaumcraftApi.registerObjectTag(new ItemStack(ChiselBlocks.cobblestoneWall, 1, OreDictionary.WILDCARD_VALUE), (new AspectList()).add(Aspect.ENTROPY, 1).add(Aspect.EARTH, 1)); + } } diff --git a/src/main/java/com/cricketcraft/chisel/compat/IMCHandler.java b/src/main/java/com/cricketcraft/chisel/compat/IMCHandler.java index 33225588..80d702f4 100644 --- a/src/main/java/com/cricketcraft/chisel/compat/IMCHandler.java +++ b/src/main/java/com/cricketcraft/chisel/compat/IMCHandler.java @@ -40,15 +40,16 @@ public class IMCHandler { } else { reg.removeVariation(block, meta, data[0]); } + break; case REGISTER_GROUP_ORE: reg.registerOre(data[0], data[1]); + break; default: throw new IllegalArgumentException("Invalid IMC constant! How...what...?"); } } catch (Exception e) { - Chisel.logger.error("Could not handle data {} for IMC type {}. This was sent from mod {}.\n" - + "!! This is a bug in that mod !!\nSwallowing error and continuing...", - value, type.name(), message.getSender()); + Chisel.logger.error("Could not handle data {} for IMC type {}. This was sent from mod {}.\n" + "!! This is a bug in that mod !!\nSwallowing error and continuing...", value, type.name(), + message.getSender()); e.printStackTrace(); } } diff --git a/src/main/java/com/cricketcraft/chisel/compat/fmp/FMPCompat.java b/src/main/java/com/cricketcraft/chisel/compat/fmp/FMPCompat.java new file mode 100644 index 00000000..3c6c864a --- /dev/null +++ b/src/main/java/com/cricketcraft/chisel/compat/fmp/FMPCompat.java @@ -0,0 +1,44 @@ +package com.cricketcraft.chisel.compat.fmp; + +import com.cricketcraft.chisel.init.ChiselBlocks; +import com.google.common.collect.Lists; + +import net.minecraft.block.Block; +import net.minecraft.world.World; +import codechicken.lib.vec.BlockCoord; +import codechicken.multipart.MultiPartRegistry.IPartConverter; +import codechicken.multipart.MultiPartRegistry.IPartFactory; +import codechicken.multipart.MultiPartRegistry; +import codechicken.multipart.TMultiPart; + +public class FMPCompat implements IPartFactory, IPartConverter { + + public void init() { + MultiPartRegistry.registerConverter(this); + MultiPartRegistry.registerParts(this, new String[] { "chisel_torch" }); + } + + @Override + public Iterable blockTypes() { + return Lists.newArrayList(ChiselBlocks.torches); + } + + @Override + public TMultiPart convert(World world, BlockCoord bc) { + Block block = world.getBlock(bc.x, bc.y, bc.z); + for (int i = 0; i < ChiselBlocks.torches.length; i++) { + if (block == ChiselBlocks.torches[i]) { + return new PartChiselTorch(i, world.getBlockMetadata(bc.x, bc.y, bc.z)); + } + } + return null; + } + + @Override + public TMultiPart createPart(String type, boolean client) { + if (type.equals("chisel_torch")) { + return new PartChiselTorch(); + } + return null; + } +} diff --git a/src/main/java/com/cricketcraft/chisel/compat/FMPIntegration.java b/src/main/java/com/cricketcraft/chisel/compat/fmp/FMPIMC.java similarity index 88% rename from src/main/java/com/cricketcraft/chisel/compat/FMPIntegration.java rename to src/main/java/com/cricketcraft/chisel/compat/fmp/FMPIMC.java index 8c75a390..37b81e75 100644 --- a/src/main/java/com/cricketcraft/chisel/compat/FMPIntegration.java +++ b/src/main/java/com/cricketcraft/chisel/compat/fmp/FMPIMC.java @@ -1,10 +1,10 @@ -package com.cricketcraft.chisel.compat; +package com.cricketcraft.chisel.compat.fmp; import net.minecraft.block.Block; import net.minecraft.item.ItemStack; import cpw.mods.fml.common.event.FMLInterModComms; -public class FMPIntegration { +public class FMPIMC { public static void registerFMP(Block block) { registerFMP(block, 0, 15); diff --git a/src/main/java/com/cricketcraft/chisel/compat/fmp/ItemBlockChiselTorchPart.java b/src/main/java/com/cricketcraft/chisel/compat/fmp/ItemBlockChiselTorchPart.java new file mode 100644 index 00000000..4f7c9f48 --- /dev/null +++ b/src/main/java/com/cricketcraft/chisel/compat/fmp/ItemBlockChiselTorchPart.java @@ -0,0 +1,69 @@ +package com.cricketcraft.chisel.compat.fmp; + +import net.minecraft.block.Block; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.item.ItemBlock; +import net.minecraft.item.ItemStack; +import net.minecraft.world.World; +import codechicken.lib.vec.BlockCoord; +import codechicken.multipart.TMultiPart; +import codechicken.multipart.TileMultipart; +import codechicken.multipart.minecraft.TorchPart; + +import com.cricketcraft.chisel.block.BlockCarvableTorch; + +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; + +public class ItemBlockChiselTorchPart extends ItemBlock { + + private BlockCarvableTorch torch; + + // Blame FML for the duped params, these references will always be the same + public ItemBlockChiselTorchPart(Block block, BlockCarvableTorch torch) { + super(block); + this.torch = torch; + } + + @SideOnly(Side.CLIENT) + public boolean func_150936_a(World world, int x, int y, int z, int side, EntityPlayer player, ItemStack stack) { + return (placePart(world, new BlockCoord(x, y, z).offset(side), stack, side, false)) || (super.func_150936_a(world, x, y, z, side, player, stack)); + } + + public TMultiPart createMultiPart(World world, BlockCoord pos, ItemStack item, int side) { + return new PartChiselTorch(torch.idx, TorchPart.sideMetaMap[side ^ 1]); + } + + public boolean placePart(World world, BlockCoord pos, ItemStack item, int side, boolean doPlace) { + TileMultipart tile = TileMultipart.getOrConvertTile(world, pos); + if (tile == null) { + return false; + } + TMultiPart part = createMultiPart(world, pos, item, side); + if (part == null) { + return false; + } + if (tile.canAddPart(part)) { + if (doPlace) { + TileMultipart.addPart(world, pos, part); + } + return true; + } + return false; + } + + @Override + public boolean onItemUse(ItemStack stack, EntityPlayer player, World world, int x, int y, int z, int side, float hitX, float hitY, float hitZ) { + Block block = world.getBlock(x, y, z); + BlockCoord pos = new BlockCoord(x, y, z); + if (!block.isReplaceable(world, x, y, z)) { + pos = new BlockCoord(x, y, z).offset(side); + } + if (placePart(world, pos, stack, side, !world.isRemote)) { + world.playSoundEffect(pos.x + 0.5F, pos.y + 0.5F, pos.z + 0.5F, field_150939_a.stepSound.func_150496_b(), (block.stepSound.getVolume() + 1.0F) / 2.0F, block.stepSound.getPitch() * 0.8F); + stack.stackSize -= 1; + return true; + } + return super.onItemUse(stack, player, world, x, y, z, side, hitX, hitY, hitZ); + } +} diff --git a/src/main/java/com/cricketcraft/chisel/compat/fmp/PartChiselTorch.java b/src/main/java/com/cricketcraft/chisel/compat/fmp/PartChiselTorch.java new file mode 100644 index 00000000..90a6c456 --- /dev/null +++ b/src/main/java/com/cricketcraft/chisel/compat/fmp/PartChiselTorch.java @@ -0,0 +1,56 @@ +package com.cricketcraft.chisel.compat.fmp; + +import com.cricketcraft.chisel.init.ChiselBlocks; + +import net.minecraft.block.Block; +import net.minecraft.nbt.NBTTagCompound; +import codechicken.lib.data.MCDataInput; +import codechicken.lib.data.MCDataOutput; +import codechicken.multipart.minecraft.TorchPart; + +public class PartChiselTorch extends TorchPart { + + private int idx; + + public PartChiselTorch() { + } + + public PartChiselTorch(int idx, int meta) { + super(meta); + this.idx = idx; + } + + @Override + public void writeDesc(MCDataOutput packet) { + super.writeDesc(packet); + packet.writeInt(idx); + } + + @Override + public void readDesc(MCDataInput packet) { + super.readDesc(packet); + this.idx = packet.readInt(); + } + + @Override + public void save(NBTTagCompound tag) { + super.save(tag); + tag.setInteger("idx", idx); + } + + @Override + public void load(NBTTagCompound tag) { + super.load(tag); + this.idx = tag.getInteger("idx"); + } + + @Override + public Block getBlock() { + return ChiselBlocks.torches[idx]; + } + + @Override + public String getType() { + return "chisel_torch"; + } +} diff --git a/src/main/java/com/cricketcraft/chisel/config/Configurations.java b/src/main/java/com/cricketcraft/chisel/config/Configurations.java index ea05b6d1..66285787 100644 --- a/src/main/java/com/cricketcraft/chisel/config/Configurations.java +++ b/src/main/java/com/cricketcraft/chisel/config/Configurations.java @@ -67,13 +67,13 @@ public class Configurations { "Traversing concrete roads, players will acceleration to this velocity. For reference, normal running speed is about 0.28. Set to 0 to disable acceleration.").getDouble(0.45); ghostCloud = config.get(category, "doesCloudRenderLikeGhost", true).getBoolean(true); factoryBlockAmount = config.get(category, "amountYouGetFromFactoryBlockCrafting", 32).getInt(32); - allowMossy = config.get(category, "allowCobbleToMossyInChisel", true).getBoolean(true); + allowMossy = config.get(category, "allowBrickToMossyInChisel", true, "If true, you can chisel stone brick to mossy stone brick.").getBoolean(true); allowSmoothStone = config.get(category, "allowSmoothStoneToStoneBricksAndBack", true).getBoolean(true); chiselRecipe = config.get(category, "chiselAlternateRecipe", false, "Use alternative crafting recipe for the chisel").getBoolean(false); enableFMP = config.get(category, "enableFMP", true, "Do you want to enable FMP").getBoolean(true); chiselStoneToCobbleBricks = config.get(category, "chiselStoneToCobbleBricks", true, "Chisel stone to cobblestone and bricks by left clicking.").getBoolean(false); - chiselBackToVanillaLeaves = config.get(category, "chiselBackToVanillaLeaves", false, "If this is true, you can chisel from the chisel leaves back to vanilla ones. If it is false, you cannot.") - .getBoolean(false); + chiselBackToVanillaLeaves = config + .get(category, "chiselBackToVanillaLeaves", false, "If this is true, you can chisel from the chisel leaves back to vanilla ones. If it is false, you cannot.").getBoolean(false); /* worldgen */ category = "worldgen"; @@ -103,12 +103,13 @@ public class Configurations { ironChiselCanLeftClick = config.get(category, "ironChiselCanLeftClick", true, "If this is true, the iron chisel can left click chisel blocks. If false, it cannot.").getBoolean(); ironChiselHasModes = config.get(category, "ironChiselHasModes", false, "If this is true, the iron chisel can change its chisel mode just as the diamond chisel can.").getBoolean(); allowChiselCrossColors = config.get(category, "allowChiselCrossColors", true, "Should someone be able to chisel something into a different color.").getBoolean(); - ironChiselAttackDamage = config.get(category, "ironChiselAttackDamage", 2, "The extra attack damage points (in half hearts) that the iron chisel inflicts when it is used to attack an entity.") - .getInt(); - diamondChiselAttackDamage = config - .get(category, "diamondChiselAttackDamage", 2, "The extra attack damage points (in half hearts) that the diamond chisel inflicts when it is used to attack an entity.").getInt(); - obsidianChiselAttackDamage = config - .get(category, "obsidianChiselAttackDamage", 4, "The extra attack damage points (in half hearts) that the obsidian chisel inflicts when it is used to attack an entity.").getInt(); + + ironChiselAttackDamage = config + .get(category, "ironChiselAttackDamage", 2, "The extra attack damage points (in half hearts) that the iron chisel inflicts when it is used to attack an entity.").getInt(); + diamondChiselAttackDamage = config.get(category, "diamondChiselAttackDamage", 2, + "The extra attack damage points (in half hearts) that the diamond chisel inflicts when it is used to attack an entity.").getInt(); + obsidianChiselAttackDamage = config.get(category, "obsidianChiselAttackDamage", 4, + "The extra attack damage points (in half hearts) that the obsidian chisel inflicts when it is used to attack an entity.").getInt(); /* block */ category = "block"; @@ -118,12 +119,13 @@ public class Configurations { "The lowest harvest level of the tool able to break the road lines (requires useRoadLineTool to be true to take effect) (0 = Wood/Gold, 1 = Stone, 2 = Iron, 3 = Diamond) Default: 0") .getInt(); - /* hexColors */ + /* hexColors */ category = "hexColors"; - for(int i = 0; i < ItemDye.field_150923_a.length; i++) { + for (int i = 0; i < ItemDye.field_150923_a.length; i++) { // tterrag... don't kill me over this formatting. - String temp = config.get(category, "hex" + ItemDye.field_150923_a[i], "#" + Integer.toHexString(ItemDye.field_150922_c[i]), Character.toUpperCase(ItemDye.field_150923_a[i].charAt(0)) + ItemDye.field_150923_a[i].substring(1) + " color for hex block overlay #RRGGBB").getString(); + String temp = config.get(category, "hex" + ItemDye.field_150923_a[i], "#" + Integer.toHexString(ItemDye.field_150922_c[i]), + Character.toUpperCase(ItemDye.field_150923_a[i].charAt(0)) + ItemDye.field_150923_a[i].substring(1) + " color for hex block overlay #RRGGBB").getString(); // Or this try { configColors[i] = Integer.decode(temp); @@ -163,4 +165,4 @@ public class Configurations { public static boolean featureEnabled(String feature) { return false; } -} \ No newline at end of file +} diff --git a/src/main/java/com/cricketcraft/chisel/entity/EntityChiselSnowman.java b/src/main/java/com/cricketcraft/chisel/entity/EntityChiselSnowman.java new file mode 100644 index 00000000..bffbc7ab --- /dev/null +++ b/src/main/java/com/cricketcraft/chisel/entity/EntityChiselSnowman.java @@ -0,0 +1,13 @@ +package com.cricketcraft.chisel.entity; + +import net.minecraft.entity.monster.EntitySnowman; +import net.minecraft.world.World; + +public class EntityChiselSnowman extends EntitySnowman{ + + public EntityChiselSnowman(World world){ + super(world); + } + + //No special features just needed to get around the hardcoding +} diff --git a/src/main/java/com/cricketcraft/chisel/init/ChiselBlocks.java b/src/main/java/com/cricketcraft/chisel/init/ChiselBlocks.java index 808de56b..82ecf675 100644 --- a/src/main/java/com/cricketcraft/chisel/init/ChiselBlocks.java +++ b/src/main/java/com/cricketcraft/chisel/init/ChiselBlocks.java @@ -1,9 +1,11 @@ package com.cricketcraft.chisel.init; +import net.minecraft.block.Block; + import com.cricketcraft.chisel.Chisel; import com.cricketcraft.chisel.block.*; + import cpw.mods.fml.common.registry.GameRegistry.ObjectHolder; -import net.minecraft.block.Block; @ObjectHolder(Chisel.MOD_ID) public final class ChiselBlocks { @@ -19,6 +21,7 @@ public final class ChiselBlocks { public static final BlockCarvable cobblestone = null; public static final BlockMarbleWall cobblestoneWall = null; public static final BlockCarvableGlass glass = null; + public static final BlockCarvableGlass glass2 = null; public static final BlockCarvablePane glass_pane = null; public static final BlockCarvable sandstone = null; public static final BlockCarvable sandstone_scribbles = null; @@ -30,6 +33,7 @@ public final class ChiselBlocks { public static final BlockCarvableGlowstone glowstone = null; public static final BlockCarvable lapis_block = null; public static final BlockCarvable emerald_block = null; + public static final BlockCarvable nation = null; public static final BlockCarvable nether_brick = null; public static final BlockCarvable netherrack = null; public static final BlockCarvable mossy_cobblestone = null; @@ -40,6 +44,7 @@ public final class ChiselBlocks { public static final BlockCarvablePackedIce packedice = null; public static final BlockCarvablePackedIcePillar packedice_pillar = null; public static final BlockCarvable obsidian = null; + public static final BlockCarvable obsidian2 = null; public static final BlockCarvablePowered redstone_block = null; public static final BlockHolystone holystone = null; public static final BlockGrimstone grimstone = null; @@ -57,6 +62,7 @@ public final class ChiselBlocks { public static final BlockCarvable templeblock = null; public static final BlockCarvable mossy_templeblock = null; public static final BlockCarvable factoryblock = null; + public static final BlockCarvable factoryblock2 = null; public static final BlockCarvablePane paperwall = null; public static final BlockCarvable paperwall_block = null; public static final BlockCarvable woolen_clay = null; @@ -101,7 +107,7 @@ public final class ChiselBlocks { public static BlockCarvableIceStairs[] iceStairs = new BlockCarvableIceStairs[8]; public static BlockCarvablePackedIceStairs[] packediceStairs = new BlockCarvablePackedIceStairs[8]; - public static BlockCarvableTorch[] torch = new BlockCarvableTorch[16]; + public static Block[] torches = new BlockCarvableTorch[16]; public static BlockCarvable[] planks = new BlockCarvable[6]; diff --git a/src/main/java/com/cricketcraft/chisel/init/ChiselItems.java b/src/main/java/com/cricketcraft/chisel/init/ChiselItems.java index df71049d..8ca3cf86 100644 --- a/src/main/java/com/cricketcraft/chisel/init/ChiselItems.java +++ b/src/main/java/com/cricketcraft/chisel/init/ChiselItems.java @@ -6,7 +6,6 @@ import com.cricketcraft.chisel.item.ItemCloudInABottle; import com.cricketcraft.chisel.item.ItemSmashingRock; import com.cricketcraft.chisel.item.ItemUpgrade; import com.cricketcraft.chisel.item.chisel.ItemChisel; - import cpw.mods.fml.common.registry.GameRegistry.ObjectHolder; @ObjectHolder(Chisel.MOD_ID) @@ -14,6 +13,7 @@ public final class ChiselItems { public static final ItemChisel chisel = null; public static final ItemChisel diamondChisel = null; + public static final ItemChisel obsidianChisel = null; public static final ItemCloudInABottle cloudinabottle = null; public static final ItemBallOMoss ballomoss = null; public static final ItemSmashingRock smashingrock = null; diff --git a/src/main/java/com/cricketcraft/chisel/init/ChiselTabs.java b/src/main/java/com/cricketcraft/chisel/init/ChiselTabs.java index d0c180cf..c27a2b1b 100644 --- a/src/main/java/com/cricketcraft/chisel/init/ChiselTabs.java +++ b/src/main/java/com/cricketcraft/chisel/init/ChiselTabs.java @@ -8,14 +8,20 @@ import net.minecraft.item.ItemStack; import com.cricketcraft.chisel.Features; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; + public class ChiselTabs { private static class CustomCreativeTab extends CreativeTabs { + private boolean search; + private ItemStack stack; - public CustomCreativeTab(String label) { + public CustomCreativeTab(String label, boolean searchbar) { super(label); + this.search = searchbar; } @Override @@ -31,16 +37,35 @@ public class ChiselTabs { public ItemStack getIconItemStack() { return stack; } + + @Override + @SideOnly(Side.CLIENT) + public String getBackgroundImageName() { + + return search ? "item_search.png" : super.getBackgroundImageName(); + } + + @Override + public int getSearchbarWidth() { + + return 89; + } + + @Override + public boolean hasSearchBar() { + + return search; + } } private static boolean atLeastOneModIsLoaded = false; - public static final CustomCreativeTab tabChisel = new CustomCreativeTab("tabChisel"); - public static final CustomCreativeTab tabStoneChiselBlocks = new CustomCreativeTab("tabStoneChiselBlocks"); - public static final CustomCreativeTab tabWoodChiselBlocks = new CustomCreativeTab("tabWoodChiselBlocks"); - public static final CustomCreativeTab tabMetalChiselBlocks = new CustomCreativeTab("tabMetalChiselBlocks"); - public static final CustomCreativeTab tabOtherChiselBlocks = new CustomCreativeTab("tabOtherChiselBlocks"); - public static final CustomCreativeTab tabModdedChiselBlocks = new CustomCreativeTab("tabModdedChiselBlocks"); + public static final CustomCreativeTab tabChisel = new CustomCreativeTab("tabChisel", false); + public static final CustomCreativeTab tabStoneChiselBlocks = new CustomCreativeTab("tabStoneChiselBlocks", true); + public static final CustomCreativeTab tabWoodChiselBlocks = new CustomCreativeTab("tabWoodChiselBlocks", true); + public static final CustomCreativeTab tabMetalChiselBlocks = new CustomCreativeTab("tabMetalChiselBlocks", true); + public static final CustomCreativeTab tabOtherChiselBlocks = new CustomCreativeTab("tabOtherChiselBlocks", true); + public static final CustomCreativeTab tabModdedChiselBlocks = new CustomCreativeTab("tabModdedChiselBlocks", true); // this serves mostly just to load the static initializers public static void preInit() { @@ -49,21 +74,26 @@ public class ChiselTabs { public static void postInit() { - if(Features.CHISEL.enabled()) - tabChisel.setTabIconItemStack(new ItemStack(ChiselItems.chisel)); - else tabChisel.setTabIconItemStack(new ItemStack(Items.stick)); - if(Features.HOLYSTONE.enabled()) - tabStoneChiselBlocks.setTabIconItemStack(new ItemStack(ChiselBlocks.holystone)); - else tabStoneChiselBlocks.setTabIconItemStack(new ItemStack(Blocks.stonebrick)); - if(Features.WOOD.enabled()) - tabWoodChiselBlocks.setTabIconItemStack(new ItemStack(ChiselBlocks.planks[0], 1, 1)); - else tabWoodChiselBlocks.setTabIconItemStack(new ItemStack(Blocks.planks)); - if(Features.TECHNICAL.enabled()) - tabMetalChiselBlocks.setTabIconItemStack(new ItemStack(ChiselBlocks.technical)); - else tabMetalChiselBlocks.setTabIconItemStack(new ItemStack(Blocks.iron_block)); - if(Features.JACKOLANTERN.enabled()) - tabOtherChiselBlocks.setTabIconItemStack(new ItemStack(ChiselBlocks.jackolantern[0])); - else tabOtherChiselBlocks.setTabIconItemStack(new ItemStack(Blocks.lit_pumpkin)); + if (Features.CHISEL.enabled()) + tabChisel.setTabIconItemStack(new ItemStack(ChiselItems.chisel)); + else + tabChisel.setTabIconItemStack(new ItemStack(Items.stick)); + if (Features.HOLYSTONE.enabled()) + tabStoneChiselBlocks.setTabIconItemStack(new ItemStack(ChiselBlocks.holystone)); + else + tabStoneChiselBlocks.setTabIconItemStack(new ItemStack(Blocks.stonebrick)); + if (Features.WOOD.enabled()) + tabWoodChiselBlocks.setTabIconItemStack(new ItemStack(ChiselBlocks.planks[0], 1, 1)); + else + tabWoodChiselBlocks.setTabIconItemStack(new ItemStack(Blocks.planks)); + if (Features.TECHNICAL.enabled()) + tabMetalChiselBlocks.setTabIconItemStack(new ItemStack(ChiselBlocks.technical)); + else + tabMetalChiselBlocks.setTabIconItemStack(new ItemStack(Blocks.iron_block)); + if (Features.JACKOLANTERN.enabled()) + tabOtherChiselBlocks.setTabIconItemStack(new ItemStack(ChiselBlocks.jackolantern[0])); + else + tabOtherChiselBlocks.setTabIconItemStack(new ItemStack(Blocks.lit_pumpkin)); if (atLeastOneModIsLoaded) { if (Features.ARCANE.enabled()) { @@ -71,9 +101,10 @@ public class ChiselTabs { } else if (Features.BLOOD_RUNE.enabled()) { tabModdedChiselBlocks.setTabIconItemStack(new ItemStack(ChiselBlocks.bloodRune)); } else { - if(ChiselBlocks.voidstone != null) - tabModdedChiselBlocks.setTabIconItemStack(new ItemStack(ChiselBlocks.voidstone)); - else tabModdedChiselBlocks.setTabIconItemStack(new ItemStack(Blocks.obsidian)); + if (ChiselBlocks.voidstone != null) + tabModdedChiselBlocks.setTabIconItemStack(new ItemStack(ChiselBlocks.voidstone)); + else + tabModdedChiselBlocks.setTabIconItemStack(new ItemStack(Blocks.obsidian)); } } } diff --git a/src/main/java/com/cricketcraft/chisel/inventory/ContainerChisel.java b/src/main/java/com/cricketcraft/chisel/inventory/ContainerChisel.java index f6962945..93cd72af 100644 --- a/src/main/java/com/cricketcraft/chisel/inventory/ContainerChisel.java +++ b/src/main/java/com/cricketcraft/chisel/inventory/ContainerChisel.java @@ -16,7 +16,7 @@ public class ContainerChisel extends Container { public final InventoryChiselSelection inventory; public InventoryPlayer playerInventory; - int currentIndex; + int chiselSlot; public ItemStack chisel; public boolean finished; public ICarvingRegistry carving; @@ -24,7 +24,7 @@ public class ContainerChisel extends Container { public ContainerChisel(InventoryPlayer inventoryplayer, InventoryChiselSelection inv) { inventory = inv; playerInventory = inventoryplayer; - currentIndex = playerInventory.currentItem; + chiselSlot = playerInventory.currentItem; inv.container = this; int top = 8, left = 62; @@ -64,7 +64,10 @@ public class ContainerChisel extends Container { @Override public ItemStack slotClick(int par1, int par2, int par3, EntityPlayer par4EntityPlayer) { // we need to subtract away all the other slots - if (par1 - inventory.getSizeInventory() - 27 == currentIndex) + int clickedSlot = par1 - inventory.getSizeInventory() - 27; + + // if the player has clicked on the chisel or is trying to use a number key to force an itemstack into the slot the chisel is in + if (clickedSlot == chiselSlot || (par3 == 2 && par2 == chiselSlot)) return null; return super.slotClick(par1, par2, par3, par4EntityPlayer); @@ -128,7 +131,7 @@ public class ContainerChisel extends Container { } public void onChiselSlotChanged() { - ItemStack stack = playerInventory.mainInventory[currentIndex]; + ItemStack stack = playerInventory.mainInventory[chiselSlot]; if (stack == null || !stack.isItemEqual(chisel)) finished = true; @@ -137,6 +140,6 @@ public class ContainerChisel extends Container { General.setChiselTarget(chisel, inventory.getStackInSpecialSlot()); - playerInventory.mainInventory[currentIndex] = chisel; + playerInventory.mainInventory[chiselSlot] = chisel; } } diff --git a/src/main/java/com/cricketcraft/chisel/inventory/SlotChiselSelection.java b/src/main/java/com/cricketcraft/chisel/inventory/SlotChiselSelection.java index 2170a7f3..eb7d4a57 100644 --- a/src/main/java/com/cricketcraft/chisel/inventory/SlotChiselSelection.java +++ b/src/main/java/com/cricketcraft/chisel/inventory/SlotChiselSelection.java @@ -13,6 +13,9 @@ import com.cricketcraft.chisel.utils.GeneralClient; public class SlotChiselSelection extends Slot { + private final ContainerChisel container; + private final InventoryChiselSelection selInventory; + public SlotChiselSelection(ContainerChisel container, InventoryChiselSelection inv, IInventory iinventory, int i, int j, int k) { super(iinventory, i, j, k); @@ -35,18 +38,13 @@ public class SlotChiselSelection extends Slot { @Override public void onPickupFromSlot(EntityPlayer player, ItemStack itemstack) { - ItemStack stack = player.inventory.getItemStack(); + ItemStack heldStack = player.inventory.getItemStack(); ItemStack crafted = selInventory.inventory[InventoryChiselSelection.normalSlots]; - if (stack == null) { - if (crafted != null && crafted.stackSize > 0) - crafted.stackSize--; - if (crafted.stackSize == 0) - crafted = null; - - selInventory.setInventorySlotContents(InventoryChiselSelection.normalSlots, crafted); + if (heldStack == null) { + selInventory.decrStackSize(InventoryChiselSelection.normalSlots, 1); } else { - putStack(new ItemStack(itemstack.getItem(), itemstack.stackSize, itemstack.getItemDamage())); + putStack(itemstack.copy()); player.inventory.setItemStack(null); @@ -58,7 +56,7 @@ public class SlotChiselSelection extends Slot { } selInventory.updateItems(); - + if (((IChiselItem) container.chisel.getItem()).onChisel(player.worldObj, container.chisel, General.getVariation(crafted))) { container.chisel.damageItem(1, player); if (container.chisel.stackSize <= 0) { @@ -70,35 +68,5 @@ public class SlotChiselSelection extends Slot { String sound = Carving.chisel.getVariationSound(crafted.getItem(), crafted.getItemDamage()); GeneralClient.playChiselSound(player.worldObj, MathHelper.floor_double(player.posX), MathHelper.floor_double(player.posY), MathHelper.floor_double(player.posZ), sound); } - - /* - * ItemStack stack=player.inventory.getItemStack(); - * - * putStack(new ItemStack(itemstack.itemID, itemstack.stackSize, - * itemstack.getItemDamage())); - * - * super.onPickupFromSlot(player,itemstack); - * - * player.inventory.setItemStack(null); - * - * if(selInventory.items[InventoryChiselSelection.normalSlots]==null) - * return; - * - * player.inventory.setItemStack(new ItemStack(itemstack.itemID, - * selInventory.items[InventoryChiselSelection.normalSlots].stackSize, - * itemstack.getItemDamage())); - * selInventory.setInventorySlotContents(InventoryChiselSelection - * .normalSlots,null); - * - * selInventory.updateItems(); - * - * String sound=Carving.chisel.getVariationSound(itemstack.itemID, - * itemstack.getItemDamage()); player.worldObj.playSoundAtEntity(player, - * sound, 0.3f + 0.7f * General.rand.nextFloat(), 0.6f + 0.4f * - * General.rand.nextFloat()); - */ } - - ContainerChisel container; - InventoryChiselSelection selInventory; } diff --git a/src/main/java/com/cricketcraft/chisel/item/ItemCarvablePumpkin.java b/src/main/java/com/cricketcraft/chisel/item/ItemCarvablePumpkin.java new file mode 100644 index 00000000..0727fcfa --- /dev/null +++ b/src/main/java/com/cricketcraft/chisel/item/ItemCarvablePumpkin.java @@ -0,0 +1,61 @@ +package com.cricketcraft.chisel.item; + +import com.cricketcraft.chisel.api.ICarvable; +import com.cricketcraft.chisel.carving.CarvableVariation; +import com.cricketcraft.chisel.config.Configurations; +import com.cricketcraft.chisel.utils.General; +import net.minecraft.block.Block; +import net.minecraft.entity.Entity; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.item.Item; +import net.minecraft.item.ItemBlock; +import net.minecraft.item.ItemStack; +import net.minecraft.util.IIcon; + +import java.util.List; + +public class ItemCarvablePumpkin extends ItemBlock { + + public ItemCarvablePumpkin(Block block) { + super(block); + setMaxDamage(0); + setHasSubtypes(true); + } + + @Override + public boolean isValidArmor(ItemStack itemStack, int armorType, Entity entity){ + return true; + } + + @Override + public int getMetadata(int i) { + return i; + } + + @Override + public IIcon getIconFromDamage(int damage) { + return Block.getBlockFromItem(this).getIcon(2, damage); + } + + @SuppressWarnings({ "unchecked", "rawtypes" }) + @Override + public void addInformation(ItemStack stack, EntityPlayer player, List lines, boolean advancedTooltips) { + if (!Configurations.blockDescriptions) + return; + + Item item = General.getItem(stack); + if (item == null) + return; + + Block block = Block.getBlockFromItem(this); + if (!(block instanceof ICarvable)) + return; + + ICarvable carvable = (ICarvable) block; + CarvableVariation var = carvable.getVariation(stack); + if (var == null) + return; + + lines.add(var.getDescription()); + } +} diff --git a/src/main/java/com/cricketcraft/chisel/item/chisel/ItemChisel.java b/src/main/java/com/cricketcraft/chisel/item/chisel/ItemChisel.java index 4d9e68aa..fb0ffa38 100644 --- a/src/main/java/com/cricketcraft/chisel/item/chisel/ItemChisel.java +++ b/src/main/java/com/cricketcraft/chisel/item/chisel/ItemChisel.java @@ -1,7 +1,13 @@ package com.cricketcraft.chisel.item.chisel; -import java.util.List; - +import com.cricketcraft.chisel.Chisel; +import com.cricketcraft.chisel.api.IChiselItem; +import com.cricketcraft.chisel.api.carving.ICarvingRegistry; +import com.cricketcraft.chisel.api.carving.ICarvingVariation; +import com.cricketcraft.chisel.carving.Carving; +import com.cricketcraft.chisel.config.Configurations; +import com.google.common.collect.HashMultimap; +import com.google.common.collect.Multimap; import net.minecraft.block.Block; import net.minecraft.client.resources.I18n; import net.minecraft.entity.EntityLivingBase; @@ -13,20 +19,14 @@ import net.minecraft.item.ItemStack; import net.minecraft.world.World; import net.minecraftforge.common.MinecraftForge; -import com.cricketcraft.chisel.Chisel; -import com.cricketcraft.chisel.api.IChiselItem; -import com.cricketcraft.chisel.api.carving.ICarvingRegistry; -import com.cricketcraft.chisel.api.carving.ICarvingVariation; -import com.cricketcraft.chisel.carving.Carving; -import com.cricketcraft.chisel.config.Configurations; -import com.google.common.collect.HashMultimap; -import com.google.common.collect.Multimap; +import java.util.List; public class ItemChisel extends Item implements IChiselItem { public enum ChiselType { IRON(Configurations.ironChiselMaxDamage, Configurations.ironChiselAttackDamage), - DIAMOND(Configurations.diamondChiselMaxDamage, Configurations.diamondChiselAttackDamage); + DIAMOND(Configurations.diamondChiselMaxDamage, Configurations.diamondChiselAttackDamage), + OBSIDIAN(Configurations.obsidianChiselMaxDamage, Configurations.obsidianChiselAttackDamage); final int maxDamage; final int attackDamage; @@ -71,11 +71,11 @@ public class ItemChisel extends Item implements IChiselItem { String lc2 = I18n.format(base + "lc2"); String modes = I18n.format(base + "modes"); list.add(gui); - if (type == ChiselType.DIAMOND || Configurations.ironChiselCanLeftClick) { + if (type == ChiselType.DIAMOND || type == ChiselType.OBSIDIAN || Configurations.ironChiselCanLeftClick) { list.add(lc1); list.add(lc2); } - if (type == ChiselType.DIAMOND || Configurations.ironChiselHasModes) { + if (type == ChiselType.DIAMOND || type == ChiselType.OBSIDIAN || Configurations.ironChiselHasModes) { list.add(""); list.add(modes); } @@ -99,7 +99,7 @@ public class ItemChisel extends Item implements IChiselItem { stack.damageItem(1, attacker); return super.hitEntity(stack, attacker, target); } - + @Override public boolean canOpenGui(World world, EntityPlayer player, ItemStack chisel) { return true; @@ -117,11 +117,11 @@ public class ItemChisel extends Item implements IChiselItem { @Override public boolean canChiselBlock(World world, EntityPlayer player, int x, int y, int z, Block block, int metadata) { - return type == ChiselType.DIAMOND || Configurations.ironChiselCanLeftClick; + return type == ChiselType.DIAMOND || type == ChiselType.OBSIDIAN || Configurations.ironChiselCanLeftClick; } @Override public boolean hasModes(ItemStack chisel) { - return type == ChiselType.DIAMOND || Configurations.ironChiselHasModes; + return type == ChiselType.DIAMOND || type == ChiselType.OBSIDIAN || Configurations.ironChiselHasModes; } } \ No newline at end of file diff --git a/src/main/java/com/cricketcraft/chisel/network/message/MessagePresentConnect.java b/src/main/java/com/cricketcraft/chisel/network/message/MessagePresentConnect.java index b0f94b76..82907574 100644 --- a/src/main/java/com/cricketcraft/chisel/network/message/MessagePresentConnect.java +++ b/src/main/java/com/cricketcraft/chisel/network/message/MessagePresentConnect.java @@ -15,16 +15,21 @@ import cpw.mods.fml.common.network.simpleimpl.MessageContext; public class MessagePresentConnect extends MessageCoords { private ForgeDirection dir; - private boolean connect; + private boolean connect, preserveDir; public MessagePresentConnect() { super(); } public MessagePresentConnect(TileEntityPresent present, ForgeDirection dir, boolean connecting) { + this(present, dir, connecting, false); + } + + public MessagePresentConnect(TileEntityPresent present, ForgeDirection dir, boolean connecting, boolean preserveDir) { super(present); this.dir = dir; this.connect = connecting; + this.preserveDir = preserveDir; } @Override @@ -32,6 +37,7 @@ public class MessagePresentConnect extends MessageCoords { super.toBytes(buf); buf.writeInt(dir.ordinal()); buf.writeBoolean(connect); + buf.writeBoolean(preserveDir); } @Override @@ -39,6 +45,7 @@ public class MessagePresentConnect extends MessageCoords { super.fromBytes(buf); dir = ForgeDirection.values()[buf.readInt()]; connect = buf.readBoolean(); + preserveDir = buf.readBoolean(); } public static class Handler implements IMessageHandler { @@ -50,7 +57,7 @@ public class MessagePresentConnect extends MessageCoords { if (message.connect) { ((TileEntityPresent) te).connectTo(message.dir); } else { - ((TileEntityPresent) te).disconnect(); + ((TileEntityPresent) te).disconnect(message.preserveDir); } } return null; diff --git a/src/main/java/com/cricketcraft/chisel/proxy/ClientProxy.java b/src/main/java/com/cricketcraft/chisel/proxy/ClientProxy.java index 4b032ec4..a76a97db 100644 --- a/src/main/java/com/cricketcraft/chisel/proxy/ClientProxy.java +++ b/src/main/java/com/cricketcraft/chisel/proxy/ClientProxy.java @@ -1,5 +1,20 @@ package com.cricketcraft.chisel.proxy; +import com.cricketcraft.chisel.block.tileentity.TileEntityAutoChisel; +import com.cricketcraft.chisel.block.tileentity.TileEntityPresent; +import com.cricketcraft.chisel.client.player.PlayerSpecials; +import com.cricketcraft.chisel.client.render.*; +import com.cricketcraft.chisel.client.render.item.ItemChiselRenderer; +import com.cricketcraft.chisel.client.render.tile.RenderAutoChisel; +import com.cricketcraft.chisel.client.render.tile.RenderPresent; +import com.cricketcraft.chisel.entity.EntityBallOMoss; +import com.cricketcraft.chisel.entity.EntityChiselSnowman; +import com.cricketcraft.chisel.entity.EntityCloudInABottle; +import com.cricketcraft.chisel.entity.EntitySmashingRock; +import com.cricketcraft.chisel.init.ChiselBlocks; +import com.cricketcraft.chisel.init.ChiselItems; +import cpw.mods.fml.client.registry.ClientRegistry; +import cpw.mods.fml.client.registry.RenderingRegistry; import net.minecraft.client.Minecraft; import net.minecraft.client.renderer.entity.RenderSnowball; import net.minecraft.entity.player.EntityPlayer; @@ -7,33 +22,6 @@ import net.minecraft.item.Item; import net.minecraft.world.World; import net.minecraftforge.client.MinecraftForgeClient; -import com.cricketcraft.chisel.block.tileentity.TileEntityAutoChisel; -import com.cricketcraft.chisel.block.tileentity.TileEntityPresent; -import com.cricketcraft.chisel.client.render.BlockAdvancedMarbleRenderer; -import com.cricketcraft.chisel.client.render.BlockCTMNoLightRenderer; -import com.cricketcraft.chisel.client.render.BlockCarpetRenderer; -import com.cricketcraft.chisel.client.render.BlockEldritchRenderer; -import com.cricketcraft.chisel.client.render.BlockGlowRenderer; -import com.cricketcraft.chisel.client.render.BlockLayeredRenderer; -import com.cricketcraft.chisel.client.render.BlockMarblePaneRenderer; -import com.cricketcraft.chisel.client.render.BlockMarblePillarRenderer; -import com.cricketcraft.chisel.client.render.BlockMarbleStairsRenderer; -import com.cricketcraft.chisel.client.render.BlockRoadLineRenderer; -import com.cricketcraft.chisel.client.render.BlockSnakeStoneRenderer; -import com.cricketcraft.chisel.client.render.BlockTexturedOreRenderer; -import com.cricketcraft.chisel.client.render.RenderStandardBlockNoSunlight; -import com.cricketcraft.chisel.client.render.item.ItemChiselRenderer; -import com.cricketcraft.chisel.client.render.tile.RenderAutoChisel; -import com.cricketcraft.chisel.client.render.tile.RenderPresent; -import com.cricketcraft.chisel.entity.EntityBallOMoss; -import com.cricketcraft.chisel.entity.EntityCloudInABottle; -import com.cricketcraft.chisel.entity.EntitySmashingRock; -import com.cricketcraft.chisel.init.ChiselBlocks; -import com.cricketcraft.chisel.init.ChiselItems; - -import cpw.mods.fml.client.registry.ClientRegistry; -import cpw.mods.fml.client.registry.RenderingRegistry; - public class ClientProxy extends CommonProxy { ItemChiselRenderer renderer = new ItemChiselRenderer(); @@ -71,9 +59,12 @@ public class ClientProxy extends CommonProxy { RenderingRegistry.registerEntityRenderingHandler(EntityCloudInABottle.class, new RenderSnowball(ChiselItems.cloudinabottle)); RenderingRegistry.registerEntityRenderingHandler(EntityBallOMoss.class, new RenderSnowball(ChiselItems.ballomoss)); RenderingRegistry.registerEntityRenderingHandler(EntitySmashingRock.class, new RenderSnowball(ChiselItems.smashingrock)); + RenderingRegistry.registerEntityRenderingHandler(EntityChiselSnowman.class, new RenderChiselSnowman()); MinecraftForgeClient.registerItemRenderer(ChiselItems.chisel, renderer); MinecraftForgeClient.registerItemRenderer(ChiselItems.diamondChisel, renderer); + + PlayerSpecials.init(); } @Override diff --git a/src/main/resources/assets/chisel/lang/en_US.lang b/src/main/resources/assets/chisel/lang/en_US.lang index a165c634..e907c22e 100644 --- a/src/main/resources/assets/chisel/lang/en_US.lang +++ b/src/main/resources/assets/chisel/lang/en_US.lang @@ -1,5 +1,8 @@ # Key localizations +# Entity localizations +entity.chisel.snowman.name=Snow Golem + # Item localizations item.chisel.chisel_iron.name=Chisel @@ -9,6 +12,7 @@ item.chisel.chisel.desc.lc2=Can target a block by leaving it in the inventory item.chisel.chisel.desc.modes=Has multiple modes for chiseling. item.chisel.chisel_diamond.name=Diamond Chisel +item.chisel.chisel_obsidian.name=Obsidian Chisel item.ballMoss.name=Ball O' Moss item.ballMoss.desc=Right-Click to throw. This will turn Cobblestone to Moss Stone on impact. @@ -29,6 +33,24 @@ item.upgrade_stack.desc=Allows it to manufacture stacks at a time #Chisel 2 +#Nation +tile.chisel.nation.name=Imperialistic Block +tile.chisel.rebel.name=Rebellious Block +tile.nation.0.desc=Camouflaged +tile.nation.1.desc=Camouflaged (Secluded) +tile.nation.2.desc=Bolted Plate +tile.nation.3.desc=White Caution Tape +tile.nation.4.desc=Teamed Caution Tape + +#Shingles +tile.chisel.shingles.name=Shingles +tile.shingles.0.desc=Red Diagonal +tile.shingles.1.desc=Red Tiny Squares +tile.shingles.2.desc=Red Big Squares +tile.shingles.3.desc=Black Diagonal +tile.shingles.4.desc=Black Tiny Squares +tile.shingles.5.desc=Black Big Squares + #Valentines tile.chisel.valentines.name=Valentines Block tile.valentines.0.desc=Valentines Bricks @@ -58,18 +80,30 @@ tile.chisel.diorite.name=Diorite tile.diorite.0.desc=Generates in your world tile.diorite.1.desc=Polished Diorite tile.diorite.2.desc=Diorite Pillar +tile.diorite.3.desc=Diorite Bricks +tile.diorite.4.desc=Ornate Diorite +tile.diorite.5.desc=Prismatic Diorite +tile.diorite.6.desc=Diorite Small Tiles #Andesite tile.chisel.andesite.name=Andesite tile.andesite.0.desc=Generates in your world tile.andesite.1.desc=Polished Andesite tile.andesite.2.desc=Andesite Pillar +tile.andesite.3.desc=Andesite Bricks +tile.andesite.4.desc=Ornate Andesite +tile.andesite.5.desc=Prismatic Andesite +tile.andesite.6.desc=Andesite Small Tiles #Granite tile.chisel.granite.name=Granite tile.granite.0.desc=Generates in your world tile.granite.1.desc=Polished Granite tile.granite.2.desc=Granite Pillar +tile.granite.3.desc=Granite Bricks +tile.granite.4.desc=Ornate Granite +tile.granite.5.desc=Prismatic Granite +tile.granite.6.desc=Granite Small Tiles #Auto Chisel tile.chisel.autoChisel.name=Auto Chisel @@ -77,6 +111,7 @@ autochisel.slot.chisel.tooltip=Chisel Slot autochisel.slot.target.tooltip=Target Slot #Leaves +tile.chisel.leaves.name=Leaf tile.leaves.6.desc=Dead Leaves tile.leaves.7.desc=Fancy Leaves tile.leaves.8.desc=Pink Petals @@ -95,12 +130,28 @@ tile.voidstone.4.desc=Runic Voidstone tile.voidstone.5.desc=Metal-Bordered Voidstone tile.voidstone.6.desc=Eye Voidstone tile.voidstone.7.desc=Beveled Voidstone +tile.chisel.voidstoneRunic.name=Runic Voidstone +tile.voidstoneRunic.0.desc=Voidstone - Orange Rune +tile.voidstoneRunic.1.desc=Voidstone - Magenta Rune +tile.voidstoneRunic.2.desc=Voidstone - Light Blue Rune +tile.voidstoneRunic.3.desc=Voidstone - Yellow Rune +tile.voidstoneRunic.4.desc=Voidstone - Lime Rune +tile.voidstoneRunic.5.desc=Voidstone - Pink Rune +tile.voidstoneRunic.6.desc=Voidstone - Gray Rune +tile.voidstoneRunic.7.desc=Voidstone - Light Gray Rune +tile.voidstoneRunic.8.desc=Voidstone - Cyan Rune +tile.voidstoneRunic.9.desc=Voidstone - Purple Rune +tile.voidstoneRunic.10.desc=Voidstone - Blue Rune +tile.voidstoneRunic.11.desc=Voidstone - Brown Rune +tile.voidstoneRunic.12.desc=Voidstone - Green Rune +tile.voidstoneRunic.13.desc=Voidstone - Red Rune +tile.voidstoneRunic.14.desc=Voidstone - Black Rune #Void Stone Pillars tile.chisel.voidstonePillar.name=Voidstone Pillar tile.voidstonePillar.0.desc=Striped Voidstone Pillar --#Warning +#Warning tile.chisel.warningSign.name=Warning Sign tile.warningSign.0.desc=Radiation tile.warningSign.1.desc=Biohazard @@ -143,7 +194,10 @@ tile.arcane.4.desc=Glowing Symbols tile.arcane.5.desc=Bricks tile.arcane.6.desc=Temporal Conduit tile.arcane.7.desc=Braaainz -tile.arcane.8.desc=Spatial Conduit +tile.arcane.8.desc=Infernally Arcane +tile.arcane.9.desc=Nasty Nazca Lines +tile.arcane.10.desc=Fine Thaumaturge's Emblem +tile.arcane.11.desc=Cracked Rock leaking Eldritch Glow #Thaumium tile.chisel.thaumium.name=Thaumium Block @@ -204,6 +258,9 @@ tile.hexPlating.white.desc=White Plating tile.hexPlating.yellow.desc=Yellow Plating tile.hexPlating.gray.desc=Gray Plating +#Hex Large Plating +tile.chisel.hexLargePlating.name=Large Hex Plating + #Grimstone tile.chisel.grimstone.name=Grimstone tile.grimstone.0.desc=Grimstone @@ -224,6 +281,8 @@ tile.grimstone.14.desc=Flaky Grimstone #Technical Block tile.chisel.technical.name=Technical Block +tile.chisel.technical2.name=Transparent Technical Block +tile.chisel.technical3.name=Industrial Technical Block tile.technical.0.desc=Scaffold tile.technical.1.desc=Panels with Caution Tape tile.technical.2.desc=An Old Relic from the land of Oneteufyv @@ -240,12 +299,15 @@ tile.technical.12.desc=Rusty Panel tile.technical.13.desc=Grate tile.technical.14.desc=Fan (Malfunctioning) tile.technical.15.desc=Rusty Grate -tile.chisel.technical2.name=Transparent Technical Block +tile.technical3.0.desc=I'm a big fan of this massive fan! +tile.technical3.1.desc=Industrial Armor Plating #Metal Blocks tile.chisel.aluminumblock.name=Block of Aluminum tile.chisel.bronzeblock.name=Block of Bronze tile.chisel.copperblock.name=Block of Copper +tile.chisel.gold2.name=Block of Gold +tile.chisel.iron2.name=Block of Iron tile.chisel.leadblock.name=Block of Lead tile.chisel.silverblock.name=Block of Silver tile.chisel.steelblock.name=Block of Steel @@ -522,6 +584,12 @@ tile.factory.13.desc=Worn Metal Wall with Ventilation Openings tile.factory.14.desc=Rusty Metal Plates tile.factory.15.desc=Worn Metal Column +tile.chisel.factoryblock2.name=Factory Block +tile.factory2.0.desc=Neon Blue Plating +tile.factory2.1.desc=Vertical Venting +tile.factory2.2.desc=Metallic Blue Circuit Plating +tile.factory2.3.desc=Blue Wireframing + #Diamond blocks tile.chisel.diamond_block.name=Diamond Block tile.diamond.1.desc=Embossed Diamond Block @@ -560,6 +628,9 @@ tile.glass.13.desc=Thick Grid Glass tile.glass.14.desc=Thin Grid Glass tile.glass.15.desc=Modern Iron Fence +tile.chisel.glass2.name=Glass +tile.glass2.0.desc=Asymmetrical Leaded Glass + #Sandstone tile.chisel.sandstone.name=Sandstone tile.sandstone.3.desc=Faded Sandstone @@ -595,7 +666,7 @@ tile.concrete.9.desc=Partly Weathered Concrete Block tile.concrete.10.desc=Asphalt #Road Line -tile.chisel.roadLine.name=Road Lines +tile.chisel.road_line.name=Road Lines tile.roadLine.0.desc=White tile.roadLine.1.desc=Yellow tile.roadLine.2.desc=Double White @@ -734,6 +805,10 @@ tile.stoneMoss.15.desc=Mossy Cobblestone with Dark Panel #Stone Bricks tile.chisel.stonebricksmooth.name=Stone Bricks +tile.stonebricksmooth.0.desc=Modern Neutral Masonry +tile.stonebricksmooth.1.desc=Modern Felsic Masonry +tile.stonebricksmooth.2.desc=Modern Mafic Masonry +tile.stonebricksmooth.3.desc=Modern Mixed Masonry tile.stonebricksmooth.4.desc=Small Stone Bricks tile.stonebricksmooth.5.desc=Wide Stone Bricks tile.stonebricksmooth.6.desc=Small Disordered Stone Bricks diff --git a/src/main/resources/assets/chisel/textures/blocks/PBTex.png b/src/main/resources/assets/chisel/textures/blocks/PBTex.png new file mode 100644 index 00000000..b106d309 Binary files /dev/null and b/src/main/resources/assets/chisel/textures/blocks/PBTex.png differ diff --git a/src/main/resources/assets/chisel/textures/blocks/andesite/andesiteLBrick-ctm.png b/src/main/resources/assets/chisel/textures/blocks/andesite/andesiteLBrick-ctm.png new file mode 100644 index 00000000..c1c0a3a7 Binary files /dev/null and b/src/main/resources/assets/chisel/textures/blocks/andesite/andesiteLBrick-ctm.png differ diff --git a/src/main/resources/assets/chisel/textures/blocks/andesite/andesiteLBrick.png b/src/main/resources/assets/chisel/textures/blocks/andesite/andesiteLBrick.png new file mode 100644 index 00000000..121633ce Binary files /dev/null and b/src/main/resources/assets/chisel/textures/blocks/andesite/andesiteLBrick.png differ diff --git a/src/main/resources/assets/chisel/textures/blocks/andesite/andesiteOrnate.png b/src/main/resources/assets/chisel/textures/blocks/andesite/andesiteOrnate.png new file mode 100644 index 00000000..7094f944 Binary files /dev/null and b/src/main/resources/assets/chisel/textures/blocks/andesite/andesiteOrnate.png differ diff --git a/src/main/resources/assets/chisel/textures/blocks/andesite/andesitePrism.png b/src/main/resources/assets/chisel/textures/blocks/andesite/andesitePrism.png new file mode 100644 index 00000000..9eb933f7 Binary files /dev/null and b/src/main/resources/assets/chisel/textures/blocks/andesite/andesitePrism.png differ diff --git a/src/main/resources/assets/chisel/textures/blocks/andesite/andesiteTiles.png b/src/main/resources/assets/chisel/textures/blocks/andesite/andesiteTiles.png new file mode 100644 index 00000000..9840ec2c Binary files /dev/null and b/src/main/resources/assets/chisel/textures/blocks/andesite/andesiteTiles.png differ diff --git a/src/main/resources/assets/chisel/textures/blocks/antiblock/black-antiBlock.png b/src/main/resources/assets/chisel/textures/blocks/antiblock/black-antiBlock.png index 896bbc2c..64534b96 100644 Binary files a/src/main/resources/assets/chisel/textures/blocks/antiblock/black-antiBlock.png and b/src/main/resources/assets/chisel/textures/blocks/antiblock/black-antiBlock.png differ diff --git a/src/main/resources/assets/chisel/textures/blocks/antiblock/blue-antiBlock-ctm.png b/src/main/resources/assets/chisel/textures/blocks/antiblock/blue-antiBlock-ctm.png index b8fa831d..68da4427 100644 Binary files a/src/main/resources/assets/chisel/textures/blocks/antiblock/blue-antiBlock-ctm.png and b/src/main/resources/assets/chisel/textures/blocks/antiblock/blue-antiBlock-ctm.png differ diff --git a/src/main/resources/assets/chisel/textures/blocks/antiblock/blue-antiBlock.png b/src/main/resources/assets/chisel/textures/blocks/antiblock/blue-antiBlock.png index 18a382dd..5d40f3eb 100644 Binary files a/src/main/resources/assets/chisel/textures/blocks/antiblock/blue-antiBlock.png and b/src/main/resources/assets/chisel/textures/blocks/antiblock/blue-antiBlock.png differ diff --git a/src/main/resources/assets/chisel/textures/blocks/antiblock/brown-antiBlock-ctm.png b/src/main/resources/assets/chisel/textures/blocks/antiblock/brown-antiBlock-ctm.png index 4ad8e32d..89991e10 100644 Binary files a/src/main/resources/assets/chisel/textures/blocks/antiblock/brown-antiBlock-ctm.png and b/src/main/resources/assets/chisel/textures/blocks/antiblock/brown-antiBlock-ctm.png differ diff --git a/src/main/resources/assets/chisel/textures/blocks/antiblock/brown-antiBlock.png b/src/main/resources/assets/chisel/textures/blocks/antiblock/brown-antiBlock.png index d3eb022f..f7dcb6ce 100644 Binary files a/src/main/resources/assets/chisel/textures/blocks/antiblock/brown-antiBlock.png and b/src/main/resources/assets/chisel/textures/blocks/antiblock/brown-antiBlock.png differ diff --git a/src/main/resources/assets/chisel/textures/blocks/antiblock/cyan-antiBlock-ctm.png b/src/main/resources/assets/chisel/textures/blocks/antiblock/cyan-antiBlock-ctm.png index e8227b9c..6ac1d47b 100644 Binary files a/src/main/resources/assets/chisel/textures/blocks/antiblock/cyan-antiBlock-ctm.png and b/src/main/resources/assets/chisel/textures/blocks/antiblock/cyan-antiBlock-ctm.png differ diff --git a/src/main/resources/assets/chisel/textures/blocks/antiblock/cyan-antiBlock.png b/src/main/resources/assets/chisel/textures/blocks/antiblock/cyan-antiBlock.png index f128f9c2..1561607b 100644 Binary files a/src/main/resources/assets/chisel/textures/blocks/antiblock/cyan-antiBlock.png and b/src/main/resources/assets/chisel/textures/blocks/antiblock/cyan-antiBlock.png differ diff --git a/src/main/resources/assets/chisel/textures/blocks/antiblock/green-antiBlock-ctm.png b/src/main/resources/assets/chisel/textures/blocks/antiblock/green-antiBlock-ctm.png index 2733a321..e137bbd8 100644 Binary files a/src/main/resources/assets/chisel/textures/blocks/antiblock/green-antiBlock-ctm.png and b/src/main/resources/assets/chisel/textures/blocks/antiblock/green-antiBlock-ctm.png differ diff --git a/src/main/resources/assets/chisel/textures/blocks/antiblock/green-antiBlock.png b/src/main/resources/assets/chisel/textures/blocks/antiblock/green-antiBlock.png index 41760853..3711591a 100644 Binary files a/src/main/resources/assets/chisel/textures/blocks/antiblock/green-antiBlock.png and b/src/main/resources/assets/chisel/textures/blocks/antiblock/green-antiBlock.png differ diff --git a/src/main/resources/assets/chisel/textures/blocks/antiblock/light_blue-antiBlock-ctm.png b/src/main/resources/assets/chisel/textures/blocks/antiblock/light_blue-antiBlock-ctm.png index 60b494ed..50bf8822 100644 Binary files a/src/main/resources/assets/chisel/textures/blocks/antiblock/light_blue-antiBlock-ctm.png and b/src/main/resources/assets/chisel/textures/blocks/antiblock/light_blue-antiBlock-ctm.png differ diff --git a/src/main/resources/assets/chisel/textures/blocks/antiblock/light_blue-antiBlock.png b/src/main/resources/assets/chisel/textures/blocks/antiblock/light_blue-antiBlock.png index d4ec7ee2..51092002 100644 Binary files a/src/main/resources/assets/chisel/textures/blocks/antiblock/light_blue-antiBlock.png and b/src/main/resources/assets/chisel/textures/blocks/antiblock/light_blue-antiBlock.png differ diff --git a/src/main/resources/assets/chisel/textures/blocks/antiblock/lime-antiBlock-ctm.png b/src/main/resources/assets/chisel/textures/blocks/antiblock/lime-antiBlock-ctm.png index 939cdafa..5930203d 100644 Binary files a/src/main/resources/assets/chisel/textures/blocks/antiblock/lime-antiBlock-ctm.png and b/src/main/resources/assets/chisel/textures/blocks/antiblock/lime-antiBlock-ctm.png differ diff --git a/src/main/resources/assets/chisel/textures/blocks/antiblock/lime-antiBlock.png b/src/main/resources/assets/chisel/textures/blocks/antiblock/lime-antiBlock.png index 75ff99d6..47434922 100644 Binary files a/src/main/resources/assets/chisel/textures/blocks/antiblock/lime-antiBlock.png and b/src/main/resources/assets/chisel/textures/blocks/antiblock/lime-antiBlock.png differ diff --git a/src/main/resources/assets/chisel/textures/blocks/antiblock/magenta-antiBlock-ctm.png b/src/main/resources/assets/chisel/textures/blocks/antiblock/magenta-antiBlock-ctm.png index 7c4c4dab..a310d0b2 100644 Binary files a/src/main/resources/assets/chisel/textures/blocks/antiblock/magenta-antiBlock-ctm.png and b/src/main/resources/assets/chisel/textures/blocks/antiblock/magenta-antiBlock-ctm.png differ diff --git a/src/main/resources/assets/chisel/textures/blocks/antiblock/magenta-antiBlock.png b/src/main/resources/assets/chisel/textures/blocks/antiblock/magenta-antiBlock.png index 6530686f..1189e79f 100644 Binary files a/src/main/resources/assets/chisel/textures/blocks/antiblock/magenta-antiBlock.png and b/src/main/resources/assets/chisel/textures/blocks/antiblock/magenta-antiBlock.png differ diff --git a/src/main/resources/assets/chisel/textures/blocks/antiblock/orange-antiBlock-ctm.png b/src/main/resources/assets/chisel/textures/blocks/antiblock/orange-antiBlock-ctm.png index 83e1ff9a..4919ba4d 100644 Binary files a/src/main/resources/assets/chisel/textures/blocks/antiblock/orange-antiBlock-ctm.png and b/src/main/resources/assets/chisel/textures/blocks/antiblock/orange-antiBlock-ctm.png differ diff --git a/src/main/resources/assets/chisel/textures/blocks/antiblock/orange-antiBlock.png b/src/main/resources/assets/chisel/textures/blocks/antiblock/orange-antiBlock.png index aef5e531..89bc4dd8 100644 Binary files a/src/main/resources/assets/chisel/textures/blocks/antiblock/orange-antiBlock.png and b/src/main/resources/assets/chisel/textures/blocks/antiblock/orange-antiBlock.png differ diff --git a/src/main/resources/assets/chisel/textures/blocks/antiblock/pink-antiBlock-ctm.png b/src/main/resources/assets/chisel/textures/blocks/antiblock/pink-antiBlock-ctm.png index 2fdb6366..2ed8e496 100644 Binary files a/src/main/resources/assets/chisel/textures/blocks/antiblock/pink-antiBlock-ctm.png and b/src/main/resources/assets/chisel/textures/blocks/antiblock/pink-antiBlock-ctm.png differ diff --git a/src/main/resources/assets/chisel/textures/blocks/antiblock/pink-antiBlock.png b/src/main/resources/assets/chisel/textures/blocks/antiblock/pink-antiBlock.png index 61470ff1..7fe52de8 100644 Binary files a/src/main/resources/assets/chisel/textures/blocks/antiblock/pink-antiBlock.png and b/src/main/resources/assets/chisel/textures/blocks/antiblock/pink-antiBlock.png differ diff --git a/src/main/resources/assets/chisel/textures/blocks/antiblock/purple-antiBlock-ctm.png b/src/main/resources/assets/chisel/textures/blocks/antiblock/purple-antiBlock-ctm.png index 32967cc9..524abba0 100644 Binary files a/src/main/resources/assets/chisel/textures/blocks/antiblock/purple-antiBlock-ctm.png and b/src/main/resources/assets/chisel/textures/blocks/antiblock/purple-antiBlock-ctm.png differ diff --git a/src/main/resources/assets/chisel/textures/blocks/antiblock/purple-antiBlock.png b/src/main/resources/assets/chisel/textures/blocks/antiblock/purple-antiBlock.png index ebe1f83e..93057bad 100644 Binary files a/src/main/resources/assets/chisel/textures/blocks/antiblock/purple-antiBlock.png and b/src/main/resources/assets/chisel/textures/blocks/antiblock/purple-antiBlock.png differ diff --git a/src/main/resources/assets/chisel/textures/blocks/antiblock/red-antiBlock-ctm.png b/src/main/resources/assets/chisel/textures/blocks/antiblock/red-antiBlock-ctm.png index 50519b6a..d24953e6 100644 Binary files a/src/main/resources/assets/chisel/textures/blocks/antiblock/red-antiBlock-ctm.png and b/src/main/resources/assets/chisel/textures/blocks/antiblock/red-antiBlock-ctm.png differ diff --git a/src/main/resources/assets/chisel/textures/blocks/antiblock/red-antiBlock.png b/src/main/resources/assets/chisel/textures/blocks/antiblock/red-antiBlock.png index e73ad4b5..f8d21dc4 100644 Binary files a/src/main/resources/assets/chisel/textures/blocks/antiblock/red-antiBlock.png and b/src/main/resources/assets/chisel/textures/blocks/antiblock/red-antiBlock.png differ diff --git a/src/main/resources/assets/chisel/textures/blocks/antiblock/yellow-antiBlock.png b/src/main/resources/assets/chisel/textures/blocks/antiblock/yellow-antiBlock.png index 726b1039..615d9aa7 100644 Binary files a/src/main/resources/assets/chisel/textures/blocks/antiblock/yellow-antiBlock.png and b/src/main/resources/assets/chisel/textures/blocks/antiblock/yellow-antiBlock.png differ diff --git a/src/main/resources/assets/chisel/textures/blocks/arcane/ArcaneBorder-ctm.png b/src/main/resources/assets/chisel/textures/blocks/arcane/ArcaneBorder-ctm.png new file mode 100644 index 00000000..391e2985 Binary files /dev/null and b/src/main/resources/assets/chisel/textures/blocks/arcane/ArcaneBorder-ctm.png differ diff --git a/src/main/resources/assets/chisel/textures/blocks/arcane/ArcaneBorder.png b/src/main/resources/assets/chisel/textures/blocks/arcane/ArcaneBorder.png new file mode 100644 index 00000000..a5e8b5ae Binary files /dev/null and b/src/main/resources/assets/chisel/textures/blocks/arcane/ArcaneBorder.png differ diff --git a/src/main/resources/assets/chisel/textures/blocks/arcane/arcaneMatrix-v9.png b/src/main/resources/assets/chisel/textures/blocks/arcane/arcaneMatrix-v9.png new file mode 100644 index 00000000..5b0720ce Binary files /dev/null and b/src/main/resources/assets/chisel/textures/blocks/arcane/arcaneMatrix-v9.png differ diff --git a/src/main/resources/assets/chisel/textures/blocks/arcane/entropiedEntritchRock-v9.png b/src/main/resources/assets/chisel/textures/blocks/arcane/entropiedEntritchRock-v9.png new file mode 100644 index 00000000..ad560d38 Binary files /dev/null and b/src/main/resources/assets/chisel/textures/blocks/arcane/entropiedEntritchRock-v9.png differ diff --git a/src/main/resources/assets/chisel/textures/blocks/arcane/arcaneBigBrick-ctm.png b/src/main/resources/assets/chisel/textures/blocks/arcane/oldFiles/arcaneBigBrick-ctm.png similarity index 100% rename from src/main/resources/assets/chisel/textures/blocks/arcane/arcaneBigBrick-ctm.png rename to src/main/resources/assets/chisel/textures/blocks/arcane/oldFiles/arcaneBigBrick-ctm.png diff --git a/src/main/resources/assets/chisel/textures/blocks/arcane/arcaneBigBrick.png b/src/main/resources/assets/chisel/textures/blocks/arcane/oldFiles/arcaneBigBrick.png similarity index 100% rename from src/main/resources/assets/chisel/textures/blocks/arcane/arcaneBigBrick.png rename to src/main/resources/assets/chisel/textures/blocks/arcane/oldFiles/arcaneBigBrick.png diff --git a/src/main/resources/assets/chisel/textures/blocks/arcane/arcaneBrick-ctmh.png b/src/main/resources/assets/chisel/textures/blocks/arcane/oldFiles/arcaneBrick-ctmh.png similarity index 100% rename from src/main/resources/assets/chisel/textures/blocks/arcane/arcaneBrick-ctmh.png rename to src/main/resources/assets/chisel/textures/blocks/arcane/oldFiles/arcaneBrick-ctmh.png diff --git a/src/main/resources/assets/chisel/textures/blocks/arcane/arcaneRunes-r9.png b/src/main/resources/assets/chisel/textures/blocks/arcane/oldFiles/arcaneRunes-r9.png similarity index 100% rename from src/main/resources/assets/chisel/textures/blocks/arcane/arcaneRunes-r9.png rename to src/main/resources/assets/chisel/textures/blocks/arcane/oldFiles/arcaneRunes-r9.png diff --git a/src/main/resources/assets/chisel/textures/blocks/arcane/arcaneRunesGlow-r9.png b/src/main/resources/assets/chisel/textures/blocks/arcane/oldFiles/arcaneRunesGlow-r9.png similarity index 100% rename from src/main/resources/assets/chisel/textures/blocks/arcane/arcaneRunesGlow-r9.png rename to src/main/resources/assets/chisel/textures/blocks/arcane/oldFiles/arcaneRunesGlow-r9.png diff --git a/src/main/resources/assets/chisel/textures/blocks/arcane/arcane_stone.png b/src/main/resources/assets/chisel/textures/blocks/arcane/oldFiles/arcane_stone.png similarity index 100% rename from src/main/resources/assets/chisel/textures/blocks/arcane/arcane_stone.png rename to src/main/resources/assets/chisel/textures/blocks/arcane/oldFiles/arcane_stone.png diff --git a/src/main/resources/assets/chisel/textures/blocks/arcane/conduitAnim.png b/src/main/resources/assets/chisel/textures/blocks/arcane/oldFiles/conduitAnim.png similarity index 100% rename from src/main/resources/assets/chisel/textures/blocks/arcane/conduitAnim.png rename to src/main/resources/assets/chisel/textures/blocks/arcane/oldFiles/conduitAnim.png diff --git a/src/main/resources/assets/chisel/textures/blocks/arcane/conduitAnim.png.mcmeta b/src/main/resources/assets/chisel/textures/blocks/arcane/oldFiles/conduitAnim.png.mcmeta similarity index 100% rename from src/main/resources/assets/chisel/textures/blocks/arcane/conduitAnim.png.mcmeta rename to src/main/resources/assets/chisel/textures/blocks/arcane/oldFiles/conduitAnim.png.mcmeta diff --git a/src/main/resources/assets/chisel/textures/blocks/arcane/largetile.png b/src/main/resources/assets/chisel/textures/blocks/arcane/oldFiles/largetile.png similarity index 100% rename from src/main/resources/assets/chisel/textures/blocks/arcane/largetile.png rename to src/main/resources/assets/chisel/textures/blocks/arcane/oldFiles/largetile.png diff --git a/src/main/resources/assets/chisel/textures/blocks/arcane/runes-r9.png b/src/main/resources/assets/chisel/textures/blocks/arcane/oldFiles/runes-r9.png similarity index 100% rename from src/main/resources/assets/chisel/textures/blocks/arcane/runes-r9.png rename to src/main/resources/assets/chisel/textures/blocks/arcane/oldFiles/runes-r9.png diff --git a/src/main/resources/assets/chisel/textures/blocks/arcane/runesGlow-r9.png b/src/main/resources/assets/chisel/textures/blocks/arcane/oldFiles/runesGlow-r9.png similarity index 100% rename from src/main/resources/assets/chisel/textures/blocks/arcane/runesGlow-r9.png rename to src/main/resources/assets/chisel/textures/blocks/arcane/oldFiles/runesGlow-r9.png diff --git a/src/main/resources/assets/chisel/textures/blocks/arcane/runesGlow-v9.png b/src/main/resources/assets/chisel/textures/blocks/arcane/oldFiles/runesGlow-v9.png similarity index 100% rename from src/main/resources/assets/chisel/textures/blocks/arcane/runesGlow-v9.png rename to src/main/resources/assets/chisel/textures/blocks/arcane/oldFiles/runesGlow-v9.png diff --git a/src/main/resources/assets/chisel/textures/blocks/arcane/thaumcraftLogo-v9.png b/src/main/resources/assets/chisel/textures/blocks/arcane/thaumcraftLogo-v9.png new file mode 100644 index 00000000..24509cee Binary files /dev/null and b/src/main/resources/assets/chisel/textures/blocks/arcane/thaumcraftLogo-v9.png differ diff --git a/src/main/resources/assets/chisel/textures/blocks/diorite/dioriteLBrick-ctm.png b/src/main/resources/assets/chisel/textures/blocks/diorite/dioriteLBrick-ctm.png new file mode 100644 index 00000000..dbd3951e Binary files /dev/null and b/src/main/resources/assets/chisel/textures/blocks/diorite/dioriteLBrick-ctm.png differ diff --git a/src/main/resources/assets/chisel/textures/blocks/diorite/dioriteLBrick.png b/src/main/resources/assets/chisel/textures/blocks/diorite/dioriteLBrick.png new file mode 100644 index 00000000..5558ce9a Binary files /dev/null and b/src/main/resources/assets/chisel/textures/blocks/diorite/dioriteLBrick.png differ diff --git a/src/main/resources/assets/chisel/textures/blocks/diorite/dioriteOrnate.png b/src/main/resources/assets/chisel/textures/blocks/diorite/dioriteOrnate.png new file mode 100644 index 00000000..ad1addfe Binary files /dev/null and b/src/main/resources/assets/chisel/textures/blocks/diorite/dioriteOrnate.png differ diff --git a/src/main/resources/assets/chisel/textures/blocks/diorite/dioritePrism.png b/src/main/resources/assets/chisel/textures/blocks/diorite/dioritePrism.png new file mode 100644 index 00000000..fa8edb0f Binary files /dev/null and b/src/main/resources/assets/chisel/textures/blocks/diorite/dioritePrism.png differ diff --git a/src/main/resources/assets/chisel/textures/blocks/diorite/dioriteTiles.png b/src/main/resources/assets/chisel/textures/blocks/diorite/dioriteTiles.png new file mode 100644 index 00000000..c8defda3 Binary files /dev/null and b/src/main/resources/assets/chisel/textures/blocks/diorite/dioriteTiles.png differ diff --git a/src/main/resources/assets/chisel/textures/blocks/unused/chrono/frameblue-ctm.png b/src/main/resources/assets/chisel/textures/blocks/factory/frameblue-ctm.png similarity index 100% rename from src/main/resources/assets/chisel/textures/blocks/unused/chrono/frameblue-ctm.png rename to src/main/resources/assets/chisel/textures/blocks/factory/frameblue-ctm.png diff --git a/src/main/resources/assets/chisel/textures/blocks/unused/chrono/frameblue.png b/src/main/resources/assets/chisel/textures/blocks/factory/frameblue.png similarity index 100% rename from src/main/resources/assets/chisel/textures/blocks/unused/chrono/frameblue.png rename to src/main/resources/assets/chisel/textures/blocks/factory/frameblue.png diff --git a/src/main/resources/assets/chisel/textures/blocks/unused/chrono/iceiceice-ctm.png b/src/main/resources/assets/chisel/textures/blocks/factory/iceiceice-ctm.png similarity index 100% rename from src/main/resources/assets/chisel/textures/blocks/unused/chrono/iceiceice-ctm.png rename to src/main/resources/assets/chisel/textures/blocks/factory/iceiceice-ctm.png diff --git a/src/main/resources/assets/chisel/textures/blocks/unused/chrono/iceiceice.png b/src/main/resources/assets/chisel/textures/blocks/factory/iceiceice.png similarity index 100% rename from src/main/resources/assets/chisel/textures/blocks/unused/chrono/iceiceice.png rename to src/main/resources/assets/chisel/textures/blocks/factory/iceiceice.png diff --git a/src/main/resources/assets/chisel/textures/blocks/unused/chrono/tilemosaic-ctm.png b/src/main/resources/assets/chisel/textures/blocks/factory/tilemosaic-ctm.png similarity index 100% rename from src/main/resources/assets/chisel/textures/blocks/unused/chrono/tilemosaic-ctm.png rename to src/main/resources/assets/chisel/textures/blocks/factory/tilemosaic-ctm.png diff --git a/src/main/resources/assets/chisel/textures/blocks/unused/chrono/tilemosaic.png b/src/main/resources/assets/chisel/textures/blocks/factory/tilemosaic.png similarity index 100% rename from src/main/resources/assets/chisel/textures/blocks/unused/chrono/tilemosaic.png rename to src/main/resources/assets/chisel/textures/blocks/factory/tilemosaic.png diff --git a/src/main/resources/assets/chisel/textures/blocks/unused/chrono/vent-ctmv.png b/src/main/resources/assets/chisel/textures/blocks/factory/vent-ctmv.png similarity index 100% rename from src/main/resources/assets/chisel/textures/blocks/unused/chrono/vent-ctmv.png rename to src/main/resources/assets/chisel/textures/blocks/factory/vent-ctmv.png diff --git a/src/main/resources/assets/chisel/textures/blocks/unused/chrono/vent-top.png b/src/main/resources/assets/chisel/textures/blocks/factory/vent-top.png similarity index 100% rename from src/main/resources/assets/chisel/textures/blocks/unused/chrono/vent-top.png rename to src/main/resources/assets/chisel/textures/blocks/factory/vent-top.png diff --git a/src/main/resources/assets/chisel/textures/blocks/unused/chrono/wireframeblue-ctm.png b/src/main/resources/assets/chisel/textures/blocks/factory/wireframeblue-ctm.png similarity index 100% rename from src/main/resources/assets/chisel/textures/blocks/unused/chrono/wireframeblue-ctm.png rename to src/main/resources/assets/chisel/textures/blocks/factory/wireframeblue-ctm.png diff --git a/src/main/resources/assets/chisel/textures/blocks/unused/chrono/wireframeblue.png b/src/main/resources/assets/chisel/textures/blocks/factory/wireframeblue.png similarity index 100% rename from src/main/resources/assets/chisel/textures/blocks/unused/chrono/wireframeblue.png rename to src/main/resources/assets/chisel/textures/blocks/factory/wireframeblue.png diff --git a/src/main/resources/assets/chisel/textures/blocks/unused/wireframe/chrono-ctm.png b/src/main/resources/assets/chisel/textures/blocks/glass/chrono-ctm.png similarity index 100% rename from src/main/resources/assets/chisel/textures/blocks/unused/wireframe/chrono-ctm.png rename to src/main/resources/assets/chisel/textures/blocks/glass/chrono-ctm.png diff --git a/src/main/resources/assets/chisel/textures/blocks/unused/wireframe/chrono.png b/src/main/resources/assets/chisel/textures/blocks/glass/chrono.png similarity index 100% rename from src/main/resources/assets/chisel/textures/blocks/unused/wireframe/chrono.png rename to src/main/resources/assets/chisel/textures/blocks/glass/chrono.png diff --git a/src/main/resources/assets/chisel/textures/blocks/granite/graniteLBrick-ctm.png b/src/main/resources/assets/chisel/textures/blocks/granite/graniteLBrick-ctm.png new file mode 100644 index 00000000..682a3f2c Binary files /dev/null and b/src/main/resources/assets/chisel/textures/blocks/granite/graniteLBrick-ctm.png differ diff --git a/src/main/resources/assets/chisel/textures/blocks/granite/graniteLBrick.png b/src/main/resources/assets/chisel/textures/blocks/granite/graniteLBrick.png new file mode 100644 index 00000000..50cdd929 Binary files /dev/null and b/src/main/resources/assets/chisel/textures/blocks/granite/graniteLBrick.png differ diff --git a/src/main/resources/assets/chisel/textures/blocks/granite/graniteOrnate.png b/src/main/resources/assets/chisel/textures/blocks/granite/graniteOrnate.png new file mode 100644 index 00000000..6c60a6d8 Binary files /dev/null and b/src/main/resources/assets/chisel/textures/blocks/granite/graniteOrnate.png differ diff --git a/src/main/resources/assets/chisel/textures/blocks/granite/granitePrism.png b/src/main/resources/assets/chisel/textures/blocks/granite/granitePrism.png new file mode 100644 index 00000000..c7bb6aa5 Binary files /dev/null and b/src/main/resources/assets/chisel/textures/blocks/granite/granitePrism.png differ diff --git a/src/main/resources/assets/chisel/textures/blocks/granite/graniteTiles.png b/src/main/resources/assets/chisel/textures/blocks/granite/graniteTiles.png new file mode 100644 index 00000000..47dac488 Binary files /dev/null and b/src/main/resources/assets/chisel/textures/blocks/granite/graniteTiles.png differ diff --git a/src/main/resources/assets/chisel/textures/blocks/hexPlating/hexNew-v9.png b/src/main/resources/assets/chisel/textures/blocks/hexPlating/hexNew-v9.png new file mode 100644 index 00000000..3d4dcdd8 Binary files /dev/null and b/src/main/resources/assets/chisel/textures/blocks/hexPlating/hexNew-v9.png differ diff --git a/src/main/resources/assets/chisel/textures/blocks/metals/gold/adv.png b/src/main/resources/assets/chisel/textures/blocks/metals/gold/adv.png new file mode 100644 index 00000000..326ef975 Binary files /dev/null and b/src/main/resources/assets/chisel/textures/blocks/metals/gold/adv.png differ diff --git a/src/main/resources/assets/chisel/textures/blocks/metals/gold/bolted.png b/src/main/resources/assets/chisel/textures/blocks/metals/gold/bolted.png new file mode 100644 index 00000000..dda01e39 Binary files /dev/null and b/src/main/resources/assets/chisel/textures/blocks/metals/gold/bolted.png differ diff --git a/src/main/resources/assets/chisel/textures/blocks/metals/gold/caution-ctm.png b/src/main/resources/assets/chisel/textures/blocks/metals/gold/caution-ctm.png new file mode 100644 index 00000000..51ea7dbb Binary files /dev/null and b/src/main/resources/assets/chisel/textures/blocks/metals/gold/caution-ctm.png differ diff --git a/src/main/resources/assets/chisel/textures/blocks/metals/gold/caution.png b/src/main/resources/assets/chisel/textures/blocks/metals/gold/caution.png new file mode 100644 index 00000000..b1da2036 Binary files /dev/null and b/src/main/resources/assets/chisel/textures/blocks/metals/gold/caution.png differ diff --git a/src/main/resources/assets/chisel/textures/blocks/metals/gold/crate-ctm.png b/src/main/resources/assets/chisel/textures/blocks/metals/gold/crate-ctm.png new file mode 100644 index 00000000..80019a1f Binary files /dev/null and b/src/main/resources/assets/chisel/textures/blocks/metals/gold/crate-ctm.png differ diff --git a/src/main/resources/assets/chisel/textures/blocks/metals/gold/crate.png b/src/main/resources/assets/chisel/textures/blocks/metals/gold/crate.png new file mode 100644 index 00000000..d5f722c2 Binary files /dev/null and b/src/main/resources/assets/chisel/textures/blocks/metals/gold/crate.png differ diff --git a/src/main/resources/assets/chisel/textures/blocks/metals/gold/egregious-ctm.png b/src/main/resources/assets/chisel/textures/blocks/metals/gold/egregious-ctm.png new file mode 100644 index 00000000..27712b9d Binary files /dev/null and b/src/main/resources/assets/chisel/textures/blocks/metals/gold/egregious-ctm.png differ diff --git a/src/main/resources/assets/chisel/textures/blocks/metals/gold/egregious.png b/src/main/resources/assets/chisel/textures/blocks/metals/gold/egregious.png new file mode 100644 index 00000000..ed4f7ce8 Binary files /dev/null and b/src/main/resources/assets/chisel/textures/blocks/metals/gold/egregious.png differ diff --git a/src/main/resources/assets/chisel/textures/blocks/metals/gold/thermal.png b/src/main/resources/assets/chisel/textures/blocks/metals/gold/thermal.png new file mode 100644 index 00000000..0c1b5940 Binary files /dev/null and b/src/main/resources/assets/chisel/textures/blocks/metals/gold/thermal.png differ diff --git a/src/main/resources/assets/chisel/textures/blocks/metals/iron/adv.png b/src/main/resources/assets/chisel/textures/blocks/metals/iron/adv.png new file mode 100644 index 00000000..8faaa598 Binary files /dev/null and b/src/main/resources/assets/chisel/textures/blocks/metals/iron/adv.png differ diff --git a/src/main/resources/assets/chisel/textures/blocks/metals/iron/bolted.png b/src/main/resources/assets/chisel/textures/blocks/metals/iron/bolted.png new file mode 100644 index 00000000..36b69300 Binary files /dev/null and b/src/main/resources/assets/chisel/textures/blocks/metals/iron/bolted.png differ diff --git a/src/main/resources/assets/chisel/textures/blocks/metals/iron/caution-ctm.png b/src/main/resources/assets/chisel/textures/blocks/metals/iron/caution-ctm.png new file mode 100644 index 00000000..413ceaa9 Binary files /dev/null and b/src/main/resources/assets/chisel/textures/blocks/metals/iron/caution-ctm.png differ diff --git a/src/main/resources/assets/chisel/textures/blocks/metals/iron/caution.png b/src/main/resources/assets/chisel/textures/blocks/metals/iron/caution.png new file mode 100644 index 00000000..855ea19e Binary files /dev/null and b/src/main/resources/assets/chisel/textures/blocks/metals/iron/caution.png differ diff --git a/src/main/resources/assets/chisel/textures/blocks/metals/iron/crate-ctm.png b/src/main/resources/assets/chisel/textures/blocks/metals/iron/crate-ctm.png new file mode 100644 index 00000000..4edeb314 Binary files /dev/null and b/src/main/resources/assets/chisel/textures/blocks/metals/iron/crate-ctm.png differ diff --git a/src/main/resources/assets/chisel/textures/blocks/metals/iron/crate.png b/src/main/resources/assets/chisel/textures/blocks/metals/iron/crate.png new file mode 100644 index 00000000..88583716 Binary files /dev/null and b/src/main/resources/assets/chisel/textures/blocks/metals/iron/crate.png differ diff --git a/src/main/resources/assets/chisel/textures/blocks/metals/iron/egregious-ctm.png b/src/main/resources/assets/chisel/textures/blocks/metals/iron/egregious-ctm.png new file mode 100644 index 00000000..28ab92cb Binary files /dev/null and b/src/main/resources/assets/chisel/textures/blocks/metals/iron/egregious-ctm.png differ diff --git a/src/main/resources/assets/chisel/textures/blocks/metals/iron/egregious.png b/src/main/resources/assets/chisel/textures/blocks/metals/iron/egregious.png new file mode 100644 index 00000000..c865cd26 Binary files /dev/null and b/src/main/resources/assets/chisel/textures/blocks/metals/iron/egregious.png differ diff --git a/src/main/resources/assets/chisel/textures/blocks/metals/iron/thermal.png b/src/main/resources/assets/chisel/textures/blocks/metals/iron/thermal.png new file mode 100644 index 00000000..a7e1bb7b Binary files /dev/null and b/src/main/resources/assets/chisel/textures/blocks/metals/iron/thermal.png differ diff --git a/src/main/resources/assets/chisel/textures/blocks/metals/steel/adv.png b/src/main/resources/assets/chisel/textures/blocks/metals/steel/adv.png index 8faaa598..35b3b947 100644 Binary files a/src/main/resources/assets/chisel/textures/blocks/metals/steel/adv.png and b/src/main/resources/assets/chisel/textures/blocks/metals/steel/adv.png differ diff --git a/src/main/resources/assets/chisel/textures/blocks/metals/steel/bolted.png b/src/main/resources/assets/chisel/textures/blocks/metals/steel/bolted.png index 36b69300..7251493c 100644 Binary files a/src/main/resources/assets/chisel/textures/blocks/metals/steel/bolted.png and b/src/main/resources/assets/chisel/textures/blocks/metals/steel/bolted.png differ diff --git a/src/main/resources/assets/chisel/textures/blocks/metals/steel/caution-ctm.png b/src/main/resources/assets/chisel/textures/blocks/metals/steel/caution-ctm.png index 413ceaa9..0ff37d7d 100644 Binary files a/src/main/resources/assets/chisel/textures/blocks/metals/steel/caution-ctm.png and b/src/main/resources/assets/chisel/textures/blocks/metals/steel/caution-ctm.png differ diff --git a/src/main/resources/assets/chisel/textures/blocks/metals/steel/caution.png b/src/main/resources/assets/chisel/textures/blocks/metals/steel/caution.png index 855ea19e..c31eeeef 100644 Binary files a/src/main/resources/assets/chisel/textures/blocks/metals/steel/caution.png and b/src/main/resources/assets/chisel/textures/blocks/metals/steel/caution.png differ diff --git a/src/main/resources/assets/chisel/textures/blocks/metals/steel/crate-ctm.png b/src/main/resources/assets/chisel/textures/blocks/metals/steel/crate-ctm.png index 4edeb314..c058b103 100644 Binary files a/src/main/resources/assets/chisel/textures/blocks/metals/steel/crate-ctm.png and b/src/main/resources/assets/chisel/textures/blocks/metals/steel/crate-ctm.png differ diff --git a/src/main/resources/assets/chisel/textures/blocks/metals/steel/crate.png b/src/main/resources/assets/chisel/textures/blocks/metals/steel/crate.png index 88583716..a78a9f0b 100644 Binary files a/src/main/resources/assets/chisel/textures/blocks/metals/steel/crate.png and b/src/main/resources/assets/chisel/textures/blocks/metals/steel/crate.png differ diff --git a/src/main/resources/assets/chisel/textures/blocks/metals/steel/egregious-ctm.png b/src/main/resources/assets/chisel/textures/blocks/metals/steel/egregious-ctm.png index 28ab92cb..3214a32e 100644 Binary files a/src/main/resources/assets/chisel/textures/blocks/metals/steel/egregious-ctm.png and b/src/main/resources/assets/chisel/textures/blocks/metals/steel/egregious-ctm.png differ diff --git a/src/main/resources/assets/chisel/textures/blocks/metals/steel/egregious.png b/src/main/resources/assets/chisel/textures/blocks/metals/steel/egregious.png index c865cd26..22650166 100644 Binary files a/src/main/resources/assets/chisel/textures/blocks/metals/steel/egregious.png and b/src/main/resources/assets/chisel/textures/blocks/metals/steel/egregious.png differ diff --git a/src/main/resources/assets/chisel/textures/blocks/metals/steel/thermal.png b/src/main/resources/assets/chisel/textures/blocks/metals/steel/thermal.png index a7e1bb7b..296ad1ff 100644 Binary files a/src/main/resources/assets/chisel/textures/blocks/metals/steel/thermal.png and b/src/main/resources/assets/chisel/textures/blocks/metals/steel/thermal.png differ diff --git a/src/main/resources/assets/chisel/textures/blocks/nation/imperialCamo-v4.png b/src/main/resources/assets/chisel/textures/blocks/nation/imperialCamo-v4.png new file mode 100644 index 00000000..e01a696e Binary files /dev/null and b/src/main/resources/assets/chisel/textures/blocks/nation/imperialCamo-v4.png differ diff --git a/src/main/resources/assets/chisel/textures/blocks/nation/imperialCamoSecluded-v4.png b/src/main/resources/assets/chisel/textures/blocks/nation/imperialCamoSecluded-v4.png new file mode 100644 index 00000000..22c61e90 Binary files /dev/null and b/src/main/resources/assets/chisel/textures/blocks/nation/imperialCamoSecluded-v4.png differ diff --git a/src/main/resources/assets/chisel/textures/blocks/nation/imperialCautionOrange-ctm.png b/src/main/resources/assets/chisel/textures/blocks/nation/imperialCautionOrange-ctm.png new file mode 100644 index 00000000..0efa53d5 Binary files /dev/null and b/src/main/resources/assets/chisel/textures/blocks/nation/imperialCautionOrange-ctm.png differ diff --git a/src/main/resources/assets/chisel/textures/blocks/nation/imperialCautionOrange.png b/src/main/resources/assets/chisel/textures/blocks/nation/imperialCautionOrange.png new file mode 100644 index 00000000..319cb96b Binary files /dev/null and b/src/main/resources/assets/chisel/textures/blocks/nation/imperialCautionOrange.png differ diff --git a/src/main/resources/assets/chisel/textures/blocks/nation/imperialCautionWhite-ctm.png b/src/main/resources/assets/chisel/textures/blocks/nation/imperialCautionWhite-ctm.png new file mode 100644 index 00000000..aee80ece Binary files /dev/null and b/src/main/resources/assets/chisel/textures/blocks/nation/imperialCautionWhite-ctm.png differ diff --git a/src/main/resources/assets/chisel/textures/blocks/nation/imperialCautionWhite.png b/src/main/resources/assets/chisel/textures/blocks/nation/imperialCautionWhite.png new file mode 100644 index 00000000..bf122ac7 Binary files /dev/null and b/src/main/resources/assets/chisel/textures/blocks/nation/imperialCautionWhite.png differ diff --git a/src/main/resources/assets/chisel/textures/blocks/nation/imperialPlate.png b/src/main/resources/assets/chisel/textures/blocks/nation/imperialPlate.png new file mode 100644 index 00000000..0e856d83 Binary files /dev/null and b/src/main/resources/assets/chisel/textures/blocks/nation/imperialPlate.png differ diff --git a/src/main/resources/assets/chisel/textures/blocks/nation/rebelCamo-v4.png b/src/main/resources/assets/chisel/textures/blocks/nation/rebelCamo-v4.png new file mode 100644 index 00000000..ba65cf73 Binary files /dev/null and b/src/main/resources/assets/chisel/textures/blocks/nation/rebelCamo-v4.png differ diff --git a/src/main/resources/assets/chisel/textures/blocks/nation/rebelCamoSecluded-v4.png b/src/main/resources/assets/chisel/textures/blocks/nation/rebelCamoSecluded-v4.png new file mode 100644 index 00000000..a933e493 Binary files /dev/null and b/src/main/resources/assets/chisel/textures/blocks/nation/rebelCamoSecluded-v4.png differ diff --git a/src/main/resources/assets/chisel/textures/blocks/nation/rebelCautionRed-ctm.png b/src/main/resources/assets/chisel/textures/blocks/nation/rebelCautionRed-ctm.png new file mode 100644 index 00000000..5f0ccdb9 Binary files /dev/null and b/src/main/resources/assets/chisel/textures/blocks/nation/rebelCautionRed-ctm.png differ diff --git a/src/main/resources/assets/chisel/textures/blocks/nation/rebelCautionRed.png b/src/main/resources/assets/chisel/textures/blocks/nation/rebelCautionRed.png new file mode 100644 index 00000000..b45b641a Binary files /dev/null and b/src/main/resources/assets/chisel/textures/blocks/nation/rebelCautionRed.png differ diff --git a/src/main/resources/assets/chisel/textures/blocks/nation/rebelCautionWhite-ctm.png b/src/main/resources/assets/chisel/textures/blocks/nation/rebelCautionWhite-ctm.png new file mode 100644 index 00000000..881e74f9 Binary files /dev/null and b/src/main/resources/assets/chisel/textures/blocks/nation/rebelCautionWhite-ctm.png differ diff --git a/src/main/resources/assets/chisel/textures/blocks/nation/rebelCautionWhite.png b/src/main/resources/assets/chisel/textures/blocks/nation/rebelCautionWhite.png new file mode 100644 index 00000000..bd52b467 Binary files /dev/null and b/src/main/resources/assets/chisel/textures/blocks/nation/rebelCautionWhite.png differ diff --git a/src/main/resources/assets/chisel/textures/blocks/nation/rebelPlate.png b/src/main/resources/assets/chisel/textures/blocks/nation/rebelPlate.png new file mode 100644 index 00000000..739e8ca5 Binary files /dev/null and b/src/main/resources/assets/chisel/textures/blocks/nation/rebelPlate.png differ diff --git a/src/main/resources/assets/chisel/textures/blocks/shingles/Shingle1-v4.png b/src/main/resources/assets/chisel/textures/blocks/shingles/Shingle1-v4.png new file mode 100644 index 00000000..849f3e71 Binary files /dev/null and b/src/main/resources/assets/chisel/textures/blocks/shingles/Shingle1-v4.png differ diff --git a/src/main/resources/assets/chisel/textures/blocks/shingles/Shingle2-v4.png b/src/main/resources/assets/chisel/textures/blocks/shingles/Shingle2-v4.png new file mode 100644 index 00000000..ea99d738 Binary files /dev/null and b/src/main/resources/assets/chisel/textures/blocks/shingles/Shingle2-v4.png differ diff --git a/src/main/resources/assets/chisel/textures/blocks/shingles/Shingle3-v4.png b/src/main/resources/assets/chisel/textures/blocks/shingles/Shingle3-v4.png new file mode 100644 index 00000000..7a5b8de2 Binary files /dev/null and b/src/main/resources/assets/chisel/textures/blocks/shingles/Shingle3-v4.png differ diff --git a/src/main/resources/assets/chisel/textures/blocks/shingles/Shingle4-v4.png b/src/main/resources/assets/chisel/textures/blocks/shingles/Shingle4-v4.png new file mode 100644 index 00000000..26dcd5d2 Binary files /dev/null and b/src/main/resources/assets/chisel/textures/blocks/shingles/Shingle4-v4.png differ diff --git a/src/main/resources/assets/chisel/textures/blocks/shingles/Shingle5-v4.png b/src/main/resources/assets/chisel/textures/blocks/shingles/Shingle5-v4.png new file mode 100644 index 00000000..76b4c77c Binary files /dev/null and b/src/main/resources/assets/chisel/textures/blocks/shingles/Shingle5-v4.png differ diff --git a/src/main/resources/assets/chisel/textures/blocks/shingles/Shingle6-v4.png b/src/main/resources/assets/chisel/textures/blocks/shingles/Shingle6-v4.png new file mode 100644 index 00000000..02c1f87f Binary files /dev/null and b/src/main/resources/assets/chisel/textures/blocks/shingles/Shingle6-v4.png differ diff --git a/src/main/resources/assets/chisel/textures/blocks/stonebrick2/masonBricksFelsic-v4.png b/src/main/resources/assets/chisel/textures/blocks/stonebrick2/masonBricksFelsic-v4.png new file mode 100644 index 00000000..8c0957d6 Binary files /dev/null and b/src/main/resources/assets/chisel/textures/blocks/stonebrick2/masonBricksFelsic-v4.png differ diff --git a/src/main/resources/assets/chisel/textures/blocks/stonebrick2/masonBricksMafic-v4.png b/src/main/resources/assets/chisel/textures/blocks/stonebrick2/masonBricksMafic-v4.png new file mode 100644 index 00000000..34f16dfe Binary files /dev/null and b/src/main/resources/assets/chisel/textures/blocks/stonebrick2/masonBricksMafic-v4.png differ diff --git a/src/main/resources/assets/chisel/textures/blocks/stonebrick2/masonBricksMixed-v4.png b/src/main/resources/assets/chisel/textures/blocks/stonebrick2/masonBricksMixed-v4.png new file mode 100644 index 00000000..114bde3b Binary files /dev/null and b/src/main/resources/assets/chisel/textures/blocks/stonebrick2/masonBricksMixed-v4.png differ diff --git a/src/main/resources/assets/chisel/textures/blocks/stonebrick2/masonBricksPlain-v4.png b/src/main/resources/assets/chisel/textures/blocks/stonebrick2/masonBricksPlain-v4.png new file mode 100644 index 00000000..f43fc0db Binary files /dev/null and b/src/main/resources/assets/chisel/textures/blocks/stonebrick2/masonBricksPlain-v4.png differ diff --git a/src/main/resources/assets/chisel/textures/blocks/technical/hexArmorPlating-v9.png b/src/main/resources/assets/chisel/textures/blocks/technical/hexArmorPlating-v9.png new file mode 100644 index 00000000..7a3329f8 Binary files /dev/null and b/src/main/resources/assets/chisel/textures/blocks/technical/hexArmorPlating-v9.png differ diff --git a/src/main/resources/assets/chisel/textures/blocks/technical/massiveFan-v9.png b/src/main/resources/assets/chisel/textures/blocks/technical/massiveFan-v9.png new file mode 100644 index 00000000..7c95f6a5 Binary files /dev/null and b/src/main/resources/assets/chisel/textures/blocks/technical/massiveFan-v9.png differ diff --git a/src/main/resources/assets/chisel/textures/blocks/technical/massiveFan-v9.png.mcmeta b/src/main/resources/assets/chisel/textures/blocks/technical/massiveFan-v9.png.mcmeta new file mode 100644 index 00000000..f0139e77 --- /dev/null +++ b/src/main/resources/assets/chisel/textures/blocks/technical/massiveFan-v9.png.mcmeta @@ -0,0 +1,3 @@ +{ + "animation": {} +} \ No newline at end of file diff --git a/src/main/resources/assets/chisel/textures/blocks/technical/massiveHexPlating-v9.png b/src/main/resources/assets/chisel/textures/blocks/technical/massiveHexPlating-v9.png new file mode 100644 index 00000000..7a3329f8 Binary files /dev/null and b/src/main/resources/assets/chisel/textures/blocks/technical/massiveHexPlating-v9.png differ diff --git a/src/main/resources/assets/chisel/textures/blocks/unused/chrono/tilered-ctm.png b/src/main/resources/assets/chisel/textures/blocks/unused/chrono/tilered-ctm.png deleted file mode 100644 index 01951da8..00000000 Binary files a/src/main/resources/assets/chisel/textures/blocks/unused/chrono/tilered-ctm.png and /dev/null differ diff --git a/src/main/resources/assets/chisel/textures/blocks/unused/chrono/tilered.png b/src/main/resources/assets/chisel/textures/blocks/unused/chrono/tilered.png deleted file mode 100644 index 80d311d8..00000000 Binary files a/src/main/resources/assets/chisel/textures/blocks/unused/chrono/tilered.png and /dev/null differ diff --git a/src/main/resources/assets/chisel/textures/blocks/unused/grass/bricks+dirt2-ctmv.png b/src/main/resources/assets/chisel/textures/blocks/unused/grass/bricks+dirt2-ctmv.png deleted file mode 100644 index 93353aae..00000000 Binary files a/src/main/resources/assets/chisel/textures/blocks/unused/grass/bricks+dirt2-ctmv.png and /dev/null differ diff --git a/src/main/resources/assets/chisel/textures/blocks/unused/grass/bricks+dirt2-top.png b/src/main/resources/assets/chisel/textures/blocks/unused/grass/bricks+dirt2-top.png deleted file mode 100644 index 9adbcc15..00000000 Binary files a/src/main/resources/assets/chisel/textures/blocks/unused/grass/bricks+dirt2-top.png and /dev/null differ diff --git a/src/main/resources/assets/chisel/textures/blocks/unused/grass/bricks.png b/src/main/resources/assets/chisel/textures/blocks/unused/grass/bricks.png deleted file mode 100644 index b865ae2d..00000000 Binary files a/src/main/resources/assets/chisel/textures/blocks/unused/grass/bricks.png and /dev/null differ diff --git a/src/main/resources/assets/chisel/textures/blocks/unused/grass/bricks2.png b/src/main/resources/assets/chisel/textures/blocks/unused/grass/bricks2.png deleted file mode 100644 index 9adbcc15..00000000 Binary files a/src/main/resources/assets/chisel/textures/blocks/unused/grass/bricks2.png and /dev/null differ diff --git a/src/main/resources/assets/chisel/textures/blocks/unused/grass/bricks3.png b/src/main/resources/assets/chisel/textures/blocks/unused/grass/bricks3.png deleted file mode 100644 index a4db0162..00000000 Binary files a/src/main/resources/assets/chisel/textures/blocks/unused/grass/bricks3.png and /dev/null differ diff --git a/src/main/resources/assets/chisel/textures/blocks/unused/grass/chunky.png b/src/main/resources/assets/chisel/textures/blocks/unused/grass/chunky.png deleted file mode 100644 index 8e8a3706..00000000 Binary files a/src/main/resources/assets/chisel/textures/blocks/unused/grass/chunky.png and /dev/null differ diff --git a/src/main/resources/assets/chisel/textures/blocks/unused/grass/cobble.png b/src/main/resources/assets/chisel/textures/blocks/unused/grass/cobble.png deleted file mode 100644 index a68b769b..00000000 Binary files a/src/main/resources/assets/chisel/textures/blocks/unused/grass/cobble.png and /dev/null differ diff --git a/src/main/resources/assets/chisel/textures/blocks/unused/grass/dirt-reinforced-ctm1.png b/src/main/resources/assets/chisel/textures/blocks/unused/grass/dirt-reinforced-ctm1.png deleted file mode 100644 index 2fdd80dd..00000000 Binary files a/src/main/resources/assets/chisel/textures/blocks/unused/grass/dirt-reinforced-ctm1.png and /dev/null differ diff --git a/src/main/resources/assets/chisel/textures/blocks/unused/grass/dirt-reinforced-ctm2.png b/src/main/resources/assets/chisel/textures/blocks/unused/grass/dirt-reinforced-ctm2.png deleted file mode 100644 index 174f2529..00000000 Binary files a/src/main/resources/assets/chisel/textures/blocks/unused/grass/dirt-reinforced-ctm2.png and /dev/null differ diff --git a/src/main/resources/assets/chisel/textures/blocks/unused/grass/dirt-reinforced-ctm3.png b/src/main/resources/assets/chisel/textures/blocks/unused/grass/dirt-reinforced-ctm3.png deleted file mode 100644 index 7dba903d..00000000 Binary files a/src/main/resources/assets/chisel/textures/blocks/unused/grass/dirt-reinforced-ctm3.png and /dev/null differ diff --git a/src/main/resources/assets/chisel/textures/blocks/unused/grass/dirt-reinforced.png b/src/main/resources/assets/chisel/textures/blocks/unused/grass/dirt-reinforced.png deleted file mode 100644 index 98eb999d..00000000 Binary files a/src/main/resources/assets/chisel/textures/blocks/unused/grass/dirt-reinforced.png and /dev/null differ diff --git a/src/main/resources/assets/chisel/textures/blocks/unused/grass/happy.png b/src/main/resources/assets/chisel/textures/blocks/unused/grass/happy.png deleted file mode 100644 index 33223973..00000000 Binary files a/src/main/resources/assets/chisel/textures/blocks/unused/grass/happy.png and /dev/null differ diff --git a/src/main/resources/assets/chisel/textures/blocks/unused/grass/hor-ctmh.png b/src/main/resources/assets/chisel/textures/blocks/unused/grass/hor-ctmh.png deleted file mode 100644 index 72123062..00000000 Binary files a/src/main/resources/assets/chisel/textures/blocks/unused/grass/hor-ctmh.png and /dev/null differ diff --git a/src/main/resources/assets/chisel/textures/blocks/unused/grass/hor-top.png b/src/main/resources/assets/chisel/textures/blocks/unused/grass/hor-top.png deleted file mode 100644 index 35651c5e..00000000 Binary files a/src/main/resources/assets/chisel/textures/blocks/unused/grass/hor-top.png and /dev/null differ diff --git a/src/main/resources/assets/chisel/textures/blocks/unused/grass/horizontal.png b/src/main/resources/assets/chisel/textures/blocks/unused/grass/horizontal.png deleted file mode 100644 index d10169c5..00000000 Binary files a/src/main/resources/assets/chisel/textures/blocks/unused/grass/horizontal.png and /dev/null differ diff --git a/src/main/resources/assets/chisel/textures/blocks/unused/grass/layers.png b/src/main/resources/assets/chisel/textures/blocks/unused/grass/layers.png deleted file mode 100644 index 91446199..00000000 Binary files a/src/main/resources/assets/chisel/textures/blocks/unused/grass/layers.png and /dev/null differ diff --git a/src/main/resources/assets/chisel/textures/blocks/unused/grass/netherbricks.png b/src/main/resources/assets/chisel/textures/blocks/unused/grass/netherbricks.png deleted file mode 100644 index 4c72c8cc..00000000 Binary files a/src/main/resources/assets/chisel/textures/blocks/unused/grass/netherbricks.png and /dev/null differ diff --git a/src/main/resources/assets/chisel/textures/blocks/unused/grass/plate.png b/src/main/resources/assets/chisel/textures/blocks/unused/grass/plate.png deleted file mode 100644 index 4f1d3584..00000000 Binary files a/src/main/resources/assets/chisel/textures/blocks/unused/grass/plate.png and /dev/null differ diff --git a/src/main/resources/assets/chisel/textures/blocks/unused/grass/reinforced-ctm1.png b/src/main/resources/assets/chisel/textures/blocks/unused/grass/reinforced-ctm1.png deleted file mode 100644 index e364c51a..00000000 Binary files a/src/main/resources/assets/chisel/textures/blocks/unused/grass/reinforced-ctm1.png and /dev/null differ diff --git a/src/main/resources/assets/chisel/textures/blocks/unused/grass/reinforced-ctm2.png b/src/main/resources/assets/chisel/textures/blocks/unused/grass/reinforced-ctm2.png deleted file mode 100644 index a899b091..00000000 Binary files a/src/main/resources/assets/chisel/textures/blocks/unused/grass/reinforced-ctm2.png and /dev/null differ diff --git a/src/main/resources/assets/chisel/textures/blocks/unused/grass/reinforced-ctm3.png b/src/main/resources/assets/chisel/textures/blocks/unused/grass/reinforced-ctm3.png deleted file mode 100644 index 430543f5..00000000 Binary files a/src/main/resources/assets/chisel/textures/blocks/unused/grass/reinforced-ctm3.png and /dev/null differ diff --git a/src/main/resources/assets/chisel/textures/blocks/unused/grass/reinforced.png b/src/main/resources/assets/chisel/textures/blocks/unused/grass/reinforced.png deleted file mode 100644 index c6614eb2..00000000 Binary files a/src/main/resources/assets/chisel/textures/blocks/unused/grass/reinforced.png and /dev/null differ diff --git a/src/main/resources/assets/chisel/textures/blocks/unused/grass/vert-ctmv.png b/src/main/resources/assets/chisel/textures/blocks/unused/grass/vert-ctmv.png deleted file mode 100644 index bad26dfe..00000000 Binary files a/src/main/resources/assets/chisel/textures/blocks/unused/grass/vert-ctmv.png and /dev/null differ diff --git a/src/main/resources/assets/chisel/textures/blocks/unused/grass/vert-top.png b/src/main/resources/assets/chisel/textures/blocks/unused/grass/vert-top.png deleted file mode 100644 index 35651c5e..00000000 Binary files a/src/main/resources/assets/chisel/textures/blocks/unused/grass/vert-top.png and /dev/null differ diff --git a/src/main/resources/assets/chisel/textures/blocks/unused/grass/vertical-ctmv.png b/src/main/resources/assets/chisel/textures/blocks/unused/grass/vertical-ctmv.png deleted file mode 100644 index ced2d158..00000000 Binary files a/src/main/resources/assets/chisel/textures/blocks/unused/grass/vertical-ctmv.png and /dev/null differ diff --git a/src/main/resources/assets/chisel/textures/blocks/unused/grass/vertical-top.png b/src/main/resources/assets/chisel/textures/blocks/unused/grass/vertical-top.png deleted file mode 100644 index bfa891a7..00000000 Binary files a/src/main/resources/assets/chisel/textures/blocks/unused/grass/vertical-top.png and /dev/null differ diff --git a/src/main/resources/assets/chisel/textures/blocks/unused/lamp/symbolgold-ctm.png b/src/main/resources/assets/chisel/textures/blocks/unused/lamp/symbolgold-ctm.png deleted file mode 100644 index 068944e8..00000000 Binary files a/src/main/resources/assets/chisel/textures/blocks/unused/lamp/symbolgold-ctm.png and /dev/null differ diff --git a/src/main/resources/assets/chisel/textures/blocks/unused/lamp/symbolgold.png b/src/main/resources/assets/chisel/textures/blocks/unused/lamp/symbolgold.png deleted file mode 100644 index 1ecefc41..00000000 Binary files a/src/main/resources/assets/chisel/textures/blocks/unused/lamp/symbolgold.png and /dev/null differ diff --git a/src/main/resources/assets/chisel/textures/blocks/unused/spiketrap/base - Copy.png b/src/main/resources/assets/chisel/textures/blocks/unused/spiketrap/base - Copy.png deleted file mode 100644 index 0fd6f731..00000000 Binary files a/src/main/resources/assets/chisel/textures/blocks/unused/spiketrap/base - Copy.png and /dev/null differ diff --git a/src/main/resources/assets/chisel/textures/blocks/unused/spiketrap/base.png b/src/main/resources/assets/chisel/textures/blocks/unused/spiketrap/base.png deleted file mode 100644 index 31e95cd5..00000000 Binary files a/src/main/resources/assets/chisel/textures/blocks/unused/spiketrap/base.png and /dev/null differ diff --git a/src/main/resources/assets/chisel/textures/blocks/unused/spiketrap/spike.png b/src/main/resources/assets/chisel/textures/blocks/unused/spiketrap/spike.png deleted file mode 100644 index 67cf3471..00000000 Binary files a/src/main/resources/assets/chisel/textures/blocks/unused/spiketrap/spike.png and /dev/null differ diff --git a/src/main/resources/assets/chisel/textures/blocks/valentines/1.png b/src/main/resources/assets/chisel/textures/blocks/valentines/1.png new file mode 100644 index 00000000..d7db1297 Binary files /dev/null and b/src/main/resources/assets/chisel/textures/blocks/valentines/1.png differ diff --git a/src/main/resources/assets/chisel/textures/blocks/valentines/2.png b/src/main/resources/assets/chisel/textures/blocks/valentines/2.png new file mode 100644 index 00000000..b4c1e7d7 Binary files /dev/null and b/src/main/resources/assets/chisel/textures/blocks/valentines/2.png differ diff --git a/src/main/resources/assets/chisel/textures/blocks/valentines/3.png b/src/main/resources/assets/chisel/textures/blocks/valentines/3.png new file mode 100644 index 00000000..a158bee9 Binary files /dev/null and b/src/main/resources/assets/chisel/textures/blocks/valentines/3.png differ diff --git a/src/main/resources/assets/chisel/textures/blocks/valentines/4.png b/src/main/resources/assets/chisel/textures/blocks/valentines/4.png new file mode 100644 index 00000000..30174e81 Binary files /dev/null and b/src/main/resources/assets/chisel/textures/blocks/valentines/4.png differ diff --git a/src/main/resources/assets/chisel/textures/blocks/valentines/5.png b/src/main/resources/assets/chisel/textures/blocks/valentines/5.png new file mode 100644 index 00000000..4455e542 Binary files /dev/null and b/src/main/resources/assets/chisel/textures/blocks/valentines/5.png differ diff --git a/src/main/resources/assets/chisel/textures/blocks/valentines/6.png b/src/main/resources/assets/chisel/textures/blocks/valentines/6.png new file mode 100644 index 00000000..0b3101eb Binary files /dev/null and b/src/main/resources/assets/chisel/textures/blocks/valentines/6.png differ diff --git a/src/main/resources/assets/chisel/textures/blocks/valentines/7.png b/src/main/resources/assets/chisel/textures/blocks/valentines/7.png new file mode 100644 index 00000000..154b6ad5 Binary files /dev/null and b/src/main/resources/assets/chisel/textures/blocks/valentines/7.png differ diff --git a/src/main/resources/assets/chisel/textures/blocks/valentines/8.png b/src/main/resources/assets/chisel/textures/blocks/valentines/8.png new file mode 100644 index 00000000..2bc1fb62 Binary files /dev/null and b/src/main/resources/assets/chisel/textures/blocks/valentines/8.png differ diff --git a/src/main/resources/assets/chisel/textures/blocks/valentines/9.png b/src/main/resources/assets/chisel/textures/blocks/valentines/9.png new file mode 100644 index 00000000..5c32d6c7 Binary files /dev/null and b/src/main/resources/assets/chisel/textures/blocks/valentines/9.png differ diff --git a/src/main/resources/assets/chisel/textures/blocks/valentines/bricks.png b/src/main/resources/assets/chisel/textures/blocks/valentines/bricks.png deleted file mode 100644 index 57f3a838..00000000 Binary files a/src/main/resources/assets/chisel/textures/blocks/valentines/bricks.png and /dev/null differ diff --git a/src/main/resources/assets/chisel/textures/blocks/voidstone/runes/runeBlack.png b/src/main/resources/assets/chisel/textures/blocks/voidstone/runes/runeBlack.png new file mode 100644 index 00000000..92b24348 Binary files /dev/null and b/src/main/resources/assets/chisel/textures/blocks/voidstone/runes/runeBlack.png differ diff --git a/src/main/resources/assets/chisel/textures/blocks/voidstone/runes/runeBlue.png b/src/main/resources/assets/chisel/textures/blocks/voidstone/runes/runeBlue.png new file mode 100644 index 00000000..84022b54 Binary files /dev/null and b/src/main/resources/assets/chisel/textures/blocks/voidstone/runes/runeBlue.png differ diff --git a/src/main/resources/assets/chisel/textures/blocks/voidstone/runes/runeBrown.png b/src/main/resources/assets/chisel/textures/blocks/voidstone/runes/runeBrown.png new file mode 100644 index 00000000..0a21e37f Binary files /dev/null and b/src/main/resources/assets/chisel/textures/blocks/voidstone/runes/runeBrown.png differ diff --git a/src/main/resources/assets/chisel/textures/blocks/voidstone/runes/runeCyan.png b/src/main/resources/assets/chisel/textures/blocks/voidstone/runes/runeCyan.png new file mode 100644 index 00000000..0c1ea76f Binary files /dev/null and b/src/main/resources/assets/chisel/textures/blocks/voidstone/runes/runeCyan.png differ diff --git a/src/main/resources/assets/chisel/textures/blocks/voidstone/runes/runeGray.png b/src/main/resources/assets/chisel/textures/blocks/voidstone/runes/runeGray.png new file mode 100644 index 00000000..abb2dcd2 Binary files /dev/null and b/src/main/resources/assets/chisel/textures/blocks/voidstone/runes/runeGray.png differ diff --git a/src/main/resources/assets/chisel/textures/blocks/voidstone/runes/runeGreen.png b/src/main/resources/assets/chisel/textures/blocks/voidstone/runes/runeGreen.png new file mode 100644 index 00000000..0b76c9d8 Binary files /dev/null and b/src/main/resources/assets/chisel/textures/blocks/voidstone/runes/runeGreen.png differ diff --git a/src/main/resources/assets/chisel/textures/blocks/voidstone/runes/runeLightBlue.png b/src/main/resources/assets/chisel/textures/blocks/voidstone/runes/runeLightBlue.png new file mode 100644 index 00000000..1f7b3b43 Binary files /dev/null and b/src/main/resources/assets/chisel/textures/blocks/voidstone/runes/runeLightBlue.png differ diff --git a/src/main/resources/assets/chisel/textures/blocks/voidstone/runes/runeLightGray.png b/src/main/resources/assets/chisel/textures/blocks/voidstone/runes/runeLightGray.png new file mode 100644 index 00000000..4cb75b60 Binary files /dev/null and b/src/main/resources/assets/chisel/textures/blocks/voidstone/runes/runeLightGray.png differ diff --git a/src/main/resources/assets/chisel/textures/blocks/voidstone/runes/runeLime.png b/src/main/resources/assets/chisel/textures/blocks/voidstone/runes/runeLime.png new file mode 100644 index 00000000..4bcacf7a Binary files /dev/null and b/src/main/resources/assets/chisel/textures/blocks/voidstone/runes/runeLime.png differ diff --git a/src/main/resources/assets/chisel/textures/blocks/voidstone/runes/runeMagenta.png b/src/main/resources/assets/chisel/textures/blocks/voidstone/runes/runeMagenta.png new file mode 100644 index 00000000..8dd2a4e4 Binary files /dev/null and b/src/main/resources/assets/chisel/textures/blocks/voidstone/runes/runeMagenta.png differ diff --git a/src/main/resources/assets/chisel/textures/blocks/voidstone/runes/runeOrange.png b/src/main/resources/assets/chisel/textures/blocks/voidstone/runes/runeOrange.png new file mode 100644 index 00000000..22f55ba9 Binary files /dev/null and b/src/main/resources/assets/chisel/textures/blocks/voidstone/runes/runeOrange.png differ diff --git a/src/main/resources/assets/chisel/textures/blocks/voidstone/runes/runePink.png b/src/main/resources/assets/chisel/textures/blocks/voidstone/runes/runePink.png new file mode 100644 index 00000000..f6c7c531 Binary files /dev/null and b/src/main/resources/assets/chisel/textures/blocks/voidstone/runes/runePink.png differ diff --git a/src/main/resources/assets/chisel/textures/blocks/voidstone/runes/runePurple.png b/src/main/resources/assets/chisel/textures/blocks/voidstone/runes/runePurple.png new file mode 100644 index 00000000..0354e696 Binary files /dev/null and b/src/main/resources/assets/chisel/textures/blocks/voidstone/runes/runePurple.png differ diff --git a/src/main/resources/assets/chisel/textures/blocks/voidstone/runes/runeRed.png b/src/main/resources/assets/chisel/textures/blocks/voidstone/runes/runeRed.png new file mode 100644 index 00000000..ee401194 Binary files /dev/null and b/src/main/resources/assets/chisel/textures/blocks/voidstone/runes/runeRed.png differ diff --git a/src/main/resources/assets/chisel/textures/blocks/voidstone/runes/runeYellow.png b/src/main/resources/assets/chisel/textures/blocks/voidstone/runes/runeYellow.png new file mode 100644 index 00000000..f4691ee0 Binary files /dev/null and b/src/main/resources/assets/chisel/textures/blocks/voidstone/runes/runeYellow.png differ diff --git a/src/main/resources/banner.jpg b/src/main/resources/banner.jpg new file mode 100644 index 00000000..4c1b6ce5 Binary files /dev/null and b/src/main/resources/banner.jpg differ diff --git a/src/main/resources/mcmod.info b/src/main/resources/mcmod.info index 76987e17..537f24c0 100644 --- a/src/main/resources/mcmod.info +++ b/src/main/resources/mcmod.info @@ -9,7 +9,7 @@ "updateUrl": "", "authorList": [ "AUTOMATIC_MAIDEN", "Pokefenn", "Cricket", "tterrag" ], "credits": "This mod uses a lot of textures from the Painterly pack: http://painterlypack.net/. Also one stone variation is designed to look like a block from Doku. Oh, and asie for porting the mod to 1.7.2. Oh wait and Drullkus for some wonderful art.", - "logoFile": "", + "logoFile": "/banner.jpg", "screenshots": [], "dependencies": [] }