Jump to content

Da9L

Members
  • Posts

    32
  • Joined

  • Last visited

Converted

  • Gender
    Undisclosed
  • Personal Text
    I am new!

Da9L's Achievements

Tree Puncher

Tree Puncher (2/8)

0

Reputation

  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 ?
×
×
  • Create New...

Important Information

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