Jump to content
View in the app

A better way to browse. Learn more.

Forge Forums

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Failender

Forge Modder
  • Joined

  • Last visited

Everything posted by Failender

  1. no idea to be honest, i started with 1.8 . try it out i guess..
  2. To make it simple. if(Player.getCurrentEquippedItem() !=null && Player.getCurrentEquippedItem().itemID == this.itemID NO if(Player.getCurrentEquippedItem()==MyItem) YES if you dont understand this go back, learn some java and come backj then
  3. Im not gonna spoon feed you. If you got some specific questions I might help you but im not gonna throw a bunch of code on you
  4. also you dont need to compare the items, the boolean should tell u if the item is equipped or not
  5. dont use ids to compare, use the instance of the item u create to register the item. so use equippedItem==myItem
  6. Failender replied to Jarle's topic in Modder Support
    for gods sake learn java. NEW BlockPos
  7. Failender replied to Jarle's topic in Modder Support
    use new BlockPos(x,y,z). blockpos is the new wrapper class for posuitiohns
  8. Failender replied to Jarle's topic in Modder Support
    should be event.state.getBlock()
  9. Failender replied to Jarle's topic in Modder Support
    how about you tell us which version you are in? if its 1.8 , 1.8 ios working wit hblocksates
  10. if you know what static means then you know where ur issues come from.
  11. use an IWorldGenerator, to check which chunk u are in use World#getBiomeGenForCoods Also if u have a question add which version u are in please.
  12. Your tradehandler code is never getting called. the FMLInit events are only called in the Mainmod class. So you need to call the villager stuff from your main mod class
  13. ModItem.mainRegistry(); ModItem.mainRegistry(); ModItem.mainRegistry(); ModItem.mainRegistry(); ModItem.mainRegistry(); ModItem.mainRegistry(); ModItem.mainRegistry(); ModItem.mainRegistry(); ModItem.mainRegistry(); ModItem.mainRegistry(); ModItem.mainRegistry(); ModItem.mainRegistry(); ModItem.mainRegistry(); ModItem.mainRegistry(); what the f.....?
  14. for your handler implement IMessageHandler and your message needs to implement IMessage. that will fix the problem with not applicable args
  15. the thread is month old why are u responsing here?^^ i had it in preinit
  16. Was already using that, just dont realized that I need to use the relative path, seen from the jar. Thank you anyway. (So we were talking about learning java.. :'D )
  17. I was so confused with the exception with the handler that i dont thought about the thrown ioexception Actually I dont care, because I want to crash the game anyway if there is something wrong in that part, because then my mod will be useless as fk. But yeah it is a FileNotFound exception. java.lang.RuntimeException: java.io.FileNotFoundException: F:\Server\mods\minigames-1.8-1.0.jar\assets\minigames\maps\archer.fail (Das System kann den angegebenen Pfad nicht finden) I just realized that my problem is, that my file inside a jar, so its technically not a file. So I need to read the file inside the jar. The way to do that was getClassCloader and getResourceAsStream (right?) so my problem is.. im inside a static method i cant use this.class. Whats the correct way to do that?
  18. Hey guys, to describe my situation. I got additional data saved in the assets under assets.minigames.maps , that I need to access on server side. So i save the path of my data in the preInit Event using path = event.getSourceFile().getAbsolutePath(); The files are storing an int[][][] , saved with an ObjectOutputStream into the file. So I try to read that using the following method, where key is the name of the map (e.g. archerwars) private static int[][][] readFile(String key) { File file = new File(MiniGames.path+"/assets/minigames/maps/"+key+".fail"); try { ObjectInputStream in = new ObjectInputStream(new FileInputStream(file)); int[][][] ret = (int[][][]) in.readObject(); in.close(); return ret; } catch (Exception e) { e.printStackTrace(); throw new RuntimeException(file.getAbsolutePath()); } } In eclipse this is working just fine. But once I compile the mod it crashes the server with the following crash log Any ideas? Greetz Fail
  19. hint of the day: learn java x)
  20. it might be better to create ur SNW by using the constructor SimpleNetworkWrapper(String channelname) but i am not sure with that
  21. public void setMimicBlock(IBlockState state, boolean isClient) { this.state = state; if (isClient){ PacketDispatcher.sendToAll(new SyncCurrentMimicBlockState((EntityPlayer) this.player)); PacketDispatcher.sendToServer(new SyncCurrentMimicBlockState((EntityPlayer) this.player)); } else PacketDispatcher.sendTo(new SyncCurrentMimicBlockState((EntityPlayer) this.player), ((EntityPlayerMP) this.player)); } sendToAll should also send to server nevermind
  22. show the PacketDispatcher. I feel like theres sth wrong. You should be creating ur own SimpleNetworkWrapper
  23. are u registrating the generator? also there is really no need to create a new worldgenminable all the time.. create it in the constructor and just call generate instead of (new WorldGenMinable(dgr2Blocks.dark_ore.getDefaultState(), 2)).generate(world, rand, quisquePos);

Important Information

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

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.