Jump to content

GameMakerWorld

Members
  • Posts

    16
  • Joined

  • Last visited

Everything posted by GameMakerWorld

  1. Thanks for the help, I will be using the following now: ArrayList<EntityPlayerMP> allp = new ArrayList<EntityPlayerMP>(); ListIterator itl; for(int i = 0; i<MinecraftServer.getServer().worldServers.length; i++) { itl = MinecraftServer.getServer().worldServers[i].playerEntities.listIterator(); while(itl.hasNext()) allp.add((EntityPlayerMP)itl.next()); }
  2. I have experimented for a few hours now, read through countless pages of what came up on google searches and still cannot figure out how to solve this very basic issue: I need to be able to get an object of the world with all its dimensions and chunks. There is the class net.minecraft.world.World that seems to hold access to all that I need but how do I get a usable instance to it? It doesn't seem to have a static access so I really need to know where I can get it from and if it can even do what I need - which is primarily to give me a full list of all players online and secondarily access to all chunks currently loaded in the game. Thanks in advance for any help you can give me. EDIT: I have found a partial solution, but it won't allow me to do everything I need to do. I use an iterator in player-related events: Iterator it = event.player.worldObj.playerEntities.iterator(); However, I didn't see any way of doing this in events not related to players where I do, however, want to check on players. Grabbing the player list from an event with players and then using it elsewhere is possible but seems like a dirty solution.
  3. Thanks for the hints - I didn't know if the instance and proxy stuff was somehow important and not having them could cause instability. Now I can safely remove them As for config, I know there is a tutorial for that and I will try to work with it. For now I have to get a server running (have a release today). If I run into problems making config control later, I will be grateful for help though. Really nice community here
  4. Alright. Still dev work to do, but this might be useful for some ppl since it is pretty much all that is needed to inventory ban items that use unusual crafting (like the IC2 crafting). For any other type I recommend ShadowDragons RecipeRemover. Please note that these item IDs are for FeedTheBeast direwolf20 pack (should work with MindCrack too) and that my code is far from streamlined (like the proxys can probably be omitted). Just saying this might be useful since it DOES just work ARecipeMod.java CommonProxy.java ClientProxy.java Events.java EDIT: Not sure if everybody can deal with source code, so (under the express limitation of this BEING AN ALPHA VERSION) I am also releasing the mod file here. http://gamemakerworld.com/stuff/aRecipeMod_a20_1.4.6.zip The contents are as shown above in the code. The way it is made it should not be able to mess up your players' inventories and definitely not your world, since it only replaces items with vanilla stuff. This is for the direwolf20 pack (probably works with MindCrack but needs testing there) for 1.4.6 (probably 1.4.7 too) and removes the following items, replacing them with a bit of some of their components: Nano suit and saber, mining laser, terraformer modules
  5. Alright, that did it. My mod seems to be working fine now. I can ban any item id and when ppl do any kind of action, items vanish as they should. Now to get this to work with configs and it could be a very useful mod. You really are the best
  6. I googled and otherwise searched for AtomicStriker and AtomicStricker and both yielded no useful results. Could you possibly give me a link to his or any other tutorial? All I really need is to see how a mod registers an event. As long as the basic mechanics are the same it doesn't even have to be the PlayerInteractEvent that I want to use. As for my current status: I have learned how to set up, de/re-compile forge and how to make basic mods for recipes. Once I can use events I will move on to using configs and then make a mod that filters item IDs out of user inventories and armor slots based on config settings. I can see this being useful for lots of people
  7. That works for windows but does it work for Linux? I saw that exact advice in many places where it was always rejected with that exact reason: "won't work on Linux". I will give it a try though, thanks. Will also try to mess with making a coremod (should load first) and add recipes that use the same components. Maybe I can mess up IC2 recipes that way without breaking the server ^^ EDIT: Holy cow... pain. Lots of pain and badly documented stuff. I will poke this some more but looks like forge isn't really easy to get into. Sad.
  8. Let me give you a great part of that thank you right now Now I just have one more (probably trivia,l but google didn't help) question: How do I make sure it loads after IC2? I guess since the file would be newer I could just keep my fingers crossed, but I would hate to make something that just works randomly (also want to post it here if/when it works).
  9. I am one of those server owners who don't like it that the mining laser bypasses protection and so does the terraformer. If that wasnt't the case me and the other thousands of ppl since probably before 1.2.5 that struggled with the same issue (yes I did set up a large number of server and any one with IC2 on had to either get rid of the problematic stuff at once or after the grief) wouldn't even try so hard I have familiarized myself with the events in forge as can be found under jd.minecraftforge.net and my money would be on PlayerInteractEvent. Let's see if I can produce something useful here EDIT: I think it's the right event but I can't find any tutorial showing how to actually make that event fire ingame. I have all the other pieces I need (checking item in player hand, deleting item in player hand) so could somebody point me towards some source that uses events, so I can learn what I am still missing? Of course, when I am done, I will release my code and jar here for anybody to mess with as they like, so it's not like I am just wasting people's time
  10. If it is that easy, then could you give me a link or a decent hint? I have been googling for HOURS not finding anything about how to use Industrialcraft API. I can use Java and I just spent some more hours setting up my eclipse and watching basic forge mod tutorials so it doesn't even have to be fully idiot proof.
  11. Hi, sorry to ask for something else again so soon, but maybe this is easier to get than a recipe remover for IC2: Does anybody know of a mod that will ban certain item IDs from a player's inventory? I could REALLY use that very well right now and would be so very grateful for any hint.
  12. I found out this is a problem of IC2 that has its own crafting recipe system. So I will need to find something that can deal with IC2 that I know HAS an interface for modifying its recipes (GregTech, Railcraft and other mods use it) but I don't know where to request a mod like that - can somebody help me or point me in the right direction? Thanks!
  13. I desperately need a mod to modify or at the very least remove existing recipes. I want to use it with the direwolf20 modpack from FTB. The mod reciperemover by ShadowDragon sadly cannot deal with IC2 recipes. I would be VERY grateful for a hint where I can find such a mod since it is the only obstacle left for my FTB server to go public, thanks! EDIT: Shadowdragons mod is okay, it is IC2 that is being a pain with its non-standard recipes. now looking for a different solution as well in a new thread because it would be COMPLETELY different. Also edited the title and text above accordingly!
×
×
  • Create New...

Important Information

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