Code cleanup
This commit is contained in:
parent
484eecf299
commit
e0cbb632f7
7 changed files with 17 additions and 15 deletions
|
@ -528,7 +528,7 @@ public class Commons {
|
|||
final List<EntityPlayer> onlinePlayers = MinecraftServer.getServer().getConfigurationManager().playerEntityList;
|
||||
for (final EntityPlayer onlinePlayer : onlinePlayers) {
|
||||
if (onlinePlayer.getCommandSenderName().equalsIgnoreCase(playerNameOrSelector) && onlinePlayer instanceof EntityPlayerMP) {
|
||||
return new EntityPlayerMP[]{ (EntityPlayerMP)onlinePlayer };
|
||||
return new EntityPlayerMP[] { (EntityPlayerMP)onlinePlayer };
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -518,9 +518,9 @@ public class TileEntityLaser extends TileEntityAbstractLaser implements IBeamFre
|
|||
beamFrequency = parBeamFrequency;
|
||||
}
|
||||
final Vector3 vRGB = IBeamFrequency.getBeamColor(beamFrequency);
|
||||
r = (float)vRGB.x;
|
||||
g = (float)vRGB.y;
|
||||
b = (float)vRGB.z;
|
||||
r = (float) vRGB.x;
|
||||
g = (float) vRGB.y;
|
||||
b = (float) vRGB.z;
|
||||
}
|
||||
|
||||
private void playSoundCorrespondsEnergy(int energy) {
|
||||
|
@ -634,13 +634,13 @@ public class TileEntityLaser extends TileEntityAbstractLaser implements IBeamFre
|
|||
return emitBeam(arguments);
|
||||
|
||||
case "position":
|
||||
return new Integer[]{ xCoord, yCoord, zCoord };
|
||||
return new Integer[] { xCoord, yCoord, zCoord };
|
||||
|
||||
case "beamFrequency":
|
||||
if (arguments.length == 1) {
|
||||
setBeamFrequency(Commons.toInt(arguments[0]));
|
||||
}
|
||||
return new Integer[]{ beamFrequency };
|
||||
return new Integer[] { beamFrequency };
|
||||
|
||||
case "getScanResult":
|
||||
return getScanResult();
|
||||
|
|
|
@ -18,7 +18,6 @@ import net.minecraft.nbt.NBTTagCompound;
|
|||
import net.minecraft.network.NetworkManager;
|
||||
import net.minecraft.network.Packet;
|
||||
import net.minecraft.network.play.server.S35PacketUpdateTileEntity;
|
||||
import net.minecraft.util.StatCollector;
|
||||
|
||||
import cpw.mods.fml.common.Optional;
|
||||
|
||||
|
@ -28,15 +27,15 @@ public class TileEntityAbstractForceField extends TileEntityAbstractEnergy imple
|
|||
protected byte tier = -1;
|
||||
protected int beamFrequency = -1;
|
||||
public boolean isEnabled = true;
|
||||
protected boolean isConnected = false;
|
||||
|
||||
// computed properties
|
||||
protected Vector3 vRGB;
|
||||
protected boolean isConnected = false;
|
||||
|
||||
public TileEntityAbstractForceField() {
|
||||
super();
|
||||
|
||||
addMethods(new String[]{
|
||||
|
||||
addMethods(new String[] {
|
||||
"enable",
|
||||
"beamFrequency"
|
||||
});
|
||||
|
@ -186,7 +185,7 @@ public class TileEntityAbstractForceField extends TileEntityAbstractEnergy imple
|
|||
if (arguments.length == 1) {
|
||||
setBeamFrequency(Commons.toInt(arguments[0]));
|
||||
}
|
||||
return new Integer[]{ beamFrequency };
|
||||
return new Integer[] { beamFrequency };
|
||||
}
|
||||
} catch (Exception exception) {
|
||||
exception.printStackTrace();
|
||||
|
|
|
@ -16,8 +16,9 @@ import net.minecraft.network.play.server.S35PacketUpdateTileEntity;
|
|||
import net.minecraft.tileentity.TileEntity;
|
||||
|
||||
public class TileEntityForceField extends TileEntityAbstractBase {
|
||||
|
||||
private VectorI vProjector;
|
||||
|
||||
|
||||
// cache parameters used for rendering, force projector check for others
|
||||
private int cache_beamFrequency;
|
||||
public Block cache_blockCamouflage;
|
||||
|
@ -154,7 +155,7 @@ public class TileEntityForceField extends TileEntityAbstractBase {
|
|||
}
|
||||
|
||||
public ForceFieldSetup getForceFieldSetup() {
|
||||
TileEntityForceFieldProjector tileEntityForceFieldProjector = getProjector();
|
||||
final TileEntityForceFieldProjector tileEntityForceFieldProjector = getProjector();
|
||||
if (tileEntityForceFieldProjector == null) {
|
||||
return null;
|
||||
}
|
||||
|
|
|
@ -214,7 +214,8 @@ public class Dictionary {
|
|||
+ "Tags shall be separated by at least one space, comma or tabulation.\n" + "Invalid tags will be ignored silently. Tags and block names are case sensitive.\n"
|
||||
+ "In case of conflicts, the latest tag overwrite the previous ones.\n" + "- Anchor: ship can't move with this entity aboard (default: none).\n"
|
||||
+ "- NoMass: this entity doesn't count when calculating ship volume/mass (default: Galacticraft air bubble).\n"
|
||||
+ "- LeftBehind: this entity won't move with your ship (default: Galacticraft air bubble).\n"
|
||||
+ "- LeftBehind: this entity won't move with your ship nor transporter (default: Galacticraft air bubble).\n"
|
||||
// + "- NoTransport: this entity is ignored by the transporter (default: -none-).\n"
|
||||
+ "- NonLivingTarget: this non-living entity can be targeted/removed by weapons (default: ItemFrame, Painting).\n"
|
||||
+ "- LivingWithoutAir: this living entity doesn't need air to live (default: vanilla zombies and skeletons).");
|
||||
|
||||
|
|
|
@ -26,6 +26,6 @@ public class CameraRegistryItem {
|
|||
&& position.chunkPosX == tileEntity.xCoord
|
||||
&& position.chunkPosY == tileEntity.yCoord
|
||||
&& position.chunkPosZ == tileEntity.zCoord
|
||||
&& videoChannel == ((IVideoChannel)tileEntity).getVideoChannel();
|
||||
&& videoChannel == ((IVideoChannel) tileEntity).getVideoChannel();
|
||||
}
|
||||
}
|
|
@ -29,6 +29,7 @@ import net.minecraft.util.DamageSource;
|
|||
import net.minecraft.world.World;
|
||||
|
||||
public class ForceFieldSetup extends GlobalPosition {
|
||||
|
||||
private static final float FORCEFIELD_BASE_SCAN_SPEED_BLOCKS_PER_SECOND = 100;
|
||||
private static final float FORCEFIELD_BASE_PLACE_SPEED_BLOCKS_PER_SECOND = 20;
|
||||
private static final float FORCEFIELD_MAX_SCAN_SPEED_BLOCKS_PER_SECOND = 10000;
|
||||
|
|
Loading…
Reference in a new issue