Skip background for hidden effect instances (#6197)

This commit is contained in:
Max Becker 2019-10-14 17:33:45 +00:00 committed by LexManos
parent 408104dbaf
commit 8248eb6ea1
1 changed files with 9 additions and 9 deletions

View File

@ -8,19 +8,19 @@
this.field_147003_i = 160 + (this.width - this.field_146999_f - 200) / 2; this.field_147003_i = 160 + (this.width - this.field_146999_f - 200) / 2;
this.field_147045_u = true; this.field_147045_u = true;
} }
@@ -84,6 +85,7 @@ @@ -59,7 +60,7 @@
int i = this.field_147009_r; j = 132 / (collection.size() - 1);
}
for(EffectInstance effectinstance : p_214077_3_) { - Iterable<EffectInstance> iterable = Ordering.<EffectInstance>natural().sortedCopy(collection);
+ if (!effectinstance.func_188419_a().shouldRender(effectinstance)) continue; + Iterable<EffectInstance> iterable = collection.stream().filter( effectInstance -> effectInstance.func_188419_a().shouldRender(effectInstance)).sorted().collect(java.util.stream.Collectors.toList());
Effect effect = effectinstance.func_188419_a(); this.func_214079_a(i, j, iterable);
blit(p_214077_1_ + 6, i + 7, this.blitOffset, 18, 18, potionspriteuploader.func_215288_a(effect)); this.func_214077_b(i, j, iterable);
i += p_214077_2_; this.func_214078_c(i, j, iterable);
@@ -95,6 +97,9 @@ @@ -95,6 +96,8 @@
int i = this.field_147009_r; int i = this.field_147009_r;
for(EffectInstance effectinstance : p_214078_3_) { for(EffectInstance effectinstance : p_214078_3_) {
+ if (!effectinstance.func_188419_a().shouldRender(effectinstance)) continue;
+ effectinstance.func_188419_a().renderInventoryEffect(effectinstance, this, p_214078_1_, i, this.blitOffset); + effectinstance.func_188419_a().renderInventoryEffect(effectinstance, this, p_214078_1_, i, this.blitOffset);
+ if (!effectinstance.func_188419_a().shouldRenderInvText(effectinstance)) { i += p_214078_2_; continue; } + if (!effectinstance.func_188419_a().shouldRenderInvText(effectinstance)) { i += p_214078_2_; continue; }
String s = I18n.func_135052_a(effectinstance.func_188419_a().func_76393_a()); String s = I18n.func_135052_a(effectinstance.func_188419_a().func_76393_a());