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. There's no program for animating the models commonly used. Nor does the file format for 3d models support animational data (.Obj only stores model information for 1 single frame). There are workaround to this of course. But none of them is easier than creating your own custom animation data and model importer, which is not easy to put it simply
  2. ^ What draco said. Or you can do an if check to see which side you are on and then do it. Using the proxy files are simpler though and as your mod grows so does the amount of things belonging to the client only so having using the proxy is really handy for separating client only code from the rest of the code
  3. Removal of BlockID's and updates to the sound system to use the ResourcePacks properly along with the complete rework of the network code. I'd say yes
  4. Yeah so it can, but which is it and is the damn program able to load it? If it is then don't mind me, I just thought it seemed like a plausible reason for such an error
  5. No... it does not. Quite the opposite in truth. You are casting the contents of the first slot in tickData[] to World... Finally something we can agree on, now your logic is not just a bit of it's straight out the window wrong. It's impossible to cast a single object into an array, just consider it logically in your head for a second and it should be quite reasonable to assume you would agree. Protip to make your life simpler: When someone in a programming community with a high standing (reputation, rank etc.) tells you that you are wrong then you usually are just that. Especially when you state you haven't really spent time on learning the basics of the subject
  6. .zip files does NOT like mixed case. Please for the love of god and cows stick to Java conventions they are there for a reason. Now why am I saying this? Because the most common reason for this error is that you have uppercase letters in one or more of the following: * modid * package names * folder names Please be so kind as to double check that this is not the issue As I'm writing this I'm noticing something which may be relevant your file is .rar and not .zip, aren't those file types using different compression types?
  7. Uhm, okay let me try to say this one more time. You CAN'T cast an class like here World to an Object[] it's impossible. And re-read your code, you did NOT make world into an Object[] mate... Also.. No, tickData is an Object[]...
  8. Let's look at the vital parts of the error log: Description: Exception in server tick loop java.lang.NoClassDefFoundError: net/minecraft/client/entity/EntityClientPlayerMP at packets.DemoMod.<clinit>(DemoMod.java:24) I see one big problem here, do you see it? Let me point it out for ya: Description: Exception in server tick loop and then: java.lang.NoClassDefFoundError: net/minecraft/client/entity/EntityClientPlayerMP Your mod is trying to access a CLIENT class on the server side for some reason. Remember that the server has no client files, it has no concepts of rendering and so on. And it does not have an EntityClientPlayerMP class as it's a Client only class. Therefore it will crash when trying to find a class which does not exist in the servers code. In case you aren't convinced read the lover parts of the output: Caused by: java.lang.RuntimeException: Attempted to load class bdi for invalid side SERVER Now the first thing you must to is to test your mod on a server only modded by forge! Regular forge not the bukkit/forge crossover. And NO other mods! If that works then try the bukkit forge thing, and if that works add one and one mod until it crashes. The problem is with that mod most likely, or your mods interaction with it but I doubt that
  9. Yeah... that's kinda how you do it when you are suggesting additions to an open source project... Create the hook/event you need, submit the PR and if it's a reasonable and well implemented then the forge team will consider it and may end up adding it.
  10. The thing is that you will be faster and better if you learn java first, then get into modding. Now you get stuck on simple things, you use "forever" to code things which after spending some time studying java you would be able to pull of in no time. Not to mention the fact that you will be able to read the harder part of the minecraft src easier, you will be able to comprehend answers to more advance problems you see around and best of all you will be able to create unique and cool mods as you can create things on your very own Let me tell you why I know this, or skip down to the TL;DR lol I started programming a simple 2d rpg as my first programming project ever. I managed to do it, despite everyone and their mother telling me it's IMPOSSIBLE without learning basic programming! Of course it's possible, it just takes a "little" more time Much later I took to studying some basic programming, did a lot of exercises, created Pong and Tetris clones etc. You know doing the steps. Anyways after about a week of that I was noticing that I coded better and faster on my game projects If I had coded the RPG game after first spending some time learning Java I would have finished it in 1/8th of the time I used. It's the same with modding, either way it's entirely up to you what you do! This forum is for support related directly to modding minecraft, it's as it states on the front page "not a Java school. You are expected to have basic knowledge of Java before posting here.". The focus is in understanding the minecraft src and the forge API and how to properly use it when modding, this means you will be asked to learn how to walk before we coach you on marathon running TL;DR: You don't need to know Java to mod, it just makes it a lot easier and faster! (by weeks and months, not just a few minutes!). This forum expects java knowledge and a will to learn more, that's how things work around here If you don't want to get told to learn java, then you are in the wrong place. Learning java reduces errors, simplifies bug finding and opens up the way to creating unique and awesome mods! PS: As this isn't the place for Java questions I'd like to recommend DreamInCode, it's very beginner friendly and their java forum is quite active. Check it out if you'd like at: http://www.dreamincode.net/forums/forum/32-java/
  11. Minecraft can do ANYTHING, it's coded in Java and you got the full power of Java behind you when you code. So nothing is impossible. It may be freaking fucking hard though, but still possible Heres a nice collection of awesomeness on how Minecraft works internally, it may be of use to you: greyminecraftcoder.blogspot.no/p/list-of-topics.html Assuming you are proficient with java basics (Can you for example program Tetris without tutorials/help? You would want to look at the source code of other mod's electrical systems. Remember that electricity is just a value. The battries usually use their item damage to hold the current charge of energy. While blocks use TileEntities to store the contents of their power. Designing a power network is tricky, it's a lot of logic to consider and plan. Once you have an idea on how you want the logic of it all to work then you can start looking into how on earth this can be done inside minecraft TL;DR: Programming is about solving logic problems, solve the logic puzzle then consider the language and Api (java, minecraft's src, forge) and start figuring out how to get that logic into code fitting with minecraft Then write down logically how the system should accomplish it, once you have figured out that part, then it's time for considering
  12. The tutorials are in multiple parts, and he has some for other topics. I'm glad you liked them and I highly recommend that you watch all the videos in the series, it will make you able to create rather impressive and advance GUI's
  13. public void setSubType(int subTypes) { this.subType = subTypes; Packet packet = this.getDescriptionPacket(); // Send Packet to server here. } Also override/add the onPacketData method similarly to how you did for the getDescriptionPacket method so you're TE knows to read the data for your field from that packet
  14. Rotate it slightly so that it isn't 100% horizontal, then it shouldn't be so "thin" as to vanish. Are you using a custom model for your disk or is the disk just simply drawn as lines using GL11 methods in the render method? Also, showing your code where it seems to vanish would help the GL11 proficient folks here able to spot the error in your code much more easily than by the use of mind reading machines. (Besides I think draco's MentalCodeReading hat is out of order atm )
  15. This is very simple, you are using the premade packet and don't even need your packet handler to manage this one I believe. But hey, do you have the method "onPacketData(packet)" implemented? If not then that MAY alone be the cause of your problem. If you have one, or if adding it does not resolve the problem. Then add the code to send a packet to the server as I mentioned in the last post. We are talking about 4-5 lines of code to be added, so this isn't anything to worry about for Netty
  16. When the world unloads and the write is called (this is done server side) is the variable holding the correct subtype? I assume not. And I assume it holds the default value instead? My thinking is that the server is never told about all this shit, since Icons are client side and all. Inside the setSubType() method, right below the line "this.subType = subTypes;" you should try to send a packet to the server. Remember to use "getDescriptionPacket()" to get the packet which you send, I'm just assuming you are familiar with packets if not check the forge wiki
  17. Place a breakpoint at the this.subType = NBT.getInteger("subType"); and another one at the NBT.setInteger("subType", subType); line. Then run the debugger and see what the values are when it's getting saved and when it's getting loaded. If the value is the never changing from the default value, then the problem is with the packets probably. If it's the correct value on save and load then it's something else. Start with the debugging and let's take it from there depending on your results
  18. You may, by simply creating a thread here in this support section and I and/or others will help you out as best we can By creating a thread about your question you achieve several things you wouldn't do by PMing me. First of all, you get a faster response. I'm only at the boards so and so often and my afk life may take me away for even longer at times. By comparison there's many regular users of these boards which all are highly skilled (lol most of them way beyond my abilities!). So you are guaranteed a faster and possibility of a better answer by creating a thread instead of using PMs Secondly by creating a thread others can find it using the search function or get directed there by helpers. This makes others learn from your questions as well, which I consider a great thing!
  19. 1. Use code tags or paste code into https://gist.github.com/ (with JAVA syntax highlighting!). 2. When you have an error, you should always mention what the error says. Now I'll look into your error You aren't going to like what I have to say though You're problem is unrelated to Minecraft's code, even to forge. The main problem you are having right now is with basic programming logic and Java syntax. It may be a simple typo, but then you would have realized by the error message, combined with your other code I'm sure in my assesment. Most people will just ignore such advise, but if you care to learn see below PPS: You are doing Class = new ItemSword(/*args */); you can't set a class to something. You need to set the variable, not the class
  20. If the block has a TileEntity and the method is a part of that TE then sure. Just do world.getTileEntityAt(x,y,z) to grab the TE for that block, and call the method on it The question is when do you need to call this method, or rather from where do you need to call it?
  21. Related to inventories and GUIs I would say VSWE's interface tutorial deals some with them: I'd start there, and after that I would have tried to make my own furnace looking at TileEntityFurnace for guidance (but NOT copy-pasting it, just reading, understanding how it works!) Also remember that TileEntities are nothing magical. They are just a way to store extra logic for a block. TileEntities can get updates on every tick, minecraft will call it's Update(UpdateEntity?) method every tick and you can do your logic there. Also TE's Can store any amount of data you want, they are not limited to the 16 bits metadata that the block has. TE's can reference the blocks they are located along with, they know their location in the world (xyz) and all that. Their data get's saved to NBT, you have to write your own save and load code into the respective methods in order to save your variables. Here again understanding TileEntityFurnace is of great value!
  22. Jeerdus, I'd just drop in the simplest and best advice I can give: Check out VSWE's excellent course about GUI's. It involves syncing Server<->Client and later covers advance syncing which does not req. you to reopen your gui
  23. This seems like a simple item code. Nothing in that code relates to how it works in crafting For making your item stay after crafting I would look into the search function on this forum and/or on the ModificationDevelopment section of the Minecraftforum.net Both contains several posts asking about how to make an item stay after crafting. Good luck on your search, I hope you find what you seek Have fun modding!
  24. I'm starting to look into creating custom structures myself. You need two classes: The Component you are which has to inherit from ComponentVillage. You will also need a class which implements the IVillageCreationHandler interface. As for how to do the methods for placing the blocks for the Components addComponentParts() method I'd recommend that you look at the vanilla village houses like the church for example During the initialization of your mod you will need to register the relevant classes. You need to register the CreationHandler by using the following method: VillagerRegistry.instance().registerVillageCreationHandler(/*argss here*/); In 1.6+ you'd also need to tell the MapGenStructureIO about your new component by using it's func_143031_a method with the Component.Class as the first argument and a String with the components name as the 2nd argument. Except that, all I can tell you is to look at how vanilla structure components behave. Try copying one of them and modifying them and see if you can get the hang of how it all works. I STRONGLY recommend that you read into the involved classes and try to understand how they are meant to work before you start slapping code together Good luck mate!
  25. Crude workaround if nothing else works: Create a new itemstack. Also, if you r-click again after it's reset to 0, does the dmg bar jump to right above zero when you r-click again? Or does it continue like the dmg value never got any lower at all?

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.