Jump to content

Pow3rCut

Members
  • Posts

    23
  • Joined

  • Last visited

Everything posted by Pow3rCut

  1. This is the answer, due to them being changed to public on load it removes the problems I was having. However I mDiyo/fuj1n made a far better way then me to do it: https://github.com/mDiyo/TinkersConstruct/blob/master/tconstruct/client/event/EventCloakRender.java So that should solve all the problems of the capes
  2. It does set up Log levels e.g. public static void severe(String message) { log(Level.SEVERE, message); } The Level is set to Severe.
  3. Look at this for an excellent example of how to set up a logger https://github.com/pahimar/Equivalent-Exchange-3/blob/master/ee3_common/com/pahimar/ee3/core/util/LogHelper.java
  4. Okay so I got around half way then hit a lot of trouble with event.renderer.anything being private, any advice? public static void init(net.minecraftforge.client.event.RenderPlayerEvent.Specials.Post event) { if(!playerHasCape(event.entityPlayer).isEmpty()) { EntityPlayer abstractClientPlayer = event.entityPlayer; ThreadDownloadImageData imageDownload = downloadImage(new ResourceLocation("skins/" + StringUtils.stripControlCodes(playerHasCape(event.entityPlayer))), "http://www.minecraftcapes.com/userskins/Diamond_Cape_by_John.png", new ImageBufferDownload()); boolean flag = imageDownload.func_110557_a(); boolean flag1 = !abstractClientPlayer.isInvisible(); boolean flag2 = !abstractClientPlayer.getHideCape(); float f6; if (flag && flag1 && flag2) { event.renderer.func_110776_a(new ResourceLocation("cloaks/" + StringUtils.stripControlCodes(playerHasCape(event.entityPlayer)))); GL11.glPushMatrix(); GL11.glTranslatef(0.0F, 0.0F, 0.125F); double d0 = abstractClientPlayer.field_71091_bM + (abstractClientPlayer.field_71094_bP - abstractClientPlayer.field_71091_bM) * (double)par2 - (abstractClientPlayer.prevPosX + (abstractClientPlayer.posX - abstractClientPlayer.prevPosX) * (double)event.partialTicks); double d1 = abstractClientPlayer.field_71096_bN + (abstractClientPlayer.field_71095_bQ - abstractClientPlayer.field_71096_bN) * (double)par2 - (abstractClientPlayer.prevPosY + (abstractClientPlayer.posY - abstractClientPlayer.prevPosY) * (double)event.partialTicks); double d2 = abstractClientPlayer.field_71097_bO + (abstractClientPlayer.field_71085_bR - abstractClientPlayer.field_71097_bO) * (double)par2 - (abstractClientPlayer.prevPosZ + (abstractClientPlayer.posZ - abstractClientPlayer.prevPosZ) * (double)event.partialTicks); f6 = abstractClientPlayer.prevRenderYawOffset + (abstractClientPlayer.renderYawOffset - abstractClientPlayer.prevRenderYawOffset) * event.partialTicks; double d3 = (double)MathHelper.sin(f6 * (float)Math.PI / 180.0F); double d4 = (double)(-MathHelper.cos(f6 * (float)Math.PI / 180.0F)); float f7 = (float)d1 * 10.0F; if (f7 < -6.0F) { f7 = -6.0F; } if (f7 > 32.0F) { f7 = 32.0F; } float f8 = (float)(d0 * d3 + d2 * d4) * 100.0F; float f9 = (float)(d0 * d4 - d2 * d3) * 100.0F; if (f8 < 0.0F) { f8 = 0.0F; } float f10 = abstractClientPlayer.prevCameraYaw + (abstractClientPlayer.cameraYaw - abstractClientPlayer.prevCameraYaw) * event.partialTicks; f7 += MathHelper.sin((abstractClientPlayer.prevDistanceWalkedModified + (abstractClientPlayer.distanceWalkedModified - abstractClientPlayer.prevDistanceWalkedModified) * event.partialTicks) * 6.0F) * 32.0F * f10; if (abstractClientPlayer.isSneaking()) { f7 += 25.0F; } GL11.glRotatef(6.0F + f8 / 2.0F + f7, 1.0F, 0.0F, 0.0F); GL11.glRotatef(f9 / 2.0F, 0.0F, 0.0F, 1.0F); GL11.glRotatef(-f9 / 2.0F, 0.0F, 1.0F, 0.0F); GL11.glRotatef(180.0F, 0.0F, 1.0F, 0.0F); event.renderer.modelBipedMain.renderCloak(0.0625F); GL11.glPopMatrix(); } } } private static String playerHasCape(EntityPlayer entityPlayer) { if(entityPlayer.username.equalsIgnoreCase("pow3rcut")) { return "Pow3rCut"; } else if(entityPlayer.username.equalsIgnoreCase("sad")) { return ""; } else if(entityPlayer.username.equalsIgnoreCase("dsada")) { return ""; } return ""; } private static ThreadDownloadImageData downloadImage(ResourceLocation par0ResourceLocation, String par1Str, IImageBuffer par3IImageBuffer) { TextureManager texturemanager = Minecraft.getMinecraft().func_110434_K(); Object object = texturemanager.func_110581_b(par0ResourceLocation); return (ThreadDownloadImageData)object; }
  5. Sorry to be a pain, but where is the Cape render code located (unless it is ModelBiped.bipedCloak = new ModelRenderer(this, 0, 0); ModelBiped.bipedCloak.addBox(-5.0F, 0.0F, -1.0F, 10, 16, 1, par1); Ignore me I am an idiot, it is obviously located in RenderPlayer.renderSpecials (P.S. check out the DeadMau5 stuff) -Pow3rCut
  6. Very true (to both the reflection and the overwriting), but either requires additional downloads by the player or for the mod to be installed as a coremod vs the old method where any mod could easily add capes. Perhaps a pull request in Forge, to make the field public? I imagine reflection is the way to go, unless their is a simplier way that I am overlooking
  7. Yes, but it seems like a simple setter and getter would be all that is needed, shame. Used to be a really nice feature
  8. Looks like it has been moved to AbstractClientPlayer and is field_110313_e and that is a ResourceLocation. But it is not public and hence inaccessible. May be another way to change this, but I am not good at reading (even mildly) obfuscated code. - Pow3rCut
  9. My Liquid is still a little buggy, if you could pass on your solution I would be grateful - Pow3rCut
  10. It does seems strange, I'll keep looking and if I find anything I'll post it here.
  11. Not sure if I'll need a tank for this, but I'll keep working on trying to figure this out. Thanks for the suggestions though
  12. That looks about right try that and if that doesn't work let me know - Pow3rCut
  13. Hi, I am trying to update my mod to 1.6.2, all is going well apart from the liquid system, previously I had used ILiquid and extended BlockFlowing/BlockStill. This system is now gone, and I was wondering if anyone has an example (or can just point me in the right direction, at the moment I am running around like a headless chicken) for how to implement the new system using BlockFluidBase/Finite From what I can see you need: A fluid Two blocks as usual - Source and Flowing To Register the fluid in the FluidRegistery What else do you need to add? Thanks in advance, - Pow3rCut
  14. You need to add lwjgl-2.9.0 to referenced libraries in Eclipse, you can find the file in mcp\jars\libaries\org\lwjgl\lwjgl\lwjgl\2.9.0 - Pow3rCut
  15. The reason for my question is that you used to be able in a TickHandler to specify capes by changing the cloakUrl in EntityPlayer and then using "Minecraft.getMinecraft().renderEngine.obtainImageData(player.cloakUrl, new ImageBufferDownload());" to download the image. cloakUrl seems to have moved, or minecraft has changed the way it handles them. If anyone can point me in the right direction I would be very grateful. -Pow3rCut
  16. The only advice I can offer you, is try to create a mod, or look through Open Source mobs such as Tinkers Construct and Buildcraft. They are both really good examples of great mods. -Pow3rCut
  17. Could you give me an example of a vanilla block so that I can have a look? ...or do you mean ItemRenderType? Because if so what do I put in the Inventory field to make it a static image and not a scaled down model?
  18. Not sure about a tutorial for projectile, my suggestion is to look at the arrow and bow code in net.minecraft.item.ItemBow and see how it attaches right click to the arrow. --- Re reading this I think you are talking about attaching the gun model to your hand? If so. I use TileEntitySpecialRender and an obj file, but check the code for modularpowersuit the arm thing (I think that's open source but I could be wrong...) As for the other Tutorials: Multiblock - I am intrested myself but have not come across one yet, check out any open source mods with multiblocks, For custom dimensions, don't worry about not having it for 1.5 almost nothing changes so wuppy's tutorials are still useful. If you have any problems ask me as I have set one of these up following these, of the top of my head I think the main problem was with setBlockwithNotify needs to change to just setBlock. Dimension Portals (see wuppy's) and remember if you want it like a normal nether portal create your own fire Custom Biomes (see wuppy's again his old ones are really good) again not many errors.. Custom music/sounds look at the music disk code and add your own .ogg sound file in your rescources Hope that helped? Pow3rCut
  19. Hi, Is their anyway to have a block that instead of having a smaller version of the placed block have a custom image, like an item. For A Random Example, Grass having a as an icon when it is in your inventory, but when you place it down, it is still grass. Thanks In Advance, Pow3rCut
×
×
  • Create New...

Important Information

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