Jump to content
View in the app

A better way to browse. Learn more.

Forge Forums

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Mazetar

Forge Modder
  • Joined

  • Last visited

Everything posted by Mazetar

  1. So what you currently have is a item which upon use reduces the amount of some variable? And now you want to draw a bar on the screen to show how much remains before the variable becomes 0?
  2. You really need to be more specific with your question, what do you want to add to the hud? A button? a text? a minimap? some animating graphics?
  3. You could group the statements together like this I believe: public static Block AFurnace, ABench, AChest; public static Item Toolbox, ConstructGun, Multitool; public static Item RazorDisk, BevelGear, MetalPlate, Item LED, Circuitboard,Wire;
  4. What if you teleport the player 1 block forward from the portal inn the direction he would be facing when he exits the portal?
  5. Well if you want to use the vanilla way to do it, it is to return the number 4 according to the post I linked above. The code where it is used is shown a few posts further down. I assume that would prove to work as intended. Else I guess you could write your own way of handling it like they did with BC, but if it's not needed and all works as you want it to the vanilla way, why bother?
  6. Video 17 will be dealing with constructors ^^ thenewboston is awesome! Now to your code again: public ObsidianArmor(int par1, EnumArmorMaterial par2EnumArmorMaterial, int par3, int par4) { super(par1, par2EnumArmorMaterial, par3, par4); } is the ObsidianArmor Constructor, whenever you call for new ObsidianArmor(); This is what's getting called. as you see it takes inn 4 parameters (Parameters are the name for variables that a function needs as an input). Namely Integers par1, par3 and par4, and the EnumArmorMaterial par2. When you inn your mod file "MiscBlocksAndItems" call the line for a new Obsidan Armor, you are not giving it all the variables it needs! You are just giving it the first two variables it needs when you say ObsidianHelemet = new ObsidianArmor(IbsidianHelmetID, OBSIDIAN) You need to give it two more ints, to satisfy the 3rd and 4th parameters. I'm not sure what they are but it should be easy to find out by looking at what the super() call inside the constructor is doing to them. When you click on the line which says super("SOME PARAMETERS HERE"); and press F3 inn eclipse you should be taken to the deffinition of that method which will show you this code: public ItemArmor(int par1, EnumArmorMaterial par2EnumArmorMaterial, int par3, int par4) { super(par1); this.material = par2EnumArmorMaterial; this.armorType = par4; this.renderIndex = par3; //etc. From this you can see that the 3rd paramter is the renderIndex for the ObsidianHelmet and the 4th is for the armor type of the helment Fill inn these numbers when you instansiate the ObsidianHelm like this: ObsidianHelemet = new ObsidianArmor(IbsidianHelmetID, OBSIDIAN, armorTypeHere, renderIndexNumberHere)
  7. For the problem: Paste the ObsidianArmor.java file on pastebin and let us see, you are either missing the constructor or it's parameters are different, in anycase it should be easy to fix For Learning: Here is a great source for learning the basics of Java, I recommend that you do watch the videos up until he starts with drawing GUI's using JFrame and such. Theres a lot of them but they are all really simple to follow and short!(Like 4-7 mins usually). http://thenewboston.org/list.php?cat=31 Futher following some tutorial series on basics of forge modding will give you a good understanding not only of the specific things which you are creating but also the forge/minecraft code inn general Wuppy here has created some nice tutorials both in tekst form AND as videos which could be a nice place to start if you aren't already following a tutorial series http://wuppy29.blogspot.nl/2012/10/forge-modding-142.html
  8. Okay I do understand your reasons for being vague. And thank you for clarifying what you meant earlier. If you are sticking to 1.2.5 I can understand why 16+ ID's is a problem, since there is such a small limit on how many block ID's one can have. I'm sadly not capable myself to provide an adequate solution to your problem, but perhaps someone else will be able to help you solve it when they have understood what you need I remember that RP's massive use of sub blocks made quite a lot of fuzz on the modding forums for minecraft, and there was quite a few threads asking the same questions. Perhaps you can find help in old threads here or on the mcboards. Either that or wait to see if someone comes along which knows how to solve the blockIds inn 1.2.5 Either way, good luck to you and have fun coding
  9. I bet that the error you are getting is the following: If that is the case then the solution is simple, either make the registerRenders() call super(); on it's first line to make it call CommonProxy's registerRenders() as is required when you @Override static methods. Or since you DON'T want to call the common proxy's regsiter renders at all, just make the registerRenders method non-static by removing the static keyword from it. @Override public void registerRenders() { }
  10. Well if you look at the error it is giving you, what is it telling you? It's saying that something is undefined... meaning that it's not there! What is it? Well it can't find a constructor at the class with those parameters, meaning you either have to change the paramterts to match the constructor you have or create a constructor which accepts the parameters you are passing into it Without looking into the ObsidianArmor.java file, I can't be sure but I belive you have an constructor method like this: public ObsidianArmor(int itemID, int TextureID, Material material){ so adding the textureID into the lines where you are calling the constructor inn your MiscBlocksAndItems file, should resolve the issue. How much experience with modding and java in general do you have? if you have troubles understanding the error messages like that I assume you are quite new to java and programming? Don't take this as an insult, but if you are let me know and I can find some resources for you to learn some more which in turn will help you solve these kinds of errors on your own
  11. I'm not sure but judging by this I guess it should be "4"? http://www.minecraftforum.net/topic/241903-creating-mods-mcp-getrendertype/ What is he doing inn the build craft source?
  12. When you try to copy the code over from BC to your own file? Well I guess that BC is using a different(older) version of MCP inn it's master branch which is for it's last release build. and inn your project you got a newer version of forge and MCP where the names on it has changed or something? That could perhaps be the reason for the error, depending on what error it is? If you open the thing you call the .getRenderType() method on, maybe you find that the method is renamed or changed somehow? Or missing? Most of this you can see from the error I believe There could be missing imports or some other errors, it's kinda hard to tell when you say "there's an error" without specifying ^^
  13. Inn that case there is a thank you button right "there" or well uhm there being at the bottom of my post above here ^^ Inn any case google is the main source of information, a google search revealed the link so some searching was all that was needed, took me 3 seconds so theres no problem at all Also since you asked your question inn such a good way it was quite easy to help you, when you state what you are trying to do, why and what you have tried along with the result and error logs! That makes me not only able to help you but also happy while doing so since it makes it easy for me to do so <3 Have fun coding man!
  14. No the source would not be the same as the recompiled version, it will be the same as how he wrote it before he compiled it. The difference being that you won't have any errors because of things lost or wrongly interpreted during the decompiling of the file(s). You will get the source as he wrote it, which means since his mod is working it will work (with the MCP and Forge version he used at least)
  15. Depends how you want the liquid to be different form the original Lava and Water, have you tried looking at build craft's code? https://github.com/BuildCraft/BuildCraft It's open source so you can download the project and look at how it is implementing the oil, using eclipse you can import the project from Git by using the git read only URI which is found on the top of the page and then you can easly browse the project inn your IDE Or you could just browse the files on your web browser Edit: The oil code is inn the Energy part of the mod, there you will find the BlockOilStill and BlockOilFlowing files and from there you should be able to figure out how to proceed
  16. class TileEntitySomethingClever extends TileEntity implements IInventory. Well you have to create one inn paint or gimp or photoshop etc. What I did for mine was to go into PS and just copy paste and move around stuff from the original GUI's You can find the original GUI images inn the "mcp_Directory\temp\bin\minecraft\gui" And use them as a starting point The images Demo_bg, slot, Container and should give you some good starting images.
  17. This is releated to what you have written inn your annotaions and such, heres a post on mc forums which has the same problem and the solution, hope it helps! http://www.minecraftforum.net/topic/1513224-solved-a-mod-tried-to-open-a-gui-on-the-server-without-being-a-networkmod-solution-included/
  18. Well what it says inn it's way is that I'm not sure but I think there is a different name for it now, opening the soruce class for the item's should let you know what the name is now. Edit: endershadow wrote as I made my post, there ya have it^^
  19. Well generally decompilling other peoples mod's / classes is kinda something people tend to look down upon, at least if the intention is to do more than just look and learn If it's Fihgu's mod's you are trying to decompile and modify why don't you contact him? As far as I can see on the MC forums he is active there and you could PM him and ask for the source you need, if you explain your reasons and ask polite and nicely maybe he will help you out by giving you the part you need to look at or help you inn some other way? Generally having the permission of the mod author to decompile and play around with his source code is more accepted and thereby you would easier get help the problems you are facing while doing so what exactly are you trying to accomplish by decompiling the files?
  20. zacpier: What makes you say that? What is the reasoning behind your statement?
  21. One often get blind by one's own code, it's hard to see simple mistakes when it's your own code You might want to check up on how a stack trace can help you with debugging, just the few lines that indicates which lines crashed it and why helps you a lot inn finding such problems
  22. yes... thats not hard at all All you need to do is to create an block which extends blockContainer, create a TileEntity for that block and a GUI class for that TileEntity/Container. It's rather easy and mostly copy-paste existing code from minecraft classes On the forge wiki there are some tutorials for GUI's have you read this one? http://www.minecraftforge.net/wiki/Containers_and_GUIs
  23. Solving 1 error didn't make the other, it made the other become clear usually when you remove some bad code, you find more So now we solve for the new problem, what error is it giving? Post the exact error it is giving and if possible a www.pastebin.com(Set Syntax Highlighting to Java) of the class with the error. And I'm sure you will get it resolved
  24. The error you are getting is " java.lang.ClassCastException: net.minecraft.client.particle.EntityDiggingFX cannot be cast to net.minecraft.entity.player.EntityPlayerMP" And from the log you see that it gets it right after this: at skycraft.blocks.PortalBlock.onEntityCollidedWithBlock(PortalBlock.java:46) So while trying to preform the onEntityCollidedWithBlock() method in the PortalBlock file on line 46. It caused this error. Let's check line 46 of that file and see what it says? Pasting your code into www.pastebin.com and setting Syntax Highlighting to Java, makes it a lot easier for others to read your code files Here I created one for your code: http://pastebin.com/cCsGd37f Looking at line 46 it seems you are doing this: EntityPlayerMP thePlayer = (EntityPlayerMP) par5Entity; Which is causing the crash, since the par5Entity is NOT an EntityPlayerMP but an different Entity. And you are telling it to use that entity as a EntityPlayerMP! What you need to do is to do a check before you do the rest of the code to see IF the par5Entity IS a EntityPlayerMP at all. To do this I suggest the following change: if (par5Entity instanceof EntityPlayerMP) { // All the code from line 46 untill line 54. } Now that I read the whole file, I notice that you ahve this check on line 42 but the code is not inside it, so you just need to move the whole code block into the if block
  25. Add [solved] to the beginning of the title at least, then people knows it's solved and people willing to help can skipp it while others having similar problems will find the solution faster when searching

Important Information

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

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.