Jump to content
Search In
  • More options...
Find results that contain...
Find results in...

AyyyyLmao

Members
  • Posts

    27
  • Joined

  • Last visited

Everything posted by AyyyyLmao

  1. Im creating a '1.7 blockhit' mod for forge, I created a mcp version a while ago and the people I gave it to want me to make a forge version so its compatible with other mods like bspkrs's mods and such. The way to do this is in the 'renderItemInFirstPerson' method in 'ItemRenderer', there is a switch statement for the action that the item is doing, case 4 of the statement is the blocking animation. Normally case 4 just contains this case 4: this.func_178096_b(var2, 0.0F); this.func_178103_d(); break; To change the animation that is played in 1.8 and make it show the animation that was shown in 1.7 all you have to do is change the values and then use the GlStateManager to translate it in to a better position like so case 4: this.func_178096_b(0.2F, var4); this.func_178103_d(); GlStateManager.translate(-0.5F, 0.2F, 0.0F); break; Is there an easy way to override this method using reflection or something? because I've tried using a subclass of the ItemRenderer method but that didn't work because some of the methods that are run inside of the 'renderItemInFirstPerson' method are private
  2. I'm trying to make a 1.7 block hit mod for forge, I already have a mcp version of it. All I have to do is this: [spoiler=Normal renderItemInFirstPerson method] public void renderItemInFirstPerson(float p_78440_1_) { float var2 = 1.0F - (this.prevEquippedProgress + (this.equippedProgress - this.prevEquippedProgress) * p_78440_1_); EntityPlayerSP var3 = this.mc.thePlayer; float var4 = var3.getSwingProgress(p_78440_1_); float var5 = var3.prevRotationPitch + (var3.rotationPitch - var3.prevRotationPitch) * p_78440_1_; float var6 = var3.prevRotationYaw + (var3.rotationYaw - var3.prevRotationYaw) * p_78440_1_; this.func_178101_a(var5, var6); this.func_178109_a(var3); this.func_178110_a((EntityPlayerSP)var3, p_78440_1_); GlStateManager.enableRescaleNormal(); GlStateManager.pushMatrix(); if (this.itemToRender != null) { if (this.itemToRender.getItem() == Items.filled_map) { this.func_178097_a(var3, var5, var2, var4); } else if (var3.getItemInUseCount() > 0) { EnumAction var7 = this.itemToRender.getItemUseAction(); switch (ItemRenderer.SwitchEnumAction.field_178094_a[var7.ordinal()]) { case 1: this.func_178096_b(var2, 0.0F); break; case 2: case 3: this.func_178104_a(var3, p_78440_1_); this.func_178096_b(var2, 0.0F); break; case 4: this.func_178096_b(var2, 0.0F); this.func_178103_d(); break; case 5: this.func_178096_b(var2, 0.0F); this.func_178098_a(p_78440_1_, var3); } } else { this.func_178105_d(var4); this.func_178096_b(var2, var4); } this.renderItem(var3, this.itemToRender, ItemCameraTransforms.TransformType.FIRST_PERSON); } else if (!var3.isInvisible()) { this.func_178095_a(var3, var2, var4); } GlStateManager.popMatrix(); GlStateManager.disableRescaleNormal(); RenderHelper.disableStandardItemLighting(); } and change it to this [spoiler=Modded renderItemInFirstPerson method] public void renderItemInFirstPerson(float p_78440_1_) { float var2 = 1.0F - (this.prevEquippedProgress + (this.equippedProgress - this.prevEquippedProgress) * p_78440_1_); EntityPlayerSP var3 = this.mc.thePlayer; float var4 = var3.getSwingProgress(p_78440_1_); float var5 = var3.prevRotationPitch + (var3.rotationPitch - var3.prevRotationPitch) * p_78440_1_; float var6 = var3.prevRotationYaw + (var3.rotationYaw - var3.prevRotationYaw) * p_78440_1_; this.func_178101_a(var5, var6); this.func_178109_a(var3); this.func_178110_a((EntityPlayerSP)var3, p_78440_1_); GlStateManager.enableRescaleNormal(); GlStateManager.pushMatrix(); if (this.itemToRender != null) { if (this.itemToRender.getItem() == Items.filled_map) { this.func_178097_a(var3, var5, var2, var4); } else if (var3.getItemInUseCount() > 0) { EnumAction var7 = this.itemToRender.getItemUseAction(); switch (ItemRenderer.SwitchEnumAction.field_178094_a[var7.ordinal()]) { case 1: this.func_178096_b(var2, 0.0F); break; case 2: case 3: this.func_178104_a(var3, p_78440_1_); this.func_178096_b(var2, 0.0F); break; case 4: this.func_178096_b(0.2F, var4); this.func_178103_d(); GlStateManager.translate(-0.5F, 0.2F, 0.0F); break; case 5: this.func_178096_b(var2, 0.0F); this.func_178098_a(p_78440_1_, var3); } } else { this.func_178105_d(var4); this.func_178096_b(var2, var4); } this.renderItem(var3, this.itemToRender, ItemCameraTransforms.TransformType.FIRST_PERSON); } else if (!var3.isInvisible()) { this.func_178095_a(var3, var2, var4); } GlStateManager.popMatrix(); GlStateManager.disableRescaleNormal(); RenderHelper.disableStandardItemLighting(); } And then it does the old 1.7 block hit animation
  3. I forgot to say that using a sub class of ItemRenderer didn't work as some of the methods that are in the method I'm changing are private
  4. Ok so I want to override the method 'renderItemInFirstPerson' in the 'ItemRenderer' class but I dont know how to. What the simplest way to do this? Thanks.
  5. I havent tried with reflection but events wont work
  6. I havent made any animations, Ive just edited some of the values in several classes of the Minecraft code
  7. So there isnt any other simple way to make the mod I've made work with forge?
  8. I have already made this mod, and all you have to do is drag it into the mc version jar and it works, I just want to know how I can get it to work with forge because I want to play with the other forge mods Ive made as well as this mod
  9. Hey, so I've been reading through this http://www.minecraftforum.net/forums/mapping-and-modding/mapping-and-modding-tutorials/1571568-tutorial-1-6-2-changing-vanilla-without-editing And I want to create my own coremod to change some of the 1.8 player animations back to 1.7's style, example: blockhit, sneaking, damage etc. But I don't know how to do this for 1.8 let alone 1.6.2 if I was using it, so I was wondering if anyone can give me some help or explain it in an easier way to understand. Thanks.
  10. I want to display a few paragraphs of text which will have all the changes in an upcoming version. But if the user has their window size different to what I'm testing with then it will go over the edges and the user will not view it correctly. How would I implement a scroll bar and format it to fit in every window of any size? Heres what I have now: package mc.ayyyylmao.testgui; import net.minecraft.client.gui.GuiButton; import net.minecraft.client.gui.GuiControls; import net.minecraft.client.gui.GuiMultiplayer; import net.minecraft.client.gui.GuiScreen; public class TestGui extends GuiScreen { private GuiScreen parentScreen; private GuiButton dlnow; private GuiButton rmlater; private int headerPos; private int footerPos; private byte byte0 = -16; public TestGui(GuiScreen parent) { this.parentScreen = parent; } public void initGui() { this.buttonList.clear(); headerPos = 35; footerPos = this.height - 29; this.dlnow = new GuiButton(1, this.width / 2 - 70, footerPos-17, 150, 20, "Download Now"); this.rmlater = new GuiButton(2, this.width / 2 - 70, footerPos+3, 150, 20, "Remind Me Later"); this.buttonList.add(dlnow); this.buttonList.add(rmlater); } protected void mouseClicked(int mouseX, int mouseY, int mouseButton) { if (mouseButton == 0) { for (int l = 0; l < this.buttonList.size(); ++l) { GuiButton guibutton = (GuiButton)this.buttonList.get(l); if (guibutton.mousePressed(this.mc, mouseX, mouseY)) { actionPerformed(guibutton); } } } } protected void actionPerformed(GuiButton button) { switch(button.id) { case 1: // Do stuff break; case 2: // Do stuff break; } } public void drawScreen(int mouseX, int mouseY, float partialTicks) { this.drawBackground(0); this.drawGradientRect(0, 50, this.width, this.height - 50, -1072689136, -804253680); this.drawCenteredString(this.fontRendererObj, "New Version Released", this.width/2, headerPos, 0xFFFFFF); super.drawScreen(mouseX, mouseY, partialTicks); } } Thanks.
  11. Hello, How would I be able to render my techne model (I already exported and imported in to my mod) I was just wondering how I would be able to render it on to the player, sitting on top of the head thanks
  12. I was thinking of having a guibutton popup above the word as you're typing it and that way if you spelled the word incorrectly and want to correct it you can click the button that you want. I'm interested in hearing what you had in mind though. If you would like to tell me that is, I don't mind :>
  13. How would I be able to get what the player is typing in the chat bar, before they send it. I'm working on an autocorrect mod for my friend. Is there a way to do this or not? Thanks
  14. Nothing I just wanted to know if there was an easier way But thanks
  15. Hey, Im trying to create a Damage Reduction Calculator so I can see how much damage my armor, potion effects and enchants are stopping, and I have everything so far I just dont know how to get just the resistance level I have. I want to be able to just get the resistance effect's amplifier without having to create and iterator. Is there a way to do this? Thanks.
  16. Hey, I was using GuiPlayerInfo in a 1.7.10 mod, and Im trying to get it for 1.8 but I cant find the GuiPlayerInfo class. What was it changed to?
  17. Is it possible with a mod to change the resource pack the player is using? If so what would I have to do to do so
  18. How can I get the EntityPlayerMP though, thats what im asking
  19. Everytime i use the command i get this [22:08:22] [Client thread/INFO] [sTDERR]: [java.lang.Throwable$WrappedPrintStream:println:748]: java.lang.ClassCastException: net.minecraft.client.entity.EntityClientPlayerMP cannot be cast to net.minecraft.entity.player.EntityPlayerMP [22:08:22] [Client thread/INFO] [sTDERR]: [java.lang.Throwable$WrappedPrintStream:println:748]: at net.ayyyylmao.ping.cmds.PingCommand.func_71515_b(PingCommand.java:49) [22:08:22] [Client thread/INFO] [sTDERR]: [java.lang.Throwable$WrappedPrintStream:println:748]: at net.minecraftforge.client.ClientCommandHandler.func_71556_a(ClientCommandHandler.java:72) [22:08:22] [Client thread/INFO] [sTDERR]: [java.lang.Throwable$WrappedPrintStream:println:748]: at net.minecraft.client.gui.GuiChat.func_146403_a(GuiChat.java:141) [22:08:22] [Client thread/INFO] [sTDERR]: [java.lang.Throwable$WrappedPrintStream:println:748]: at net.minecraft.client.gui.GuiChat.func_73869_a(GuiChat.java:131) [22:08:22] [Client thread/INFO] [sTDERR]: [java.lang.Throwable$WrappedPrintStream:println:748]: at net.minecraft.client.gui.GuiScreen.func_146282_l(GuiScreen.java:319) [22:08:22] [Client thread/INFO] [sTDERR]: [java.lang.Throwable$WrappedPrintStream:println:748]: at net.minecraft.client.gui.GuiScreen.func_146269_k(GuiScreen.java:276) [22:08:22] [Client thread/INFO] [sTDERR]: [java.lang.Throwable$WrappedPrintStream:println:748]: at net.minecraft.client.Minecraft.func_71407_l(Minecraft.java:1628) [22:08:22] [Client thread/INFO] [sTDERR]: [java.lang.Throwable$WrappedPrintStream:println:748]: at net.minecraft.client.Minecraft.func_71411_J(Minecraft.java:961) [22:08:22] [Client thread/INFO] [sTDERR]: [java.lang.Throwable$WrappedPrintStream:println:748]: at net.minecraft.client.Minecraft.func_99999_d(Minecraft.java:887) [22:08:22] [Client thread/INFO] [sTDERR]: [java.lang.Throwable$WrappedPrintStream:println:748]: at net.minecraft.client.main.Main.main(SourceFile:148) [22:08:22] [Client thread/INFO] [sTDERR]: [java.lang.Throwable$WrappedPrintStream:println:748]: at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [22:08:22] [Client thread/INFO] [sTDERR]: [java.lang.Throwable$WrappedPrintStream:println:748]: at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) [22:08:22] [Client thread/INFO] [sTDERR]: [java.lang.Throwable$WrappedPrintStream:println:748]: at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) [22:08:22] [Client thread/INFO] [sTDERR]: [java.lang.Throwable$WrappedPrintStream:println:748]: at java.lang.reflect.Method.invoke(Method.java:483) [22:08:22] [Client thread/INFO] [sTDERR]: [java.lang.Throwable$WrappedPrintStream:println:748]: at net.minecraft.launchwrapper.Launch.launch(Launch.java:135) [22:08:22] [Client thread/INFO] [sTDERR]: [java.lang.Throwable$WrappedPrintStream:println:748]: at net.minecraft.launchwrapper.Launch.main(Launch.java:28)
  20. I need to get to get the EntityClientPlayerMP, but i cant cast it to EntityPlayerMP .-. java.lang.ClassCastException: net.minecraft.client.entity.EntityClientPlayerMP cannot be cast to net.minecraft.entity.player.EntityPlayerMP
  21. 1) Don't give copy-paste ready code, it doesn't help anyone 2) What is sender isn't a EntityPlayerMP ? Its ICommandSender Its my IGN I dont have reddit ;-;
  22. Hey, im working on adding a /ping command to my mod but at the moment I just cant get the player without it erroring. How do I get the EntityPlayerMP from the command sender. thanks!
  23. Create a /ping command Or maybe add a drawString in the top so I can see my ping without having to use cmd or logout of the server
×
×
  • Create New...

Important Information

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