Jump to content

Mitchellbrine

Forge Modder
  • Posts

    193
  • Joined

  • Last visited

Everything posted by Mitchellbrine

  1. How are you searching right now? - - - Wasn't there originally a thread for this?
  2. Actually, event.source.getEntity() doesn't always return null.
  3. I'd use .setChatStyle(/* Make the chat style */); after the message (I'm assuming you're modding in 1.7). Hope that helps!
  4. You're wanting people to help but not letting them see the code they need to see to fix it? You could at least show them the method you're using. That way they could test and help. D:<
  5. Sokaya, no. He is talking about sending a message as the player to an IRC channel, not to the server. Yes, that would work if we were sending a message as the player to the server, but not if we were trying to relay a chat message to IRC.
  6. If they are using IntelliJ IDEA, it auto-corrects it. Or they prefer the former.
  7. You should've mentioned that first. That wasn't really clear. - - - You should create a bot for IRC and have it relay messages. This is sort of the concept of EiraIRC (which is open-source if you need help with your code).
  8. PlayerLoggedInEvent triggers on ANY server.
  9. If you are trying to tell ALL the people on the server (like a fake chat message), cycle through all the players and have a translatable message that takes the player's username/display name as a parameter. That would be a way of doing it.
  10. I'm going to assume everything is set up correctly about the achievement, in which case, make the event a PlayerLoggedInEvent. That should make it work.
  11. ItemCraftedEvent is a FML event. Register it using FMLCommonHandler.instance().bus().register(/* Event class */); Make sure you check the package name of the event to know which to use (MinecraftForge or FML). Hope that helps!
  12. You can also use MinecraftServer.getServer();
  13. Minecraft.getMinecraft().getIntegratedServer();
  14. No it's not (and I'd suggest using spoilers when displaying your code). NBT stands for Named Binary Tags. NBT is Minecraft's way of saving objects. That's how all of the information of your player is saved. That's how TileEntity's save information. There's a good tutorial to look at here. It will show you how to save extra information with the player, so it will persist. I hope this helps!
  15. Are you using NBT to save the integer?
  16. Make a list of all the player entities in the world and use a for loop to go through them and add a message to all of them. I have something similar in my mod, and this is how I would use it in your case (put it all in the event or method of your preference): List<EntityPlayerMP> players = world.playerEntities; for (int i = 0; i < players.size(); i++) { players.get(i).addChatMessage(/* Insert Message Here */); } You could probably also do: for (EntityPlayerMP player : world.playerEntities) { player.addChatMessage(/* Insert Message Here */); } I don't know about the second method, but the first method works fine for me.
  17. You can still have it. I have used it. You should also be initializing variables in the pre-init method, btw. Try that and come back. That might fix it. Everything else seems fine.
  18. CraftingManager.getInstance().getRecipeList().add(new ShapelessOreRecipe(new ItemStack(/*Crafting Result*/, 1), "XY",'X',"battery",'Y',/*Other Item*/)); That's assuming they both register in the ore dictionary as "battery"
  19. You're going to need to have onItemUse to actually do something on click first.
  20. I use straight up Git. It works fine for me and it super simple.
  21. At the very end of the AchievementPage, there's a parameter that is Achievement[]. You put in an array of achievements that needed to go on that page. That's how you fixed it.
  22. Stop over complicating things. I would use onUpdate or onCreated in your item's class. There you can use the same method and you won't have to over complicate code.
  23. You mean make a new class where you have the achievements stored? That's super simple. Register everything in a method there and call that method in your preInit.
  24. Change firework.setPosition to firework.setLocationandAngles(this.player.posX,this.player.posY,this.player.posZ,this.player.cameraYaw,this.player.cameraPitch); I don't know, but I think the firework's data can be empty.
×
×
  • Create New...

Important Information

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