mirror of
https://github.com/HbmMods/Hbm-s-Nuclear-Tech-GIT.git
synced 2026-01-25 10:32:49 +00:00
fixes, tweaks and other crap
This commit is contained in:
parent
9192f1cf1b
commit
771938257c
@ -54,6 +54,7 @@
|
||||
* Microwave explosions no longer destroy blocks, only the microwave and nearby players
|
||||
* Wings can now be used like armor mods
|
||||
* At higher pollution levels, skeletons can now spawn with guns
|
||||
* Logistic drones now move at 0.625 blocks/t instead of 0.6. There is no balancing reason for this, I just hate weird numbers like 0.6
|
||||
|
||||
## Fixed
|
||||
* The conveyor grabber should no longer skip over items when used in long lines
|
||||
@ -72,3 +73,5 @@
|
||||
* Fixed the wood burner destroying container items like buckets when using lava as fuel
|
||||
* Fixed pollution serialization for the fluid trait config being wrong
|
||||
* Fixed slag crashing the game when trying to flow into the void
|
||||
* Fixed issue where drones that are too fast may skip waypoints
|
||||
* Fixed the electrolyzer speed upgrades not increasing energy consumption as advertised
|
||||
|
||||
@ -103,14 +103,12 @@ public abstract class EntityDroneBase extends Entity {
|
||||
if(this.targetY != -1) {
|
||||
|
||||
Vec3 dist = Vec3.createVectorHelper(targetX - posX, targetY - posY, targetZ - posZ);
|
||||
double speed = getSpeed();
|
||||
double speed = Math.min(getSpeed(), dist.lengthVector());
|
||||
|
||||
if(dist.lengthVector() >= speed) {
|
||||
dist = dist.normalize();
|
||||
this.motionX = dist.xCoord * speed;
|
||||
this.motionY = dist.yCoord * speed;
|
||||
this.motionZ = dist.zCoord * speed;
|
||||
}
|
||||
dist = dist.normalize();
|
||||
this.motionX = dist.xCoord * speed;
|
||||
this.motionY = dist.yCoord * speed;
|
||||
this.motionZ = dist.zCoord * speed;
|
||||
}
|
||||
if(isCollidedHorizontally){
|
||||
motionY += 1;
|
||||
|
||||
@ -199,7 +199,7 @@ public class EntityRequestDrone extends EntityDroneBase {
|
||||
|
||||
@Override
|
||||
public double getSpeed() {
|
||||
return 0.6D;
|
||||
return 0.625D;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@ -158,7 +158,7 @@ public class GunFactoryClient {
|
||||
setRendererBulkBeam(LegoClient.RENDER_LIGHTNING, energy_tesla, energy_tesla_overcharge);
|
||||
setRendererBulkBeam(LegoClient.RENDER_TAU, tau_uranium);
|
||||
setRendererBulkBeam(LegoClient.RENDER_TAU_CHARGE, tau_uranium_charge);
|
||||
setRendererBulkBeam(LegoClient.RENDER_LASER, energy_las, energy_las_overcharge);
|
||||
setRendererBulkBeam(LegoClient.RENDER_LASER_RED, energy_las, energy_las_overcharge);
|
||||
|
||||
setRendererBulk(LegoClient.RENDER_AP_BULLET, coil_tungsten, coil_ferrouranium);
|
||||
|
||||
|
||||
@ -19,6 +19,7 @@ import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.renderer.ActiveRenderInfo;
|
||||
import net.minecraft.client.renderer.RenderHelper;
|
||||
import net.minecraft.client.renderer.Tessellator;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.util.MathHelper;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
import net.minecraft.util.Vec3;
|
||||
@ -121,11 +122,18 @@ public class LegoClient {
|
||||
public static BiConsumer<EntityBulletBaseMK4, Float> RENDER_FLARE_WEAPON = (bullet, interp) -> { renderFlare(bullet, interp, 0.5F, 1F, 0.5F); };
|
||||
|
||||
private static final ResourceLocation flare = new ResourceLocation(RefStrings.MODID + ":textures/particle/flare.png");
|
||||
public static void renderFlare(EntityBulletBaseMK4 bullet, float interp, float r, float g, float b) {
|
||||
public static void renderFlare(Entity bullet, float interp, float r, float g, float b) {
|
||||
|
||||
if(bullet.ticksExisted < 2) return;
|
||||
|
||||
RenderArcFurnace.fullbright(true);
|
||||
|
||||
double scale = Math.min(5, (bullet.ticksExisted + interp - 2) * 0.5) * (0.8 + bullet.worldObj.rand.nextDouble() * 0.4);
|
||||
renderFlareSprite(bullet, interp, r, g, b, scale, 0.5F, 0.75F);
|
||||
|
||||
RenderArcFurnace.fullbright(false);
|
||||
}
|
||||
public static void renderFlareSprite(Entity bullet, float interp, float r, float g, float b, double scale, float outerAlpha, float innerAlpha) {
|
||||
|
||||
GL11.glPushMatrix();
|
||||
GL11.glEnable(GL11.GL_BLEND);
|
||||
GL11.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE);
|
||||
@ -148,9 +156,8 @@ public class LegoClient {
|
||||
double posX = 0;
|
||||
double posY = 0;
|
||||
double posZ = 0;
|
||||
double scale = Math.min(5, (bullet.ticksExisted + interp - 2) * 0.5) * (0.8 + bullet.worldObj.rand.nextDouble() * 0.4);
|
||||
|
||||
tess.setColorRGBA_F(r, g, b, 0.5F);
|
||||
tess.setColorRGBA_F(r, g, b, outerAlpha);
|
||||
tess.addVertexWithUV((double) (posX - f1 * scale - f3 * scale), (double) (posY - f5 * scale), (double) (posZ - f2 * scale - f4 * scale), 1, 1);
|
||||
tess.addVertexWithUV((double) (posX - f1 * scale + f3 * scale), (double) (posY + f5 * scale), (double) (posZ - f2 * scale + f4 * scale), 1, 0);
|
||||
tess.addVertexWithUV((double) (posX + f1 * scale + f3 * scale), (double) (posY + f5 * scale), (double) (posZ + f2 * scale + f4 * scale), 0, 0);
|
||||
@ -158,7 +165,7 @@ public class LegoClient {
|
||||
|
||||
scale *= 0.5D;
|
||||
|
||||
tess.setColorRGBA_F(1F, 1F, 1F, 0.75F);
|
||||
tess.setColorRGBA_F(1F, 1F, 1F, innerAlpha);
|
||||
tess.addVertexWithUV((double) (posX - f1 * scale - f3 * scale), (double) (posY - f5 * scale), (double) (posZ - f2 * scale - f4 * scale), 1, 1);
|
||||
tess.addVertexWithUV((double) (posX - f1 * scale + f3 * scale), (double) (posY + f5 * scale), (double) (posZ - f2 * scale + f4 * scale), 1, 0);
|
||||
tess.addVertexWithUV((double) (posX + f1 * scale + f3 * scale), (double) (posY + f5 * scale), (double) (posZ + f2 * scale + f4 * scale), 0, 0);
|
||||
@ -172,7 +179,6 @@ public class LegoClient {
|
||||
GL11.glAlphaFunc(GL11.GL_GREATER, 0.1F);
|
||||
GL11.glDisable(GL11.GL_BLEND);
|
||||
GL11.glPopMatrix();
|
||||
RenderArcFurnace.fullbright(false);
|
||||
}
|
||||
|
||||
public static BiConsumer<EntityBulletBaseMK4, Float> RENDER_GRENADE = (bullet, interp) -> {
|
||||
@ -304,7 +310,11 @@ public class LegoClient {
|
||||
RenderArcFurnace.fullbright(false);
|
||||
};
|
||||
|
||||
public static BiConsumer<EntityBulletBeamBase, Float> RENDER_LASER = (bullet, interp) -> {
|
||||
public static BiConsumer<EntityBulletBeamBase, Float> RENDER_LASER_RED = (bullet, interp) -> {
|
||||
renderStandardLaser(bullet, interp, 0x80, 0x15, 0x15);
|
||||
};
|
||||
|
||||
public static void renderStandardLaser(EntityBulletBeamBase bullet, float interp, int r, int g, int b) {
|
||||
|
||||
RenderArcFurnace.fullbright(true);
|
||||
GL11.glPushMatrix();
|
||||
@ -313,24 +323,34 @@ public class LegoClient {
|
||||
Vec3 delta = Vec3.createVectorHelper(0, bullet.beamLength, 0);
|
||||
double age = MathHelper.clamp_double(1D - ((double) bullet.ticksExisted - 2 + interp) / (double) bullet.getBulletConfig().expires, 0, 1);
|
||||
GL11.glScaled(age / 2 + 0.5, 1, age / 2 + 0.5);
|
||||
int colorInner = ((int)(0x80 * age) << 16) | ((int)(0x15 * age) << 8) | (int) (0x15 * age);
|
||||
int colorInner = ((int)(r * age) << 16) | ((int)(g * age) << 8) | (int) (b * age);
|
||||
BeamPronter.prontBeam(delta, EnumWaveType.RANDOM, EnumBeamType.SOLID, colorInner, colorInner, bullet.ticksExisted / 3, (int)(bullet.beamLength / 2 + 1), 0F, 8, 0.0625F);
|
||||
GL11.glPopMatrix();
|
||||
RenderArcFurnace.fullbright(false);
|
||||
};
|
||||
}
|
||||
|
||||
public static BiConsumer<EntityBulletBeamBase, Float> RENDER_FOLLY = (bullet, interp) -> {
|
||||
|
||||
double age = MathHelper.clamp_double(1D - ((double) bullet.ticksExisted - 2 + interp) / (double) bullet.getBulletConfig().expires, 0, 1);
|
||||
RenderArcFurnace.fullbright(true);
|
||||
|
||||
GL11.glPushMatrix();
|
||||
renderFlareSprite(bullet, interp, 1F, 1F, 1F, (1 - age) * 7.5 + 1.5, 0.5F * (float) age, 0.75F * (float) age);
|
||||
GL11.glPopMatrix();
|
||||
|
||||
GL11.glPushMatrix();
|
||||
GL11.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE);
|
||||
GL11.glAlphaFunc(GL11.GL_GREATER, 0);
|
||||
GL11.glRotatef(180 - bullet.rotationYaw, 0, 1F, 0);
|
||||
GL11.glRotatef(-bullet.rotationPitch - 90, 1F, 0, 0);
|
||||
Vec3 delta = Vec3.createVectorHelper(0, bullet.beamLength, 0);
|
||||
double age = MathHelper.clamp_double(1D - ((double) bullet.ticksExisted - 2 + interp) / (double) bullet.getBulletConfig().expires, 0, 1);
|
||||
GL11.glScaled((1 - age) * 25 + 2.5, 1, (1 - age) * 25 + 2.5);
|
||||
int colorInner = ((int)(0x20 * age) << 16) | ((int)(0x20 * age) << 8) | (int) (0x20 * age);
|
||||
BeamPronter.prontBeam(delta, EnumWaveType.RANDOM, EnumBeamType.SOLID, colorInner, colorInner, bullet.ticksExisted / 3, (int)(bullet.beamLength / 2 + 1), 0F, 8, 0.0625F);
|
||||
GL11.glAlphaFunc(GL11.GL_GREATER, 0.1F);
|
||||
GL11.glDisable(GL11.GL_BLEND);
|
||||
GL11.glPopMatrix();
|
||||
|
||||
RenderArcFurnace.fullbright(false);
|
||||
};
|
||||
|
||||
|
||||
@ -132,8 +132,8 @@ public class TileEntityElectrolyser extends TileEntityMachineBase implements IEn
|
||||
int speedLevel = Math.min(UpgradeManager.getLevel(UpgradeType.SPEED), 3);
|
||||
int powerLevel = Math.min(UpgradeManager.getLevel(UpgradeType.POWER), 3);
|
||||
|
||||
usageOre = usageOreBase - usageOreBase * powerLevel / 4;
|
||||
usageFluid = usageFluidBase - usageFluidBase * powerLevel / 4;
|
||||
usageOre = usageOreBase - usageOreBase * powerLevel / 4 + usageOreBase * speedLevel;
|
||||
usageFluid = usageFluidBase - usageFluidBase * powerLevel / 4 + usageFluidBase * speedLevel;
|
||||
|
||||
for(int i = 0; i < getCycleCount(); i++) {
|
||||
if (this.canProcessFluid()) {
|
||||
@ -585,9 +585,7 @@ public class TileEntityElectrolyser extends TileEntityMachineBase implements IEn
|
||||
public int[] getMatsToCopy() {
|
||||
ArrayList<Integer> types = new ArrayList<>();
|
||||
if(leftStack != null) types.add(leftStack.material.id);
|
||||
|
||||
if(rightStack != null) types.add(rightStack.material.id);
|
||||
|
||||
return BobMathUtil.intCollectionToArray(types);
|
||||
}
|
||||
}
|
||||
|
||||
@ -81,8 +81,6 @@ public class DamageResistanceHandler {
|
||||
amount -= dt;
|
||||
dr *= MathHelper.clamp_float(1F - pierce, 0F, 1F);
|
||||
|
||||
System.out.println(dt + " " + dr);
|
||||
|
||||
return amount *= (1F - dr);
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user