Removed unused energy property from beam effects

This commit is contained in:
Unknown 2018-05-12 21:50:35 +02:00 committed by unknown
parent 9cc06316d9
commit fc1b3d7576
5 changed files with 12 additions and 15 deletions

View file

@ -250,7 +250,8 @@ public class TileEntityCloakingCore extends TileEntityAbstractEnergy {
xCoord + 0.5D + distanceOuterCoils_blocks[direction.ordinal()] * direction.offsetX,
yCoord + 0.5D + distanceOuterCoils_blocks[direction.ordinal()] * direction.offsetY,
zCoord + 0.5D + distanceOuterCoils_blocks[direction.ordinal()] * direction.offsetZ),
r, g, b, LASER_DURATION_TICKS, 0,
r, g, b,
LASER_DURATION_TICKS,
AxisAlignedBB.getBoundingBox(minX, minY, minZ, maxX, maxY, maxZ));
}
}
@ -280,7 +281,8 @@ public class TileEntityCloakingCore extends TileEntityAbstractEnergy {
xCoord + 0.5D + (DISTANCE_INNER_COILS_BLOCKS + 0.3D) * stop .offsetX + 0.2D * start.offsetX,
yCoord + 0.5D + (DISTANCE_INNER_COILS_BLOCKS + 0.3D) * stop .offsetY + 0.2D * start.offsetY,
zCoord + 0.5D + (DISTANCE_INNER_COILS_BLOCKS + 0.3D) * stop .offsetZ + 0.2D * start.offsetZ),
r, g, b, LASER_DURATION_TICKS, 0,
r, g, b,
LASER_DURATION_TICKS,
AxisAlignedBB.getBoundingBox(minX, minY, minZ, maxX, maxY, maxZ));
}
}

View file

@ -282,7 +282,7 @@ public class CloakedArea {
centerY + radiusY * world.rand.nextGaussian(),
centerZ + radiusZ * world.rand.nextGaussian()),
world.rand.nextFloat(), world.rand.nextFloat(), world.rand.nextFloat(),
60 + world.rand.nextInt(60), 100));
60 + world.rand.nextInt(60)));
}
}

View file

@ -24,20 +24,18 @@ public class MessageBeamEffect implements IMessage, IMessageHandler<MessageBeamE
private float green;
private float blue;
private int age;
private int energy;
public MessageBeamEffect() {
// required on receiving side
}
public MessageBeamEffect(final Vector3 source, final Vector3 target, final float red, final float green, final float blue, final int age, final int energy) {
public MessageBeamEffect(final Vector3 source, final Vector3 target, final float red, final float green, final float blue, final int age) {
this.source = source;
this.target = target;
this.red = red;
this.green = green;
this.blue = blue;
this.age = age;
this.energy = energy;
}
public MessageBeamEffect(
@ -51,7 +49,6 @@ public class MessageBeamEffect implements IMessage, IMessageHandler<MessageBeamE
this.green = green;
this.blue = blue;
this.age = age;
this.energy = energy;
}
@Override
@ -70,7 +67,6 @@ public class MessageBeamEffect implements IMessage, IMessageHandler<MessageBeamE
green = buffer.readFloat();
blue = buffer.readFloat();
age = buffer.readShort();
energy = buffer.readInt();
}
@Override
@ -85,12 +81,11 @@ public class MessageBeamEffect implements IMessage, IMessageHandler<MessageBeamE
buffer.writeFloat(green);
buffer.writeFloat(blue);
buffer.writeShort(Math.min(32767, age));
buffer.writeInt(energy);
}
@SideOnly(Side.CLIENT)
private void handle(final World world) {
FMLClientHandler.instance().getClient().effectRenderer.addEffect(new EntityFXBeam(world, source.clone(), target.clone(), red, green, blue, age, energy));
FMLClientHandler.instance().getClient().effectRenderer.addEffect(new EntityFXBeam(world, source.clone(), target.clone(), red, green, blue, age));
}
@Override
@ -105,7 +100,7 @@ public class MessageBeamEffect implements IMessage, IMessageHandler<MessageBeamE
if (WarpDriveConfig.LOGGING_EFFECTS) {
WarpDrive.logger.info("Received beam packet from " + beamEffectMessage.source + " to " + beamEffectMessage.target
+ " as RGB " + beamEffectMessage.red + " " + beamEffectMessage.green + " " + beamEffectMessage.blue
+ " age " + beamEffectMessage.age +" energy " + beamEffectMessage.energy);
+ " age " + beamEffectMessage.age);
}
beamEffectMessage.handle(Minecraft.getMinecraft().theWorld);

View file

@ -57,7 +57,7 @@ public class PacketHandler {
final int age, final int energy, final int radius) {
assert(!world.isRemote);
final MessageBeamEffect messageBeamEffect = new MessageBeamEffect(v3Source, v3Target, red, green, blue, age, energy);
final MessageBeamEffect messageBeamEffect = new MessageBeamEffect(v3Source, v3Target, red, green, blue, age);
// small beam are sent relative to beam center
if (v3Source.distanceTo_square(v3Target) < 3600 /* 60 * 60 */) {
@ -82,10 +82,10 @@ public class PacketHandler {
public static void sendBeamPacketToPlayersInArea(final World world, final Vector3 source, final Vector3 target,
final float red, final float green, final float blue,
final int age, final int energy, final AxisAlignedBB aabb) {
final int age, final AxisAlignedBB aabb) {
assert(!world.isRemote);
final MessageBeamEffect messageBeamEffect = new MessageBeamEffect(source, target, red, green, blue, age, energy);
final MessageBeamEffect messageBeamEffect = new MessageBeamEffect(source, target, red, green, blue, age);
// Send packet to all players within cloaked area
final List<Entity> list = world.getEntitiesWithinAABB(EntityPlayerMP.class, aabb);
for (final Entity entity : list) {

View file

@ -31,7 +31,7 @@ public class EntityFXBeam extends AbstractEntityFX {
public EntityFXBeam(final World world, final Vector3 position, final Vector3 target,
final float red, final float green, final float blue,
final int age, final int energy) {
final int age) {
super(world, position.x, position.y, position.z, 0.0D, 0.0D, 0.0D);
this.setRBGColorF(red, green, blue);
this.setSize(0.02F, 0.02F);