+ DispenseItemBehavior idispensebehavior = DispenserBlock.getDispenseBehavior(pointer, eventStack); // Paper - Fix NPE with equippable and items without behavior
if (idispensebehavior != DispenseItemBehavior.NOOP && idispensebehavior != this) {
+ DispenseItemBehavior idispensebehavior = DispenserBlock.getDispenseBehavior(sourceblock, eventStack); // Paper - Fix NPE with equippable and items without behavior
if (idispensebehavior != DispenseItemBehavior.NOOP && idispensebehavior.getClass() != DefaultDispenseItemBehavior.class) {
+ DispenseItemBehavior idispensebehavior = DispenserBlock.getDispenseBehavior(pointer, eventStack); // Paper - Fix NPE with equippable and items without behavior
if (idispensebehavior != DispenseItemBehavior.NOOP && idispensebehavior != this) {
idispensebehavior.dispense(pointer, eventStack);
return stack;
@@ -178,7 +178,7 @@ public interface DispenseItemBehavior {
+ DispenseItemBehavior idispensebehavior = DispenserBlock.getDispenseBehavior(pointer, eventStack); // Paper - Fix NPE with equippable and items without behavior
if (idispensebehavior != DispenseItemBehavior.NOOP && idispensebehavior != this) {
idispensebehavior.dispense(pointer, eventStack);
return stack;
@@ -231,8 +231,8 @@ public interface DispenseItemBehavior {
- if (idispensebehavior != DispenseItemBehavior.NOOP && idispensebehavior != EquipmentDispenseItemBehavior.INSTANCE) {
+ DispenseItemBehavior idispensebehavior = DispenserBlock.getDispenseBehavior(pointer, eventStack); // Paper - Fix NPE with equippable and items without behavior
- if (idispensebehavior != DispenseItemBehavior.NOOP && idispensebehavior != EquipmentDispenseItemBehavior.INSTANCE) {
+ DispenseItemBehavior idispensebehavior = DispenserBlock.getDispenseBehavior(pointer, eventStack); // Paper - Fix NPE with equippable and items without behavior
+ DispenseItemBehavior idispensebehavior = DispenserBlock.getDispenseBehavior(pointer, eventStack); // Paper - Fix NPE with equippable and items without behavior
if (idispensebehavior != DispenseItemBehavior.NOOP && idispensebehavior != this) {
idispensebehavior.dispense(pointer, eventStack);
return stack;
@@ -414,7 +414,7 @@ public interface DispenseItemBehavior {
+ DispenseItemBehavior idispensebehavior = DispenserBlock.getDispenseBehavior(pointer, eventStack); // Paper - Fix NPE with equippable and items without behavior
if (idispensebehavior != DispenseItemBehavior.NOOP && idispensebehavior != this) {
idispensebehavior.dispense(pointer, eventStack);
return stack;
@@ -452,7 +452,7 @@ public interface DispenseItemBehavior {
+ DispenseItemBehavior idispensebehavior = DispenserBlock.getDispenseBehavior(pointer, eventStack); // Paper - Fix NPE with equippable and items without behavior
if (idispensebehavior != DispenseItemBehavior.NOOP && idispensebehavior != this) {
idispensebehavior.dispense(pointer, eventStack);
return stack;
@@ -514,7 +514,7 @@ public interface DispenseItemBehavior {
+ DispenseItemBehavior idispensebehavior = DispenserBlock.getDispenseBehavior(pointer, eventStack); // Paper - Fix NPE with equippable and items without behavior
if (idispensebehavior != DispenseItemBehavior.NOOP && idispensebehavior != this) {
idispensebehavior.dispense(pointer, eventStack);
return stack;
@@ -585,7 +585,7 @@ public interface DispenseItemBehavior {
+ DispenseItemBehavior idispensebehavior = DispenserBlock.getDispenseBehavior(pointer, eventStack); // Paper - Fix NPE with equippable and items without behavior
if (idispensebehavior != DispenseItemBehavior.NOOP && idispensebehavior != this) {
idispensebehavior.dispense(pointer, eventStack);
return stack;
@@ -625,7 +625,7 @@ public interface DispenseItemBehavior {
+ DispenseItemBehavior idispensebehavior = DispenserBlock.getDispenseBehavior(pointer, eventStack); // Paper - Fix NPE with equippable and items without behavior
if (idispensebehavior != DispenseItemBehavior.NOOP && idispensebehavior != this) {
idispensebehavior.dispense(pointer, eventStack);
return stack;
@@ -645,7 +645,7 @@ public interface DispenseItemBehavior {
+ DispenseItemBehavior idispensebehavior = DispenserBlock.getDispenseBehavior(pointer, eventStack); // Paper - Fix NPE with equippable and items without behavior
if (idispensebehavior != DispenseItemBehavior.NOOP && idispensebehavior != this) {
idispensebehavior.dispense(pointer, eventStack);
return stack;
@@ -691,7 +691,7 @@ public interface DispenseItemBehavior {
+ DispenseItemBehavior idispensebehavior = DispenserBlock.getDispenseBehavior(pointer, eventStack); // Paper - Fix NPE with equippable and items without behavior
if (idispensebehavior != DispenseItemBehavior.NOOP && idispensebehavior != this) {
idispensebehavior.dispense(pointer, eventStack);
return stack;
@@ -818,8 +818,8 @@ public interface DispenseItemBehavior {
- if (idispensebehavior != DispenseItemBehavior.NOOP && idispensebehavior != EquipmentDispenseItemBehavior.INSTANCE) {
+ DispenseItemBehavior idispensebehavior = DispenserBlock.getDispenseBehavior(pointer, eventStack); // Paper - Fix NPE with equippable and items without behavior
- if (idispensebehavior != DispenseItemBehavior.NOOP && idispensebehavior != EquipmentDispenseItemBehavior.INSTANCE) {
+ DispenseItemBehavior idispensebehavior = DispenserBlock.getDispenseBehavior(pointer, eventStack); // Paper - Fix NPE with equippable and items without behavior
+ if (idispensebehavior != DispenseItemBehavior.NOOP && (currentBehavior == null || idispensebehavior != currentBehavior)) { // Paper - fix possible StackOverflowError
+ DispenseItemBehavior idispensebehavior = DispenserBlock.getDispenseBehavior(pointer, eventStack); // Paper - Fix NPE with equippable and items without behavior
if (idispensebehavior != DispenseItemBehavior.NOOP && idispensebehavior != this) {
+ DispenseItemBehavior idispensebehavior = DispenserBlock.getDispenseBehavior(pointer, eventStack); // Paper - Fix NPE with equippable and items without behavior
if (idispensebehavior != DispenseItemBehavior.NOOP && idispensebehavior != this) {
+ DispenseItemBehavior idispensebehavior = DispenserBlock.getDispenseBehavior(pointer, eventStack); // Paper - Fix NPE with equippable and items without behavior
if (idispensebehavior != DispenseItemBehavior.NOOP && idispensebehavior != this) {
+ DispenseItemBehavior idispensebehavior = DispenserBlock.getDispenseBehavior(pointer, eventStack); // Paper - Fix NPE with equippable and items without behavior
if (idispensebehavior != DispenseItemBehavior.NOOP && idispensebehavior != this) {
+ net.minecraft.core.dispenser.DispenseItemBehavior itemBehavior = net.minecraft.world.level.block.DispenserBlock.getDispenseBehavior(pointer, eventStack); // Paper - Fix NPE with equippable and items without behavior
if (itemBehavior != net.minecraft.core.dispenser.DispenseItemBehavior.NOOP && itemBehavior != instance) {