mirror of
https://github.com/HbmMods/Hbm-s-Nuclear-Tech-GIT.git
synced 2026-01-25 10:32:49 +00:00
cleanup duty once again
This commit is contained in:
parent
2f7bb54c3a
commit
adaf445d6c
@ -4806,7 +4806,7 @@ public class ModItems {
|
|||||||
.addEffect(new PotionEffect(Potion.moveSpeed.id, 20, 6))
|
.addEffect(new PotionEffect(Potion.moveSpeed.id, 20, 6))
|
||||||
.addEffect(new PotionEffect(Potion.regeneration.id, 20, 1))
|
.addEffect(new PotionEffect(Potion.regeneration.id, 20, 1))
|
||||||
.addEffect(new PotionEffect(Potion.nightVision.id, 15 * 20, 0))
|
.addEffect(new PotionEffect(Potion.nightVision.id, 15 * 20, 0))
|
||||||
.setDashCount(3)
|
.setDashCount(6)
|
||||||
.setUnlocalizedName("bismuth_helmet").setTextureName(RefStrings.MODID + ":bismuth_helmet");
|
.setUnlocalizedName("bismuth_helmet").setTextureName(RefStrings.MODID + ":bismuth_helmet");
|
||||||
bismuth_plate = new ArmorBismuth(MainRegistry.aMatBismuth, 7, 1, RefStrings.MODID + ":textures/armor/starmetal_2.png").cloneStats((ArmorFSB) bismuth_helmet).setCap(8F).setMod(0.3F).setUnlocalizedName("bismuth_plate").setTextureName(RefStrings.MODID + ":bismuth_plate");
|
bismuth_plate = new ArmorBismuth(MainRegistry.aMatBismuth, 7, 1, RefStrings.MODID + ":textures/armor/starmetal_2.png").cloneStats((ArmorFSB) bismuth_helmet).setCap(8F).setMod(0.3F).setUnlocalizedName("bismuth_plate").setTextureName(RefStrings.MODID + ":bismuth_plate");
|
||||||
bismuth_legs = new ArmorBismuth(MainRegistry.aMatBismuth, 7, 2, RefStrings.MODID + ":textures/armor/starmetal_1.png").cloneStats((ArmorFSB) bismuth_helmet).setCap(8F).setMod(0.3F).setUnlocalizedName("bismuth_legs").setTextureName(RefStrings.MODID + ":bismuth_legs");
|
bismuth_legs = new ArmorBismuth(MainRegistry.aMatBismuth, 7, 2, RefStrings.MODID + ":textures/armor/starmetal_1.png").cloneStats((ArmorFSB) bismuth_helmet).setCap(8F).setMod(0.3F).setUnlocalizedName("bismuth_legs").setTextureName(RefStrings.MODID + ":bismuth_legs");
|
||||||
|
|||||||
@ -461,33 +461,42 @@ public class ArmorFSB extends ItemArmor {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
boolean v1enabled = true;
|
|
||||||
|
|
||||||
if(dashCount > 0) {
|
if(dashCount > 0) {
|
||||||
|
|
||||||
int perDash = 64;
|
int perDash = 60;
|
||||||
|
|
||||||
HbmPlayerProps props = (HbmPlayerProps) player.getExtendedProperties("NTM_EXT_PLAYER");
|
HbmPlayerProps props = (HbmPlayerProps) player.getExtendedProperties("NTM_EXT_PLAYER");
|
||||||
|
|
||||||
props.setDashCount(dashCount);
|
props.setDashCount(dashCount);
|
||||||
|
|
||||||
|
int stamina = props.getStamina();
|
||||||
|
|
||||||
if(props.getDashCooldown() <= 0) {
|
if(props.getDashCooldown() <= 0) {
|
||||||
|
|
||||||
if(!player.capabilities.isFlying && player.isSneaking() && props.getStamina() >= perDash) {
|
if(!player.capabilities.isFlying && player.isSneaking() && stamina >= perDash) {
|
||||||
|
|
||||||
Vec3 lookingIn = player.getLookVec();
|
Vec3 lookingIn = player.getLookVec();
|
||||||
player.addVelocity(lookingIn.xCoord, 0, lookingIn.zCoord);
|
player.addVelocity(lookingIn.xCoord, 0, lookingIn.zCoord);
|
||||||
|
player.playSound("hbm:player.dash", 1.0F, 1.0F);
|
||||||
|
|
||||||
props.setDashCooldown(HbmPlayerProps.dashCooldownLength);
|
props.setDashCooldown(HbmPlayerProps.dashCooldownLength);
|
||||||
props.setStamina(props.getStamina() - perDash);
|
stamina -= perDash;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
props.setDashCooldown(props.getDashCooldown() - 1);
|
props.setDashCooldown(props.getDashCooldown() - 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
if(props.getStamina() < props.getDashCount() * perDash) {
|
if(stamina < props.getDashCount() * perDash) {
|
||||||
props.setStamina(props.getStamina() + 1);
|
stamina++;
|
||||||
|
|
||||||
|
if(stamina % perDash == perDash-1) {
|
||||||
|
|
||||||
|
player.playSound("hbm:player.dashRecharge", 1.0F, (1.0F + ((1F/12F)*(stamina/perDash))));
|
||||||
|
stamina++;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
props.setStamina(stamina);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -4,6 +4,7 @@ import org.lwjgl.opengl.GL11;
|
|||||||
import org.lwjgl.opengl.GL12;
|
import org.lwjgl.opengl.GL12;
|
||||||
|
|
||||||
import com.hbm.extprop.HbmPlayerProps;
|
import com.hbm.extprop.HbmPlayerProps;
|
||||||
|
import com.hbm.interfaces.Spaghetti;
|
||||||
import com.hbm.lib.RefStrings;
|
import com.hbm.lib.RefStrings;
|
||||||
|
|
||||||
import net.minecraft.client.Minecraft;
|
import net.minecraft.client.Minecraft;
|
||||||
@ -25,6 +26,8 @@ public class RenderScreenOverlay {
|
|||||||
private static float prevResult;
|
private static float prevResult;
|
||||||
private static float lastResult;
|
private static float lastResult;
|
||||||
|
|
||||||
|
private static float fadeOut = 0F;
|
||||||
|
|
||||||
public static void renderRadCounter(ScaledResolution resolution, float in, Gui gui) {
|
public static void renderRadCounter(ScaledResolution resolution, float in, Gui gui) {
|
||||||
GL11.glPushMatrix();
|
GL11.glPushMatrix();
|
||||||
|
|
||||||
@ -164,6 +167,7 @@ public class RenderScreenOverlay {
|
|||||||
Minecraft.getMinecraft().renderEngine.bindTexture(Gui.icons);
|
Minecraft.getMinecraft().renderEngine.bindTexture(Gui.icons);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Spaghetti ("like a fella once said, aint that a kick in the head")
|
||||||
public static void renderDashBar(ScaledResolution resolution, Gui gui, HbmPlayerProps props) {
|
public static void renderDashBar(ScaledResolution resolution, Gui gui, HbmPlayerProps props) {
|
||||||
|
|
||||||
|
|
||||||
@ -178,28 +182,100 @@ public class RenderScreenOverlay {
|
|||||||
|
|
||||||
Minecraft mc = Minecraft.getMinecraft();
|
Minecraft mc = Minecraft.getMinecraft();
|
||||||
|
|
||||||
int posX = 16;
|
int width = 30;
|
||||||
int posY = resolution.getScaledHeight() - 48 - 2;
|
|
||||||
|
int posX = 16;//(int)(resolution.getScaledWidth()/2 - ((props.getDashCount()*(width+2))/2));
|
||||||
|
int posY = resolution.getScaledHeight() - 40 - 2;
|
||||||
|
|
||||||
mc.renderEngine.bindTexture(misc);
|
mc.renderEngine.bindTexture(misc);
|
||||||
|
|
||||||
gui.drawTexturedModalRect(posX-10, posY, 99, 18, 7, 10);
|
gui.drawTexturedModalRect(posX-10, posY, 107, 18, 7, 10);
|
||||||
|
|
||||||
int stamina = props.getStamina();
|
int stamina = props.getStamina();
|
||||||
|
|
||||||
for(int x = 0; x < props.getDashCount(); x++) {
|
int dashes = props.getDashCount();
|
||||||
int status = 3;
|
|
||||||
int width = 22;
|
//int count = props.getDashCount();
|
||||||
gui.drawTexturedModalRect(posX + (width+2)*x, posY, 76, 48, 30, 10);
|
//int x3count = count / 3;
|
||||||
if(stamina / 64 > x) {
|
|
||||||
status = 1;
|
int rows = dashes / 3;
|
||||||
} else if(stamina / 64 == x) {
|
int finalColumns = dashes % 3;
|
||||||
width = (int)( (float)(stamina % 64) * (width/64F) );
|
|
||||||
status = 2;
|
for(int y = 0; y < rows; y++) {
|
||||||
|
for(int x = 0; x < 3; x++) {
|
||||||
|
if(y == rows && x > finalColumns)
|
||||||
|
break;
|
||||||
|
gui.drawTexturedModalRect(posX + (width+2)*x, posY - 12*y, 76, 48, width, 10);
|
||||||
|
int staminaDiv = stamina / 60;
|
||||||
|
int staminaMod = stamina % 60;
|
||||||
|
int barID = (3*y)+x;
|
||||||
|
int barStatus = 1; //0 = red, 1 = normal, 2 = greyed, 3 = dashed, 4 = ascended
|
||||||
|
int barSize = width;
|
||||||
|
if(staminaDiv < barID) {
|
||||||
|
barStatus = 3;
|
||||||
|
} else if(staminaDiv == barID) {
|
||||||
|
barStatus = 2;
|
||||||
|
barSize = (int)((float)(stamina % 60) * (width/60F) );
|
||||||
|
if(barID == 0)
|
||||||
|
barStatus = 0;
|
||||||
|
}
|
||||||
|
gui.drawTexturedModalRect(posX + (width+2)*x, posY - 12*y, 76, 18+(10*barStatus), barSize, 10);
|
||||||
|
|
||||||
|
if(staminaDiv == barID && staminaMod >= 57) {
|
||||||
|
fadeOut = 1F;
|
||||||
|
}
|
||||||
|
if(fadeOut > 0 && staminaDiv-1 == barID) {
|
||||||
|
GL11.glColor4f(1F, 1F, 1F, fadeOut);
|
||||||
|
int bar = barID;
|
||||||
|
if(stamina % 60 >= 50)
|
||||||
|
bar++;
|
||||||
|
int yPos = y;
|
||||||
|
if(bar / 3 != y)
|
||||||
|
y++;
|
||||||
|
bar = bar % 3;
|
||||||
|
gui.drawTexturedModalRect(posX + (width+2)*bar, posY - 12*y, 76, 58, width, 10);
|
||||||
|
fadeOut -= 0.04F;
|
||||||
|
GL11.glColor4f(1F, 1F, 1F, 1F);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
gui.drawTexturedModalRect(posX + 24*x, posY, 76, 18+(10*status), width, 10);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*for(int x = 0; x < props.getDashCount(); x++) {
|
||||||
|
int status = 3;
|
||||||
|
gui.drawTexturedModalRect(posX + (24)*x, posY, 76, 48, 24, 10);
|
||||||
|
int staminaDiv = stamina / 60;
|
||||||
|
if(staminaDiv > x) {
|
||||||
|
status = 1;
|
||||||
|
} else if(staminaDiv == x) {
|
||||||
|
width = (int)( (float)(stamina % 60) * (width/60F) );
|
||||||
|
status = 2;
|
||||||
|
if(staminaDiv == 0)
|
||||||
|
status = 0;
|
||||||
|
}
|
||||||
|
/*if(staminaDiv-1 == x && (stamina % 60 < 20 && stamina % 60 != 0)) {
|
||||||
|
status = 4;
|
||||||
|
}
|
||||||
|
/*if(((staminaDiv == x && stamina % 60 >= 55) || (staminaDiv-1 == x && stamina % 60 <= 5)) && !(stamina == props.totalDashCount * 60)) {
|
||||||
|
status = 4;
|
||||||
|
}
|
||||||
|
gui.drawTexturedModalRect(posX + (24)*x, posY, 76, 18+(10*status), width, 10);
|
||||||
|
|
||||||
|
if(staminaDiv == x && stamina % 60 >= 57) {
|
||||||
|
fadeOut = 1F;
|
||||||
|
}
|
||||||
|
if(fadeOut > 0 && staminaDiv-1 == x) {
|
||||||
|
GL11.glColor4f(1F, 1F, 1F, fadeOut);
|
||||||
|
int bar = x;
|
||||||
|
if(stamina % 60 >= 50)
|
||||||
|
bar++;
|
||||||
|
System.out.println(bar);
|
||||||
|
gui.drawTexturedModalRect(posX + 24*bar, posY, 76, 58, width, 10);
|
||||||
|
fadeOut -= 0.04F;
|
||||||
|
GL11.glColor4f(1F, 1F, 1F, 1F);
|
||||||
|
}
|
||||||
|
}*/
|
||||||
|
|
||||||
|
|
||||||
GL11.glEnable(GL11.GL_DEPTH_TEST);
|
GL11.glEnable(GL11.GL_DEPTH_TEST);
|
||||||
GL11.glDepthMask(true);
|
GL11.glDepthMask(true);
|
||||||
GL11.glPopMatrix();
|
GL11.glPopMatrix();
|
||||||
|
|||||||
@ -120,6 +120,7 @@ achievement.ZIRNOXBoom=CIRNOX
|
|||||||
armor.blastProtection=Damage modifier of %s against explosions
|
armor.blastProtection=Damage modifier of %s against explosions
|
||||||
armor.cap=Hard damage cap of %s
|
armor.cap=Hard damage cap of %s
|
||||||
armor.damageModifier=Damage modifier of %s against %s
|
armor.damageModifier=Damage modifier of %s against %s
|
||||||
|
armor.dash=Grants %s dashes
|
||||||
armor.electricJetpack=Ion Jetpack
|
armor.electricJetpack=Ion Jetpack
|
||||||
armor.explosionImmune=Cannot take any damage except from explosions
|
armor.explosionImmune=Cannot take any damage except from explosions
|
||||||
armor.fastFall=Fast Fall
|
armor.fastFall=Fast Fall
|
||||||
|
|||||||
@ -199,6 +199,8 @@
|
|||||||
|
|
||||||
"player.vomit": {"category": "player", "sounds": [{"name": "player/vomit", "stream": false}]},
|
"player.vomit": {"category": "player", "sounds": [{"name": "player/vomit", "stream": false}]},
|
||||||
"player.cough": {"category": "player", "sounds": ["player/cough1", "player/cough2", "player/cough3", "player/cough4"]},
|
"player.cough": {"category": "player", "sounds": ["player/cough1", "player/cough2", "player/cough3", "player/cough4"]},
|
||||||
|
"player.dash": {"category": "player", "sounds": [{"name": "player/dash", "stream": false}]},
|
||||||
|
"player.dashRecharge": {"category": "player", "sounds": [{"name": "player/dashRecharge", "stream": false}]},
|
||||||
|
|
||||||
"potatos.random": {"category": "player", "sounds": ["potatos/randResponse0", "potatos/randResponse1", "potatos/randResponse2", "potatos/randResponse3", "potatos/randResponse4", "potatos/randResponse5", "potatos/randResponse6", "potatos/randResponse7"]},
|
"potatos.random": {"category": "player", "sounds": ["potatos/randResponse0", "potatos/randResponse1", "potatos/randResponse2", "potatos/randResponse3", "potatos/randResponse4", "potatos/randResponse5", "potatos/randResponse6", "potatos/randResponse7"]},
|
||||||
|
|
||||||
|
|||||||
BIN
src/main/resources/assets/hbm/sounds/player/dash.ogg
Normal file
BIN
src/main/resources/assets/hbm/sounds/player/dash.ogg
Normal file
Binary file not shown.
BIN
src/main/resources/assets/hbm/sounds/player/dashRecharge.ogg
Normal file
BIN
src/main/resources/assets/hbm/sounds/player/dashRecharge.ogg
Normal file
Binary file not shown.
Binary file not shown.
|
Before Width: | Height: | Size: 1004 B |
Binary file not shown.
|
Before Width: | Height: | Size: 4.9 KiB After Width: | Height: | Size: 7.2 KiB |
Loading…
x
Reference in New Issue
Block a user