Clone static itemstack before modifying it

This commit is contained in:
Teriuihi 2022-01-13 23:17:15 +01:00
parent cc60244fd0
commit 907ad4819e

View File

@ -44,7 +44,7 @@ public class ChooseParticleGUI extends DefaultGUI {
for (ParticleSet particleSet : availableParticles) { for (ParticleSet particleSet : availableParticles) {
if (i >= 25) //leave the last 2 slots of the inventory open if (i >= 25) //leave the last 2 slots of the inventory open
return; return;
ItemStack itemStack = particleSet.getItemStack(); ItemStack itemStack = particleSet.getItemStack().clone();
ParticleSet activeParticleSet = playerSettings.getParticles(aPartType); ParticleSet activeParticleSet = playerSettings.getParticles(aPartType);
if (activeParticleSet != null && playerSettings.getParticles(aPartType).equals(particleSet)) { if (activeParticleSet != null && playerSettings.getParticles(aPartType).equals(particleSet)) {