Jump to content

Naomiora

Members
  • Posts

    14
  • Joined

  • Last visited

Naomiora's Achievements

Tree Puncher

Tree Puncher (2/8)

0

Reputation

  1. I'm currently able to kind of extend the arm. How would I apply the player skin to the extended arm part?
  2. Hey there, I'm trying to extend the player arm model, I've been googling around and I've seen some suggestions of using GL11#translatef but I got no real clue on how I'd use it to extend a player arm. I know it's a small question to start a whole thread about, but thanks for reading anyways.
  3. Hey there! As the title suggests, I am trying to create my own flat-world generator (lowest block being bedrock, and then 10 layers of obsidian). When I look in the MC Flat world creation, I get even more confused on how to do it. Is there anyone willing to explain me how creating such an incredibly simple thing works? (I don't need code, just pseudo code or an explanation is fine). I am pretty new to modding, so I need to learn stuff I guess. Thanks for reading!
  4. Hey, I am back again! Today I am curious about am I able to exclude certain parts of the EntitySlime AI. For Example keep the jumping movement part, but remove it targetting players. So for example keeping the AISlimeFloat, AISlimeFaceRandom and the AISlimeHop, but removing the other 3. Is this possible or do I need to create my own MovementHelper and copy + change the AI it currently has?
  5. That's why I tried running it on the main thread, because I got the same error when not having it run on the main thread. (I changed the code a bit, for some reason I double check freezeKeyBoard? I am pretty blind sometimes) Fixed it by changing the code a bit, for some reason I thought I'd be smart to load and unload it in the same tick. Ty for your help though!
  6. That makes sense now you say it. How do I switch to the GL/render thread though? (Sorry if this is some basic question I could've found in 20 mins googling)
  7. I render my code in the RenderGameOverlayEvent.Post, it simply starts spamming the error once it loads private static final ResourceLocation motionblur = new ResourceLocation("shaders/post/phosphor.json"); public void onHUDrender(RenderGameOverlayEvent.Post render) { Minecraft.getMinecraft().addScheduledTask(new Runnable() { @Override public void run() { if (Minecraft.getMinecraft().player != null) { EntityPlayerSP player = Minecraft.getMinecraft().player; if (Minecraft.getMinecraft().entityRenderer.isShaderActive()) { if (TempStorage.instance.getMyScreen()) { Minecraft.getMinecraft().entityRenderer.stopUseShader(); TempStorage.instance.setMyScreen(false); } } else if (TempStorage.instance.getFreezeKeyBoard()) { if (TempStorage.instance.getFreezeKeyBoard()) { Minecraft.getMinecraft().entityRenderer.loadShader(motionblur); TempStorage.instance.setMyScreen(true); } } } } }); }
  8. Small bumby bumb (I think that's allowed after 24 hours?)
  9. Hey, here I am again! This time with an error I don't know why it's caused, I am basically trying to load the minecraft phosphor shader. Using entityRenderer#loadShader. Each time I perform this however, it spams my console with this specific error: [13:26:08] [Client thread/WARN] [minecraft/ShaderManager]: Could not find uniform named InSize in the specified shader program. I don't know what causes this and when googling it I find no solution/explanation of the problem. Any thoughts? (I'll post the code if needed) Thanks for taking your time with reading this!
  10. Sorry for the horribly late reply, I tried doing this but I already knew maths wasn't my strongest part in life. I couldn't get it to work, and eventually recoded parts of my mod because I thought the reason why it didn't work was because of some other parts affecting the entities movement etc etc. So sorry for asking more help into the linear interpolation part, but could you explain how that'd work?
  11. So something like this: public void pullEntityToEntity(Entity entity, Entity secondEntity, double moveFactor) { double distX = entity.posX - secondEntity.posX; double distZ = entity.posZ - secondEntity.posZ; double dir = MathHelper.atan2(distZ, distX); double speed = 1f / secondEntity.getDistance(entity.posX, entity.posY, entity.posZ) * moveFactor; secondEntity.motionX = MathHelper.cos((float) dir) * speed; secondEntity.motionZ = MathHelper.sin((float) dir) * speed; } shouldn't work for an EntityPlayer? (secondEntity is the EntityPlayer in this case) If you think it should work, it doesn't for me. All it does is nothing, it does get casted though.
  12. Oh, I didn't see that one! Ill look better next time! Thank you! Now the freezing part is solved, but how do I make the player float/move towards the certain location though? The code I currently have only works on Living AI-entities. Do I do that part in the InputUpdateEvent? I don't think so, if so thats gonna be alot of hard work
  13. @SubscribeEvent public static void inputListener(InputUpdateEvent event) { if(ClientModule.isFrozen) { event.getMovementInput().moveStrafe = 0; event.getMovementInput().backKeyDown = false; event.getMovementInput().forwardKeyDown = false; event.getMovementInput().jump = false; event.getMovementInput().leftKeyDown = false; event.getMovementInput().rightKeyDown = false; } } It does freeze most of my movement keys, except for my forwardkey and backkey. why do exactly those 2 keys still work?
  14. Basically what the title says, cancelling WASD and Spacebar keys. Then make the player float/move towards a certain destination. I got it to work for entities such as a cow or skeleton etc. the code I currently use to move an entity towards a location (in this case the location is another entity) is this: public void pullEntityToEntity(Entity entity, Entity secondEntity, double moveFactor) { double distX = entity.posX - secondEntity.posX; double distZ = entity.posZ - secondEntity.posZ; double dir = MathHelper.atan2(distZ, distX); double speed = 1f / secondEntity.getDistance(entity.posX, entity.posY, entity.posZ) * moveFactor; secondEntity.motionX = MathHelper.cos((float) dir) * speed; secondEntity.motionZ = MathHelper.sin((float) dir) * speed; } the code I use to freeze certain entities is: public void freezeEntity(Entity entity) { entity.setVelocity(0, 0, 0); if (entity.prevPosX != entity.posX || entity.prevPosY != entity.posY || entity.prevPosZ != entity.posZ) { entity.posX = entity.prevPosX; entity.posY = entity.prevPosY; entity.posZ = entity.prevPosZ; } } I also tried a simple network message to disable the WASD and spacebar key, which eventually turned out not to work. I googled around why I couldn't change the entityplayer's position + velocity but I could not find why. The code above does work for other entities that isn't a EntityPlayer. Thanks for reading and possibly your help! ^^
×
×
  • Create New...

Important Information

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