GiantNuker
Members-
Posts
139 -
Joined
Everything posted by GiantNuker
-
Definatly, if there is a pic, I cannot see it, also - are long distance teliporters those magic mirrors?
-
Nope, nether portal is entity.setPortal(true) and end portal is entity.change/dimension(1)
-
Thanks
-
But you're right, iterators are much more compact and cleaner, Thanks!
-
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?
-
Awesome, also hooks for MapGenStructure would be nice, and I mean like worldgen hooks, to add to vanilla generator.
-
what if I add i--; ... pylons.remove(pylon); i-- //<-- ...
-
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!
-
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);
-
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;)
-
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.
-
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(); }
-
if it's mana level is less than or equal to zero, it is removed.
-
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.
-
Doesn't Java give an error when that happens?
-
It freezes, mouse comes back on screen, and gives the windows loading mouse image.
-
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:
-
[1.12]mcmod.info specify dependency version
GiantNuker replied to GiantNuker's topic in Modder Support
Not the point, I removed my API. I want it to be "backslash : 3.0.0" instead of "backslash : any" -
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.
-
Teleporter working in creative, but not in survival. (1.10.2)
GiantNuker replied to Dustpuppy's topic in Modder Support
Nice -
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.
-
Teleporter working in creative, but not in survival. (1.10.2)
GiantNuker replied to Dustpuppy's topic in Modder Support
Hmmm... try, allong with what you have, adding a ~5 second cooldown. BTW: sounds like a fun mod! -
[1.11.2] How to call player.setAngles(float dx,float dy) ?
GiantNuker replied to Aang23's topic in Modder Support
Horray you're updating this, I've wanted this mod for a while! -
Teleporter working in creative, but not in survival. (1.10.2)
GiantNuker replied to Dustpuppy's topic in Modder Support
try moving your mirrors farther apart.