multiplier

This commit is contained in:
ThisIsALegitUsername 2023-04-01 21:15:46 +00:00
parent a598d5cfe5
commit c086d671c4
8 changed files with 35617 additions and 35608 deletions

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because one or more lines are too long

View File

@ -15,7 +15,7 @@ public class ClickGui extends Mod{
public NumberSetting test = new NumberSetting("Test, ignore!", "", 50, 1, 200, 5, 5); public NumberSetting test = new NumberSetting("Test, ignore!", "", 50, 1, 200, 5, 5);
public ClickGui(){ public ClickGui(){
addSetting(scroll, guiTheme, test); addSetting(scroll, guiTheme);
} }
} }

View File

@ -6,13 +6,13 @@ import dev.resent.module.base.Mod.Category;
import dev.resent.module.base.setting.BooleanSetting; import dev.resent.module.base.setting.BooleanSetting;
import dev.resent.module.base.setting.NumberSetting; import dev.resent.module.base.setting.NumberSetting;
@Module(name = "Particle multipler", category = Category.MISC, hasSetting = true) @Module(name = "Particles Mod", category = Category.MISC, hasSetting = true)
public class ParticleMultiplier extends Mod{ public class ParticleMultiplier extends Mod{
public static BooleanSetting alwaysCrit = new BooleanSetting("Always critical", "", false); public static BooleanSetting alwaysCrit = new BooleanSetting("Always critical", "", false);
public static BooleanSetting alwaysSharp = new BooleanSetting("Always sharpness", "", false); public static BooleanSetting alwaysSharp = new BooleanSetting("Always sharpness", "", false);
public static NumberSetting multiplier = new NumberSetting("Multiplier", "", 1, 1, 10, 1, 1); public static NumberSetting multiplier = new NumberSetting("Multiplier", "", 1, 1, 50, 1, 1);
public ParticleMultiplier(){ public ParticleMultiplier(){
addSetting(alwaysCrit, alwaysSharp); addSetting(alwaysCrit, alwaysSharp, multiplier);
} }
} }

View File

@ -372,6 +372,6 @@ public class ClickGUI extends GuiScreen {
} }
private int getListMaxScroll() { private int getListMaxScroll() {
return this.height; return 500 - this.height;
} }
} }

View File

@ -1,5 +1,6 @@
package net.minecraft.client.entity; package net.minecraft.client.entity;
import dev.resent.module.impl.misc.ParticleMultiplier;
import net.minecraft.client.Minecraft; import net.minecraft.client.Minecraft;
import net.minecraft.client.audio.MovingSoundMinecartRiding; import net.minecraft.client.audio.MovingSoundMinecartRiding;
import net.minecraft.client.audio.PositionedSoundRecord; import net.minecraft.client.audio.PositionedSoundRecord;
@ -526,12 +527,16 @@ public class EntityPlayerSP extends AbstractClientPlayer {
* Args: entity that was hit critically * Args: entity that was hit critically
*/ */
public void onCriticalHit(Entity entityHit) { public void onCriticalHit(Entity entityHit) {
for(int i = 0; i < ParticleMultiplier.multiplier.getValue() - 1; i++){
this.mc.effectRenderer.emitParticleAtEntity(entityHit, EnumParticleTypes.CRIT); this.mc.effectRenderer.emitParticleAtEntity(entityHit, EnumParticleTypes.CRIT);
} }
}
public void onEnchantmentCritical(Entity entityHit) { public void onEnchantmentCritical(Entity entityHit) {
for(int i = 0; i < ParticleMultiplier.multiplier.getValue() - 1; i++){
this.mc.effectRenderer.emitParticleAtEntity(entityHit, EnumParticleTypes.CRIT_MAGIC); this.mc.effectRenderer.emitParticleAtEntity(entityHit, EnumParticleTypes.CRIT_MAGIC);
} }
}
/**+ /**+
* Returns if this entity is sneaking. * Returns if this entity is sneaking.

View File

@ -1049,11 +1049,11 @@ public abstract class EntityPlayer extends EntityLivingBase implements ICommandS
this.setSprinting(false); this.setSprinting(false);
} }
if (flag || ParticleMultiplier.alwaysCrit.getValue()) { if (flag || ParticleMultiplier.alwaysCrit.getValue() && ModManager.particleMultiplier.isEnabled()) {
this.onCriticalHit(entity); this.onCriticalHit(entity);
} }
if (f1 > 0.0F || ParticleMultiplier.alwaysSharp.getValue()) { if (f1 > 0.0F || ParticleMultiplier.alwaysSharp.getValue() && ModManager.particleMultiplier.isEnabled()) {
this.onEnchantmentCritical(entity); this.onEnchantmentCritical(entity);
} }