Everything posted by Mitchellbrine
-
Find Block Anywhere in World (or a workaround)
How are you searching right now? - - - Wasn't there originally a thread for this?
-
[1.7.10] Track type of mob killed
Actually, event.source.getEntity() doesn't always return null.
-
Long addChatMessage() not showing colors on second line?
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
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:<
-
Send a chat message as the player
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.
-
[1.7.10] How to use a proxy?
If they are using IntelliJ IDEA, it auto-corrects it. Or they prefer the former.
-
Send a chat message as the player
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
PlayerLoggedInEvent triggers on ANY server.
-
Send a chat message as the player
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
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?????
Check the fire class.
-
onCraft event?
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?
You can also use MinecraftServer.getServer();
-
[1.7.2] Missing ModLoader class in net.minecraft.src?
Minecraft.getMinecraft().getIntegratedServer();
-
my int is resetted after closing minecraft in eclipse
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
Are you using NBT to save the integer?
-
[1.7.10] Entity Name
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.
-
[1.7.2][SOLVED]Achievements not showing on custom achievement page
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.
-
Using other mods' items in my crafting recipes
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
You're going to need to have onItemUse to actually do something on click first.
-
Git setup
I use straight up Git. It works fine for me and it super simple.
-
[1.7.2] Achievements
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.
-
[1.7.2]Pre-Enchanted Items?
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.
-
[1.7.2] Achievements
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.
-
Launch fireworks from player's location (and one other small question)
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.
IPS spam blocked by CleanTalk.