Jump to content

NolValue

Members
  • Posts

    42
  • Joined

  • Last visited

Everything posted by NolValue

  1. Yeah, Minecraft really isn't inherently threadsafe. Thankfully, at least right now, the AI is going to only read data from other threads. It shouldn't be able to directly alter it. The most it'll do is maybe spawn an Entity like a projectile.
  2. I know it relatively well. Not too strong on it in Java, only used it occasionally, but I do have extensive experience in other languages. Thanks for answering my question, I'll go ahead and give it a try.
  3. This isn't really an outright request for help or support, more asking a question on what you guys would recommend in terms of this idea. I've been working on a mod as of late, if you guys know what CustomNPCs is, I'm working on my own type of mod in that sort of genre. So, right now, I'm working on a custom AI system based off Behaviour Trees. I chose this over using Minecraft's built in one because theirs feels kind of limited, plus it's easier to visualize what decisions my AI would make this way. After getting closer to completion, I've been thinking about how this system is a lot of overhead to add to Minecrafts already relatively bloated stack. Do you guys think it would be justifiable to move all my NPC entities AI onto their own thread? As in, have a singleton AI Handler class in which it has it's own thread where it processes its children (at a fixed tickrate of course) on loop? (Accidentally posted in wrong section before. Reposting here and editing old thread)
  4. That's most likely incorrect, these are Minecraft methods and parameter. Which means the user didn't run the gradle task setupDecompWorkspace
  5. So this isn't so much support, as I know how to do this, but I was wondering exactly why it's so frowned upon within this community? The personal reasons I do this with a couple of mods are as followed 1. Clients who I do mod development for would like mods to be obfuscated because they don't want the features within them to be replicated (Scummy in my opinion, but I go with it, especially when they pay me more.) 2. Security reasons, packets can be surprisingly easy to manipulate if someone takes the time to research them and finds a vulnerability. While I try to avoid vulnerabilities by adding serverside checks, there's always going to be an exploit. This is what I do for my personal projects that are meant to be heavily serversided focus. 3. Avoidance of clientside exploits. A good example of this would be a 1.7.10 Mod called Dragon Block C, where due to the modder's failure to properly hide functions and what they do, I ended up able to create a mod that allows me to instantly transform and reach max output percentage of stats. These are my reasons, though I rarely do obfuscation aside from projects with very experimental and potentially exploitable features or upon specific request from a paying client. When I'm not worried about such issues they'll be left alone with no special obfuscation attempts I'd like to hear the thoughts of other modders, as I personally understand the need for it in certain situations. Normally however, while I don't frown upon it, I don't think it's outright necessary.
  6. Not every mod has updated to 1.12.2, and a lot of the really good ones are stuck in 1.7.10 due to the massive jump in difficulty to update from 1.7.1.0 to 1.8. Plus the newer versions of MC are a lot more resource intensive.
  7. I'm still unable to figure out why mobs become transparent behind it.
  8. Apparently, it's decided to do that thing where it only renders when the camera is in certain positions. And other entities aren't visible behind it
  9. Even with both of those done, the Entity plain refuses to load the model in. Works just fine with regular GL11, but not GLState
  10. public class RenderAura extends Render implements IRenderFactory<EntityAura> { ModelBase model; public RenderAura(RenderManager renderManager) { super(renderManager); this.model = new ModelAura(); } @Nullable @Override protected ResourceLocation getEntityTexture(Entity entity) { return new ResourceLocation(References.MOD_ID, "textures/entity/aura.png"); } public void doRender(Entity entity, double x, double y, double z, float yaw, float pitch) { int[] AuraColor = entity.getCapability(ModCapabilities.AURA, null).getAuraColor(); float[] color = new float[AuraColor.length]; for(int i=0; i<AuraColor.length; i++) { color[i] = AuraColor[i]/10; } GlStateManager.pushAttrib(); GlStateManager.pushMatrix(); GlStateManager.enableAlpha(); GlStateManager.enableBlend(); GlStateManager.translate(x, y, z); GlStateManager.color(0.259f, 0.525f, 0.957f, 0.4f); this.model.render(entity, 0.0F, 0.0F, -0.1F, 0.0F, 0.0F, 0.0625F); GlStateManager.disableAlpha(); GlStateManager.disableBlend(); GlStateManager.popMatrix(); GlStateManager.popAttrib(); } @Override public Render<? super EntityAura> createRenderFor(RenderManager manager) { return new RenderAura(manager); } }
  11. Also, I should mention that this isn't a for a TileEntity, this is a regular entity using a custom model.
  12. Went ahead and tried using GLStateManager, doesn't even render now. Anyways, the color is just straight up not applying
  13. So, I have this code here, that is supposed to render my custom model. public class RenderAura extends Render implements IRenderFactory<EntityAura> { ModelBase model; public RenderAura(RenderManager renderManager) { super(renderManager); this.model = new ModelAura(); } @Nullable @Override protected ResourceLocation getEntityTexture(Entity entity) { return new ResourceLocation(References.MOD_ID, "textures/entity/aura.png"); } public void doRender(Entity entity, double x, double y, double z, float yaw, float pitch) { int[] AuraColor = entity.getCapability(ModCapabilities.AURA, null).getAuraColor(); float[] color = new float[AuraColor.length]; for(int i=0; i<AuraColor.length; i++) { color[i] = AuraColor[i]/10; } GL11.glPushMatrix();{ GL11.glScaled(0.5, 0.5, 0.5); GL11.glColor4f(0.58f, 0.110f, 0.193f, 0.4f); GL11.glEnable(GL11.GL_BLEND); GL11.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA); GL11.glTranslated(x, y, z); GL11.glPushAttrib(GL11.GL_ENABLE_BIT); OpenGlHelper.setLightmapTextureCoords(OpenGlHelper.lightmapTexUnit, 128.0F, 128.0F); bindTexture(new ResourceLocation(References.MOD_ID, "textures/entity/aura.png")); this.model.render(entity, 0.0F, 0.0F, -0.1F, 0.0F, 0.0F, 0.0625F); GlStateManager.disableAlpha(); GlStateManager.disableBlend(); GL11.glPopAttrib(); } GL11.glPopMatrix(); } @Override public Render<? super EntityAura> createRenderFor(RenderManager manager) { return new RenderAura(manager); } } As you can see by the title, I want a color that changes. Whenever I try to get it to work, it fails to apply the color. I've tried various different methods in an attempt to get it to work The Alpha works perfectly, however the color of the texture does not.
  14. Yeah, thankfully my code already has Capabilities and a packet sync setup that I can just add to, haha. Just need to figure out how to get the player who's using the keybind, which I should be able to by looking through MC's code.
  15. As it turns out, RenderPlayerEvent.post is not the proper way to do this, as I'm going to render something to a player when a button is pressed. It's going to take a lot more work than originally expected, as I need to write a custom .obj parser and renderer now using OpenGL, haha.
  16. Issue is unrelated to forge, it appears to be a gui issue according to the crash log however. Try remaking the server?
  17. I want to draw something on top of the player, or rather around the player. Not replace the model. Sorry for the late response, forgot that I had made this post.
  18. That wouldn't crash the code, hasCapability functions like a boolean from what I believe. Anyways, I'm not sure if there is any way to check if an event is there either. He'd just have to check if that other mod is there or not as you said.
  19. In that case, that code should still work as hasCapability checks if it's there or not. If it isn't there, use an else statement to have it send a chat message stating that the player needs to install that mod
  20. Ah, alright then. I was thinking by using that I'd be overriding the player's model though.
  21. So basically, you want to check if there is a capability then execute code correct? I'm fairly certain you can do something along the lines of using if [Entity].hasCapability([CapabilityName]){ACTIONHERE} or to a similar effect
  22. To clarify, I'm looking for general pointers on how to use a TESR as the documentation for it isn't the greatest.
  23. So, I have a .obj file, which I'd like to have the player sit in the center of. Not override the player's model, but have it rendered on top of them. I know it's possible, as I've seen it done before, however, I'm unsure how to go about doing it. I know I'll need a TESR but that's about it. I assume I'll have to get the player's coords then render it to that, however I've never done anything with a TESR before, which will make this difficult for me. Any form of help or advice on how to go about doing this is appreciated.
  24. You should be able to drag the jar file of the mod you're looking to test for into the mods folder under the run section in where your project is.
  25. Yeah apparently it was as simple as switching to CommandBase and removing the lines that use null or 0. Thanks mate.
×
×
  • Create New...

Important Information

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