Jump to content

GiantNuker

Members
  • Posts

    139
  • Joined

Everything posted by GiantNuker

  1. Definatly, if there is a pic, I cannot see it, also - are long distance teliporters those magic mirrors?
  2. Nope, nether portal is entity.setPortal(true) and end portal is entity.change/dimension(1)
  3. But you're right, iterators are much more compact and cleaner, Thanks!
  4. Hi, I'm making a Botania addon, my problem is that I have two portal TileEntities, to make them work, they need to be linked(obviously). The system works just fine, until you try to link portals that aren't chunkloaded at the same time. I thought I could just make them chunkload, but I don't want that abused. Is there any way to load a TileEntity on command?
  5. Awesome, also hooks for MapGenStructure would be nice, and I mean like worldgen hooks, to add to vanilla generator.
  6. what if I add i--; ... pylons.remove(pylon); i-- //<-- ...
  7. I got a concurrent modifocation exception, so I created another list, then iterated through that, but I think it would be faster if I just did a for(int i = 0; i < pylons.size(); i++). Thanks!
  8. also, don't think that's the problem because It did not work with this algorithm either. do { for (TileCrystalPylon pylon : pylons) { if (!pylon.canDrawFrom(user)) { pylons.remove(pylon); continue; } mana = pylon.takeMana(mana); } } while(mana > 0 && pylons.size() > 0);
  9. Yes, but I've never used eclipse debug tools, always System.out.println() What I've been trying to get at is, the output of takemana should not mean anything, because every iteration, canDrawFrom is called, and that checks if there is any mana left in the pool, if not it returns false, and when that returns false, it is removed from the pylons list, when that list is empty, the method exits(if (pylons.size() < 1) return mana;)
  10. Did It. I also changed method contents to List<TileCrystalPylon> a = new ArrayList(); a.addAll(pylons); do { for (TileCrystalPylon pylon : a) { if (pylons.size() < 1) return mana; if (mana < 0) break; if (!pylon.canDrawFrom(user)) { pylons.remove(pylon); continue; } mana = pylon.takeMana(1); } } while(mana > 0); /*do { for (TileCrystalPylon pylon : pylons) { if (!pylon.canDrawFrom(user)) { pylons.remove(pylon); continue; } mana = pylon.takeMana(mana); } } while(mana > 0 && pylons.size() > 0);*/ return mana; It still is not working.
  11. if (!pylon.canDrawFrom(user)) { pylons.remove(pylon); continue; } canDrawFrom has this line if (this.getCurrentMana() <= 0) return false; getCurrenMana & hasPool public boolean hasPool() { return world.getTileEntity(pos.down()) instanceof IManaPool; } public int getCurrentMana() { if (!hasPool()) return 0; return ((IManaPool)world.getTileEntity(pos.down())).getCurrentMana(); }
  12. if it's mana level is less than or equal to zero, it is removed.
  13. public boolean canDrawFrom(BlockPos pos) { updateUseability(true); if (this.activated != EnumActivation.OFF && this.centerPos != pos) return false; if (this.bind != EnumBinding.OUTPUT_ALL && this.boundPos != pos) return false; /*Look Here*/ if (this.getCurrentMana() <= 0) return false; //<--Look Here! //RayTraceResult res = this.world.rayTraceBlocks(new Vec3d(this.pos), new Vec3d(pos), false, true, false); //if (res != null)if (res.hitVec.x != pos.getX() || res.hitVec.y != pos.getY() || res.hitVec.z != pos.getZ()) return false; return true; } Line 5 of canDrawFrom.
  14. Doesn't Java give an error when that happens?
  15. It freezes, mouse comes back on screen, and gives the windows loading mouse image.
  16. I am worrking on an addon for Botania. The game does not crash and nothing appears in the log, but here it is anyway: Here is my Pylon tile entity(supplying power) and finally the user: What happens is, it just drops out, no log,mouse not working, nothing. It always drops out right as the spawning finishes(update>isSpawning>mana_remove_left at the bottom of TileManaSpawner) This is also a major setback, because most things use crystal pylons for power. If you can help Thanks! In action, right before crash:
  17. Not the point, I removed my API. I want it to be "backslash : 3.0.0" instead of "backslash : any"
  18. Here is my mcmod.info [ { "modid": "wings", "name": "Giant's Wings", "description": "Wings=Cool", "version": "${version}", "url": "", "updateUrl": "", "authorList": ["GiantNuker"], "credits": "GiantNuker", "logoFile": "", "screenshots": [], "useDependencyInformation": "true", "requiredMods": ["backslash"], "dependencies": ["backslash"] } ] here is my problem: I cannot specify the version of backslash I want.
  19. Solved! @SubscribeEvent public void setElytra(TickEvent.PlayerTickEvent te) { if (te.player instanceof EntityPlayerMP) if (WingsMod.pgl.containsKey(te.player) && WingsMod.pgl.get(te.player)) ((EntityPlayerMP) te.player).setElytraFlying(); } pgl stancds for playerGlideList.
  20. Hmmm... try, allong with what you have, adding a ~5 second cooldown. BTW: sounds like a fun mod!
  21. Horray you're updating this, I've wanted this mod for a while!
×
×
  • Create New...

Important Information

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