Comments (9)
I don't know if this stems from the same issue or bedrock just handles blockstates differently, but it seems to ignore me setting stair nbt to straight instead of corner as well.
Difference with the stairs in particular is that reloading chunks doesn't fix the issue
from geyser.
Here is proof showing the shulker facing block state fixes after reloading the chunk
from geyser.
Please update to the latest version (and install ViaVersion as well) and re-test this and provide a Geyser dump. Thanks!
from geyser.
https://dump.geysermc.org/CAVfs9mo8A92a7vJASKQdDRKsu7C9FSi
Paper: 1.20.4 # 496
Geyser: 2.3.0
ViaVersion: 4.10.0
Same issue persists after updating everything
from geyser.
For context, this is the code on my spigot plugin that is setting the block state of the shulker
private void convertToFatChest(Block block, Material fatChestType, BlockFace facing)
{
if (!(block.getState() instanceof Container)) return;
// save pre conversion container
ItemStack[] containerContents = ((Container) block.getState()).getInventory().getContents();
// convert container to desired chest type
BlockData newFatChest = fatChestType.createBlockData();
((Directional) newFatChest).setFacing(facing);
block.setBlockData(newFatChest);
// load pre conversion container to new container
((Container) block.getState()).getInventory().setContents(containerContents);
}
from geyser.
When do you change the block state? As Vanilla always sends the block state on placing and interacting, and when you modify it there it might send two block state updates.
from geyser.
When do you change the block state? As Vanilla always sends the block state on placing and interacting, and when you modify it there it might send two block state updates.
@EventHandler
public void onChestPlace(BlockPlaceEvent event) {
// get if block representing a chest was placed
Block placedBlock = event.getBlockPlaced();
if (!placedBlock.getType().equals(GUI_CHEST)) return;
// can't place chest in the middle of two chests
List<Block> adjacentChests = getAdjacentChests(placedBlock);
if (adjacentChests.size() > 1) {
event.setCancelled(true);
return;
}
// can't place adjacent chest next to double chest, if normal chest then create double chest!
for (Block chest : adjacentChests) {
Material adjacentType = chest.getType();
if (isDoubleChest(adjacentType)) {
event.setCancelled(true);
return;
} else if (isSingleChest(adjacentType)) {
convertToDoubleChest(placedBlock, chest);
return;
}
}
// not a double chest, make a single chest!
if (adjacentChests.isEmpty()) convertToFatChest(placedBlock, SINGLE_CHEST);
}
I am setting the placed block's block data right on BlockPlaceEvent
from geyser.
// not a double chest, make a single chest!
if (adjacentChests.isEmpty())
{
convertToFatChest(placedBlock, SINGLE_CHEST);
placedBlock.getState().update(true, true);
}
So by adding the forced state update it halfway fixes it. The fake chest is still facing upwards (default shulker state) but with the forced update it will correct its orientation when opened. So whatever is happening when the player opens the shulker needs to somehow be done on state update.
from geyser.
2024-05-14.23-53-42.mp4
Heres a video of what I mean in my previous comment
from geyser.
Related Issues (20)
- lucky icon effect does not show up the icon at all. HOT 2
- Combat translation HOT 4
- Could not find class HOT 3
- Very Confused. Get outdated message. HOT 1
- Sending to many packets HOT 4
- ArrayIndexOutOfBoundsException HOT 3
- Compatibility issues with multiple NIC device HOT 3
- DeadChest Spawning below Y=0 in the void for Bedrock players HOT 3
- Problem opening a menu on CosmeticsCore HOT 1
- Server unreachable when use-proxy-protocol is true HOT 2
- [Bug]: build error with java 8 HOT 1
- Inventory Regeneration Bug Upon Leaving Server HOT 5
- Older paper server version with ViaVersion plugins not work. HOT 5
- chunks stop loading (wrong render distance calculation) HOT 2
- Latest release for velocity generate new error and block user to join. HOT 2
- Geyser hasn't been updated on Hangar since March 2023 HOT 2
- Unable to process text in a braces in values of locale JSON HOT 1
- Warped and crimson doors not working properly HOT 2
- Bedrock player display "server positioning" HOT 2
- java.lang.NoClassDefFoundError: io/netty/handler/codec/dns/DnsQuestion when transferring bedrock players to other servers with ServerTransferEvent listener HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from geyser.