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.

WORMSTweaker

Members
  • Joined

  • Last visited

Everything posted by WORMSTweaker

  1. Okay, removed my set() calls from there What's the proper way to change my values though?
  2. Yes, but I'm not calling set() in my Provider, I'm calling it in a separate class
  3. I don't see where or when I'm reading from NBT though Again, I'm a bit lost (but things works like I want them to right now)
  4. So then, instead of callingsendUpdate() in my set() like this I should instead call it each time after I use set(), like this?
  5. I'm sending updates each time I'm calling the set/add/rem of my capability, are they reading from NBT?
  6. I was away for a few days, so sorry for the late response, I think I finally understood now So, before, my instance was created like this: private IPSize instance = SIZE_CAPABILITY.getDefaultInstance(); This is how I've seen every capability instance being created in the examples that I found I suppose that wasn't good, since I can't pass the player this way, so instead i'm doing this: private IPSize instance = new PSize(player); Where player is set trough the constructor of the Provider This should be good (?), but again I'm not 100% sure this is correct, and what's you're expecting me to do The constructor of PSize is simply this and player is used by sendUpdate() that I detailed in earlier posts However, I get a NullPointerException when deserializeNBT() is called, so I suppose that somehow player in the Provider isn't set correctly?...
  7. Okay hmm... I... do not see how I could pass the player to the capability. Could you give me an example? Because i'm getting a bit lost right now...
  8. I cannot access PSizeProvider.player otherwise I suppose I misunderstood how you wanted me to store/retrieve EntityPlayer from the Provider And yes I do understand what static means, I just didn't thought about this when I wrote this, sorry
  9. Okay, I've done it like this I've put this in the Provider And I simply access it like this Doing this do raise some exception tho; so I must be doing something wrong again eh...
  10. Hmm. I'm having trouble understanding what you want me to do then... Right now, my AttachCapabilitiesEvent looks like this My PSizeProvider class looks like this Knowing this, how can I to my PSizeStorage class?
  11. I thought you meant the setters of my capability, but I suppose it was something else?
  12. Okay, now the problem is, by passing EntityPlayer in my setters it break my readNBT() method of my storage class, since i'm calling instance.set(), and now it need an EntityPlayer to be passed I do not see an obvious way to specify it tho, simply using Minecraft.getMinecraft().player doesn't work and simply result in a NullPointerException
  13. Okay, moved all rendering to a separate class So I just need to remove onPlayerUpdate of my code, alright Sending the packet each time the setter is called EDIT : Okay, the problem is, by doing it like this it break my readNBT method of my storage class, since i'm calling instance.set(), and now it need an EntityPlayer to be passed, I don't see an obvious way to specify it tho Removed sendToAll() Sorry about the copy pasting, bad habit of mine. Moved every similar packet related things into a private sendUpdateMessage() method.
  14. Where should I move the RenderPlayerEvent? Changed, in my case, is it better to use START or END ? Removed the check How can I check if the value has changed? Should I simply store it temporarily and then send it if the temp value is different than the current value? Applied everything, is this correct?
  15. Well, somehow it doesn't, I forgot to put it, sorry
  16. Hello! I'm trying to render a new layer on the player model, which we be scaled differently based on a value stored in the player capabilities. I got the rendering to work, the capability too, but now i'm trying to retrieve the value from the capability to modify on the fly the scaling. However, the capability always return the base value (0.0) when I try to view the player model in the inventory, or using F5, and of course it doesn't work in multiplayer too. What could be the problem? I've attached a screenshot to show the chain of events I'm logging into the player chat. This is my Event Handler The SizeSyncPacket class If you think the problem might be elsewhere than these 2 classes, please feel free to tell me!
  17. Oh okay, I didn't knew you were talking about making something like this Anyway, thanks for your help! I'm going to mark this as solved now, and as I said in my first post, look at how layers works, since it seems a bit more appropriated for what I want to do with my model
  18. I'm not going to lie, I'm having trouble understanding what you want me to do with getEntityTexture()... I understand that it returns cubeTexture, and also as I read is apparently called when do .bindTextures(), but I don't know how it can help me change the texture itself. Mind developping a bit? Also, please excuse my lack of knowledge on the matter
  19. I'm planning on making my model change the way it looks when a certain event happen, and so I just want to be sure that it is the right way to change the model texture I suppose that the change should be immediate? Since I'm calling cubeRenderer.doRender() each frame
  20. Yes of course, but I was just saying that since I'm not setting any texture (unless I directly access RenderCube.cubeTextures or use setCubeTextures() ) cubeTextures is null, and that it is normal that I get this null Now again, since I'm trying to change this texture from outside of the RenderCube class, should I simply do something like RenderCube.cubeTextures = new ResourceLocation(Hyper.MOD_ID, "bla/bla/new/path"), or should I do it differently?
  21. getEntityTexture() simply returns null,which is expected since I'm not giving any texture to the model inside the RenderCube class, and I want to assign the texture from outside the renderer What should I do to achieve this the correct way? Urgh, again I missed out something this simple, even though I looked at previous code that I made, and countless examples... It does work and load correctly now, when I'm using my weird setCubeTextures() function
  22. Okay, removed the @SideOnly Is a check like this a good solution, or should I find another way to do it? This strange setup (as I stated in the comments next to RenderCube.setCubeTextures(texture); ) is to let me change the texture without directly accessing the cubeTextures in the RenderCube class. I agree that it is weird, and probably useless, so I might remove it. Also, if the model isn't assigned a texture, it doesn't render at all, not even with a missing texture pattern. This might indicate that I again did something wrong. Why would you want me to return the texture? Since i'm trying to assign the texture to my model, why should I use getEntityTexture()? My evidence that it does exist, please do not pay attention to the fact that my classes are not organized, I will do that when I'll get a working render:
  23. Hello! I'm trying, for now at least, to render a small model onto the player model I first tried to use layers, but then I simply rendered my model on the player entity when the player is rendered. Anyway, for now, my problem is, that my model doesn't have any textures, and that Minecraft simply spit this error: Of course, the file does exist, my path in my ResourceLocation is correct, but still no textures. I register my model entity in my ClientProxy: And I render it on the onPlayerRender event, in my EventHandlerClient: RenderCube: And the model, for good measure: I'm using Intellij, and before you ask, I already tried to put 'idea { module { inheritOutputDirs = true } }' or similar stuff to try to fix this kind of error. If anybody has a clue on what's going on, feel free to respond! And also, if you have some time, maybe you can teach me how to use layers on the player model, as I think it would be more appropriate to use them instead of rendering directly over the player model.
  24. Oh my god, now I feel like a fool. How did I miss that?... Anyway, thanks for you help, and please excuse my stupidity for not noticing something this obvious ?
  25. Hello! So, I wanted to get back into modding, but apparently the world is against me today. My problem is, that when starting up, FML simply crashes at the construction phase, claiming that it couldn't "load a proxy". I never had trouble with this kind of error, and I wanted to know if somebody could help me with this. And just so you know, I read and re-read the few classes I have, looked at multiple exemples on proxies and even rewritten my Client, Server, and CommonProxy (since thre's pretty much nothing in them) Here's the crash message : And this is my main class, I checked if the paths in @SidedProxy() to see if they were wrong, and they apparently aren't : As you can see, there's pretty much nothing here for now, and the same can be said for my proxy classes. Those are my Common, Client, and ServerProxy: In term of workspace, I'm working with Intellij Community 2019, and Forge 1.12.2-14.23.5.2838 Attached is the full crash log, and my working folder. If anybody spot something that is wrong, or have an idea of why this is happening, please feel free to respond, and thanks for the help! crash.txt

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.