Fix server crash in Magical Scrubber
This commit is contained in:
parent
494219a23e
commit
70453a25ca
2 changed files with 4 additions and 4 deletions
|
@ -233,7 +233,7 @@ public class MagicalScrubberBlockEntity extends BlockEntity implements MenuProvi
|
|||
ItemStack main = entity.itemsHandler.getStackInSlot(0);
|
||||
|
||||
//Map<Enchantment, Integer> enchants = main.getAllEnchantments();
|
||||
Map<Enchantment, Integer> enchantments = ItemUtils.getEnchantments(main);
|
||||
Map<Enchantment, Integer> enchantments = ItemUtils.getEnchantments(main.copy());
|
||||
|
||||
if(enchantments.size()>0)
|
||||
{
|
||||
|
@ -245,7 +245,7 @@ public class MagicalScrubberBlockEntity extends BlockEntity implements MenuProvi
|
|||
|
||||
enchantments.remove(entry.getKey());
|
||||
//iEntries.remove();
|
||||
main = makeOutputItem(main);
|
||||
main = makeOutputItem(main.copy());
|
||||
while(iEntries.hasNext())
|
||||
{
|
||||
entry = iEntries.next();
|
||||
|
|
|
@ -67,7 +67,7 @@ public class ThrownPossBall extends ThrowableItemProjectile
|
|||
|
||||
@Override
|
||||
protected void onHitEntity(EntityHitResult pResult) {
|
||||
//super.onHitEntity(pResult);
|
||||
super.onHitEntity(pResult);
|
||||
if(getItem().getTag().contains("entity"))
|
||||
{
|
||||
// Don't capture the entity
|
||||
|
@ -102,7 +102,7 @@ public class ThrownPossBall extends ThrowableItemProjectile
|
|||
|
||||
@Override
|
||||
protected void onHit(HitResult pResult) {
|
||||
//super.onHit(pResult);
|
||||
super.onHit(pResult);
|
||||
if(!this.level().isClientSide)
|
||||
{
|
||||
// We do two things here
|
||||
|
|
Reference in a new issue