OliPulse / DeathTotems

A Custom Inventory Restoring Minecraft Plugin
2 stars 1 forks source link

World height problems in 1.17+ #5

Open Weasel-Beans opened 2 years ago

Weasel-Beans commented 2 years ago

In the new expanded world height of Minecraft, this plugin's way of adjusting to make sure that a totem is not generated outside of the world's bounds needs to be changed.

https://github.com/OliPulse/DeathTotems/blob/master/src/main/java/me/olipulse/deathtotems/DeathTotem/DeathTotem.java

        }
        this.location = new Location(location.getWorld(), (int)(location.getX()), (int)location.getY(), (int)location.getZ());
        //Fix block height limit issue
        if (this.location.getY() > 255) {
            this.location.setY(255);
        }
        //Fix below 0 totem  issue
        if (this.location.getY() < 0) {
            this.location.setY(0);
        }

I assume that adjusting these values is all that's necessary.

Weasel-Beans commented 2 years ago

It appears that another user has already fixed this issue and requested to merge.

https://github.com/OliPulse/DeathTotems/pull/4