Jump to content

techstack

Members
  • Posts

    23
  • Joined

  • Last visited

Everything posted by techstack

  1. I've written a recursive method to do this myself. One tip if you plan to write your own. make sure you are not going from log to leaf & back to log again. If you don't in a biome like Roofed forest you'll get 1/2 the forest otherwise very OP but very lag inducing. I'd share mine but i'm not 100% happy with it yet. It still leaves some hanging logs in the big oak trees that have random logs that are not on the up, down,north , south, east, west sides but instead are diagonals or not connected at all. Its been low priority on my todo list so far.
  2. Updating for anyone that may come across this later. The workaround causes problems in 1.8.9 as i suspected it might. It causes the entity to get rendered many times over which is not desirable so the issue is back for me. What method call should be setting the entity as being in a chunk client side? I ask because it seems its not getting called correctly in my mod some times so i suspect it could possibly be in a method i've overridden.
  3. Seems that the UV cords are off. If i load the model with a different image (one that is 100% orange) the model is rendered orange when using this.bindEntityTexture(entity); Marking topic as solved as its unrelated to the subject. If anyone else has info on the proper way to do this in 1.8.9 I'd love to hear it
  4. Hello everyone, I've had some success porting my mod to 1.8.9 but i'd like to take advantage of the new OBJLoaders for my entities. I've been able to work out how to load them & draw them on screen. But i haven't had any success in getting the textures to apply. (see screenshot) I know of bindEntityTexture(entity) in the entity's rendered however it just resulted in an all black texture. When i do not use bindEntityTexture(entity) i get the default purple & black texture. Is there any documentation on how to use this new OBJLoader ? especially for entities..... my google-fu abilities have been weak on this topic so far. Source for this branch /commit https://github.com/TechStack/TechStack-s-HeavyMachineryMod/tree/752b09b48fdd079ba5c74f7a5cc3f7a2d6e00853 Check the following for the model class code: https://github.com/TechStack/TechStack-s-HeavyMachineryMod/blob/752b09b48fdd079ba5c74f7a5cc3f7a2d6e00853/src/main/java/com/projectreddog/machinemod/model/ModelLawnmower.java The Renderer https://github.com/TechStack/TechStack-s-HeavyMachineryMod/blob/752b09b48fdd079ba5c74f7a5cc3f7a2d6e00853/src/main/java/com/projectreddog/machinemod/render/machines/RenderLawnmower.java lawnmower.mtl & lawnmower.obj can be found here : https://github.com/TechStack/TechStack-s-HeavyMachineryMod/tree/752b09b48fdd079ba5c74f7a5cc3f7a2d6e00853/src/main/resources/assets/machinemod/models Image of current state with purple & black default texture when bindtexture is disabled:
  5. Maybe I'm over looking it but where is your mapping entry lines in the build.gradle file ? Eg: mappings = "stable_20" my 1.8.9 Example build.gradle : https://github.com/TechStack/TechStack-s-HeavyMachineryMod/blob/1.8.8_redux/build.gradle it May or may not be the cause of this exact error. Hope it helps
  6. OK so after a lot of trial and error I've got the model rendering. Any tips on on how to use the texture? Currently it is just a black model. Ive tried a few things but most point me down a path of using the blockstate /property data. Which I can't wrap my head around yet and are not needed from a entity perspective.
  7. Quick question is the new 1.8.8 OBJ Model & associated OBJLoader intended to only be used for blocks/ Items & TESR... or could it also be used for Entities. I have a mod that started with 1.7.10's advanced model loader to load OBJ files that i used for my entities.. I was able to port this to 1.8 with only minor pain but now i'm looking at 1.8.8 and seeing that the world render is very different and if I'm understanding correctly seems to be always expecting quads.
  8. Update: it seems setting addedToChunk = false; client side will cause them to render/re-appear when returning to chunks so I've done so in my client side update method. I'm not sure if this will have any negative side effects.
  9. RagMan, Thanks for the tip .. i Think that will solve a different problem where the center chunk is not rendering... Thanks! But this one the chunk is in view but the entities will not render... i'll see if i can make a video showing it off shortly.
  10. Any of my entities will do this but the code is very similar. The entities will desapear when the player travles away unloading the chunk the entity is in and will remain invisable untill the player relogs or another player drives the entity into a different chunk.
  11. I've created a custom Rideable entity in my mod I'm able to spawn it in game and see it. However ocassionaly when the player goes to a distant chunk and returns to the entity it will not render... sometimes its OK sometimes it's not. The issue can be resolved by relogging into the SMP server or reloading a SSP world. I've done a good deal of debugging & tracing the code and it seems to me that the entity is not in the Client's version of the EntityLists for the chunk & the shouldrender method is not geting called. I've also confirmed the client is aware of the entiy & is in the correct location by adding logging statments in it's update methods. I also belive it is an issue with entity not being in the Chunks entitylist because in SMP Player A may not be able to see the entity but Player B can and as soon as Player B rides the entity over a chunk border Player A's system will begin rendering the entity again. Any suggestions as to why this may be occuring? Just looking for a point in the right direction Project's github for reference: https://github.com/TechStack/TechStack-s-HeavyMachineryMod TechStack
  12. Disregard it looks like if i run gradle[w] launch4j in the forge project it creates the installer needed to install and run forge obfuscated
  13. I'm able to sort out how to get forge setup in my dev enviroment and make my changes & i can test forge /fml standalone but how would i add in my mod to confirm it resolves the issue? If i add it to the mods folder that forge is run from then it will crash due to the mod being built & re-obfuscated and the forge source in the dev env is de-obfuscated. Is there a way to compile/build my mod so it is not re-obfuscated ?
  14. turns out its a bug in forge for 1.8 : https://github.com/MinecraftForge/MinecraftForge/issues/1552 for anyone looking in the future if a PR isn't created by then. Overriding flowIntoBlock in your class that extends BlockFluidClassic to read as follows seems to correct the issue temporarily until forge is corrected. Also anyone know what the guidelines are for posting PR for forge? Any document that lays out how they should be setup ? I assume there is some special gradel commands to run to get the forge source in a state for the PR & to create the patches etc..
  15. OK that is very useful, Thank you. The tutorial (which was for 1.7.X ) I was using had directions to extend a forge class (BlockFluidClassic) which if I drill down far enough into its parent classes overides getRenderType () with a return value from FluidRegistry.renderIdFluid and that is set to -1. If I override this method to return 1 then i get an error for class cast exception My modded block which extends BlockFluidClassic cannot be cast to net.minecraft.block.BlockLiquid which sounds correct because BlockFluidClassic is from forge and BlockLiquid is from vanilla so the vanilla blockFluidrenderer can't be used to render mod fluids. Without overriding getRenderType() the block can be placed into the world but as soon as the fluid flows out to another block it crashes with the following : Which is why i was asking for the blockstate information because it sounds like it is trying to set the block state name = level to an integer value of 0 -15 based on the fuild's flow distance from origin (eg its height)
  16. Hello, I'm having problems creating a custom fluid block because I cannot find info on how the BlockState (the Json files) file should be setup for a fluid. I tried looking at the vanilla BlockStates and I do not see any blockstate file for water or lava. I was able to add a fluid block but without the proper blockstate file the game crashes when the fluid spreads because it doesn't have the different levels of the fluids defined in the blockstate file. Does anyone have an example of how a fluid & fluid block should be done in 1.8 ? I do not want to copy only to understand the proper way I'd be happy just to know how it was done in vanilla but i do not see blockstates for water or lava. Thanks! Tech
  17. Hello, I had an idea for the mod I'm working on that would involve taking the texture from any block in the game game and "Mixing" it with a texture from my mod. Example adding an overlay to make stone look cracked or damaged in some way. It would be from the rendered in my mod's block but I wasn't sure if it would be possible given the blockstates etc. in 1.8 and having textures pre-defined and stored on disk. I understand that the "Mixing" task could be CPU consuming and would probably be best done during start up not during rendering. Thougths? Tech
  18. For anyone who may encounter this issue in the future I've created an issue on FML's Github for this @ https://github.com/MinecraftForge/FML/issues/588 I've also created a temporary helper method that will send a packet to all players around a point by sending the packets individually. I'm sure its not as effecient but it seems to work until we have a permanent solution to the root cause. Workaround based on how FML finds players around a point: Hope this helps !
  19. Is https://github.com/MinecraftForge/FML/ the proper place to report bugs like this or do they use some other issue tracking tool?
  20. Hi coolAlias, Thanks for the response. I did come across your discussion with Lex Earlier today and tried separating it into another thread at one point to see if that would help but it did not. I took a look at your project and made a fork to test with. If i use your code but change it to sendtoAll instead of sendTo in your Combo class I get the same error when I have multiple users connected to the dedicated server & I attack a mob after pressing X to "Lock" on to them. Looks like FML has a bug when sending packets to multiple clients but works OK if the packet is going to one player/client. Guess i'm not crazy after all Thanks again for another set of code to confirm it with
  21. First , Thank you TheGreyGhost for taking a look & your suggestions I appreciate it. I can confirm the constructor ,frombytes & handler are getting called by the client when it is working properly with only one player within range of the packet location. I can also confirm that sometimes when the client reconnects and other clients are within range that it is not even calling the constructor of my message so it appears to be a bug in FML before my code is running on the client. This plus the fact that I'm not seeing the same behavior when I back port to 1.7 leads me to believe it is a bug in FML 1.8. I'm working with forge 18. build 1285 which is the latest so it sounds like I need to wait until it is corrected. Feel free to use the project as you'd like its the reason its on github I had mostly used other tutorials here on the forums on networking & I have came across a few of your post and examples and I've found them helpful. Thanks again !
  22. Hello, I'm working on a mod where I send packets to the clients in the area with simpleNetworkWrapper.sendToAllAround and passing my MachineModMessageEntityToClient class which implements IMessage. When I do so with only 1 player online or in SP it works fine... the data is sent to the client for rendering . But if I have two (& possibly for more players ) online when the packets are sent both clients are kicked from the server and the error below is in the console. I've set break points in the FML code where it is causing the exception and I can see from the message object that it is in the processing of my packet but the packet appears to be in this "EmptyByteBuf" state even though I'm creating it with my constructor that will provide the data to it. I've tried back porting my project to 1.7 and I haven't encountered this problem in 1.7 yet, but i'd prefer to have my mod working in 1.8 because I still have a lot of work to do and 1.8 may be official by then. I'm still somewhat new to modding so I thought maybe another set of eyes my spot what i'm doing wrong or offer a better way to troubleshoot the issue. Any help or guidance is greatly appreciated I've been racking my brain on this one for a few days now. Tech. my project on github: https://github.com/TechStack/TechStack-s-HeavyMachineryMod networkHandler: https://github.com/TechStack/TechStack-s-HeavyMachineryMod/blob/master/src/main/java/com/projectreddog/machinemod/network/MachineModMessageEntityToClientHandler.java Imessage implementation : https://github.com/TechStack/TechStack-s-HeavyMachineryMod/blob/master/src/main/java/com/projectreddog/machinemod/network/MachineModMessageEntityToClient.java Network Registration line 26 specifically: https://github.com/TechStack/TechStack-s-HeavyMachineryMod/blob/master/src/main/java/com/projectreddog/machinemod/init/ModNetwork.java Call that is sending the packet line 213 : https://github.com/TechStack/TechStack-s-HeavyMachineryMod/blob/master/src/main/java/com/projectreddog/machinemod/entity/EntityMachineModRideable.java#L213 ERROR from client side console (spoiler tag seems to not work for me): https://gist.github.com/TechStack/442357d160ee49ac2260
×
×
  • Create New...

Important Information

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