-
Posts
193 -
Joined
-
Last visited
Everything posted by Mitchellbrine
-
Find Block Anywhere in World (or a workaround)
Mitchellbrine replied to TricliniumAlegorium's topic in Modder Support
How are you searching right now? - - - Wasn't there originally a thread for this? -
Actually, event.source.getEntity() doesn't always return null.
-
Long addChatMessage() not showing colors on second line?
Mitchellbrine replied to DavidJotta's topic in Modder Support
I'd use .setChatStyle(/* Make the chat style */); after the message (I'm assuming you're modding in 1.7). Hope that helps! -
[1.7.10] [Solved] Unable to play sounds
Mitchellbrine replied to NomNuggetNom's topic in Modder Support
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:< -
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.
-
If they are using IntelliJ IDEA, it auto-corrects it. Or they prefer the former.
-
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).
-
[1.7.10] Achievements not being awarded
Mitchellbrine replied to NomNuggetNom's topic in Modder Support
PlayerLoggedInEvent triggers on ANY server. -
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.
-
[1.7.10] Achievements not being awarded
Mitchellbrine replied to NomNuggetNom's topic in Modder Support
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. -
[1.7.10] How to Make Block Infinitely Burn?????
Mitchellbrine replied to Mattkx10's topic in Modder Support
Check the fire class. -
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!
-
[1.7.2] Missing ModLoader class in net.minecraft.src?
Mitchellbrine replied to skymmer's topic in Modder Support
You can also use MinecraftServer.getServer(); -
[1.7.2] Missing ModLoader class in net.minecraft.src?
Mitchellbrine replied to skymmer's topic in Modder Support
Minecraft.getMinecraft().getIntegratedServer(); -
my int is resetted after closing minecraft in eclipse
Mitchellbrine replied to knokko's topic in Modder Support
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! -
my int is resetted after closing minecraft in eclipse
Mitchellbrine replied to knokko's topic in Modder Support
Are you using NBT to save the integer? -
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.
-
Using other mods' items in my crafting recipes
Mitchellbrine replied to Aspiring-Mod-Maker's topic in Modder Support
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" -
Custom informational book using NBT 1.7.2
Mitchellbrine replied to Potato Coded's topic in Modder Support
You're going to need to have onItemUse to actually do something on click first. -
I use straight up Git. It works fine for me and it super simple.
-
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.
-
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.
-
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.