Jump to content
Search In
  • More options...
Find results that contain...
Find results in...

jonesto95

Members
  • Posts

    21
  • Joined

  • Last visited

jonesto95's Achievements

Tree Puncher

Tree Puncher (2/8)

0

Reputation

  1. I've settled on just climbing slabs, and here's something I've put together that seems to work well. If anything could be improved upon, let me know.
  2. I've made an entity similar to a boat, and just like a boat it gets stuck on slabs, stairs, and even from transitioning from grass paths to normal dirt. I've been looking through the related code for a horse but I'm not finding anything that allows it to "climb" these things. Does anybody know what code allows me to do this?
  3. I've recently successfully gotten a race car entity to load in my mod, and I'm trying to get a second entity (a trophy) to work as well. I figure the best way to get the that trophy model to work, is to copy the appropriate files from the racecar model and adjust the class names. The item used to spawn this object spawns in an entity (the hitbox loads), but the model does not show up. Here's all of the code I believe is relevant: ModEntities RenderHandler RenderTrophy class I feel like the error is somewhere in the RenderHandler class, I feel like I should merge those two RenderingRegistry statements, but I'm not sure how to do so.
  4. Registering the entities on the server side is what did it, thanks!
  5. 1. Yeah, the RegistryHandler is basically the meat and potatoes here. As you saw, the main mod class used to call the RegistryHandler method, but I moved that to ClientProxy. 2. I am aware that the server's proxy doesn't do anything, but the NoClassDefException I got earlier led me to believe that registering models was only done client-side, which I'm beginning to think is the wrong way of thinking. 3. That method is called in util/handlers/RegistryHandler.preInitRegistries() Wait a minute I think I just realized, registerEntityRenders isn't called anywhere anymore. Should I put proxy.preInitRegistries() in the main mod's preInit method? The mod works fine in the development environment, I've tested it that far. It's just getting it to work on a server that I'm not sure about.
  6. I've created a mod over the past week that includes a racecar-like model in the game, and works just like a boat: There is an item that you use to spawn in an instance of the model. Yesterday I decided to test it with an FTB server (where it will ultimately end up), and I got a NoClassDefException, related to the RenderHandler class in my mod. I solved this by putting @SideOnly annotations almost indiscriminately within the project, and moving RegistryHandler.preInitRegistries(); from the main class preInit, to the ClientProxy preInit. Now, the mod loads in fine to the server (no complaints in the server console), and a client can access the items. However, a model does not spawn in if they use the item. Why is this? I've only made mods focused on offline use, so I'm not well experienced in making a mod server-friendly. The source can be found here, if you wish to dig around in it: https://github.com/jonesto95/RaceCarMod/tree/master/src/main/java/tnsoft/racecarmod
  7. It's an entity that can be controlled like a boat, the method simply gets the user's input and sets booleans accordingly, taken from the EntityBoat class. @SideOnly(Side.CLIENT) public void updateInputs() { leftInputDown = GameSettings.isKeyDown(Minecraft.getMinecraft().gameSettings.keyBindLeft); rightInputDown = GameSettings.isKeyDown(Minecraft.getMinecraft().gameSettings.keyBindRight); forwardInputDown = GameSettings.isKeyDown(Minecraft.getMinecraft().gameSettings.keyBindForward); backInputDown = GameSettings.isKeyDown(Minecraft.getMinecraft().gameSettings.keyBindBack); } Strangely enough, I didn't find a call to the EntityBoat's version of the method anywhere within that class, so I added one in mine elsewhere in the code public void onUpdate() { previousStatus = status; status = getRaceCartStatus(); updateInputs(); ... which is causing the NoSuchMethodException. If I take out that call, I get the NoClassDefFoundError, looking for net/minecraft/client/Minecraft
  8. I've compiled my mod, and I've thrown it on a server I'm hosting, and I'm running into NoSuchMethodExceptions for client @SideOnly methods, and NoClassDefFoundError: net/minecraft/client/Minecraft, which I believe tells me I've created a client-only mod. I don't know how to make it multiplayer-compatible though...how do I do that?
  9. I'm pretty sure you actually need a block .json in the item models folder, so that can go. The ModelResourceLocation "new ModelResourceLocation(block.getUnlocalizedName().substring(5))" works for me. Before you get any farther, let me warn you: Any declarations involving ModelLoader must be done on the client side, or else they will crash the server. Look at this file here (and maybe the whole repostiory) and see if you can mold your mod to reflect its structure. https://github.com/Choonster-Minecraft-Mods/TestMod3/blob/1.12/src/main/java/choonster/testmod3/client/model/ModModelManager.java?utf8=✓
  10. Ok, so how would I go about fixing this? As you said it's causing issues lol. Should I use the @SideOnly(Side.CLIENT) tag for those methods?
  11. I'm trying to spawn entities with the same model, but different textures (just like boats), but what is used to dictate the texture must get nulled out as it transfers from item to render. Here's my classes, in order of progression: First, the items are initialized here. This works fine, and the items appear as intended. Then, the onRightClick method in the Item class should assign the item's type to the entity. (Lower half of method) The two getters and setters for the driver enum in the Entity class: And the Render class *should* pull the driver from the entity passed in, using getEntityTexture(), but I get a Null exception instead. Here's the stack trace of the error I'm pretty sure I built this exactly how the boat object handles this, but I also did this at 4 in the morning and may have missed something simple.
  12. Got it. The render method in the Model class had a bunch of junk in it that seemed to break the rendering. I just need the body.render, spoiler.render, etc. statements. Only issue is that seemed to break the scaling I had on the model. Now it's just a bit of number-tweaking from there to get it right again.
  13. Update The cube no longer renders (I honestly forget how I managed that one, yay!), but I have since added a collision box that does work. The box takes the shape of the cube that should be there. I also know the RenderRaceCart.doRender() method is called (and by extension, the ModelRaceCart.render() method as well), but, again, nothing is showing up. I feel something is wrong in these methods...?
  14. Changed that, and it didn't like me casting the model as an IMultipassModel, so I fixed that in the Model class. Now I have an empty renderMultipass method in there. (Do I even need to make this a multipass model?) Now when I right-click the item that spawns the car, nothing shows up.
×
×
  • Create New...

Important Information

By using this site, you agree to our Privacy Policy.