-
-
Notifications
You must be signed in to change notification settings - Fork 662
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Custom skull block support #683
Conversation
TODO: - Add to config as a setting - Spawn skulls on chunk load and not only on placement - Cleanup - Document more
Spawns fake skulls on spawn and added a config options for those who do not want skulls. This is set to false by default just incase they don't want added lag.
...ava/org/geysermc/connector/network/translators/world/block/entity/CustomSkullTranslator.java
Outdated
Show resolved
Hide resolved
...ava/org/geysermc/connector/network/translators/world/block/entity/CustomSkullTranslator.java
Outdated
Show resolved
Hide resolved
...ava/org/geysermc/connector/network/translators/world/block/entity/CustomSkullTranslator.java
Outdated
Show resolved
Hide resolved
...va/org/geysermc/connector/network/translators/java/world/JavaUpdateTileEntityTranslator.java
Outdated
Show resolved
Hide resolved
connector/src/main/java/org/geysermc/connector/utils/ChunkUtils.java
Outdated
Show resolved
Hide resolved
connector/src/main/java/org/geysermc/connector/utils/SkinProvider.java
Outdated
Show resolved
Hide resolved
Custom skull code simplifying
...rg/geysermc/connector/network/translators/world/block/entity/SkullBlockEntityTranslator.java
Outdated
Show resolved
Hide resolved
...rg/geysermc/connector/network/translators/world/block/entity/SkullBlockEntityTranslator.java
Outdated
Show resolved
Hide resolved
Now removes skulls on chunk unload for performance and fixed small things.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looking really good!
bootstrap/bukkit/src/main/java/org/geysermc/platform/bukkit/GeyserBukkitConfiguration.java
Outdated
Show resolved
Hide resolved
...rg/geysermc/connector/network/translators/world/block/entity/SkullBlockEntityTranslator.java
Outdated
Show resolved
Hide resolved
connector/src/main/java/org/geysermc/connector/network/session/GeyserSession.java
Outdated
Show resolved
Hide resolved
Removed setter and made naming convention like the other caches
...rap/bungeecord/src/main/java/org/geysermc/platform/bungeecord/GeyserBungeeConfiguration.java
Outdated
Show resolved
Hide resolved
bootstrap/sponge/src/main/java/org/geysermc/platform/sponge/GeyserSpongeConfiguration.java
Outdated
Show resolved
Hide resolved
connector/src/main/java/org/geysermc/connector/network/session/GeyserSession.java
Outdated
Show resolved
Hide resolved
...rg/geysermc/connector/network/translators/world/block/entity/SkullBlockEntityTranslator.java
Outdated
Show resolved
Hide resolved
...rg/geysermc/connector/network/translators/world/block/entity/SkullBlockEntityTranslator.java
Outdated
Show resolved
Hide resolved
...rg/geysermc/connector/network/translators/world/block/entity/SkullBlockEntityTranslator.java
Outdated
Show resolved
Hide resolved
connector/src/main/java/org/geysermc/connector/utils/ChunkUtils.java
Outdated
Show resolved
Hide resolved
connector/src/main/java/org/geysermc/connector/utils/SkinProvider.java
Outdated
Show resolved
Hide resolved
Fix naming conventions, change using java ids to just using the blockstate for wall directions, and a few other things.
No, not from what I understand anyway. Maybe possible in the future but out of scope I think for this PR |
@@ -104,6 +107,7 @@ | |||
private InventoryCache inventoryCache; | |||
private ScoreboardCache scoreboardCache; | |||
private WindowCache windowCache; | |||
private Map<Position, Long> skullCache = new HashMap<>(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Replace this with an Object2LongMap
.
if (BlockStateValues.getSkullRotation(blockState) == -1) { | ||
y += 0.25f; | ||
switch (BlockStateValues.getWallSkullDirection().get(blockState)) { | ||
case "north]": |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there any way you could exclude this bracket here from the switch statement?
@Hellohi3654 fixed in the latest commit and silenced to debug mode. |
Since we aren't using it yet anyway.
Hello, i would love to see this thing in action, but i guess u still cant find a way to get those heads working in inventory. Hmm, correct me if i am wrong. I guess i found a way, i know its not good and is heavy, but |
We could do this for the player's own head, but otherwise, it's not really worth it. Especially when using standalone, we can't guarantee what player heads the player will be using in their inventory. |
So there's no real way to distinguish between them? I wanted this bcoz many plugins rely on heads like slimefun, companions, bag of gold, etc. Maybe allow owners to package some important heads? |
I think it would be helpful for server owners to be able to specify a list of player heads to add in a pack. For example, if a server owner is running Slimefun, they could use a list of Slimefun player heads. I expanded on this a few weeks ago over in the #development channel in the Discord. |
Thats what i am saying, but i think i cant explain it correctly. |
When I use Slimefun, all its head names become "CS-CoreLib's head" |
maybe intergrating into head database plugin to make this possible? |
Hi Guys, And if it doesn't, could you use a resource pack/addon like the one seen here (https://foxynotail.com/add-ons/player-heads/). That is All |
Merged means that the proposed changes were incorporated into Geyser, so yes this has been implemented. The article you linked is complete misinformation and is likely just trawling for search engine clicks. Bedrock edition does not have native support for arbitrarily skinned player heads. A resource pack would not solve the issue as we need to be able to dynamically spawn in any player head. A resource pack would require that we know what heads are going to be spawned in beforehand. In the future, please use the Discord for questions like this rather than posting on a stale pull request. |
Bedrock currently doesn't support custom skulls Geyser spawns a player in the place of custom skulls and removes the body of the player model just leaving the head which gives the illusion of custom skulls for bedrock players Only problem with doing it is that if you have a tonne of custom skulls then it can cause a lot of lag for bedrock players You could use a resource pack like the foxy no tail one but then you couldn't have custom player skulls as you would have to have every player skin possible in the resource pack or make the player leave and rejoin to download a resource pack everytime a new player skull is created Besides that I think the foxy no tail resource pack just creates custom mobs to recreate all the mob skulls so this probably won't solve the lag problem |
Will this ever work for skulls on armour stands? I am not particularly worried about placed ones so ideally would be under a different config option |
I think that can now be implemented, seeing as one of our developers implemented some performance improvements for skulls. It's just a matter of somebody getting around to it. |
When I do the block mappings PR that is on top of the block and skull system so it would be included with that, but I imagine it will be a while even once the PR is open since custom blocks are a fairly major change and will require testing (and therefore take a while). |
Adds custom skulls through fake player entities! Works on player spawn and when the block is placed! I added a config option to enable it (its disabled by default to prevent lag from users who don't want them)
![CustomSkull](https://user-images.githubusercontent.com/27742182/83199724-c599e500-a10f-11ea-987f-677004b7aeca.PNG)