Jump to content

TLHPoE

Members
  • Posts

    638
  • Joined

  • Last visited

Everything posted by TLHPoE

  1. Don't think that's quite possible unless you do some base class edits.
  2. Just don't check for a biome at all. Also, tweak your block so that it can spawn on anything. Unless you don't want it to spawn on everything, just make it spawn on BlockGrass. Most other mods' grass blocks will extend BlockGrass.
  3. I've figured out a way to detect when the player's inventory is open, but is it possible to render another GuiContainer on the side of the inventory?
  4. I would recommend looking into how spawner's spawn their mobs (for the tick) Then just look at the chest's code for the unifying with other wires.
  5. You would have to "bind" a tile entity to the wire. With that tile entity, you can use it's NBT methods to write how much data the wire has stored up. You could also use the onBlockPlacedBy method in Block to connect to other wires.
  6. Are there any tags I could add to make the spawner spawn entities with a potion effect?
  7. Much thanks Draco
  8. Ok, I've tweaked my code so that it has a flag. It's still stuck in a recursive loop though? Edit: I tried putting the "nbt.setBoolean("Joined", true); behind the travelToDimension method, still a stack trace error.
  9. I know that there are external programs that can easily edit an existing spawner's NBT data, but how would I do it in code? I've looked around the code, and there are tags that you can write to the spawner's NBT. Does anybody know of a list of the possible tags? As in tags that would adjust the entity? I.E. Potion effects?
  10. If you need help with using an ItemStack's NBT, look around in Minecraft's code.
  11. First of all, editing any base class and distributing it is illegal. Unless you use ASM, which is very un-needed for this situation. What I would recommend, is looking into Forge's events. Here is a great tutorial by AtomicStryker: http://www.minecraftforum.net/topic/1419836-forge-4x-events-howto/
  12. In my mod, I add 2 chests that run on 1 class. My problem, is that they get buggy when I place them next to each other. They also get buggy when I place them right next to the vanilla chest. Am I missing something? I looked inside BlockChest and saw some methods. But those methods used a check for block IDs, which shouldn't be a problem. BlockColoredChest:
  13. Not sure if I'm doing this the most efficient way possible, but I have this piece of code: if(world.provider.dimensionId != 0 && player.ridingEntity == null && player.riddenByEntity == null && !world.isRemote) { player.travelToDimension(0); } It's job is to just teleport the player to the overworld if they're not already there. After that, I teleport the player else where. But I get a stack over flow error whenever I'm in a dimension that isn't the overworld. Crash log:
  14. Yeah, I have the NetworkMod annotation.
  15. I guess you could try finding out how entities move and get the location of the entity you want to kill. There was something with AxisAllignedBB for detecting entities within the bounding box.
  16. I'm almost 100% sure that if you want to use GUIs, then you'll need the Instance annotation.
  17. I tried it like this: if(player.worldObj.isRemote) { player.openGui(RPG.instance, 0, player.worldObj, (int) player.posX, (int) player.posY, (int) player.posZ); } Didn't call the client method? Do I need a container? Sorry if I sound a bit dumb, today has not been my brightest day.
  18. Oh. I just tried putting a print in, and it turns out that it doesn't call the Client side thing. But it does call the server side...
  19. I'm trying to open a GUI that extends GuiScreen, but nothing seems to happen. I put a check to see if my GUI handler was working, and it was. GuiStats: GuiHandler: Code I use to open it: player.openGui(RPG.instance, 0, player.worldObj, (int) player.posX, (int) player.posY, (int) player.posZ);
  20. Agghhhhh. Kind of the same problem, but I put it in, it detects equipped, I remove it, nothing. I close and re-open, and it detects nothing.
  21. Thanks for all the help, one last problem though. I was testing and saw it earlier and knew the cause, but I had to go do something else. Now I can't figure out why it says that it's equipping and unequipping every tick.
  22. I'm assuming that you mean that when the player is holding the pickaxe, it has the effect. First, I would make a player tick handler, and check if the player was holding your pickaxe. And after that, I would find out how "WaterWorker" actually applies it's effects to the player. Finally, I would apply said effects to the player in the tick handler.
  23. ASM is something about core mods and transforming base classes. Assuming that you're working with a custom furnace, just look into how other things explode. Usually you get a world object and there's a method to cause an explosion.
  24. Ok, I've moved the code back into my player tick handler. Currently, it refuses to detect nothing different with the slots. I know it's checking them because of a check I added, but it doesn't detect anything different. http://pastebin.com/fX1yvk0j
  25. Ok, I've switched to a much more efficient way. Instead of doing it every tick, I'm doing it every time a slot changes. My only problem now, is that it detects if it's been equipped. But if I try to remove it, it does nothing. It also only detects if it's equipped when it's the first thing I do in the inventory. I have to close and reopen for it to detect it. My code:
×
×
  • Create New...

Important Information

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