Browse Source

Fixed Crash in Player Tick Handler

parent
commit
76f3414e13
1 changed files with 1 additions and 1 deletions
  1. 1
    1
      src/main/java/gregapi/GT_API_Proxy.java

+ 1
- 1
src/main/java/gregapi/GT_API_Proxy.java View File

@@ -543,7 +543,7 @@ public abstract class GT_API_Proxy extends Abstract_Proxy implements IGuiHandler
543 543
 								float tHeat = UT.Entities.getHeatDamageFromItem(tStack);
544 544
 								if (tHeat != 0.0F) if (tHeat > 0) UT.Entities.applyHeatDamage(aEvent.player, tHeat); else UT.Entities.applyFrostDamage(aEvent.player, -tHeat);
545 545
 							}
546
-							if (tData != null && (tData.mMaterial.mMaterial == MT.Bedrockium || tData.mMaterial.mMaterial == MT.Neutronium) && (tData.mPrefix != null || tData.mByProducts.length <= 0)) {
546
+							if (tData != null && tData.mMaterial != null && (tData.mMaterial.mMaterial == MT.Bedrockium || tData.mMaterial.mMaterial == MT.Neutronium) && (tData.mPrefix != null || tData.mByProducts.length <= 0)) {
547 547
 								PotionEffect tEffect = null;
548 548
 								aEvent.player.addPotionEffect(new PotionEffect(Potion.moveSlowdown.id, Math.max(140, ((tEffect = aEvent.player.getActivePotionEffect(Potion.moveSlowdown))==null?0:tEffect.getDuration())), 3));
549 549
 							}

Loading…
Cancel
Save