aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/io/github/moulberry/notenoughupdates/miscfeatures/CustomItemEffects.java
diff options
context:
space:
mode:
authorBuildTools <james.jenour@protonmail.com>2021-02-10 00:31:43 +0800
committerBuildTools <james.jenour@protonmail.com>2021-02-10 00:31:43 +0800
commite782e847ccc0eadc4d6e58068ed36d30ce233899 (patch)
treed7bc8f605889cc9b040e69bd13faef8ab1cd75e3 /src/main/java/io/github/moulberry/notenoughupdates/miscfeatures/CustomItemEffects.java
parent05ecb9ec0980fbf3eb074deb021d6b06172b8fd2 (diff)
downloadnotenoughupdates-e782e847ccc0eadc4d6e58068ed36d30ce233899.tar.gz
notenoughupdates-e782e847ccc0eadc4d6e58068ed36d30ce233899.tar.bz2
notenoughupdates-e782e847ccc0eadc4d6e58068ed36d30ce233899.zip
PRE18
Diffstat (limited to 'src/main/java/io/github/moulberry/notenoughupdates/miscfeatures/CustomItemEffects.java')
-rw-r--r--src/main/java/io/github/moulberry/notenoughupdates/miscfeatures/CustomItemEffects.java20
1 files changed, 17 insertions, 3 deletions
diff --git a/src/main/java/io/github/moulberry/notenoughupdates/miscfeatures/CustomItemEffects.java b/src/main/java/io/github/moulberry/notenoughupdates/miscfeatures/CustomItemEffects.java
index de0d7406..45d55b1d 100644
--- a/src/main/java/io/github/moulberry/notenoughupdates/miscfeatures/CustomItemEffects.java
+++ b/src/main/java/io/github/moulberry/notenoughupdates/miscfeatures/CustomItemEffects.java
@@ -113,15 +113,29 @@ public class CustomItemEffects {
ItemStack held = Minecraft.getMinecraft().thePlayer.getHeldItem();
String internal = NotEnoughUpdates.INSTANCE.manager.getInternalNameForItem(held);
if(internal != null) {
- if(internal.equals("HYPERION")) {
- lastUsedHyperion = System.currentTimeMillis();
+ boolean shadowWarp = false;
+ if(internal.equals("HYPERION") || internal.equals("VALKYRIE") || internal.equals("SCYLLA") || internal.equals("ASTRAEA")) {
+ NBTTagCompound tag = held.getTagCompound();
+ if(tag != null && tag.hasKey("ExtraAttributes", 10)) {
+ NBTTagCompound ea = tag.getCompoundTag("ExtraAttributes");
+ if(ea != null && ea.hasKey("ability_scroll", 9)) {
+ NBTTagList list = ea.getTagList("ability_scroll", 8);
+ for(int i=0; i<list.tagCount(); i++) {
+ if(list.getStringTagAt(i).equals("IMPLOSION_SCROLL")) {
+ lastUsedHyperion = System.currentTimeMillis();
+ } else if(list.getStringTagAt(i).equals("SHADOW_WARP_SCROLL")) {
+ shadowWarp = true;
+ }
+ }
+ }
+ }
}
if(NotEnoughUpdates.INSTANCE.config.smoothAOTE.smoothTpMillis <= 0
|| Minecraft.getMinecraft().gameSettings.thirdPersonView != 0) return;
boolean aote = NotEnoughUpdates.INSTANCE.config.smoothAOTE.enableSmoothAOTE && internal.equals("ASPECT_OF_THE_END");
- boolean hyp = NotEnoughUpdates.INSTANCE.config.smoothAOTE.enableSmoothHyperion && internal.equals("HYPERION");
+ boolean hyp = NotEnoughUpdates.INSTANCE.config.smoothAOTE.enableSmoothHyperion && shadowWarp;
if(aote || hyp) {
aoteUseMillis = System.currentTimeMillis();
if(aoteTeleportationCurr == null) {