Sanitise firework flight power

This commit is contained in:
Olof Larsson 2017-07-07 12:25:39 +02:00
parent f68970865f
commit a077762b62

View File

@ -43,6 +43,9 @@ public class WriterItemStackMetaFireworkFlight extends WriterAbstractItemStackMe
@Override @Override
public void setB(FireworkMeta cb, Integer fb, ItemStack d) public void setB(FireworkMeta cb, Integer fb, ItemStack d)
{ {
fb = Math.min(fb, 127);
fb = Math.max(fb, 0);
cb.setPower(fb); cb.setPower(fb);
} }