diff options
| author | Moulberry <james.jenour@student.scotch.wa.edu.au> | 2020-08-23 11:09:19 +1000 |
|---|---|---|
| committer | Moulberry <james.jenour@student.scotch.wa.edu.au> | 2020-08-23 11:09:19 +1000 |
| commit | 3cb08dc571907bdf216ee628c1f8608067a03441 (patch) | |
| tree | e98e8e67c74394eae1815c3657eccb92e018ba48 /src/main/java/io/github/moulberry/notenoughupdates/CustomItemEffects.java | |
| parent | 65ae0aa5a0319b6ead2dd6ed07c53a7e7291a23d (diff) | |
| download | notenoughupdates-3cb08dc571907bdf216ee628c1f8608067a03441.tar.gz notenoughupdates-3cb08dc571907bdf216ee628c1f8608067a03441.tar.bz2 notenoughupdates-3cb08dc571907bdf216ee628c1f8608067a03441.zip | |
fine dj
Diffstat (limited to 'src/main/java/io/github/moulberry/notenoughupdates/CustomItemEffects.java')
| -rw-r--r-- | src/main/java/io/github/moulberry/notenoughupdates/CustomItemEffects.java | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/main/java/io/github/moulberry/notenoughupdates/CustomItemEffects.java b/src/main/java/io/github/moulberry/notenoughupdates/CustomItemEffects.java index f4fcc41d..fe3c7542 100644 --- a/src/main/java/io/github/moulberry/notenoughupdates/CustomItemEffects.java +++ b/src/main/java/io/github/moulberry/notenoughupdates/CustomItemEffects.java @@ -51,7 +51,9 @@ public class CustomItemEffects { if(delta <= 0) return; - if(aoteTeleportationMillis > 300) aoteTeleportationMillis = 300; + if(aoteTeleportationMillis > NotEnoughUpdates.INSTANCE.manager.config.smoothAoteMillis.value.intValue()*2) { + aoteTeleportationMillis = NotEnoughUpdates.INSTANCE.manager.config.smoothAoteMillis.value.intValue()*2; + } if(aoteTeleportationMillis < 0) aoteTeleportationMillis = 0; if(currentTime - aoteUseMillis > 1000 && aoteTeleportationMillis <= 0) { @@ -91,6 +93,8 @@ public class CustomItemEffects { @SubscribeEvent public void onPlayerInteract(PlayerInteractEvent event) { + if(NotEnoughUpdates.INSTANCE.manager.config.smoothAoteMillis.value <= 0) return; + if(event.action == PlayerInteractEvent.Action.RIGHT_CLICK_AIR || event.action == PlayerInteractEvent.Action.RIGHT_CLICK_BLOCK) { ItemStack held = Minecraft.getMinecraft().thePlayer.getHeldItem(); if(held != null) { @@ -113,6 +117,7 @@ public class CustomItemEffects { if(aoteTeleportationCurr != null && aoteTeleportationMillis > 0) { event.setCanceled(true); } + if(NotEnoughUpdates.INSTANCE.manager.config.disableTreecapOverlay.value) return; ItemStack held = Minecraft.getMinecraft().thePlayer.getHeldItem(); String heldInternal = NotEnoughUpdates.INSTANCE.manager.getInternalNameForItem(held); if(heldInternal != null) { |
