Skip to content

Commit

Permalink
Version 1.2.0
Browse files Browse the repository at this point in the history
- Changed Rooted to Skyrooted, fixing compatiblilty with Tinker's
Defense.
- Added Icestone, with 'Refrigeration' trait, like autosmelt but for the
freezer instead of furnace
- Added various fletching materials, namely Skyroot Leaf, Golden Oak
Leaf, Holiday Leaf, Crystal Leaf and Golden Feather
- Made some internal things more consistent
- Fixed names of fluids
- Added ability to disable melting of Gravitite Ore in the Smeltery, if
pack makers want to force use of the Enchanter
- Tweaked some colours
  • Loading branch information
Shnupbups committed Aug 31, 2018
1 parent 8e2e80e commit 2d23d42
Show file tree
Hide file tree
Showing 28 changed files with 250 additions and 70 deletions.
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -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"

Expand Down
8 changes: 7 additions & 1 deletion src/main/java/shnupbups/tinkersaether/TinkersAether.java
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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
Expand Down
36 changes: 32 additions & 4 deletions src/main/java/shnupbups/tinkersaether/config/TAConfig.java
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand All @@ -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
Expand Down
4 changes: 2 additions & 2 deletions src/main/java/shnupbups/tinkersaether/fluids/FluidHelper.java
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
23 changes: 18 additions & 5 deletions src/main/java/shnupbups/tinkersaether/misc/OreDict.java
Original file line number Diff line number Diff line change
Expand Up @@ -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));
}
}
98 changes: 83 additions & 15 deletions src/main/java/shnupbups/tinkersaether/modules/ModuleBase.java
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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");
Expand All @@ -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");
Expand Down Expand Up @@ -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),
Expand Down Expand Up @@ -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) {
Expand Down Expand Up @@ -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");
Expand All @@ -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<IRecipe> event) {
IForgeRegistry<IRecipe> registry = event.getRegistry();
Expand Down
7 changes: 1 addition & 6 deletions src/main/java/shnupbups/tinkersaether/traits/Antigrav.java
Original file line number Diff line number Diff line change
Expand Up @@ -2,19 +2,16 @@

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;
import net.minecraftforge.common.MinecraftForge;
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() {
Expand All @@ -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();
Expand All @@ -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;
Expand Down
3 changes: 1 addition & 2 deletions src/main/java/shnupbups/tinkersaether/traits/Cushy.java
Original file line number Diff line number Diff line change
Expand Up @@ -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() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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() {
Expand Down
3 changes: 1 addition & 2 deletions src/main/java/shnupbups/tinkersaether/traits/Festive.java
Original file line number Diff line number Diff line change
Expand Up @@ -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() {
Expand Down
3 changes: 1 addition & 2 deletions src/main/java/shnupbups/tinkersaether/traits/Gilded.java
Original file line number Diff line number Diff line change
Expand Up @@ -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() {
Expand Down
3 changes: 1 addition & 2 deletions src/main/java/shnupbups/tinkersaether/traits/Launching.java
Original file line number Diff line number Diff line change
Expand Up @@ -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();

Expand Down
Loading

0 comments on commit 2d23d42

Please sign in to comment.