
Mew
Members-
Posts
567 -
Joined
-
Last visited
Everything posted by Mew
-
And that was exactly my point. I couldn't find any hints in the FML source code yet. Still searching for why it even loads mods from memory in the workspace, maybe I can find something relevant there... I managed to separate my code from the minecraft project into a new project, should anyone be interested. It creates the entire Minecraft directory structure in your new project though, but it's quite useful when developing several mods I think. Pahimar already does that that is the way he teaches to set up the workspace, except it only needs one minecraft directory And how do you even go about building a core mod anyway? I know I have made one that doesn't do anything... but it didn't load in MC... And I couldn't figure out why
-
Try something like IExtendedEntityProperties. Here are some examples: Class that implements IExtendedEntityProperties: https://github.com/ModderPenguin/MinePG/blob/master/source/minepg/rpg_common/rpg/playerinfo/PlayerInformation.java How to register it: https://github.com/ModderPenguin/MinePG/blob/master/source/minepg/rpg_common/rpg/handlers/events/GenericEventHandler.java* Register it like any normal forge event handler. * The first method is the one you want
-
This is when I facepalm myself to death... Can you tell we and/or show screenshots of the "null" blocks (blocks that are invisible and glitch the game. My name for 'em )?a
-
If you mean it's not loading in debug mode, then yes, it's not loading. Well, I like to develop and test my programs in the IDE. I haven't tried yet whether it even loads up in regular Minecraft. Sure I could do it that way too, but I'd like to know if it is possible to get it to run in the IDE, especially since it's much quicker and easier when resolving problems since I don't always have to log a lot of information, recompile, and re-obfuscate all the time. It's just about convenience at this point. I've never used Debug myself. What exactly does it do? In eclipse, it lets you change code in classes and you will immediately see the result, except you add/delete/rename a method, field or class. Now, that seems handy. That would make logging a whole lot easier. I should use that. I agree to that... I was wondering how one would go about his
-
I know there is another method for drawing... its something like drawTexturedModelRectFromIcon or something like that. It draws where you specify, and the Icon you specify. That might help, I have never really played around with it to see how it works...
-
I feel like a know all in this situation... try something like this: package huntingTraps.Resources; import net.minecraft.world.World; public class PitfallHandler { public static World world; // the world you are using public static int i, j, k; // X, Y, and Z axis variables public PitfallHandler(World world, int x, int y, int x) { this.world = world; // the world this.i = x; // X axis this.j = y; // Y axis this.k = z; // Z axis } public static void generatePitfall() { // this nested for loop will make a 'block' of air to the dimensions specified in numOfBlocksOn*** for(int x = 0; x < numOfBlocksOnXAxis; ++x) { for(int y = 0; y < numOfBlocksOnYAxis; ++y) { for(int z = 0; z < numOfBlocksOnZAxis; ++z) { world.setBlock( i + x, // this makes blocks of air go out however many numOfBlocksOnXAxis was j - y, // this makes blocks of air go out however many numOfBlocksOnYAxis was k + z, // this makes blocks of air go out however many numOfBlocksOnZAxis was 00 // the block of air ); } } } } } Then in the onBlockActivated() method, have something like this inside it: PitfallHandler pit = new Pitfallhandler(Minecraft.getMinecraft().theWorld, (location of block x, y and z coords in the next 3 paramaters) xLocation, yLocation, zLocation); pit.generatePitfall(); I garuntee that the PitfallHandler will work, the other... well
-
That is not really that hard. All you need to do is make a new EntityPlayer variable like so: EntityPlayer player = Minecraft.getMinecraft().thePlayer; That will give you an instance of the player. BUT!!!! This is the CLIENT SIDE player, so if you are wanting stuff done server side, you will have a slight issue. Though I am sure that you could then create a packet that sends the required information to the server and casts the EntityPlayer (player) variable to a EntityPlayerMP (that being done in the packet). I just released, GUI's are ONLY client side, so you will be fine with that reference I made. Also you WILL need a packet handler and such when working with GUI's, you have to pass information done and such to the server. But I am sure you would already know this.
-
That, or he hasn't written the new name to NBT... That might help if he isn't doing that.
-
Whats the name of the book? I am always, ALWAYS looking for documentation on java so that I can learn more...
-
That would work, but inside the GUI you can actually tell the GUI to be a pause GUI... So you do not need to actually have the player be set to creative. And I wish I knew how to draw a video in java... The only way I could think of doing it would be to screenshot each frame (or use a program that turns videos into .GIF [or whatever the extension is]) and make a GIF image and draw that into the GUI....
-
@OP I get what you are saying. You basically would want a new GUI that would pause the game, then, "draw" the video as the background of the GUI. That way it would pause the game and play the video without actually allowing the player to be hurt. But do not ask me how to draw the video... Also, you would want to have a tick handler that starts running when the movie starts playing and then automagically closes the GUI when the movie has finished (which is a time defined in the tick handler, the same time as the video goes for). Or a "skip" button or something to that effect would work in the GUI unless you wanted them to see it, then do the tick handler.
-
The keybinding is quite easy. After you have the GUI working (test it via the onBlockActivated() method) you literally just use the FMLClientHandler.getClient().openGui(new GuiToOpen); (its something like that) and it opens the GUI*. * I have yet to figure out how to CLOSE the GUI using the bound button I know that I saw a tutorial on the minecraft forums that was to do with item stack nbt tag compounds... I cannot find it at the time being though.
-
Actually, in the EntityPlayer (I think) there is a boolean variable that is called "isPlayerSleeping" or something like that. That SHOULD be what you are looking for.
-
ModLoader.addName applies one name to all items. (X-post)
Mew replied to linkseyi's topic in Modder Support
Thank you, but as this is part of an interactive compiler (http://www.minecraftforum.net/topic/1361604-152-windows-linkseyis-modmaker-create-unique-blocks-items-recipes-mobs-and-models-structures-and-biomes-with-a-simple-gui/#entry16594112), changing around large amounts of code is not practical unless ultimately necessary. Also, I have tried using the Forge equivalent to addName (LanguageRegsitry.addName) and got the same results. If you don't want to use Forge, don't come complaining to Forge when your mod doesn't work. I don't think you understand. I am using the ModLoader class in Forge, which should work fine (it's designed to be ModLoader-compatible). No, I don't think you understand. YOUR PROBLEM IS COMING FROM MAKING THE MOD IN A MOD MAKER!!!! Since you have done that, it cannot read properly, and editing it is just pointless. So you need to decompile MCP with forge, REWRITE your mod (yes, the whole damn thing because it is already recompiled/reobfuscated) and then recompile/reobfuscate it the normal way. And ObsequiousNewt is right, don't come complaining about forge related problems if you are making a mod using another API. lol, hipster Hipster? What do you mean by that sir? I mean that I was into Minecraft before it was cool. What does that have to do with me? -
ModLoader.addName applies one name to all items. (X-post)
Mew replied to linkseyi's topic in Modder Support
lol, hipster Hipster? What do you mean by that sir? -
ModLoader.addName applies one name to all items. (X-post)
Mew replied to linkseyi's topic in Modder Support
First thing first, learn to code using Forge!!!!!! Don't use mod porters, you will most likely get more errors like this. What you need to do is just recode it all into Forge. And its not that hard to do so. All you have to do is change the base mod file (in ModLoader, defined as mod_***) to a Forge one, and then just change all your ModLoader methods to the Forge equivalents. Entity, Item, and Block files will all be the same, the only difference being how you register them (not very different at all since the 1.5 update) and the name registry, entity registry etcetera. I hope I don't seem like a modder fanatic or something that is the right word for this situation.. -
How to stop double calls using entityPlayer.sendChatToPlayer("");
Mew replied to Mew's topic in Modder Support
thanks -
I believe that the meta data range is 0 to 17. So yeah... That could be why
-
Damn..... Well then. This will be fun
-
That would be a problem with the way you have registered the block then. And it would be something like this: [EDIT] public class FuelHandler implements IFuelHandler { @Override public int getBurnTime(ItemStack fuel) { int var1 = fuel.itemID; if(var1 == Item.book.itemID){ return 300; }else if(var1 == YourModBase.itemYouWantAsFuel.itemID){ return 40000; } else if(var1 == YourModBase.blockYouWantAsFuel.blockID){ return 12345; } else return 0; } }
-
I believe that "Base" is something like, YourModBase... So as a rewrite... : public class FuelHandler implements IFuelHandler { @Override public int getBurnTime(ItemStack fuel) { int var1 = fuel.itemID; if(var1 == Item.book.itemID){ return 300; }else if(var1 == YourModBase.itemYouWantAsFuel.itemID){ return 40000; }else return 0; } } in "YourModBase": GameRegistry.registerFuelHandler(new FuelHandler());
-
You could probably do a check like that inside the actual entity. Basically, you have a method that will set the entity to dead if it is not in a dimension. Then you use the good 'ole spawn method to spawn it in the biome you want. Then it can only exist in that dimension... Another way would be to look through gast code. They can only exist in the nether right? Or is it just the hell biome?
-
How to stop double calls using entityPlayer.sendChatToPlayer("");
Mew replied to Mew's topic in Modder Support
*facepalms* That was the cast I was missing... -
I am still not getting what you mean by restricting dimension. Do you mean restricting it so that the mob can only exist inside that dimension?
-
How to stop double calls using entityPlayer.sendChatToPlayer("");
Mew replied to Mew's topic in Modder Support
addChatMessage(""); sends a message to all the players, whereas sendChatToPlayer(""); sends the message only to the specified player. At least thats what I think... But that is beside the point. The method sends the message to the player, but it sends it twice. Which is what I am trying to avoid.