Bets
-
Posts
153 -
Joined
-
Last visited
Posts posted by Bets
-
-
I made mods for 1.11.2 too, it's just most people don't like the new PVP system so they chose to stay on 1.8.9
- 2
-
On 7/6/2017 at 10:38 PM, larsgerrits said:
Not an excuse.
Most players still play on 1.8.9 - and a lot of the mods created for PVP players etc are mainly 1.8.9
- 1
-
3 minutes ago, diesieben07 said:
Update. 1.8.x is old and outdated.
Need the PvP
-
Oh, yeah I use 1.8.9 that makes sense.
-
4 minutes ago, Choonster said:
Why not?
No idea honestly, it's like it doesn't exist for some reason. It's ok though, it works!
-
I wasn't able to implement IClientCommand. However, I added an override to the permission level and it works now! thank you!
-
On 7/4/2017 at 8:33 AM, Choonster said:
Extend CommandBase, implement IClientCommand and register it by calling CommandHandler#registerCommand on ClientCommandHandler.instance.
It says I don't have perms to use the command
@Mod.EventHandler public void init (FMLPostInitializationEvent event) { ClientCommandHandler.instance.registerCommand(new commandthing()); } public class commandthing extends CommandBase implements ICommand { @Override public String getCommandName() { // TODO Auto-generated method stub return "cmd"; } @Override public String getCommandUsage(ICommandSender sender) { // TODO Auto-generated method stub return "use it"; } @Override public void processCommand(ICommandSender sender, String[] args) throws CommandException { // TODO Auto-generated method stub System.out.println("THIS WORKS DANG IT"); } }
-
Hi
I tried adding a command that only the client can see, just to test things out and it did not work for some reason.
I tried using the implementation ICommand into a class I added to my main class.
I tried searching for hours, but I didn't find anything useful for what I want to do. most of the tutorials are including the server too.
This is what I tried doing:
public class command implements ICommand { @Override public int compareTo(ICommand arg0) { // TODO Auto-generated method stub return 0; } @Override public String getCommandName() { // TODO Auto-generated method stub return "test"; } @Override public String getCommandUsage(ICommandSender sender) { // TODO Auto-generated method stub return "test stuff"; } @Override public List<String> getCommandAliases() { return null; } @Override public void processCommand(ICommandSender sender, String[] args) throws CommandException { // TODO Auto-generated method stub System.out.println("testing complete"); } @Override public boolean canCommandSenderUseCommand(ICommandSender sender) { // TODO Auto-generated method stub return true; } @Override public List<String> addTabCompletionOptions(ICommandSender sender, String[] args, BlockPos pos) { // TODO Auto-generated method stub return null; } @Override public boolean isUsernameIndex(String[] args, int index) { // TODO Auto-generated method stub return false; } }
What am I doing wrong here? and will this method work only on the client?
Thanks
-
How do you get the player names? in some sort of an object?
-
I'd like to put all the players that there are in the player list to an array. is this possible?
-
I need to change someone's skin using my mod - or even reset it but it should change the model of the skin (Alex/Steve model)
Is something like this possible?
-
I'm trying to get the name of the player that send the current chat message. I'm using ClientChatReceivedEvent and I can get the formatted / unformatted text yet I don't know how can I get just the senders name,
Anyone knows? thanks.
-
1 minute ago, diesieben07 said:
Your exception suggests otherwise.
Please stop posting snippets of code and logs.
Post the complete log and all of your classes that are mentioned in the stacktrace.
Maybe it looks like I do because I run it for like 6 times to check 6 different players.
The thing is, it works! I just want to know how to detect the "429 Error" and handle it. Is something like this even possible?
-
3 minutes ago, diesieben07 said:
That is not the full exception trace. You are missing the most important part, the type and message of the exception:
And are you seriously making a HTTP request to the API every single frame, aka 60 times a second? You can't be serious.
No, it's getting called when you join a server, ones.
Is that it?
[Client thread/INFO]: [STDERR]: java.io.IOException: Server returned HTTP response code: 429 for URL: api url [Client thread/INFO]: [STDERR]: at sun.net.www.protocol.http.HttpURLConnection.getInputStream0(Unknown Source) [Client thread/INFO]: [STDERR]: at sun.net.www.protocol.http.HttpURLConnection.access$200(Unknown Source) ...
-
3 minutes ago, diesieben07 said:
This is a terrible way to deal with exceptions. Or rather, it is not a way to deal with them at all. This is just putting your head in the sand.
Show the TheAPI class.
And you still have not shown the actual crash report.
This is what I've got in the TheAPI class.
public class TheAPI { private String current_rank; public String get_current_rank() { return current_rank; } public void setCurrent_rank(String current_rank) { this.current_rank = current_rank; } @Override public String toString() { return current_rank; } }
And this is the crash log:
-- Head -- Thread: Client thread Stacktrace: at me.main.Engine.getRank(Engine.java:361) at me.main.Engine.onRenderText(Engine.java:178) at net.minecraftforge.fml.common.eventhandler.ASMEventHandler_9_Engine_onRenderText_Text.invoke(.dynamic) at net.minecraftforge.fml.common.eventhandler.ASMEventHandler.invoke(ASMEventHandler.java:90) at net.minecraftforge.fml.common.eventhandler.EventBus.post(EventBus.java:185) at net.minecraftforge.client.GuiIngameForge.renderHUDText(GuiIngameForge.java:695) at net.minecraftforge.client.GuiIngameForge.renderGameOverlay(GuiIngameForge.java:171)
-
15 minutes ago, diesieben07 said:
Show your code and the crash.
It's not much, but this is the code that loads the JSON:
public static String[] getRank(String username) { String json = null; try { json = getJson("api url" + username); } catch (Exception e) { e.printStackTrace(); } Gson gson = new Gson(); TheAPI theapi = gson.fromJson(json, TheAPI.class); return new String[] { theapi.get_current_rank() }; }
The result is just put in a String that's being displayed on the screen.
The crash log points to the return line in the code I showed before ^
-
I have a function that loads a specific URL from an API for some data.
Sometimes I'll get an HTTP error 429 (too many requests) from the API server. When this happens for some reason the game just crashes. All I'm doing is checking an URL for some data and displaying that data on the screen.
My first idea was to somehow detect when the API returns error 429 but I don't really know how I can do that.
-
7 minutes ago, diesieben07 said:
Yes, you can control that on the server-side using ServerChatEvent.
Thank you for replying fast haha - can I do something like this on client side?
-
18 hours ago, diesieben07 said:
IChatListener was replaced by events, namely ServerChatEvent and ClientChatReceivedEvent.
Wait, so is it possible to edit an already sent message?
-
1 minute ago, diesieben07 said:
Ok, I don't know what Pahimar is up to there again, but that repository is completely pointless. The mod in it does nothing.
And that is why I probably was not able to find anything.
-
1 minute ago, diesieben07 said:
You browse the repository. Seriously, we are not your butlers...
I did without success. If I succeeded I'd just say "thank you" and not ask anything else.
-
5 minutes ago, loordgek said:
to filter out non PG words???
It was just an example, but yeah something like that.
Where can I see the Chat event handler and how it edits the messages?
-
Hi guys
I need to make a function that when it detects a chat message with a specific string inside it it changes the sent message or deletes it completely (Client side of course).
For example:
Original:
Someone: Hi, you smell
Edited:
Someone: Hi, you *****
Thanks
-
On 3/2/2017 at 9:58 PM, diesieben07 said:
You would have to store a new position every second (attached to the horse using capabilities) and then display the speed based on the Euclidian distance between the current position and the old position.
Is it possible to add 1 to a variable every block the horse moves? and reset when needed?
Auto Complete
in Modder Support
Posted
I tried searching everywhere, could not find a legit answer.
Is it possible to add the autocomplete cycle to cycle through players when pressing TAB?
(doesn't have to exactly be players, can be other strings inside an array)