-
Vanilla Hud replacement via toggle.
Hi, I'm having a go at doing a custom HUD too but don't quite understand your code. Could you post the whole class or add some comments please? That would really help. Thanks!
-
Move player using code
The arduino part isnt the problem, I've got my own thread pulling in the data and then calling MC functions. I just found setVelocity() and that seems to work thanks Is there any documentation on these sorts of things? Instead of looking at the list of all functions on 'player', is there a guide to say things like "If you want to move the player used setVelocity() etc? Thanks
-
Move player using code
Okay after some searching I found player.setPositionAndUpdate() But that seems to be doing nothing for me. I get x and z from my Arduino and then do: player.setPositionAndUpdate(player.posX + x, player.posY, player.posZ + z); But nothing happens
-
Move player using code
Hi, I think this is a pretty simple problem but after searching the forums I couldn't find a post about it. I'm trying to move the player using my own custom code. I've got an arduino with a joystick. I am successfully getting the data from the arduino into Minecraft and can get the player to jump with jump(). What I want to do now is use the joystick data to move the player. I've tried using just player.moveEntity(x, y, z); (Where I get 'player' from: player = Minecraft.getMinecraft().thePlayer;) but this moves the player in a jerky way. Is there a function to smooth move the player in the same way that the W key moves the player forward and A key to the left etc? Thanks for your time.
-
Support for Custom Input Controller
Ah okay great, thanks for the info! So does it make sense to have my own thread receiving the serial data and then a locked method for faking keypresses all within the minecraft mod code (point 2. from above)? I'll have a go at looking at the KeyBindings code now and report back.
-
Support for Custom Input Controller
Sorry for the shameless bump but there must be a way to do this right? I can think of 2 ways to do it: 1. Create a tray app (separate from the mod) which gets commands from Arduino over serial and spoofs Keyboard/Mouse commands (same as how Minecontrol etc. work). 2. Poll serial within the Mod itself and call functions/spoof keyboard/mouse from inside the Java code. I'd much prefer to do the 2nd method but I can't see how to get access to the Input polling in Minecraft. It is based on LWJGL right? So there must be a Keyboard/Mouse polling thread somewhere? Any ideas would be greatly appreciated. Thanks for your time
-
Support for Custom Input Controller
Hello, I was wondering if anyone has tried writing code to make a custom input controller work other than spoofing mouse/keyboard events? I have used Arduino and Microsoft Gadgeteer before and written an application that sits in the tray, converting inputs into mouse/keyboard events (system-wide) but I was wondering if there was a more elegant way of doing it? For example, my controller sends strings over virtual serial port (over USB), I have written the Java code to get this stream of strings in and parse them into "button 1 pressed/button 2 released" etc. but I am new to Minecraft modding and don't see how I can then hook this data into input events within minecraft. Has anyone ever tried this? Or would know where to start? I've found this controller mod on github (https://github.com/ljsimin/MinecraftJoypadSplitscreenMod/tree/master/MinecraftJoypadSplitscreenMod/src/com/shiny/joypadmod) but I'm not quite sure where it is hooking into Minecraft. Thanks for your time!
IPS spam blocked by CleanTalk.