Das ist tatsächlich ein Bug und sollte mit dem nächsten Update eigentlich behoben sein ![]()
Posts by red51
A small new update is available now!
-
-
Is it still missing? oO I can see the server in the list now, although 4 hours have passed since you created this topic...
Do you refer to the ingame server browser or the Steam server browser (in your Steam client under "View" -> "Servers")? -
@yahwho is right, this function gets the player which is considered as "hostile" by the npc. E.g. if you attack a pig, the pig considers you as hostile and runs away (once the distance between the npc and you is great enough, the "hostile status" will be removed again). If there is currently no "hostile player", this function returns null

-
Das ist tatsächlich ein interessantes Foto, allerdings scheint das kein Fehler zu sein, sondern die Flossen scheinen lediglich im Boden zu stecken. Das Terrain scheint leicht uneben zu sein, wodurch die NPCs etwas tiefer stehen, und entsprechend der Blickrichtung verschwindet eine Flosse (und sogar die halbe andere der linken Figur) etwas im Boden

-
Glad to hear it works now

I have one more question, is there a way to set it so just myself enters the server in creative mode?
You could disable all creative permissions in the "default.permissions" file. This file is the "base permission", i.e. it basically affects every player (group permissions inherit the default.permissions). So the "creative" section in the default.permissions file could look like this:
Now you could allow all creative permissions for the "admin.permissions", for example. As mentioned, the group permissions inherit the default.permissions, but can still override individual permissions. In this case, you could allow all creative-related permissions, so put this in your admin.permissions file (or more precisely, replace the current "creative" part in your permission file with this snippet):
As a result, only members of the permission group "admin" are allowed to access the creative mode
-
@Liralen: If you use the standalone, it's indeed necessary to allocate the memory manually. You can find a modified game exe attached which allocates 6 GB of RAM (3 GB Heap and 3 GB Direct memory) automatically

About the error: it's possible that it's related to the memory, but it looks like it mainly happens in multiplayer. Did it also happen in multiplayer in your case @thomasvitrano87?
-
Thanks for uploading the file
Unfortunately there are some minor issues in this file which prevents the server from loading these permissions...
In line 13, the - all commands does not work. If you want to allow all commands, you have to use the wildcard character (*), for example:
The "general" permissions - on the other hand - do not support a "allow/deny" structure, instead you have to specify the particular permission keys explicitly, e.g.:
Another small problem is in line 23, there is a space missing between "-" and "*" (I know, this looks like nitpicking, but unfortunately yaml is very strict about the syntax), so it should look like this:
You find more information about the permissions in this topic: Permission systemAbout the setting "settings_admin_allpermissions" in the server.properties file: If it's set to true, it means that owners/admins (i.e. all players which are set up as "admin" in the server.properties file) are not affected by permissions, they always have full access to all commands etc. If you set it to false, owners/admins will be treated like all other players, i.e. it depends on which permission group they're assigned to.
-
Is the normal raycast easier (the one that sends just along the x direction) on the performance than the others? I have the concept that it is only sending one ray out..
The performance is the same for these methods. The only thing that really matters is the "CollisionType", the more collision types you set, the bigger the impact on performance. For example, if you only want to check if the player is looking at another player, you should only define "CollisionType.PLAYERS" (in this case, the game only checks if the ray collides with other players, so there is no need for expensive checks if the ray also collides with npcs, vegetations etc)

getting the name of the npc is an interesting exercise in typing correctly but works fine but if I wanted to get a players information would it be Object obj = result.getCollisionObject(); PLAYER player = (PLAYER) obj;? So I can later get the UID and other information from the target player. I can't test this without help so was looking to save some development time for my code.
Yes, if the ray collides with a player, the "getCollisionObject()" function returns this particular player object. For example:
Display MoreJava -
Usually it's always recommended to use the main (public) branch. The "jdbc" branch was only an attempt to fix an issue with the jdbc driver a few people were having.
About the "official release": we don't have an ETA for that yet, it depends on how long it takes to get all important features into the game (and get all bugs sorted out).
About the performance issues, please see my response in your other topic
-
The main issue - according to the screen shot - is the view distance and detail distance: using the max setting requires powerful hardware, so I'd recommend to reduce these settings (especially the "detail distance", since it has the biggest impact on performance).
Apart from that, it mainly depends on your hardware. Maybe you can post a report file here, it contains important information about your RAM, CPU and graphics card. To do that, open the ingame console (key `) and type "report", then a file called report shows up in your game directory. Please upload this file here, or send it via email to support@jiw-games.net -
As @Trevor mentioned, sounds are usually handled as 3D sound, so they have a specific location in the world. If you want to play the sound as a 2D sound (so it does not have a direction/location), make sure to load a mono sound file and use the playSound(SoundInformation) method.
-
If you get the response "group not found", there is either no "admin" permission in the groups folder, or it contains syntax errors so the server could not load the permission. In this case you will see an error in the server log.
Maybe upload the "admin.permissions" file here, that's the easiest way to find out if there is something wrong with it
-
If you want to find out which object the player is currently looking at, the raycast() method is indeed what you're looking for
The method "shoots" a ray from the player camera position and checks if it collides with any solid objects. Since the raycast is performed clientside, a callback is required (if any collisions occurred, the result contains these information). You can find an example in the Javadoc.
A raycast is rather "expensive" in terms of performance (not expensive for the server, but for the particular client), however, it matters how often you actually perform it. It will only be a problem if it's performed too frequently, e.g. every tick, so using it in the PlayerChangePositionEvent or the UpdateEvent is not advisable. If you really have to perform a raycast frequently, there should be a delay of 50 or 100 ms (at least) between every raycast (per player). -
You can use the static Utils.ChunkUtils.getChunkPosition(Vector3f) function to convert a global position to chunk coordinates

-
just sent you a crash if you exit when the sound file is running too.
It's unfortunately the same crash that happens when calling "stopSound()" manually. This bug will be fixed with the next update

-
I'm getting 'No converter for version 39" please help, thanks
Sorry for the delay, we will release an updated converter soon
Is there a way to create the server direct to MySQL?
Sure, just open the server.properties file with a text editor and set database_type to mysql (and enter your login credentials), then the server will create a new world if it cannot find a world in the database.
-
Maybe NPCInventoryAccessEvent to keep it a little more generic.
Sounds like a good idea!

-
Just a small info about the SoundInformation: Basically this is just the abstract representation of the sound file, it does not have an ID or something like that. Only if you play the file, an actual sound instance is created (so the "playSound()" function returns this ID).
It's recommendable to create a "SoundInformation" object only once btw and reuse it everytime you need it for a player
For example:Display MoreJava -
-
Well, adding support for DocumentFilters would be difficult, since the text field is only manipulated clientside. Having a DocumentFilter (serverside) in place would require the game to sync every input with the server (and probably wait for the server response), so this would result in additional traffic (and - apart from that - there might be a noticeable delay due to the ping) oO
Do you just need it to allow certain characters only? In this case we could add a new method like "setAllowedCharacters()", preferably in combination with a regex. This way you can make sure the player can only enter numbers, for example
