Jump to content

GotoLink

Members
  • Posts

    2012
  • Joined

  • Last visited

  • Days Won

    1

Everything posted by GotoLink

  1. If you have some good ideas how to make it, you can submit a pull request to the Forge team
  2. Rails are blocks. Check their code in BlockRailBase, BlockRail, BlockRailPowered.
  3. Container only opened client side ?
  4. So you want to show what is on the world spawn in the main menu after the integrated server as started ?
  5. Potion effect is determined by the four lowest bits, so yeah it is a 15 max enabled values. Bits 5 and 6 are for power and time. I think higher bits are unused though, so it may be possible to add more of them, if you make a new brewing system to access them.
  6. Well, looking at the Potion class, they use an old internal texture index even in 1.6.2. They are located in the inventory.png, which is given by GuiContainer to the InventoryEffectRenderer. You'll have to provide your own custom inventory.png with your icon, and set your index accordingly.
  7. I would recommend changing your modid to lower case and something less...generic...
  8. With a MinecraftServer instance: executeCommand("/awesomeCommand");//will use default "fake entity" to notify the admins or a ICommandManager instance: executeCommand(ICommandSender icommandsender, String s);//will use icommandsender name to notify the admins
  9. I wouldn't call it "hidding" since the player which has his event canceled won't see other people tag. It would make more sense to call it "blind". You can put the list of players in the event class, it doesn't really matter as long as it is accessible for the server. Using a map like hydroflame suggested.
  10. As for the first idea (opening a GUI while another GUI is still open) this is probably making-your-own-gui-system-from-start-to-finish (like a game within a game) kinda hard. Intensive use of a tickhandler, making your own mouse listener, catching packets if you want to pass items between the two GUIs, then saving data somehow when your own GUI closes... The second idea would require keeping a copy of the original GUI, closing it, opening a combined GUI with the copy as an argument, so it can build it again and add more. Making this copy (the only hard step, as everything else can be handled by vanilla Minecraft) may require reflection, bytecode manipulation...this is on advanced-object-handling level, i think.
  11. I think opening another gui (with buttons and even slots) is feasible, though you can't rely on player.opengui(...) to do that, because Minecraft would allow only one to be open at a time. You'll have to catch mouse event on your own, i suppose. Another solution would be to make an "extending Gui", a gui that look like the one you replace, with more buttons and stuff. You'll have to pass the vanilla gui content into your own then. I remember mods that probably did this in 1.4.7.
  12. I think the simplest way would be to make the keyhandler send the packet, the packethandler to receive it and then change a variable in your event class.
  13. What was the old code and which part doesn't work ?
  14. new ResourceLocation("roads", "/textures/gui/roadpaintergui.png") Remove slash before "textures"
  15. @Instance("Generic") This annotation should contain your modid ("mcgadgetry"), not some random word.
  16. Your question doesn't make sense.
  17. The ResourceLocation thing has been explained like, every day since 1.6 release. You can do a search for it can't you ? Hint: changing the string arg should do. Why do you use obfuscated names for your own fields and methods ?
  18. You may use RenderGameOverlayEvent or a TickHandler. Then check if world is loaded, player exists, and has open the inventory you want to build a Gui against.
  19. I think the identifier you would need is the UUID. Though I never tested this.
  20. No, then yes, but keep in mind that datawatcher is a built-in solution (so it works faster and is globally easier to use, but may conflict with vanilla entities) while packets are custom (separate, but slower...).
  21. Well first you'll have to make sure it is a block, then you can use its blockid to retrieve at least a base icon with Block.blocksList[id].getIcon(side, meta);
  22. Do you want to cook both input simultaneously when they are both filled, or would you allow the cooking in one slot, or is it separate inputs (with different cooking time maybe) ?
  23. Make sure you put @ForgeSubscribe on your SoundLoadEvent. And that your sound is in mcp/src/minecraft/assets/troncraft/sound/..
  24. Considering the amount of work you are planning to do, you should have at least one hundred blocks to merge like this. It would be a huge loss of time to do it for less.
  25. Don't add annotation if you don't know what they do. Look at the TickRegistry.registerTickHandler(args); one of the args is Side.
×
×
  • Create New...

Important Information

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