[SPIGOT-5633] Setting a large amount of block's type to certain materials crashes any player who loads them Created: 25/Mar/20  Updated: 29/Mar/20  Resolved: 29/Mar/20

Status: Resolved
Project: Spigot
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Bug Priority: Minor
Reporter: Maranda Davis Assignee: Unassigned
Resolution: Invalid Votes: 0
Labels: disconnect, plugin
Environment:

Windows 10

Jdk 1.8.0_41

Spigot API 1.15.2-R0.1


Attachments: File SpigotBugTest.jar    
Version: CraftBukkit version git-Spigot-6de3d4b-a6f8093 (MC: 1.15.2) (Implementing API version 1.15.2-R0.1-SNAPSHOT)
Guidelines Read: Yes

 Description   

When using Block.setType(MATERIAL) on a large amount of blocks, players who render them get disconnected with the error "Internal Exception: io.netty.handler.codec.DecoderException: Badly compressed packet - size of (number) is larger than protocol maximum of (number)"

Materials that I have tested this with are furnaces, player heads, and banners. But I think there are probably more that cause this.

If you fill, for instance an entire chunk by hand, this will not happen.

If you load an effected world in vanilla Minecraft this does not happen.

I have attached a simple plugin, the main function of this plugin runs:

Chunk chunk = player.getLocation().getChunk();
for(int x=0;x<16;x++) {
    for(int y=0;y<255;y++) {
        for(int z=0;z<16;z++) {
            chunk.getBlock(x,y,z).setType(Material.FURNACE);
        }
    }
}

To use this plugin, join a server running it and type /bug.



 Comments   
Comment by md_5 [ 29/Mar/20 ]

>If you load an effected world in vanilla Minecraft this does not happen.

It does for me. You should report this to Mojang. We cannot fix it, it has to be changed by the client.

Generated at Sat Dec 13 13:39:54 UTC 2025 using Jira 10.3.13#10030013-sha1:56dd970ae30ebfeda3a697d25be1f6388b68a422.