Tweak block highlight scale to remove the tiny gap due to the anti-z-fighting offset

This commit is contained in:
Electroblob77
2020-04-09 20:09:13 +01:00
parent d56cf37f2b
commit 1833ed9c56
@@ -1,6 +1,7 @@
package electroblob.wizardry.client.particle;
import electroblob.wizardry.Wizardry;
import electroblob.wizardry.util.WizardryUtilities;
import net.minecraft.util.EnumFacing;
import net.minecraft.util.ResourceLocation;
import net.minecraft.util.math.BlockPos;
@@ -22,7 +23,8 @@ public class ParticleBlockHighlight extends ParticleWizardry {
this.particleGravity = 0;
this.setMaxAge(160);
this.particleScale = 5;
// 5 makes it the exact size of a block face, plus a little bit to account for the anti-z-fighting offset
this.particleScale = 5 * (1 + 2 * (float)WizardryUtilities.ANTI_Z_FIGHTING_OFFSET);
this.shaded = false;
}