diff --git a/src/main/java/mrthomas20121/tinkers_reforged/Tools/SwordGladius.java b/src/main/java/mrthomas20121/tinkers_reforged/Tools/SwordGladius.java index 2ad41013..48d3edb5 100644 --- a/src/main/java/mrthomas20121/tinkers_reforged/Tools/SwordGladius.java +++ b/src/main/java/mrthomas20121/tinkers_reforged/Tools/SwordGladius.java @@ -1,4 +1,4 @@ -package mrthomas20121.tinkers_reforged.Tools; +package mrthomas20121.tinkers_reforged.tools; import net.minecraft.entity.Entity; import net.minecraft.entity.EntityLivingBase; diff --git a/src/main/java/mrthomas20121/tinkers_reforged/Tools/SwordGreatSword.java b/src/main/java/mrthomas20121/tinkers_reforged/Tools/SwordGreatSword.java index d971a9f3..75f0ca9f 100644 --- a/src/main/java/mrthomas20121/tinkers_reforged/Tools/SwordGreatSword.java +++ b/src/main/java/mrthomas20121/tinkers_reforged/Tools/SwordGreatSword.java @@ -1,6 +1,6 @@ -package mrthomas20121.tinkers_reforged.Tools; +package mrthomas20121.tinkers_reforged.tools; -import mrthomas20121.tinkers_reforged.Module.ModuleTools; +import mrthomas20121.tinkers_reforged.modules.ModuleTools; import net.minecraft.entity.Entity; import net.minecraft.entity.EntityLivingBase; import net.minecraft.entity.player.EntityPlayer; diff --git a/src/main/java/mrthomas20121/tinkers_reforged/Tools/SwordKhopesh.java b/src/main/java/mrthomas20121/tinkers_reforged/Tools/SwordKhopesh.java index 72dfcb63..44ff9764 100644 --- a/src/main/java/mrthomas20121/tinkers_reforged/Tools/SwordKhopesh.java +++ b/src/main/java/mrthomas20121/tinkers_reforged/Tools/SwordKhopesh.java @@ -1,6 +1,6 @@ -package mrthomas20121.tinkers_reforged.Tools; +package mrthomas20121.tinkers_reforged.tools; -import mrthomas20121.tinkers_reforged.Module.ModuleTools; +import mrthomas20121.tinkers_reforged.modules.ModuleTools; import net.minecraft.entity.Entity; import net.minecraft.entity.EntityLivingBase; import net.minecraft.entity.player.EntityPlayer; diff --git a/src/main/java/mrthomas20121/tinkers_reforged/Tools/ToolClub.java b/src/main/java/mrthomas20121/tinkers_reforged/Tools/ToolClub.java index f6e00f77..94f86af1 100644 --- a/src/main/java/mrthomas20121/tinkers_reforged/Tools/ToolClub.java +++ b/src/main/java/mrthomas20121/tinkers_reforged/Tools/ToolClub.java @@ -1,6 +1,6 @@ -package mrthomas20121.tinkers_reforged.Tools; +package mrthomas20121.tinkers_reforged.tools; -import mrthomas20121.tinkers_reforged.Module.ModuleTools; +import mrthomas20121.tinkers_reforged.modules.ModuleTools; import net.minecraft.entity.Entity; import net.minecraft.entity.EntityLivingBase; import net.minecraft.entity.player.EntityPlayer; diff --git a/src/main/java/mrthomas20121/tinkers_reforged/Tools/ToolRunicKnife.java b/src/main/java/mrthomas20121/tinkers_reforged/Tools/ToolRunicKnife.java index 17840d42..553aab29 100644 --- a/src/main/java/mrthomas20121/tinkers_reforged/Tools/ToolRunicKnife.java +++ b/src/main/java/mrthomas20121/tinkers_reforged/Tools/ToolRunicKnife.java @@ -1,4 +1,4 @@ -package mrthomas20121.tinkers_reforged.Tools; +package mrthomas20121.tinkers_reforged.tools; import epicsquid.mysticallib.util.ItemUtil; import epicsquid.roots.config.MossConfig; diff --git a/src/main/java/mrthomas20121/tinkers_reforged/Traits/TraitCarbon.java b/src/main/java/mrthomas20121/tinkers_reforged/Traits/TraitCarbon.java index deaa6a6b..b73cad39 100644 --- a/src/main/java/mrthomas20121/tinkers_reforged/Traits/TraitCarbon.java +++ b/src/main/java/mrthomas20121/tinkers_reforged/Traits/TraitCarbon.java @@ -18,7 +18,7 @@ public void afterBlockBreak(ItemStack tool, World world, IBlockState state, Bloc if(this.isToolWithTrait(tool)) { NBTTagCompound nbt = tool.getTagCompound(); int durability = nbt.getInteger("Durability"); - nbt.setInteger("Durability", durability+1); + nbt.setInteger("Durability", durability+10); } } } \ No newline at end of file diff --git a/src/main/java/mrthomas20121/tinkers_reforged/Traits/TraitEnderfestation.java b/src/main/java/mrthomas20121/tinkers_reforged/Traits/TraitEnderfestation.java index c8bdae44..24d37969 100644 --- a/src/main/java/mrthomas20121/tinkers_reforged/Traits/TraitEnderfestation.java +++ b/src/main/java/mrthomas20121/tinkers_reforged/Traits/TraitEnderfestation.java @@ -7,11 +7,13 @@ import net.minecraft.util.math.BlockPos; import net.minecraft.world.World; import net.minecraft.world.WorldServer; +import slimeknights.tconstruct.library.modifiers.ModifierAspect; import slimeknights.tconstruct.library.traits.AbstractTrait; public class TraitEnderfestation extends AbstractTrait { public TraitEnderfestation() { super("enderfestation", 0x1D3D37); + this.aspects.add(ModifierAspect.harvestOnly); } @Override diff --git a/src/main/java/mrthomas20121/tinkers_reforged/Traits/TraitFey.java b/src/main/java/mrthomas20121/tinkers_reforged/Traits/TraitFey.java new file mode 100644 index 00000000..19d95239 --- /dev/null +++ b/src/main/java/mrthomas20121/tinkers_reforged/Traits/TraitFey.java @@ -0,0 +1,30 @@ +package mrthomas20121.tinkers_reforged.Traits; + +import net.minecraft.entity.EntityLivingBase; +import net.minecraft.item.ItemStack; +import net.minecraftforge.event.entity.player.PlayerEvent; +import slimeknights.tconstruct.library.modifiers.ModifierAspect; +import slimeknights.tconstruct.library.traits.AbstractTraitLeveled; + +public class TraitFey extends AbstractTraitLeveled { + private int boost = 2; + public TraitFey() + { + super("ref_fey", 0x67AFAF, 3, 0); + this.aspects.add(ModifierAspect.harvestOnly); + } + @Override + public void miningSpeed(ItemStack tool, PlayerEvent.BreakSpeed event) { + float originalSpeed = event.getOriginalSpeed(); + event.setNewSpeed(originalSpeed+ (boost+levels) ); + } + @Override + public float damage(ItemStack tool, EntityLivingBase player, EntityLivingBase target, float damage, float newDamage, boolean isCritical) { + return newDamage+ (boost+levels); + } + + @Override + public int onToolHeal(ItemStack tool, int amount, int newAmount, EntityLivingBase entity) { + return newAmount+ (boost+levels); + } +} diff --git a/src/main/java/mrthomas20121/tinkers_reforged/Traits/TraitLiving.java b/src/main/java/mrthomas20121/tinkers_reforged/Traits/TraitLiving.java new file mode 100644 index 00000000..3445b83b --- /dev/null +++ b/src/main/java/mrthomas20121/tinkers_reforged/Traits/TraitLiving.java @@ -0,0 +1,18 @@ +package mrthomas20121.tinkers_reforged.Traits; + +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.item.ItemStack; +import net.minecraftforge.event.entity.living.LivingHurtEvent; +import slimeknights.tconstruct.library.traits.AbstractTrait; + +public class TraitLiving extends AbstractTrait { + public TraitLiving() + { + super("ref_living", 0x0); + } + + @Override + public void onBlock(ItemStack tool, EntityPlayer player, LivingHurtEvent event) { + if(player.getHealth() != player.getMaxHealth()) player.heal(2); + } +} diff --git a/src/main/java/mrthomas20121/tinkers_reforged/Traits/TraitManaBoost.java b/src/main/java/mrthomas20121/tinkers_reforged/Traits/TraitManaBoost.java new file mode 100644 index 00000000..3d0d9e76 --- /dev/null +++ b/src/main/java/mrthomas20121/tinkers_reforged/Traits/TraitManaBoost.java @@ -0,0 +1,53 @@ +package mrthomas20121.tinkers_reforged.Traits; + +import baubles.api.BaublesApi; +import baubles.api.cap.IBaublesItemHandler; +import net.minecraft.entity.EntityLivingBase; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.item.ItemStack; +import net.minecraft.util.NonNullList; +import slimeknights.tconstruct.library.traits.AbstractTrait; +import slimeknights.tconstruct.library.utils.ToolHelper; +import vazkii.botania.api.mana.ManaItemHandler; + +public class TraitManaBoost extends AbstractTrait { + public TraitManaBoost() + { + super("ref_mana_boost", 0x0); + } + + @Override + public float damage(ItemStack tool, EntityLivingBase player, EntityLivingBase target, float damage, float newDamage, boolean isCritical) { + + int tempDamage = 0; + + if(player instanceof EntityPlayer) + { + EntityPlayer entityPlayer = (EntityPlayer)player; + IBaublesItemHandler baubleInv = BaublesApi.getBaublesHandler(entityPlayer);; + NonNullList manaStacks = entityPlayer.inventory.mainInventory; + for(ItemStack manaStack: manaStacks) + { + if(tool.isItemDamaged()) + { + if(ManaItemHandler.requestManaExact(manaStack, entityPlayer, tool.getMaxDamage(), true)) tempDamage = 15; + } + } + int size = baubleInv.getSlots(); + for(int slot = 0; slot < size; slot++) + { + ItemStack stackInSlot = baubleInv.getStackInSlot(slot); + if(!stackInSlot.isEmpty()) + { + if(tool.isItemDamaged() && tempDamage == 0) + { + if(ManaItemHandler.requestManaExact(stackInSlot, entityPlayer, tool.getMaxDamage(), true)) tempDamage = 15; + } + } + + } + } + if(tempDamage > 0) return newDamage+tempDamage; + return newDamage; + } +} diff --git a/src/main/java/mrthomas20121/tinkers_reforged/Traits/TraitManaInfusion.java b/src/main/java/mrthomas20121/tinkers_reforged/Traits/TraitManaInfusion.java new file mode 100644 index 00000000..6881623a --- /dev/null +++ b/src/main/java/mrthomas20121/tinkers_reforged/Traits/TraitManaInfusion.java @@ -0,0 +1,55 @@ +package mrthomas20121.tinkers_reforged.Traits; + +import baubles.api.BaublesApi; +import baubles.api.cap.IBaublesItemHandler; +import net.minecraft.entity.Entity; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.item.ItemStack; +import net.minecraft.util.NonNullList; +import net.minecraft.world.World; +import slimeknights.tconstruct.library.traits.AbstractTrait; +import slimeknights.tconstruct.library.utils.ToolHelper; +import vazkii.botania.api.mana.ManaItemHandler; + +import java.util.List; + +public class TraitManaInfusion extends AbstractTrait { + public TraitManaInfusion() + { + super("ref_mana_infusion", 0x0); + } + + @Override + public void onUpdate(ItemStack tool, World world, Entity entity, int itemSlot, boolean isSelected) { + if(isSelected) + { + if(entity instanceof EntityPlayer) + { + EntityPlayer player = (EntityPlayer)entity; + IBaublesItemHandler baubleInv = BaublesApi.getBaublesHandler(player);; + NonNullList manaStacks = player.inventory.mainInventory; + for(ItemStack manaStack: manaStacks) + { + if(tool.isItemDamaged()) + { + if(ManaItemHandler.requestManaExact(manaStack, player, 100, true)) ToolHelper.repairTool(tool, 10); + } + } + int size = baubleInv.getSlots(); + for(int slot = 0; slot < size; slot++) + { + ItemStack stackInSlot = baubleInv.getStackInSlot(slot); + if(!stackInSlot.isEmpty()) + { + if(tool.isItemDamaged()) + { + if(ManaItemHandler.requestManaExact(stackInSlot, player, 100, true)) ToolHelper.repairTool(tool, 10); + } + } + + } + + } + } + } +} diff --git a/src/main/java/mrthomas20121/tinkers_reforged/Traits/Traits.java b/src/main/java/mrthomas20121/tinkers_reforged/Traits/Traits.java index 62a682ca..0918bf12 100644 --- a/src/main/java/mrthomas20121/tinkers_reforged/Traits/Traits.java +++ b/src/main/java/mrthomas20121/tinkers_reforged/Traits/Traits.java @@ -24,26 +24,8 @@ public class Traits { public static final TraitRose rose = new TraitRose(); public static final TraitCarbon carbon = new TraitCarbon(); public static final TraitCurse curse = new TraitCurse(); - - public static void preInit() { - MaterialBuilder.registerTrait(ender); - MaterialBuilder.registerTrait(enderfestation); - MaterialBuilder.registerTrait(signal); - MaterialBuilder.registerTrait(light); - MaterialBuilder.registerTrait(astral); - MaterialBuilder.registerTrait(AURA_INFUSION); - MaterialBuilder.registerTrait(radioactive); - MaterialBuilder.registerTrait(nuclearwaste); - MaterialBuilder.registerTrait(life_steal); - MaterialBuilder.registerTrait(pyromancy); - MaterialBuilder.registerTrait(refined); - MaterialBuilder.registerTrait(flux); - MaterialBuilder.registerTrait(starshaped); - MaterialBuilder.registerTrait(void_trait); - MaterialBuilder.registerTrait(starry_night); - MaterialBuilder.registerTrait(villager_love); - MaterialBuilder.registerTrait(rose); - MaterialBuilder.registerTrait(carbon); - MaterialBuilder.registerTrait(curse); - } + public static final TraitFey fey = new TraitFey(); + public static final TraitManaInfusion traitManaInfusion = new TraitManaInfusion(); + public static final TraitManaBoost traitManaBoost = new TraitManaBoost(); + public static final TraitLiving traitLiving = new TraitLiving(); } diff --git a/src/main/java/mrthomas20121/tinkers_reforged/proxy/ClientProxy.java b/src/main/java/mrthomas20121/tinkers_reforged/proxy/ClientProxy.java index bd166d08..6a51eb23 100644 --- a/src/main/java/mrthomas20121/tinkers_reforged/proxy/ClientProxy.java +++ b/src/main/java/mrthomas20121/tinkers_reforged/proxy/ClientProxy.java @@ -1,17 +1,18 @@ package mrthomas20121.tinkers_reforged.proxy; -import mrthomas20121.tinkers_reforged.Client.TinkerBookTransformer; -import mrthomas20121.tinkers_reforged.Module.Materials; -import mrthomas20121.tinkers_reforged.Module.ModuleFluids; -import mrthomas20121.tinkers_reforged.Module.ModuleItems; -import mrthomas20121.tinkers_reforged.Module.Modules; +import mrthomas20121.tinkers_reforged.client.ModifiersTransformer; +import mrthomas20121.tinkers_reforged.client.ToolsTransformer; +import mrthomas20121.tinkers_reforged.modules.*; import mrthomas20121.tinkers_reforged.TinkersReforged; +import mrthomas20121.tinkers_reforged.resources.Resource; +import mrthomas20121.tinkers_reforged.resources.Resources; import net.minecraft.block.state.IBlockState; import net.minecraft.client.renderer.block.model.ModelResourceLocation; import net.minecraft.client.renderer.block.statemap.StateMapperBase; import net.minecraft.item.Item; import net.minecraft.item.ItemBlock; +import net.minecraft.util.ResourceLocation; import net.minecraftforge.client.event.ModelRegistryEvent; import net.minecraftforge.client.model.ModelLoader; import net.minecraftforge.fml.common.Mod; @@ -22,8 +23,10 @@ import net.minecraftforge.fml.relauncher.Side; import net.minecraftforge.fml.relauncher.SideOnly; import slimeknights.tconstruct.common.ModelRegisterUtil; +import slimeknights.tconstruct.library.TinkerRegistryClient; import slimeknights.tconstruct.library.book.TinkerBook; -import slimeknights.tconstruct.library.materials.Material; +import slimeknights.tconstruct.library.client.ToolBuildGuiInfo; +import slimeknights.tconstruct.library.modifiers.IModifier; import slimeknights.tconstruct.library.tools.IToolPart; import slimeknights.tconstruct.library.tools.ToolCore; @@ -38,25 +41,72 @@ public void preInit(FMLPreInitializationEvent e) { @Override public void init(FMLInitializationEvent e) { - this.registerBookData(); - Modules.tools.init(e); } @SideOnly(Side.CLIENT) @Override public void postInit(FMLPostInitializationEvent event) { - TinkersReforged.logger.info("Client Stuff"); - for (Material mat : Materials.mats) { - mat.setRenderInfo(mat.materialTextColor); + for (Resource resource : Resources.materials) { + if(!resource.getName().equals("kovar")) resource.builder().getMat().setRenderInfo(resource.getColor()); } } @Override public void registerToolPartModel(T part) { ModelRegisterUtil.registerPartModel(part); } + @Override + public void registerModifierModel(IModifier mod, ResourceLocation rl) { + ModelRegisterUtil.registerModifierModel(mod, rl); + } + + @Override + public void registerToolCrafting() + { + if(ModuleTools.gladius != null) + { + ToolBuildGuiInfo gladiusGui = new ToolBuildGuiInfo(ModuleTools.gladius); + gladiusGui.addSlotPosition(33 - 20 - 1, 42 + 20); + gladiusGui.addSlotPosition(33 + 20 - 5, 42 - 20 + 4); + gladiusGui.addSlotPosition(33 - 2 - 1, 42 + 2); + TinkerRegistryClient.addToolBuilding(gladiusGui); + } + if(ModuleTools.knife != null) + { + ToolBuildGuiInfo runedKnifeGui = new ToolBuildGuiInfo(ModuleTools.knife); + runedKnifeGui.addSlotPosition(33 - 20 - 1, 42 + 20); + runedKnifeGui.addSlotPosition(33 + 20 - 5, 42 - 20 + 4); + runedKnifeGui.addSlotPosition(33 - 2 - 1, 42 + 2); + TinkerRegistryClient.addToolBuilding(runedKnifeGui); + } + if(ModuleTools.club != null) + { + ToolBuildGuiInfo clubGui = new ToolBuildGuiInfo(ModuleTools.club); + clubGui.addSlotPosition(33 - 20 - 1, 42 + 20); + clubGui.addSlotPosition(33 - 2 - 1, 42 + 2); + TinkerRegistryClient.addToolBuilding(clubGui); + } + if(ModuleTools.greatsword != null) + { + ToolBuildGuiInfo greatSwordGui = new ToolBuildGuiInfo(ModuleTools.greatsword); + greatSwordGui.addSlotPosition(33 - 20 - 1, 42 + 20); + greatSwordGui.addSlotPosition(33 + 20 - 5, 42 - 20 + 4); + greatSwordGui.addSlotPosition(33 - 2 - 1, 42 + 2); + TinkerRegistryClient.addToolBuilding(greatSwordGui); + } + if(ModuleTools.khopesh != null) + { + ToolBuildGuiInfo khopeshGui = new ToolBuildGuiInfo(ModuleTools.khopesh); + khopeshGui.addSlotPosition(33 - 20 - 1, 42 + 20); + khopeshGui.addSlotPosition(33 + 20 - 5, 42 - 20 + 4); + khopeshGui.addSlotPosition(33 - 2 - 1, 42 + 2); + TinkerRegistryClient.addToolBuilding(khopeshGui); + } + } + @Override public void registerBookData() { - TinkerBook.INSTANCE.addTransformer(new TinkerBookTransformer()); + TinkerBook.INSTANCE.addTransformer(new ToolsTransformer()); + TinkerBook.INSTANCE.addTransformer(new ModifiersTransformer()); } @Override @@ -65,7 +115,7 @@ public void registerToolModel(ToolCore tc) { } @SubscribeEvent public static void registerModels(ModelRegistryEvent event) { - TinkersReforged.logger.info("Loading Model"); + TinkersReforged.getLogger().info("Loading Model"); ArrayList items = ModuleItems.genArrayList(); for(Item item : items) { ModelLoader.setCustomModelResourceLocation(item, 0 , new ModelResourceLocation(item.getRegistryName(), "inventory")); diff --git a/src/main/java/mrthomas20121/tinkers_reforged/proxy/CommonProxy.java b/src/main/java/mrthomas20121/tinkers_reforged/proxy/CommonProxy.java index 577b0d93..51be9b12 100644 --- a/src/main/java/mrthomas20121/tinkers_reforged/proxy/CommonProxy.java +++ b/src/main/java/mrthomas20121/tinkers_reforged/proxy/CommonProxy.java @@ -1,40 +1,41 @@ package mrthomas20121.tinkers_reforged.proxy; -import mrthomas20121.tinkers_reforged.Config.Config; -import mrthomas20121.tinkers_reforged.Modifiers.Modifiers; +import mrthomas20121.tinkers_reforged.config.Config; +import mrthomas20121.tinkers_reforged.modules.Modules; import net.minecraft.item.Item; -import net.minecraftforge.common.config.Configuration; +import net.minecraft.util.ResourceLocation; import net.minecraftforge.fml.common.Mod; import net.minecraftforge.fml.common.event.FMLInitializationEvent; import net.minecraftforge.fml.common.event.FMLPreInitializationEvent; import net.minecraftforge.fml.common.event.FMLPostInitializationEvent; +import slimeknights.tconstruct.library.modifiers.IModifier; import slimeknights.tconstruct.library.tools.IToolPart; import slimeknights.tconstruct.library.tools.ToolCore; -import java.io.File; - -//import static com.mrthomas20121.tinkers_reforged.TinkersReforged.logger; @Mod.EventBusSubscriber public class CommonProxy { - public static Configuration config; + public void preInit(FMLPreInitializationEvent e) { - File directory = e.getModConfigurationDirectory(); - config = new Configuration(new File(directory.getPath(), "TinkersReforged.cfg")); - Config.readConfig(); + + Config.readConfig(e); } public void init(FMLInitializationEvent e) { + Modules.tools.init(e); } public void postInit(FMLPostInitializationEvent e) { } - public void registerToolPartModel(T part) { - } + public void registerToolPartModel(T part) { } - public void registerToolModel(ToolCore tc) { + public void registerToolModel(ToolCore tc) { } + public void registerModifierModel(IModifier mod, ResourceLocation rl) { } + public void registerBookData() { } + + public void registerToolCrafting() + { } - public void registerBookData() { } } \ No newline at end of file diff --git a/src/main/java/mrthomas20121/tinkers_reforged/resources/Resource.java b/src/main/java/mrthomas20121/tinkers_reforged/resources/Resource.java new file mode 100644 index 00000000..cc94c50f --- /dev/null +++ b/src/main/java/mrthomas20121/tinkers_reforged/resources/Resource.java @@ -0,0 +1,91 @@ +package mrthomas20121.tinkers_reforged.resources; + +import mrthomas20121.biolib.common.MaterialBuilder; +import mrthomas20121.biolib.util.FluidUtils; +import net.minecraftforge.fluids.Fluid; +import net.minecraftforge.fluids.FluidRegistry; +import slimeknights.tconstruct.library.materials.Material; + +import javax.annotation.Nullable; + +public class Resource { + + private Fluid fluid; + public MaterialBuilder builder; + private String name; + private int color; + + private Resource(String name, int color, Fluid fluid, int temp, MaterialBuilder builder) + { + this.name = "ref_"+name; + this.color = color; + this.fluid = fluid; + this.builder = builder; + + this.fluid.setTemperature(temp); + this.setMode(true); + } + public Resource(String name, int color, @Nullable String fluidName, int temp) + { + this(name, color, FluidUtils.createMetalFluid(fluidName == null? name: fluidName, color), temp, new MaterialBuilder(new Material("ref_"+name, color))); + } + public Resource(String name, int color, int temp) + { + this(name, color, name, temp); + } + public Resource(String name, int color) + { + this(name, color, name, 500); + } + public Resource(String name, int color, boolean fluid) + { + this(name, color); + if(fluid) + { + this.setMode(false); + } + } + + public void setMode(boolean mode) + { + this.builder.setCraftable(!mode).setCastable(mode); + } + + public void registerFluid() + { + FluidRegistry.registerFluid(this.fluid); + FluidRegistry.addBucketForFluid(this.fluid); + } + + public String getName() { + return name; + } + + public int getColor() { + return color; + } + + public Fluid getFluid() { + return fluid; + } + + public MaterialBuilder builder() { + return builder; + } + + public void setName(String name) { + this.name = name; + } + + public void setColor(int color) { + this.color = color; + } + + public void setFluid(Fluid fluid) { + this.fluid = fluid; + } + + public void setBuilder(MaterialBuilder builder) { + this.builder = builder; + } +} diff --git a/src/main/java/mrthomas20121/tinkers_reforged/resources/Resources.java b/src/main/java/mrthomas20121/tinkers_reforged/resources/Resources.java new file mode 100644 index 00000000..18288ed1 --- /dev/null +++ b/src/main/java/mrthomas20121/tinkers_reforged/resources/Resources.java @@ -0,0 +1,117 @@ +package mrthomas20121.tinkers_reforged.resources; + + +import java.util.ArrayList; + +public class Resources { + + public static ArrayList materials = new ArrayList<>(); + + // tinkers reforged resources + public static Resource kovar = new Resource("kovar", 0xC7CFD8, 750); + public static Resource lavium = new Resource("lavium", 0x9FAF59, 750); + public static Resource qivium = new Resource("qivium", 0xAF7259, 750); + + // common mods resources + public static Resource invar = new Resource("invar", 0xA8AFAB, 1500); + public static Resource aluminium = new Resource("aluminium", 0x0, 1200); + public static Resource iridium = new Resource("iridium", 0x0, 1500); + public static Resource platinum = new Resource("platinum", 0x0, 1200); + public static Resource titanium = new Resource("titanium", 0x0, 1000); + public static Resource zinc = new Resource("zinc", 0x94BD5E); + public static Resource ruby = new Resource("ruby", 0xC70437); + public static Resource sapphire = new Resource("sapphire",0x3191C0); + public static Resource amethyst = new Resource("amethyst", 0xD94AE6); + public static Resource peridot = new Resource("peridot", 0x94BD5E); + + // actually addition resources + public static Resource blackquartz = new Resource("blackquartz", 0x161515, 500); + public static Resource diamantine = new Resource("diamantine", 0x9A9CFF, 900); + public static Resource emeradic = new Resource("emeradic", 0x15EA0A, 900); + public static Resource enori = new Resource("enori", 0x15EA0A, 900); + public static Resource palis = new Resource("palis", 0x1E1B88, 900); + public static Resource redstonia = new Resource("redstonia", 0xF30000, 900); + public static Resource void_crystal = new Resource("void", 0x171717, 900); + + // advancedrocketry / libvulpes + public static Resource silicon = new Resource("silicon", 0xBADBFF, 1000); + + // applied energistics resources + public static Resource certus_quartz = new Resource("certus_quartz", 0xBADBFF, false); + public static Resource fluix_crystal = new Resource("fluix_crystal", 0x614EAB, false); + + // Astral sorcery resources + public static Resource starmetal = new Resource("starmetal", 0x001169, 850); + + // atum resources + public static Resource khnumite = new Resource("khnumite", 0x998B59, false); + public static Resource limestone = new Resource("limestone", 0x9F8D7A, false); + + // biomesoplenty resources + public static Resource tanzanite = new Resource("tanzanite", 0xF59760); + public static Resource topaz = new Resource("topaz", 0xF59760); + public static Resource malachite = new Resource("malachite", 0x23AB79); + public static Resource amber = new Resource("amber", 0xFFB226); + + // blue skies resources + public static Resource charoite = new Resource("charoite", 0x9F8D7A); + public static Resource diopside = new Resource("diopside", 0x4CE849); + public static Resource horizonite = new Resource("horizonite", 0xF27B2B); + public static Resource pyrope = new Resource("pyrope", 0xDA283E); + public static Resource turquoise = new Resource("turquoise", 0x5AE7D1); + public static Resource ventium = new Resource("ventium", 0xC31A1F); + + // botania resources + public static Resource dragonstone = new Resource("dragonstone", 0xF15CAE); + public static Resource dreamwood = new Resource("dreamwood", 0xA6BCB6, false); + public static Resource elementium = new Resource("elementium", 0xED339A); + public static Resource gaia_spirit = new Resource("gaia_spirit", 0xD9BBFA); + public static Resource red_string = new Resource("red_string", 0xD61212); + public static Resource mana_string = new Resource("mana_string", 0xADF4E2); + public static Resource manasteel = new Resource("manasteel", 0x3389FF); + public static Resource terrasteel = new Resource("terrasteel", 0x40C400); + public static Resource manaa_diamond = new Resource("mana_diamond", 0x07EAFF); + public static Resource livingrock = new Resource("livingrock", 0xCCCEBC, false); + public static Resource livingwood = new Resource("livingwood", 0x2E1106, false); + + // cavern II resources + public static Resource aquamarine = new Resource("aquamarine", 0xA7E7E5); + public static Resource magnite = new Resource("magnite", 0xD22700); + public static Resource hexcite = new Resource("hexcite", 0xDEDEDE); + + // extreme reactor resources + public static Resource yellorium = new Resource("yellorium", 0xD9DB5C); + public static Resource ludicrite = new Resource("ludicrite", 0xDD5EDD); + public static Resource blutonium = new Resource("blutonium", 0x4642D6); + public static Resource cyanite = new Resource("cyanite", 0x5CAFDB); + + // mekanism resources + public static Resource osmium = new Resource("osmium", 0x7F8EB2); + public static Resource refined_obsidian = new Resource("refined_obsidian", 0x463763); + public static Resource refined_glowstone = new Resource("refined_glowstone", 0xEAC829); + + // natures aura resources + public static Resource ingot_of_the_sky = new Resource("material_of_the_sky", 0x9BDFFF); + public static Resource infused_iron = new Resource("infused_iron", 0x34BA3D); + public static Resource ancient_wood = new Resource("ancient_wood", 0xA06686, false); + + // projectred resources + public static Resource red_alloy = new Resource("red_alloy", 0xED4242); + public static Resource electrotine = new Resource("electrotine", 0x0E73AA); + public static Resource electrotitne_alloy = new Resource("electrotine_alloy", 0x43C7ED); + + // quark + public static Resource ender_biotite = new Resource("ender_biotite", 0x7F8EB2); + + // refinedstorage resources + public static Resource quartz_enriched_iron = new Resource("quartz_enriched_iron", 0xC31A1F); + + // roots resources + public static Resource runestone = new Resource("runestone", 0xC31A1F); + + // thermal foundation resources + public static Resource enderium = new Resource("enderium", 0x006C5F); + public static Resource lumium = new Resource("lumium", 0xA32500); + public static Resource signalum = new Resource("signalum", 0xEAD981); + +} diff --git a/src/main/resources/assets/tconstruct/book/en_us/modifiers/lens_killer.json b/src/main/resources/assets/tconstruct/book/en_us/modifiers/lens_killer.json new file mode 100644 index 00000000..febc8047 --- /dev/null +++ b/src/main/resources/assets/tconstruct/book/en_us/modifiers/lens_killer.json @@ -0,0 +1,15 @@ +{ + "modifier": "lens_killer", + "text": [ + { + "text": "Congratuation you are now a serial killer!" + } + ], + "effects": [ + "Deal more damage to mobs" + ], + "demoTool": [ + "tconstruct:broadsword", + "tconstruct:shuriken" + ] +} \ No newline at end of file diff --git a/src/main/resources/assets/tconstruct/book/en_us/tools/runic_knife.json b/src/main/resources/assets/tconstruct/book/en_us/tools/runic_knife.json new file mode 100644 index 00000000..cf3c189f --- /dev/null +++ b/src/main/resources/assets/tconstruct/book/en_us/tools/runic_knife.json @@ -0,0 +1,19 @@ +{ + "tool": "runic_knife", + "text": [ + { + "text": "The Runic Knife a knife. it has the same capability as roots knifes" + }, + { + "text": "\n" + }, + { + "text": "Compatible with other offhand weapons or tools." + } + ], + "properties": [ + "Medium Damage", + "Sweep attack", + "Can use offhand" + ] +} \ No newline at end of file diff --git a/src/main/resources/assets/tinkers_reforged/blockstates/kovar_glass.json b/src/main/resources/assets/tinkers_reforged/blockstates/kovar_glass.json index e0c9b49c..541139dd 100644 --- a/src/main/resources/assets/tinkers_reforged/blockstates/kovar_glass.json +++ b/src/main/resources/assets/tinkers_reforged/blockstates/kovar_glass.json @@ -4,7 +4,6 @@ "model": "minecraft:cube_all", "textures": { "all": "tinkers_reforged:blocks/material/kovar_glass", - "connected_tex": "tinkers_reforged:blocks/material/kovar_glass_ct", "particle": "#all" }, "transform": "forge:default-block" diff --git a/src/main/resources/assets/tinkers_reforged/lang/en_us.lang b/src/main/resources/assets/tinkers_reforged/lang/en_us.lang index 20bd81b6..7e03636b 100644 --- a/src/main/resources/assets/tinkers_reforged/lang/en_us.lang +++ b/src/main/resources/assets/tinkers_reforged/lang/en_us.lang @@ -51,7 +51,7 @@ item.tinkers_reforged.runic_knife.desc=A Knife used to get Moss from mossy block # Fluids fluid.infused_iron=Molten Infused Iron -fluid.molten_of_the_sky=Molten of the sky +fluid.material_of_the_sky=Molten of the sky fluid.starmetal=Starmetal fluid.blutonium=Molten Blutonium fluid.ludicrite=Molten Ludicrite @@ -64,13 +64,23 @@ fluid.refined_glowstone=Molten Refined Glowstone fluid.ventium=Molten Ventium fluid.horizonite=Molten Horizonite fluid.pyrope=Molten Pyrope -fluid.black_quartz=Molten Black Quartz +fluid.blackquartz=Molten Black Quartz fluid.enori=Molten Enori fluid.palis=Molten Palis fluid.void=Molten Void fluid.emeradic=Molten Emeradic fluid.redstonia=Molten Redstonia fluid.diamantine=Molten Diamantine +fluid.ruby=Molten Ruby +fluid.sapphire=Molten Sapphire +fluid.titanium=Molten Titanium +fluid.platinum=Molten Platinum +fluid.aluminium=Molten aluminium +fluid.iridium=Molten Iridium +fluid.amethyst=Molten Amethyst +fluid.aquamarine=Molten Aquamarine +fluid.magnite=Molten Magnite +fluid.hexcite=Molten Hexcite # mining levels ui.mininglevel.lavium=Lavium @@ -78,18 +88,18 @@ ui.mininglevel.lavium=Lavium # materials # thermalfoundation materials -material.reforged_enderium.name=Enderium -material.reforged_signalum.name=Signalum -material.reforged_lumium.name=Lumium -material.reforged_platinum.name=Platinum -material.reforged_iridium.name=Iridium -material.reforged_invar.name=Invar -material.reforged_aluminum.name=Aluminum +material.ref_enderium.name=Enderium +material.ref_signalum.name=Signalum +material.ref_lumium.name=Lumium +material.ref_platinum.name=Platinum +material.ref_iridium.name=Iridium +material.ref_invar.name=Invar +material.ref_aluminum.name=Aluminum # naturesaura materials -material.reforged_infused_iron.name=Infused Iron -material.reforged_ancient_wood.name=Ancient Wood -material.reforged_sky.name=Material Of The Sky +material.ref_infused_iron.name=Infused Iron +material.ref_ancient_wood.name=Ancient Wood +material.ref_material_of_the_sky.name=Material Of The Sky ## aa materials material.ref_black_quartz.name=Black Quartz @@ -101,45 +111,58 @@ material.ref_diamantine.name=Diamantine Crystal material.ref_palis.name=Palis Crystal # Appliedenergistic2 materials -material.reforged_certus_quartz.name=Certus Quartz -material.reforged_fluix_crystal.name=Fluix Crystal +material.ref_certus_quartz.name=Certus Quartz +material.ref_fluix_crystal.name=Fluix Crystal # Astralsorcery materials -material.reforged_starmetal.name=Starmetal +material.ref_starmetal.name=Starmetal # Atum 2 -material.reforged_limestone.name=Limestone -material.reforged_khnumite.name=Khnumite +material.ref_limestone.name=Limestone +material.ref_khnumite.name=Khnumite # blueskies -material.reforged_ventium.name=Ventium -material.reforged_horizonite.name=Horizonite -material.reforged_pyrope.name=Pyrope -material.reforged_turquoise.name=Turquoise -material.reforged_charoite.name=Charoite -material.reforged_dioside.name=Diopside +material.ref_ventium.name=Ventium +material.ref_horizonite.name=Horizonite +material.ref_pyrope.name=Pyrope +material.ref_turquoise.name=Turquoise +material.ref_charoite.name=Charoite +material.ref_dioside.name=Diopside + +# botania +material.ref_manasteel.name=Manasteel +material.ref_mana_diamond.name=Mana diamond +material.ref_elementium.name=Elementium +material.ref_terrasteel.name=Terrasteel +material.ref_dragonstone.name=Dragonstone +material.ref_livingrock.name=Livingrock +material.ref_livingwood.name=Livingwood +material.ref_dreamwood.name=Dreamwood +material.red_string.name=Red String +material.ref_mana_string.name=Mana String +material.ref_gaia_spirit.name=Gaia Spirit # Mystical world material.reforged_amethyst.name=Amethyst # Mekanism -material.reforged_osmium.name=Osmium -material.reforged_obsidian.name=Refined Obsidian -material.reforged_glowstone.name=Refined Glowstone -material.reforged_hdpesheet.name=HDPE Sheet +material.ref_osmium.name=Osmium +material.ref_obsidian.name=Refined Obsidian +material.ref_glowstone.name=Refined Glowstone +material.ref_hdpesheet.name=HDPE Sheet # Roots -material.reforged_runestone.name=Runestone +material.ref_runestone.name=Runestone # Extreme reactor -material.reforged_yellorium.name=Yellorium -material.reforged_blutonium.name=Blutonium -material.reforged_ludicrite.name=Ludicrite -material.reforged_cyanite.name=Cyanite +material.ref_yellorium.name=Yellorium +material.ref_blutonium.name=Blutonium +material.ref_ludicrite.name=Ludicrite +material.ref_cyanite.name=Cyanite # custom mats -material.reforged_lavium.name=Lavium -material.reforged_qivium.name=Qivium +material.ref_lavium.name=Lavium +material.ref_qivium.name=Qivium # Traits and Modifiers modifier.ref_signal.name=Signal @@ -173,7 +196,7 @@ modifier.life_steal.name=Life Steal modifier.life_steal.desc=§oYou want MORE???§r\nSteal Heart from mobs. modifier.ref_refined.name=Refined -modifier.ref_refined.desc=§oNot so fast!§r\nMine Obsidian faster +modifier.ref_refined.desc=§oNot so fast!§r\nMine Obsidian faster. modifier.ref_flux.name=Flux modifier.ref_flux.desc=§oHow does that work?§r\nHave a chance to not use durability but will exaust you faster. @@ -196,6 +219,26 @@ modifier.ref_starry_night.desc=§oOh look a star!§r\nGive Haste at night modifier.ref_carbon.name=Carbon modifier.ref_carbon.desc=§oHard as a rock§r\nBlocks mined increase the durability. +modifier.ref_fey.name=Fey +modifier.ref_fey.desc=§oBehold Nature!§r\nFey Spirits empowered your tools, giving it a overall boost. + +modifier.ref_mana_infusion.name=Mana Infusion +modifier.ref_mana_infusion.desc=§oBotania is a magic mod!§r\nDrain mana from inventory/baubles inventory to repair your tools. + +modifier.ref_mana_boost.name=Mana Boost +modifier.ref_mana_boost.desc=§oDamage go brr§r\nDrain mana from inventory/baubles inventory to boost your tools damage. + +modifier.ref_living.name=Living +modifier.ref_living.desc=§oIt feels so good!§r\nBlocking an attack heal you. + modifier.ender_star.name=Ender Star modifier.ender_star.desc=§oEnder Power!§r\nall Mobs can drop wither skeleton skulls. +modifier.lens_killer.name=Lens of The Killer +modifier.lens_killer.desc=§oMoar Power!§r\nCongratuation, you now deal more damage. + +modifier.token.name=Token +modifier.token.desc=§oToken Power!§r\nGive one free modifier. + +modifier.ref_lens_miner.name=Lens of The Miner +modifier.ref_lens_miner.desc=§oPhysics 101§r\nBlocks have a chance to drop a ore(any ore). diff --git a/src/main/resources/assets/tinkers_reforged/materials/ref_dreamwood.json b/src/main/resources/assets/tinkers_reforged/materials/ref_dreamwood.json new file mode 100644 index 00000000..6333c82c --- /dev/null +++ b/src/main/resources/assets/tinkers_reforged/materials/ref_dreamwood.json @@ -0,0 +1,6 @@ +{ + "type": "block", + "parameters": { + "texture": "botania:blocks/dreadwood0" + } +} \ No newline at end of file diff --git a/src/main/resources/assets/tinkers_reforged/materials/ref_lavium.json b/src/main/resources/assets/tinkers_reforged/materials/ref_lavium.json new file mode 100644 index 00000000..80125cb2 --- /dev/null +++ b/src/main/resources/assets/tinkers_reforged/materials/ref_lavium.json @@ -0,0 +1,10 @@ +{ + "type": "metal_textured", + "parameters": { + "texture": "minecraft:blocks/cobblestone", + "color": "9FAF59", + "shinyness": 0.6, + "brightness": 0.4, + "hueshift": 0.1 + } +} \ No newline at end of file diff --git a/src/main/resources/assets/tinkers_reforged/materials/ref_livingrock.json b/src/main/resources/assets/tinkers_reforged/materials/ref_livingrock.json new file mode 100644 index 00000000..dfccbda4 --- /dev/null +++ b/src/main/resources/assets/tinkers_reforged/materials/ref_livingrock.json @@ -0,0 +1,6 @@ +{ + "type": "block", + "parameters": { + "texture": "botania:blocks/livingrock0" + } +} \ No newline at end of file diff --git a/src/main/resources/assets/tinkers_reforged/materials/ref_livingwood.json b/src/main/resources/assets/tinkers_reforged/materials/ref_livingwood.json new file mode 100644 index 00000000..2fa8dbb0 --- /dev/null +++ b/src/main/resources/assets/tinkers_reforged/materials/ref_livingwood.json @@ -0,0 +1,6 @@ +{ + "type": "block", + "parameters": { + "texture": "botania:blocks/livingwood0" + } +} \ No newline at end of file diff --git a/src/main/resources/assets/tinkers_reforged/materials/ref_qivium.json b/src/main/resources/assets/tinkers_reforged/materials/ref_qivium.json new file mode 100644 index 00000000..a37f25ed --- /dev/null +++ b/src/main/resources/assets/tinkers_reforged/materials/ref_qivium.json @@ -0,0 +1,10 @@ +{ + "type": "metal_textured", + "parameters": { + "texture": "minecraft:blocks/cobblestone", + "color": "AF7259", + "shinyness": 0.6, + "brightness": 0.4, + "hueshift": 0.1 + } +} \ No newline at end of file diff --git a/src/main/resources/assets/tinkers_reforged/models/item/modifiers/lens_killer.json b/src/main/resources/assets/tinkers_reforged/models/item/modifiers/lens_killer.json new file mode 100644 index 00000000..293d3284 --- /dev/null +++ b/src/main/resources/assets/tinkers_reforged/models/item/modifiers/lens_killer.json @@ -0,0 +1,5 @@ + { + "textures": { + "greatsword": "tinkersreforged:items/greatsword/mod_lens_killer", + } +} \ No newline at end of file diff --git a/src/main/resources/assets/tinkers_reforged/textures/items/greatsword/mod_lens_killer.png b/src/main/resources/assets/tinkers_reforged/textures/items/greatsword/mod_lens_killer.png new file mode 100644 index 00000000..3449f916 Binary files /dev/null and b/src/main/resources/assets/tinkers_reforged/textures/items/greatsword/mod_lens_killer.png differ diff --git a/src/main/resources/assets/tinkers_reforged/textures/items/material/lavium/texture.png b/src/main/resources/assets/tinkers_reforged/textures/items/material/lavium/texture.png new file mode 100644 index 00000000..e732c2d2 Binary files /dev/null and b/src/main/resources/assets/tinkers_reforged/textures/items/material/lavium/texture.png differ diff --git a/src/main/resources/assets/tinkers_reforged/textures/items/material/qivium/texture.png b/src/main/resources/assets/tinkers_reforged/textures/items/material/qivium/texture.png new file mode 100644 index 00000000..1ce098db Binary files /dev/null and b/src/main/resources/assets/tinkers_reforged/textures/items/material/qivium/texture.png differ