Jump to content

Vaderico

Members
  • Posts

    11
  • Joined

  • Last visited

Converted

  • Gender
    Undisclosed
  • Personal Text
    I am new!

Vaderico's Achievements

Tree Puncher

Tree Puncher (2/8)

0

Reputation

  1. Hey thanks for the reply guys. TheGreyGhost, I have read the thread you linked me and I figured I will get confused keys working first and then I will use that as a base to get my mod to work. I am however having a few problems. (In 1.7.10) I have re-created your three classes ConfusedMovementInput, ClientTickHandler, (my main modding class) - ConfusedMovementInput doesn't seem to have any errors - ClientTickHandler has the following errors: -> It's telling me I need to create the interface "ITickHandler" -> It's telling me I need to create an interface or Class called "TickType" - (main modding class called Shinobi) doesn't seem to have any errors Here is the code: package net.shinobi.mod; import net.shinobi.mod.keyboard.ConfusedMovementInput; import cpw.mods.fml.common.Mod; import cpw.mods.fml.common.Mod.EventHandler; import cpw.mods.fml.common.event.FMLInitializationEvent; @Mod(modid = Shinobi.MODID, version = Shinobi.VERSION) public class Shinobi { public static final String MODID = "Shinobi"; public static final String VERSION = "Alpha 1.0"; public static net.shinobi.mod.Shinobi instance; public static ConfusedMovementInput confusedMovementInput; } package net.shinobi.mod.keyboard; import net.minecraft.util.MovementInput; public class ConfusedMovementInput extends MovementInput { public ConfusedMovementInput(MovementInput interceptedMovementInput) { underlyingMovementInput = interceptedMovementInput; } @Override public void updatePlayerMoveState() { underlyingMovementInput.updatePlayerMoveState(); this.jump = underlyingMovementInput.jump; this.sneak = underlyingMovementInput.sneak; if (!confused) { this.moveStrafe = underlyingMovementInput.moveStrafe; this.moveForward = underlyingMovementInput.moveForward; } else { this.moveStrafe = -underlyingMovementInput.moveStrafe; //swap left and right this.moveForward = underlyingMovementInput.moveForward; } } public void setConfusion(boolean newConfused) { confused = newConfused; } protected MovementInput underlyingMovementInput; private boolean confused = false; } package net.shinobi.mod.keyboard; import java.util.EnumSet; import net.minecraft.client.Minecraft; import net.minecraft.client.entity.EntityClientPlayerMP; import net.minecraft.item.ItemStack; import net.shinobi.mod.Shinobi; public class ClientTickHandler implements ITickHandler { public EnumSet<TickType> ticks() { return EnumSet.of(TickType.CLIENT); } public void tickStart(EnumSet<TickType> type, Object... tickData) { if (!type.contains(TickType.CLIENT)) return; EntityClientPlayerMP player = Minecraft.getMinecraft().thePlayer; if (player != null) { if (player.movementInput instanceof ConfusedMovementInput) { } else { Shinobi.confusedMovementInput = new ConfusedMovementInput(player.movementInput); player.movementInput = Shinobi.confusedMovementInput; } ItemStack heldItem = player.getHeldItem(); if (heldItem != null) { Shinobi.confusedMovementInput.setConfusion(true); } else { Shinobi.confusedMovementInput.setConfusion(false); } } } public void tickEnd(EnumSet<TickType> type, Object... tickData) { } public String getLabel() { return "ClientTickHandler"; } }
  2. I'm trying to figure out how to disable the player movement keys when the left and right mouse buttons are being held down at the same time. When the player releases the mouse keys the movement keys will work again. I have been reading the tutorials provided on the website explaining how mouse and keyboard input works. http://greyminecraftcoder.blogspot.com.au/2013/10/user-input.html I am looking for tips on how to apply this information to a mod. I'm not entirely sure where to start. Thanks in advance to anyone who is able to help me out.
  3. Hey Oli I'm having the exact same problem you are. I have only just started coding and don't understand how to perform all of your proposed solutions. specifically: Do I re-run the command "gradlew setupDecompWorkspace" with an extension: gradlew setupDecompWorkspace --assetIndex 1.7.2 --assetsDir "C:\Users\Oli_Gophrenos\.gradle\caches\minecraft\assets" I'm sorry for asking you such a stupid question haha
  4. I am going to start modding Minecraft using forge. I have successfully downloaded/installed Eclipse and JDK. However, when I attempt to install the forge workspace I encounter a problem. The download is freezing at a different point each time. For example: http://i1270.photobucket.com/albums/jj613/Vaderico/SS7_zps77324be9.png[/img] In the picture the download has paused at "10 KB/173" Things I have tried to resolve the issue: 1- Try running it in both Java 7 and Java 8 2- Running it with my firewall turned off 3- Deleting the .gradle folder in C:\Users\Ravi and repeating steps 1 and 2 4- Using different commands such as: >gradlew >gradlew setupDecompWorkspace >gradlew setupDevWorkspace >gradlew.bat setupDecompWorkspace --refresh-dependencies >gradlew.bat setupDevWorkspace --refresh-dependencies None of these things have helped resolve the Issue, so I am turning to you guys and girls for a bit of advice If anyone is able to help me, I will be very grateful.
  5. Thanks for the reply Abrar. I have run with --refresh-dependencies, but I am now encountering another problem. The download is freezing at a different point each time. For example: http://i1270.photobucket.com/albums/jj613/Vaderico/SS6_zps4a987b2c.png[/img] In the picture above it seems to have stopped at "77 KB/173". The cursor is still flashing, and this happens every time I run it.
  6. I keep restarting it using refresh depencies and it is getting stuck at different points each time. I have also tried turning my firewall off, but that doesn't work...
  7. I just tried doing refresh dependencies as well but something else happens... The downloading gets stuck here: http://i1270.photobucket.com/albums/jj613/Vaderico/SS5_zps39a69cf4.png[/img] Is this what is supposed to happen?
  8. I just tried installing 1.7.10 and got this: http://i1270.photobucket.com/albums/jj613/Vaderico/SS4_zps4e4b1a31.png[/img] This is driving me crazy hahahahaha
  9. ******There is a new problem, it is in post 10****** I am going to start modding Minecraft using forge.I have successfully downloaded/installed Eclipse and JDK. However, when I attempt to install the forge workspace I encounter a problem. I am following The Neale Gamings installation Instructions. Link here: In the step where I use the command window and type "gradlew setupDecompWorkspace", it begins downloading the files. I was having an issue where the download would freeze so i deleted the .gradle folder located at C:\Users\Ravi in hopes that when i re-try it, it will have a fresh folder to work with. I tried the "gradlew setupDecompWorkspace" command again, but this time it resulted in the following error: http://i1270.photobucket.com/albums/jj613/Vaderico/SS31_zpsacd88a5b.png[/img] Things I have tried to resolve the issue: 1- Try running it in both Java 7 and Java 8 2- Running it with my firewall turned off 3- Deleting the .gradle folder in C:\Users\Ravi and repeating steps 1 and 2 4- Using different commands such as: >gradlew >gradlew setupDecompWorkspace >gradlew setupDevWorkspace >gradlew.bat setupDecompWorkspace --refresh-dependencies >gradlew.bat setupDevWorkspace --refresh-dependencies None of these things have helped resolve the Issue, so I am turning to you guys and girls for a bit of advice If anyone is able to help me, It will be very grateful.
×
×
  • Create New...

Important Information

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