diff --git a/build.gradle b/build.gradle index 2516e1a..1233802 100644 --- a/build.gradle +++ b/build.gradle @@ -11,7 +11,7 @@ apply plugin: 'net.minecraftforge.gradle.forge' //Only edit below this line, the above code adds and enables the necessary things for Forge to be setup. -version = "1.1.6" +version = "1.2.0" group = "shnupbups.tinkersaether" // http://maven.apache.org/guides/mini/guide-naming-conventions.html archivesBaseName = "tinkersaether" diff --git a/src/main/java/shnupbups/tinkersaether/TinkersAether.java b/src/main/java/shnupbups/tinkersaether/TinkersAether.java index a9a7f8e..593b37d 100644 --- a/src/main/java/shnupbups/tinkersaether/TinkersAether.java +++ b/src/main/java/shnupbups/tinkersaether/TinkersAether.java @@ -31,7 +31,7 @@ public class TinkersAether { public static final String modid = "tinkersaether"; public static final String name = "Tinkers Aether"; - public static final String version = "1.1.6"; + public static final String version = "1.2.0"; @Mod.Instance(modid) public static TinkersAether instance; @@ -69,6 +69,12 @@ public void init(FMLInitializationEvent event) { if(TAConfig.skyroot) { MiscUtils.displace(TinkerMaterials.wood.getIdentifier()); // Skyroot needs priority } + if(TAConfig.skyrootLeaf||TAConfig.goldenOakLeaf||TAConfig.crystalLeaf||TAConfig.holidayLeaf) { + MiscUtils.displace(TinkerMaterials.leaf.getIdentifier()); // Leaves need priority + } + if(TAConfig.goldenFeather) { + MiscUtils.displace(TinkerMaterials.feather.getIdentifier()); // Golden Feather needs priority + } } @Mod.EventHandler diff --git a/src/main/java/shnupbups/tinkersaether/config/TAConfig.java b/src/main/java/shnupbups/tinkersaether/config/TAConfig.java index ae9e083..0edfa31 100644 --- a/src/main/java/shnupbups/tinkersaether/config/TAConfig.java +++ b/src/main/java/shnupbups/tinkersaether/config/TAConfig.java @@ -30,7 +30,7 @@ public class TAConfig extends Configuration { @Config.Comment("Whether Golden Amber is enabled or not.") @Config.RequiresMcRestart - public static boolean goldenamber = true; + public static boolean goldenAmber = true; @Config.Comment("Whether Valkyrie Metal is enabled or not.") @Config.RequiresMcRestart @@ -42,7 +42,7 @@ public class TAConfig extends Configuration { @Config.Comment("Whether Candy Cane is enabled or not.") @Config.RequiresMcRestart - public static boolean candycane = true; + public static boolean candyCane = true; @Config.Comment("Whether Blue Aercloud is enabled or not.") @Config.RequiresMcRestart @@ -56,13 +56,41 @@ public class TAConfig extends Configuration { @Config.RequiresMcRestart public static boolean aercloudGold = true; + @Config.Comment("Whether Icestone is enabled or not.") + @Config.RequiresMcRestart + public static boolean icestone = true; + + @Config.Comment("Whether Skyroot Leaf is enabled or not.") + @Config.RequiresMcRestart + public static boolean skyrootLeaf = true; + + @Config.Comment("Whether Golden Oak Leaf is enabled or not.") + @Config.RequiresMcRestart + public static boolean goldenOakLeaf = true; + + @Config.Comment("Whether Holiday Leaf is enabled or not.") + @Config.RequiresMcRestart + public static boolean holidayLeaf = true; + + @Config.Comment("Whether Crystal Leaf is enabled or not.") + @Config.RequiresMcRestart + public static boolean crystalLeaf = true; + + @Config.Comment("Whether Golden Feather is enabled or not.") + @Config.RequiresMcRestart + public static boolean goldenFeather = true; + @Config.Comment("Whether Darts and Dart Shooters are enabled or not.") @Config.RequiresMcRestart public static boolean darts = true; @Config.Comment("Whether Gravitite can be used to make a tool forge.") - @Config.RequiresMcRestart - public static boolean gravititeForge = true; + @Config.RequiresMcRestart + public static boolean gravititeForge = true; + + @Config.Comment("Whether Gravitite Ore can be melted in the smeltery.") + @Config.RequiresMcRestart + public static boolean gravititeOreMelt = true; @Config.Comment("Whether Valkyrie Metal (if enabled) can be used to make a tool forge.") @Config.RequiresMcRestart diff --git a/src/main/java/shnupbups/tinkersaether/fluids/FluidHelper.java b/src/main/java/shnupbups/tinkersaether/fluids/FluidHelper.java index a505fd7..2bd77db 100644 --- a/src/main/java/shnupbups/tinkersaether/fluids/FluidHelper.java +++ b/src/main/java/shnupbups/tinkersaether/fluids/FluidHelper.java @@ -13,8 +13,8 @@ public static FluidMolten createFluid(Material material, int temperature) { fluid.setTemperature(temperature); FluidRegistry.registerFluid(fluid); BlockMolten blockFluid = new BlockMolten(fluid); - blockFluid.setUnlocalizedName(TinkersAether.modid+".molten_"+fluid.getName()); - blockFluid.setRegistryName(TinkersAether.modid+".molten_"+fluid.getName()); + blockFluid.setUnlocalizedName("molten_"+fluid.getName()); + blockFluid.setRegistryName("molten_"+fluid.getName()); ForgeRegistries.BLOCKS.register(blockFluid); FluidRegistry.addBucketForFluid(fluid); TinkersAether.proxy.registerFluidModels(fluid); diff --git a/src/main/java/shnupbups/tinkersaether/misc/OreDict.java b/src/main/java/shnupbups/tinkersaether/misc/OreDict.java index 4e09853..1f5e86e 100644 --- a/src/main/java/shnupbups/tinkersaether/misc/OreDict.java +++ b/src/main/java/shnupbups/tinkersaether/misc/OreDict.java @@ -7,21 +7,34 @@ public class OreDict { + private static final int WILDCARD = OreDictionary.WILDCARD_VALUE; + public static void register() { OreDictionary.registerOre("plankSkyroot", BlocksAether.skyroot_plank); - OreDictionary.registerOre("logSkyroot",BlocksAether.aether_log); - OreDictionary.registerOre("logSkyroot",new ItemStack(BlocksAether.aether_log,1,1)); + OreDictionary.registerOre("logSkyroot",new ItemStack(BlocksAether.aether_log,1,WILDCARD)); OreDictionary.registerOre("stickSkyroot", ItemsAether.skyroot_stick); + OreDictionary.registerOre("holystone",BlocksAether.holystone); + OreDictionary.registerOre("icestone",BlocksAether.icestone); + OreDictionary.registerOre("gemGoldenAmber",ItemsAether.golden_amber); + OreDictionary.registerOre("slimeball",ItemsAether.swetty_ball); OreDictionary.registerOre("slimeballSwet",ItemsAether.swetty_ball); - OreDictionary.registerOre("aercloud",new ItemStack(BlocksAether.aercloud,1,0)); + + OreDictionary.registerOre("aercloud",new ItemStack(BlocksAether.aercloud,1,WILDCARD)); OreDictionary.registerOre("aercloudCold",new ItemStack(BlocksAether.aercloud,1,0)); - OreDictionary.registerOre("aercloud",new ItemStack(BlocksAether.aercloud,1,1)); OreDictionary.registerOre("aercloudBlue",new ItemStack(BlocksAether.aercloud,1,1)); - OreDictionary.registerOre("aercloud",new ItemStack(BlocksAether.aercloud,1,2)); OreDictionary.registerOre("aercloudGold",new ItemStack(BlocksAether.aercloud,1,2)); + OreDictionary.registerOre("candyCane",ItemsAether.candy_cane); + + OreDictionary.registerOre("feather",ItemsAether.golden_feather); + OreDictionary.registerOre("featherGold",ItemsAether.golden_feather); + + OreDictionary.registerOre("treeLeavesSkyroot", new ItemStack(BlocksAether.aether_leaves, 1, 0)); + OreDictionary.registerOre("treeLeavesGoldenOak", new ItemStack(BlocksAether.aether_leaves, 1, 1)); + OreDictionary.registerOre("treeLeavesCrystal", new ItemStack(BlocksAether.crystal_leaves, 1, WILDCARD)); + OreDictionary.registerOre("treeLeavesHoliday", new ItemStack(BlocksAether.holiday_leaves, 1, WILDCARD)); } } diff --git a/src/main/java/shnupbups/tinkersaether/modules/ModuleBase.java b/src/main/java/shnupbups/tinkersaether/modules/ModuleBase.java index 24a6a23..fff5ee4 100644 --- a/src/main/java/shnupbups/tinkersaether/modules/ModuleBase.java +++ b/src/main/java/shnupbups/tinkersaether/modules/ModuleBase.java @@ -21,6 +21,7 @@ import shnupbups.tinkersaether.traits.*; import slimeknights.tconstruct.library.MaterialIntegration; import slimeknights.tconstruct.library.TinkerRegistry; +import slimeknights.tconstruct.library.events.TinkerRegisterEvent; import slimeknights.tconstruct.library.materials.*; import slimeknights.tconstruct.library.smeltery.CastingRecipe; import slimeknights.tconstruct.tools.TinkerTools; @@ -38,15 +39,22 @@ public ModuleBase() { public static final Material skyroot = Materials.mat("skyroot", 0x6C633E); public static final Material holystone = Materials.mat("holystone", 0xA8AAA8); - public static final Material goldenAmber = Materials.mat("goldenamber", 0xFFE41C); + public static final Material goldenAmber = Materials.mat("golden_amber", 0xFFE41C); public static final Material zanite = Materials.mat("zanite", 0x6611DD); public static final Material gravitite = Materials.mat("gravitite", 0xCC55AA); public static final Material valkyrie = Materials.mat("valkyrie", 0xEEEEDD); public static final Material swet = Materials.mat("swet", 0x29A6D9); - public static final Material candycane = Materials.mat("candycane", 0xFF3333); - public static final Material aercloudBlue = Materials.mat("aercloudBlue", 0x99B2C2); - public static final Material aercloudCold = Materials.mat("aercloudCold", 0xAAAAAA); - public static final Material aercloudGold = Materials.mat("aercloudGold", 0xFFF1A1); + public static final Material candyCane = Materials.mat("candy_cane", 0xFF3333); + public static final Material aercloudBlue = Materials.mat("aercloud_blue", 0x99B2C2); + public static final Material aercloudCold = Materials.mat("aercloud_cold", 0xAAAAAA); + public static final Material aercloudGold = Materials.mat("aercloud_gold", 0xFFF1A1); + public static final Material icestone = Materials.mat("icestone", 0x99999F); + + public static final Material skyrootLeaf = Materials.mat("skyroot_leaf", 0xBFFF5F); + public static final Material goldenOakLeaf = Materials.mat("golden_oak_leaf", 0xEAF84F); + public static final Material crystalLeaf = Materials.mat("crystal_leaf", 0x29AAD9); + public static final Material holidayLeaf = Materials.mat("holiday_leaf", 0xC7A0EB); + public static final Material goldenFeather = Materials.mat("golden_feather", 0xFFF25C); public static final TAItem valkyrieIngot = new TAItem("valkyrie_ingot").setBeaconPayment(); public static final TAItem valkyrieNugget = new TAItem("valkyrie_nugget"); @@ -68,7 +76,7 @@ public void preInit() { skyroot.addItem("stickSkyroot", 1, Material.VALUE_Shard); skyroot.addItem("plankSkyroot", 1, Material.VALUE_Ingot); skyroot.addItem("logSkyroot", 1, Material.VALUE_Ingot * 4); - skyroot.addTrait(Rooted.rooted, MaterialTypes.HEAD); + skyroot.addTrait(Skyrooted.skyrooted, MaterialTypes.HEAD); skyroot.addTrait(ecological, MaterialTypes.HEAD); skyroot.addTrait(ecological); MaterialIntegration skyrootMi = new MaterialIntegration(skyroot).setRepresentativeItem("plankSkyroot"); @@ -122,7 +130,7 @@ public void preInit() { TinkerRegistry.integrate(gravititeMi).preInit(); } - if(TAConfig.goldenamber) { + if(TAConfig.goldenAmber) { TinkerRegistry.addMaterialStats(goldenAmber, new HeadMaterialStats(300, 1.50f, 7.20f, STONE), new HandleMaterialStats(0.7f, 40), @@ -169,18 +177,18 @@ public void preInit() { TinkerRegistry.integrate(swetMi).preInit(); } - if(TAConfig.candycane) { - TinkerRegistry.addMaterialStats(candycane, + if(TAConfig.candyCane) { + TinkerRegistry.addMaterialStats(candyCane, new HeadMaterialStats(250, 2.5f, 5.0f, STONE), new HandleMaterialStats(1.2f, -120), new ExtraMaterialStats(120), TinkersAether.plzNo); - candycane.setCraftable(true).setCastable(false); - candycane.addItem("candyCane", 1, Material.VALUE_Ingot); - candycane.addTrait(Festive.festive); - candycane.addTrait(tasty); - MaterialIntegration candycaneMi = new MaterialIntegration(candycane).setRepresentativeItem("candyCane"); - TinkerRegistry.integrate(candycaneMi).preInit(); + candyCane.setCraftable(true).setCastable(false); + candyCane.addItem("candyCane", 1, Material.VALUE_Ingot); + candyCane.addTrait(Festive.festive); + candyCane.addTrait(tasty); + MaterialIntegration candyCaneMi = new MaterialIntegration(candyCane).setRepresentativeItem("candyCane"); + TinkerRegistry.integrate(candyCaneMi).preInit(); } if(TAConfig.aercloudCold) { @@ -224,6 +232,59 @@ public void preInit() { TinkerRegistry.integrate(aercloudGoldMi).preInit(); } + if(TAConfig.icestone) { + TinkerRegistry.addMaterialStats(icestone, + new HeadMaterialStats(250, 4.20f, 3.50f, IRON), + new HandleMaterialStats(0.50f, -20), + new ExtraMaterialStats(40), + TinkersAether.plzNo); + icestone.setCraftable(true).setCastable(false); + icestone.addItem("icestone", 1, Material.VALUE_Ingot); + icestone.addTrait(Refrigeration.refrigeration); + MaterialIntegration icestoneMi = new MaterialIntegration(icestone).setRepresentativeItem("icestone"); + TinkerRegistry.integrate(icestoneMi).preInit(); + } + + if(TAConfig.skyrootLeaf) { + TinkerRegistry.addMaterialStats(skyrootLeaf, new FletchingMaterialStats(0.5f, 1.6f)); + skyrootLeaf.setCraftable(true).setCastable(false); + skyrootLeaf.addItem("treeLeavesSkyroot", 1, Material.VALUE_Shard); + MaterialIntegration skyrootLeafMi = new MaterialIntegration(skyrootLeaf).setRepresentativeItem("treeLeavesSkyroot"); + TinkerRegistry.integrate(skyrootLeafMi).preInit(); + } + + if(TAConfig.goldenOakLeaf) { + TinkerRegistry.addMaterialStats(goldenOakLeaf, new FletchingMaterialStats(0.7f, 1.7f)); + goldenOakLeaf.setCraftable(true).setCastable(false); + goldenOakLeaf.addItem("treeLeavesGoldenOak", 1, Material.VALUE_Shard); + MaterialIntegration goldenOakLeafMi = new MaterialIntegration(goldenOakLeaf).setRepresentativeItem("treeLeavesGoldenOak"); + TinkerRegistry.integrate(goldenOakLeafMi).preInit(); + } + + if(TAConfig.crystalLeaf) { + TinkerRegistry.addMaterialStats(crystalLeaf, new FletchingMaterialStats(0.8f, 2f)); + crystalLeaf.setCraftable(true).setCastable(false); + crystalLeaf.addItem("treeLeavesCrystal", 1, Material.VALUE_Shard); + MaterialIntegration crystalLeafMi = new MaterialIntegration(crystalLeaf).setRepresentativeItem("treeLeavesCrystal"); + TinkerRegistry.integrate(crystalLeafMi).preInit(); + } + + if(TAConfig.holidayLeaf) { + TinkerRegistry.addMaterialStats(holidayLeaf, new FletchingMaterialStats(0.9f, 1.8f)); + holidayLeaf.setCraftable(true).setCastable(false); + holidayLeaf.addItem("treeLeavesHoliday", 1, Material.VALUE_Shard); + MaterialIntegration holidayLeafMi = new MaterialIntegration(holidayLeaf).setRepresentativeItem("treeLeavesHoliday"); + TinkerRegistry.integrate(holidayLeafMi).preInit(); + } + + if(TAConfig.goldenFeather) { + TinkerRegistry.addMaterialStats(goldenFeather, new FletchingMaterialStats(1.0f, 2f)); + goldenFeather.setCraftable(true).setCastable(false); + goldenFeather.addItem("featherGold", 1, Material.VALUE_Ingot); + MaterialIntegration goldenFeatherMi = new MaterialIntegration(goldenFeather).setRepresentativeItem("featherGold"); + TinkerRegistry.integrate(goldenFeatherMi).preInit(); + } + TinkersAether.logger.info("Base Module - Materials Registered"); TinkersAether.logger.info("Base Module - End PreInit"); @@ -247,6 +308,13 @@ public void postInit() { } } + @SubscribeEvent + public void disableOreSmelting(TinkerRegisterEvent.MeltingRegisterEvent event) { + if(event.getRecipe().input.getInputs().contains(MiscUtils.stackFromOreDict("oreGravitite"))) { + event.setCanceled(!TAConfig.gravititeOreMelt); + } + } + @SubscribeEvent public void registerRecipes(RegistryEvent.Register event) { IForgeRegistry registry = event.getRegistry(); diff --git a/src/main/java/shnupbups/tinkersaether/traits/Antigrav.java b/src/main/java/shnupbups/tinkersaether/traits/Antigrav.java index f18bb3e..8a23411 100644 --- a/src/main/java/shnupbups/tinkersaether/traits/Antigrav.java +++ b/src/main/java/shnupbups/tinkersaether/traits/Antigrav.java @@ -2,7 +2,6 @@ import com.legacy.aether.entities.block.EntityFloatingBlock; import net.minecraft.item.ItemStack; -import net.minecraft.nbt.NBTTagCompound; import net.minecraft.util.math.BlockPos; import net.minecraft.world.World; import net.minecraftforge.common.ForgeHooks; @@ -10,11 +9,9 @@ import net.minecraftforge.event.entity.player.PlayerInteractEvent; import net.minecraftforge.fml.common.eventhandler.EventPriority; import net.minecraftforge.fml.common.eventhandler.SubscribeEvent; -import slimeknights.tconstruct.library.traits.AbstractTrait; -import slimeknights.tconstruct.library.utils.TagUtil; import slimeknights.tconstruct.library.utils.ToolHelper; -public class Antigrav extends AbstractTrait{ +public class Antigrav extends TATrait{ public static final Antigrav antigrav = new Antigrav(); public Antigrav() { @@ -24,7 +21,6 @@ public Antigrav() { @SubscribeEvent(priority = EventPriority.LOWEST) public void floatBlock(PlayerInteractEvent.RightClickBlock event) { - NBTTagCompound nbt = TagUtil.getTagSafe(event.getItemStack()); World world = event.getWorld(); BlockPos pos = event.getPos(); ItemStack heldItem = event.getItemStack(); @@ -34,7 +30,6 @@ public void floatBlock(PlayerInteractEvent.RightClickBlock event) { || !isToolWithTrait(heldItem) || ToolHelper.getCurrentDurability(event.getItemStack()) < 4) return; - EntityFloatingBlock entity = new EntityFloatingBlock(world, pos, world.getBlockState(pos)); if ((heldItem.getDestroySpeed(world.getBlockState(pos)) > 1.0f || ForgeHooks.isToolEffective(world, pos, heldItem)) && world.isAirBlock(pos.up())) { if (world.getTileEntity(pos) != null || world.getBlockState(pos).getBlockHardness(world, pos) == -1.0F) { return; diff --git a/src/main/java/shnupbups/tinkersaether/traits/Cushy.java b/src/main/java/shnupbups/tinkersaether/traits/Cushy.java index b3dab5e..0672181 100644 --- a/src/main/java/shnupbups/tinkersaether/traits/Cushy.java +++ b/src/main/java/shnupbups/tinkersaether/traits/Cushy.java @@ -4,10 +4,9 @@ import net.minecraft.init.Enchantments; import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; -import slimeknights.tconstruct.library.traits.AbstractTrait; import slimeknights.tconstruct.library.utils.ToolBuilder; -public class Cushy extends AbstractTrait { +public class Cushy extends TATrait { public static final Cushy cushy = new Cushy(); public Cushy() { diff --git a/src/main/java/shnupbups/tinkersaether/traits/Enlightened.java b/src/main/java/shnupbups/tinkersaether/traits/Enlightened.java index de2b5f4..466cf92 100644 --- a/src/main/java/shnupbups/tinkersaether/traits/Enlightened.java +++ b/src/main/java/shnupbups/tinkersaether/traits/Enlightened.java @@ -7,9 +7,8 @@ import net.minecraft.item.ItemStack; import net.minecraft.util.math.BlockPos; import net.minecraft.world.World; -import slimeknights.tconstruct.library.traits.AbstractTrait; -public class Enlightened extends AbstractTrait { +public class Enlightened extends TATrait { public static final Enlightened enlightened = new Enlightened(); public Enlightened() { diff --git a/src/main/java/shnupbups/tinkersaether/traits/Festive.java b/src/main/java/shnupbups/tinkersaether/traits/Festive.java index 42ee515..0baedd0 100644 --- a/src/main/java/shnupbups/tinkersaether/traits/Festive.java +++ b/src/main/java/shnupbups/tinkersaether/traits/Festive.java @@ -7,9 +7,8 @@ import net.minecraft.item.ItemStack; import net.minecraft.util.math.BlockPos; import net.minecraft.world.World; -import slimeknights.tconstruct.library.traits.AbstractTrait; -public class Festive extends AbstractTrait { +public class Festive extends TATrait { public static final Festive festive = new Festive(); public Festive() { diff --git a/src/main/java/shnupbups/tinkersaether/traits/Gilded.java b/src/main/java/shnupbups/tinkersaether/traits/Gilded.java index a548991..02b5214 100644 --- a/src/main/java/shnupbups/tinkersaether/traits/Gilded.java +++ b/src/main/java/shnupbups/tinkersaether/traits/Gilded.java @@ -10,9 +10,8 @@ import net.minecraft.item.ItemStack; import net.minecraft.util.math.BlockPos; import net.minecraft.world.World; -import slimeknights.tconstruct.library.traits.AbstractTrait; -public class Gilded extends AbstractTrait { +public class Gilded extends TATrait { public static final Gilded gilded = new Gilded(); public Gilded() { diff --git a/src/main/java/shnupbups/tinkersaether/traits/Launching.java b/src/main/java/shnupbups/tinkersaether/traits/Launching.java index 082844e..c13cc15 100644 --- a/src/main/java/shnupbups/tinkersaether/traits/Launching.java +++ b/src/main/java/shnupbups/tinkersaether/traits/Launching.java @@ -4,9 +4,8 @@ import net.minecraft.entity.player.EntityPlayerMP; import net.minecraft.item.ItemStack; import net.minecraft.network.play.server.SPacketEntityVelocity; -import slimeknights.tconstruct.library.traits.AbstractTrait; -public class Launching extends AbstractTrait { +public class Launching extends TATrait { public static final Launching launching = new Launching(); diff --git a/src/main/java/shnupbups/tinkersaether/traits/Reach.java b/src/main/java/shnupbups/tinkersaether/traits/Reach.java index ad49ccb..abe8ffb 100644 --- a/src/main/java/shnupbups/tinkersaether/traits/Reach.java +++ b/src/main/java/shnupbups/tinkersaether/traits/Reach.java @@ -15,12 +15,11 @@ import net.minecraftforge.fml.relauncher.SideOnly; import shnupbups.tinkersaether.TinkersAether; import shnupbups.tinkersaether.network.MessageExtendedAttack; -import slimeknights.tconstruct.library.traits.AbstractTrait; import java.util.List; import java.util.UUID; -public class Reach extends AbstractTrait { +public class Reach extends TATrait { public static final Reach reach = new Reach(); public static final AttributeModifier reachModifier = new AttributeModifier(UUID.fromString("df6eabe7-6947-4a56-9099-002f90370708"), "Tinkers Aether Reach Modifier", 5.0D, 0); diff --git a/src/main/java/shnupbups/tinkersaether/traits/Refrigeration.java b/src/main/java/shnupbups/tinkersaether/traits/Refrigeration.java new file mode 100644 index 0000000..f784b6e --- /dev/null +++ b/src/main/java/shnupbups/tinkersaether/traits/Refrigeration.java @@ -0,0 +1,26 @@ +package shnupbups.tinkersaether.traits; + +import com.legacy.aether.api.AetherAPI; +import net.minecraft.item.ItemStack; +import net.minecraftforge.event.world.BlockEvent; + +import java.util.List; + +public class Refrigeration extends TATrait { + public static final Refrigeration refrigeration = new Refrigeration(); + + public Refrigeration() { + super("refrigeration",0x99999F); + } + + @Override + public void blockHarvestDrops(ItemStack tool, BlockEvent.HarvestDropsEvent event) { + List drops = event.getDrops(); + for(ItemStack i:drops) { + if(AetherAPI.getInstance().hasFreezable(i)) { + drops.set(drops.indexOf(i),AetherAPI.getInstance().getFreezable(i).getOutput()); + } + } + } + +} diff --git a/src/main/java/shnupbups/tinkersaether/traits/Rooted.java b/src/main/java/shnupbups/tinkersaether/traits/Skyrooted.java similarity index 85% rename from src/main/java/shnupbups/tinkersaether/traits/Rooted.java rename to src/main/java/shnupbups/tinkersaether/traits/Skyrooted.java index 0ba48b7..881f0c8 100644 --- a/src/main/java/shnupbups/tinkersaether/traits/Rooted.java +++ b/src/main/java/shnupbups/tinkersaether/traits/Skyrooted.java @@ -11,19 +11,17 @@ import net.minecraft.util.math.BlockPos; import net.minecraft.world.World; import net.minecraftforge.common.ForgeHooks; -import slimeknights.tconstruct.library.traits.AbstractTrait; -public class Rooted extends AbstractTrait { - public static final Rooted rooted = new Rooted(); +public class Skyrooted extends TATrait { + public static final Skyrooted skyrooted = new Skyrooted(); - public Rooted() { - super("rooted",0x6C633E); + public Skyrooted() { + super("skyrooted",0x6C633E); } @Override public void afterBlockBreak(ItemStack tool, World world, IBlockState state, BlockPos pos, EntityLivingBase entity, boolean wasEffective) { if(entity instanceof EntityPlayer) { - EntityPlayer player = (EntityPlayer)entity; if(tool.getDestroySpeed(world.getBlockState(pos)) > 1.0f || ForgeHooks.isToolEffective(world, pos, tool)) { if(state.getProperties().containsKey(PropertyBool.create(Aether.doubleDropNotifier()))) { boolean dropDouble = state.getValue(PropertyBool.create(Aether.doubleDropNotifier())).equals(true); diff --git a/src/main/java/shnupbups/tinkersaether/traits/Swetty.java b/src/main/java/shnupbups/tinkersaether/traits/Swetty.java index 96e2f87..a3091ad 100644 --- a/src/main/java/shnupbups/tinkersaether/traits/Swetty.java +++ b/src/main/java/shnupbups/tinkersaether/traits/Swetty.java @@ -6,9 +6,8 @@ import net.minecraft.item.ItemStack; import net.minecraft.util.math.BlockPos; import net.minecraft.world.World; -import slimeknights.tconstruct.library.traits.AbstractTrait; -public class Swetty extends AbstractTrait { +public class Swetty extends TATrait { public static final Swetty swetty = new Swetty(); diff --git a/src/main/java/shnupbups/tinkersaether/traits/TATrait.java b/src/main/java/shnupbups/tinkersaether/traits/TATrait.java new file mode 100644 index 0000000..7d139b2 --- /dev/null +++ b/src/main/java/shnupbups/tinkersaether/traits/TATrait.java @@ -0,0 +1,10 @@ +package shnupbups.tinkersaether.traits; + +import slimeknights.tconstruct.library.traits.AbstractTrait; + +public abstract class TATrait extends AbstractTrait { + + public TATrait(String name, int colour) { + super(name, colour); + } +} diff --git a/src/main/java/shnupbups/tinkersaether/traits/Zany.java b/src/main/java/shnupbups/tinkersaether/traits/Zany.java index b5a3aef..ae79298 100644 --- a/src/main/java/shnupbups/tinkersaether/traits/Zany.java +++ b/src/main/java/shnupbups/tinkersaether/traits/Zany.java @@ -6,12 +6,11 @@ import net.minecraftforge.event.entity.player.PlayerEvent; import shnupbups.tinkersaether.misc.MiscUtils; import slimeknights.tconstruct.library.Util; -import slimeknights.tconstruct.library.traits.AbstractTrait; import slimeknights.tconstruct.library.utils.ToolHelper; import java.util.List; -public class Zany extends AbstractTrait { +public class Zany extends TATrait { public static final Zany zany = new Zany(); public Zany() { diff --git a/src/main/resources/assets/tinkersaether/lang/en_us.lang b/src/main/resources/assets/tinkersaether/lang/en_us.lang index 8a9b0a3..c7ae17a 100644 --- a/src/main/resources/assets/tinkersaether/lang/en_us.lang +++ b/src/main/resources/assets/tinkersaether/lang/en_us.lang @@ -2,13 +2,20 @@ material.gravitite.name=Gravitite material.zanite.name=Zanite material.skyroot.name=Skyroot material.holystone.name=Holystone -material.goldenamber.name=Golden Amber +material.golden_amber.name=Golden Amber material.valkyrie.name=Valkyrie material.swet.name=Swet -material.candycane.name=Candy Cane -material.aercloudblue.name=Blue Aercloud -material.aercloudcold.name=Cold Aercloud -material.aercloudgold.name=Golden Aercloud +material.candy_cane.name=Candy Cane +material.aercloud_blue.name=Blue Aercloud +material.aercloud_cold.name=Cold Aercloud +material.aercloud_gold.name=Golden Aercloud +material.icestone.name=Icestone + +material.skyroot_leaf.name=Skyroot Leaf +material.golden_oak_leaf.name=Golden Oak Leaf +material.crystal_leaf.name=Crystal Leaf +material.holiday_leaf.name=Holiday Leaf +material.golden_feather.name=Golden Feather fluid.gravitite.name=Molten Gravitite fluid.valkyrie.name=Molten Valkyrie Metal @@ -34,8 +41,8 @@ modifier.launching.name=Launching modifier.launching.desc=§oUppercut!§r\nLaunches attacked creatures high into the air. modifier.enlightened.name=Enlightened modifier.enlightened.desc=§oThe gods' favourite snack.§r\nGrants a 5% chance for blocks to drop Ambrosium shards. -modifier.rooted.name=Rooted -modifier.rooted.desc=§oFirst ones double.§r\nExtra drops from naturally generated Aether blocks. +modifier.skyrooted.name=Skyrooted +modifier.skyrooted.desc=§oFirst ones double.§r\nExtra drops from naturally generated Aether blocks. modifier.zany.name=Zany modifier.zany.desc=§oEntropy powered speed.§r\nThe tool mines considerably faster as it wears out. modifier.zany.extra=Zany Speed: x%s @@ -49,5 +56,7 @@ modifier.festive.name=Festive modifier.festive.desc=§oCandy canes!§r\nLick them in a spear and kill your enemies. modifier.cushy.name=Cushy modifier.cushy.desc=§oLike a cushion.§r\nSilky, but doesn't hurt much. +modifier.refrigeration.name=Refrigeration +modifier.refrigeration.desc=§oA freezer in tool form!§r\nHarvested blocks get frozen. tinkersaether.config.title=Tinker's Aether Configuration \ No newline at end of file diff --git a/src/main/resources/assets/tinkersaether/materials/candy_cane.json b/src/main/resources/assets/tinkersaether/materials/candy_cane.json new file mode 100644 index 0000000..e80043e --- /dev/null +++ b/src/main/resources/assets/tinkersaether/materials/candy_cane.json @@ -0,0 +1,6 @@ +{ + "type": "block", + "parameters": { + "texture": "tinkersaether:materials/candy_cane" + } +} \ No newline at end of file diff --git a/src/main/resources/assets/tinkersaether/materials/candycane.json b/src/main/resources/assets/tinkersaether/materials/candycane.json deleted file mode 100644 index 6883dfe..0000000 --- a/src/main/resources/assets/tinkersaether/materials/candycane.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "type": "block", - "parameters": { - "texture": "tinkersaether:materials/candycane" - } -} \ No newline at end of file diff --git a/src/main/resources/assets/tinkersaether/materials/crystal_leaf.json b/src/main/resources/assets/tinkersaether/materials/crystal_leaf.json new file mode 100644 index 0000000..e5e680b --- /dev/null +++ b/src/main/resources/assets/tinkersaether/materials/crystal_leaf.json @@ -0,0 +1,7 @@ +{ + "type": "colored", + "suffix": "feather", + "parameters": { + "color": "29AAD9" + } +} \ No newline at end of file diff --git a/src/main/resources/assets/tinkersaether/materials/golden_feather.json b/src/main/resources/assets/tinkersaether/materials/golden_feather.json new file mode 100644 index 0000000..cbff769 --- /dev/null +++ b/src/main/resources/assets/tinkersaether/materials/golden_feather.json @@ -0,0 +1,7 @@ +{ + "type": "colored", + "suffix": "feather", + "parameters": { + "color": "FFF25C" + } +} \ No newline at end of file diff --git a/src/main/resources/assets/tinkersaether/materials/golden_oak_leaf.json b/src/main/resources/assets/tinkersaether/materials/golden_oak_leaf.json new file mode 100644 index 0000000..656e42d --- /dev/null +++ b/src/main/resources/assets/tinkersaether/materials/golden_oak_leaf.json @@ -0,0 +1,7 @@ +{ + "type": "colored", + "suffix": "feather", + "parameters": { + "color": "EAF84F" + } +} \ No newline at end of file diff --git a/src/main/resources/assets/tinkersaether/materials/holiday_leaf.json b/src/main/resources/assets/tinkersaether/materials/holiday_leaf.json new file mode 100644 index 0000000..4d2dca1 --- /dev/null +++ b/src/main/resources/assets/tinkersaether/materials/holiday_leaf.json @@ -0,0 +1,7 @@ +{ + "type": "colored", + "suffix": "feather", + "parameters": { + "color": "DED4FF" + } +} \ No newline at end of file diff --git a/src/main/resources/assets/tinkersaether/materials/skyroot_leaf.json b/src/main/resources/assets/tinkersaether/materials/skyroot_leaf.json new file mode 100644 index 0000000..06ce031 --- /dev/null +++ b/src/main/resources/assets/tinkersaether/materials/skyroot_leaf.json @@ -0,0 +1,7 @@ +{ + "type": "colored", + "suffix": "feather", + "parameters": { + "color": "BFFF5F" + } +} \ No newline at end of file diff --git a/src/main/resources/assets/tinkersaether/textures/materials/candycane.png b/src/main/resources/assets/tinkersaether/textures/materials/candy_cane.png similarity index 100% rename from src/main/resources/assets/tinkersaether/textures/materials/candycane.png rename to src/main/resources/assets/tinkersaether/textures/materials/candy_cane.png diff --git a/src/main/resources/mcmod.info b/src/main/resources/mcmod.info index 77a76b4..13f65e8 100644 --- a/src/main/resources/mcmod.info +++ b/src/main/resources/mcmod.info @@ -3,7 +3,7 @@ "modid": "tinkersaether", "name": "Tinker's Aether", "description": "Adds Aether materials and stuff to Tinker's Construct.", - "version": "1.1.6", + "version": "1.2.0", "mcversion": "${mcversion}", "url": "", "updateUrl": "",