Jump to content

Da9L

Members
  • Posts

    32
  • Joined

  • Last visited

Everything posted by Da9L

  1. I know this is a rather old thread, but I've encountered the same problem and managed to fix the issue. For me the reason for this is because Linux Mint uses a newer version of Java, namely Java 10 .. You can see this by opening a terminal and typing: java --version For me this showed something with openjdk ... version 10 To fix this simply open the terminal and enter: sudo update-alternatives --config java This should give you a screen where you can select other versions of java.. I chose option 2, which is, as of this time, Java 8.. After this and a reboot, Minecraft with Forge is working fine through the newest launcher
  2. Hi. I'm trying to add some custom trades to villagers in 1.10.2. I've done it before in 1.7.10, but i noticed that since the IVillageTradeHandler interface is no longer present in the VillagerRegistry, I cannot do this the way i used to do it. The closest i can seem to find is the IVillageCreationHandler interface, but I'm getting a suspicion that this has nothing to do with trading, but more to do with Village World generation. How would you do this in 1.10.2 ?
  3. Thanks for your replies guys, that was fast ! I guess i better get started then
  4. I have recently begun modding with forge, and i have some ideas for a mod i would like to try and create. But since it will be rather time consuming for me to do, i would like to hear someone with more expertise out if its even possible to do before i start. Im not asking for anyone to do it, just if its possible :-) So here goes: * - Is it possible to change the size of a players inventory ? Like graying out 50% of the inventory and then change its size when inside the game? * - Is it possible to change the speed of the players movement without using any potion like effects ? * - Is it possible to make a multiplier on mining speed for all pickaxes / damage with all weapons / etc. ? * - Is it possible to change the max health amount ? * - Change the length of how long a potion lasts ( including default potions)
  5. Ofcourse! Thanks for that .. I dont know why i couldnt figure that out.. It makes perfect sense :-)
  6. Alright thanks for that info ! Now since im all new to this.. Could you guys maybe provide an example on the usage ? Im having a hard time understanding it i must say.. I tried it like this: the addEnchantment method on Item.enchanted_book seems to want the first argument to be an ItemStack. But since i have no ItemStack to define here, as this is on the line where i create it, what should i write ? ItemStack enchantedBook = new ItemStack(Items.enchanted_book.addEnchantment(enchantedBook, enchData)); The above ofcourse does not work, since the enchantedBook ItemStack i use, is being created on the same line.. This might be a noob question i hope you can handle my low skill level
  7. Now im a little confused but isnt that already what im doing if you look at my code ? I create a new itemstack with Items.enchanted_book that i call enchantedBook. And with that instance i then use enchantedBook.addEnchantment ..
  8. Hello I have some trouble with some enchanted books that i've made my villagers sell. What i do is to create my own tradehandler that implements the IVillageTradeHandler. This works, and i can make my villagers sell what i want them to. I want them to sell enchanted books and those do somehow not work in an anvil. I've noticed that the default enchanted books has a yellow name "Enchanted Book" whereas the ones i have, has a blue name.. I think it has something to do with the way i "make" the book it self. Heres my code in my trade handler showing what im doing: Random rand = new Random(); Enchantment enchantment = Enchantment.enchantmentsBookList[random.nextInt(Enchantment.enchantmentsBookList.length)]; ItemStack enchantedBook = new ItemStack(Items.enchanted_book, 1); int lvl = MathHelper.getRandomIntegerInRange(rand, enchantment.getMinLevel(), enchantment.getMaxLevel()); enchantedBook.addEnchantment(enchantment, lvl); I've also tried using the Items.book instead of the Items.enchanted_book, but this gives the same results. What im i doing wrong ?
  9. A custom villager would surely be a possibility. Also good for the learning.
  10. Ill take a look at that.. Oh and as for the 1.6.4.. I have no intention of releasing a 1.6.4 version.. I have a 1.7.10 version ready which is the one i want to release.. The 1.6.4 is for my self on a server that runs 1.6.4.. I dont want to release the 1.6.4 version because in my opinion, staying at older versions just slows the hole progress of upgrading down for everyone :-)
  11. Hello. First of all i want to say that this is my entry project into modding with Forge, so my experience is low. However it has been a good experience so far. So just to try it out, i began creating a very simple mod that adds custom trades to villagers. I wanted them to be able to trade emeralds for enchanted books at a higher rate. So far it works well. I have two classes: My main class, and a TradeHandler. Besides loading configs my main class only has this: VillagerRegistry.instance().registerVillageTradeHandler(1, new TradeHandler()); VillagerRegistry.instance().registerVillageTradeHandler(2, new TradeHandler()); VillagerRegistry.instance().registerVillageTradeHandler(3, new TradeHandler()); VillagerRegistry.instance().registerVillageTradeHandler(4, new TradeHandler()); My Trade handler looks like this: public class TradeHandler implements IVillageTradeHandler{ @Override public void manipulateTradesForVillager(EntityVillager villager, MerchantRecipeList recipeList, Random random) { Random rand = new Random(); int Price = 64; Enchantment enchantment = Enchantment.enchantmentsBookList[random.nextInt(Enchantment.enchantmentsBookList.length)]; //Enchantment enchantment = Enchantment.enchantmentsBookList[15]; ItemStack enchantedBook = new ItemStack(Item.enchantedBook, 1); int lvl = MathHelper.getRandomIntegerInRange(rand, enchantment.getMinLevel(), enchantment.getMaxLevel()); enchantedBook.addEnchantment(enchantment, lvl); switch (lvl) { case 1 : Price = Main.lvl1Price; break; case 2 : Price = Main.lvl2Price; break; case 3 : Price = Main.lvl3Price; break; case 4 : Price = Main.lvl4Price; break; case 5 : Price = Main.lvl5Price; break; } final String[] highCostBooks = convertStringToArraystring(Main.highPriceEnchantments); if(stringContainsItemFromList(enchantment.getTranslatedName(lvl), highCostBooks)) { Price = Main.highPriceEnchantmentsPrice; } recipeList.add(new MerchantRecipe(new ItemStack(Item.emerald, Price, 0), enchantedBook)); } public static boolean stringContainsItemFromList(String inputString, String[] items) { for(int i =0; i < items.length; i++) { if(inputString.contains(items[i])) { return true; } } return false; } public static String[] convertStringToArraystring(String input) { String[] split = input.split(","); return split; } } My problem is that, on a vanilla minecraft installation my custom trades is shown like 50% of the times.. But on a modded installation where other mods also add trades, i only get a 5% chance of my trade showing on a villager. I want this to have a higher chance. So basicly .. Is it possible to set a higher chance of a specifc trade to get shown ? Thanks in advance !
  12. Alright i guess your "friendly" tone means im out of help on your own forums.. I figured it out the last time on my own, and i propably will this time too ..
  13. hey calm down i was only using magic launcher as an example.. What iam doing is trying to write my own script to download the needed libraries, as, which you also say, magic launcher cant do .. And as i also state your old installers does not work anymore, as the code in them is using the old url to download from, which is why im doing it my own way. But if i use http://libraries.minecraft.net/ instead of https://s3.amazonaws.com/Minecraft.Download/libraries/ it is not getting any files. Im still using the old way of "generating" the complete url though.. Has this changed ?
  14. Alright thanks.. So that means that if i change the old link, https://s3.amazonaws.com/Minecraft.Download/libraries/, to the new one, the old forge installers should also work ?
  15. Yes i think i might have misunderstood what Forge Gradle is about.. This program i have made is actually just running the Minecraft Forge Installer.. But the Minecraft Forge installer does not download the required libraries by it self (which im refering to as discrepancies) Say you have a mod pack you install.. First you go to your vanilla minecraft launcher, and launch minecraft in the version the mod pack needs, so that the launcher will download all the files.. The next thing you do is to install Minecraft Forge in the version that is needed (shipped with the mod pack), and lastly you install the mods and a launcher.. This launcher (Magic Launcher) will not be able to launch minecraft because of some missing libraries.. You will now have to relaunch the minecraft vanilla launcher and edit your profile to the forge one, and launch it from there. After this you can close minecraft, and Magic Launcher will now work.. So Minecrafts Vanilla launcher is downloading some new libraries, that Magic Launcher cannot download for some reason. Earlier i made a program that would go read the json file inside the forge installer, and download the libraries listed there, and put them in the correct places (i based the code on what was in the src of forge). This was to prevent the extra step needed, after you had installed forge and the mods, where you had to go and relaunch the vanilla launcher to get the required libraries, and it has been working without problems, untill lately. What have changed ?
  16. Hello I have a program that, untill lately, downloaded forge discrepancies automaticly. This doesnt work anymore, and i've noticed that this is the case for most of the programs out there that used to do this automaticly. I've heard about something called Forge Gratel or something like that, that the new, 1.7.2, forge uses to download discrepancies. I have a few questions for this.. 1. Does this work with old versions of forge, or is it only 1.7.2 and upwards? 2. If the above is true, how does the old versions of forge handle discrepancy download? 3. Is there somewhere i can get some documentation about this? Thanks ! ~D
  17. No.. Multicraft is the system im using to host the servers..
  18. "As the Main admin of a Multicraft setup" <- I believe that should imply iam the host I have allready contacted Multicraft support but they only refer to their documentation, which only explains it about Craftbukkit ..
  19. As the Main admin of a Multicraft setup we are about to get running i would like my users to be able to select forge as a server type .. As from how i understand i will need the forge jar file along with some jar.conf file that holds what output the server can give, so that multicraft can understand it .. Where can i get this file ? Or in other words.. How can i set up my Multicraft environment to use Forge on its servers ?
  20. I suppose its the DownloadUtils class i will have to look at right? Just want to make sure ..
  21. Good, then ill just have to figure out a way to read it with C# and download the file.. EDIT: Can you explain to me how the lines are supposed to be read? Like a line that says: "name": "org.scala-lang:scala-compiler:2.10.2", It "seems" that the file is downloaded from somewhere i cant find, and then stored like the the above but so: "org\scala-lang\scala-compiler\2.10.2".. The dots in the line above is replaced with backslashes.. but what does the colons mean ?
  22. Do you by any chance know if those links are static or they change from version to version ? In other words, do i have to go read the links in each version or can i just hardcode the url inside my application ?
  23. LexManos - could you maybe provide me the urls and maybe even a list of files? Because then i could just code it into my launcher my self. Would be awesome..
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.