Skip to content

Commit

Permalink
The order in the names of classes and variables
Browse files Browse the repository at this point in the history
  • Loading branch information
OldSerpskiStalker committed Oct 24, 2024
1 parent de6ec90 commit 6019df0
Show file tree
Hide file tree
Showing 47 changed files with 186 additions and 184 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,12 @@
*
*/
@Mod.EventBusSubscriber(modid = ProjectStructure.STRUCT_INFO_MOD.MOD_ID)
public final class WebAttackEvent
public final class OnWebAttackEvent
{
/**
*
*/
public WebAttackEvent()
public OnWebAttackEvent()
{
CodeGenericUtil.printInitClassToLog(this.getClass());
}
Expand All @@ -34,7 +34,7 @@ public WebAttackEvent()
* @param event
*/
@SubscribeEvent
public synchronized void attachCapabilitiesTileEntity(AttachCapabilitiesEvent<TileEntity> event)
public synchronized void onAttachCapabilitiesTileEntity_0(AttachCapabilitiesEvent<TileEntity> event)
{
TileEntity entity = event.getObject();

Expand Down Expand Up @@ -79,7 +79,7 @@ public IWebSlinger getInstance()
* @param event
*/
@SubscribeEvent
public synchronized void attachCapabilitiesEntity(AttachCapabilitiesEvent<Entity> event)
public synchronized void onAttachCapabilitiesEntity_1(AttachCapabilitiesEvent<Entity> event)
{
Entity entity = event.getObject();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,12 @@
*
*/
@Mod.EventBusSubscriber(modid = ProjectStructure.STRUCT_INFO_MOD.MOD_ID)
public final class BreakTorchEvent
public final class OnBreakTorchEvent
{
/**
*
*/
public BreakTorchEvent()
public OnBreakTorchEvent()
{
CodeGenericUtil.printInitClassToLog(this.getClass());
}
Expand All @@ -27,7 +27,7 @@ public BreakTorchEvent()
* @param event
*/
@SubscribeEvent
public synchronized void onZombieSpawn(EntityJoinWorldEvent event)
public synchronized void onSearchToBreakTorch_0(EntityJoinWorldEvent event)
{
if (event.getEntity() instanceof EntityZombie)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,12 @@
/**
*
*/
public final class cmdAdminDumpBlock extends CommandBase
public final class CmdAdminDumpBlock extends CommandBase
{
/**
*
*/
public cmdAdminDumpBlock()
public CmdAdminDumpBlock()
{
CodeGenericUtil.printInitClassToLog(this.getClass());
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,12 @@
/**
*
*/
public final class cmdAdminDumpEntity extends CommandBase
public final class CmdAdminDumpEntity extends CommandBase
{
/**
*
*/
public cmdAdminDumpEntity()
public CmdAdminDumpEntity()
{
CodeGenericUtil.printInitClassToLog(this.getClass());
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,12 @@
/**
*
*/
public final class cmdAdminDumpItem extends CommandBase
public final class CmdAdminDumpItem extends CommandBase
{
/**
*
*/
public cmdAdminDumpItem()
public CmdAdminDumpItem()
{
CodeGenericUtil.printInitClassToLog(this.getClass());
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,12 @@
/**
*
*/
public final class cmdAdminGameMode extends CommandBase
public final class CmdAdminGameMode extends CommandBase
{
/**
*
*/
public cmdAdminGameMode()
public CmdAdminGameMode()
{
CodeGenericUtil.printInitClassToLog(this.getClass());
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,12 @@
/**
*
*/
public final class cmdAdminGetWorldMoonPhase extends CommandBase
public final class CmdAdminGetWorldMoonPhase extends CommandBase
{
/**
*
*/
public cmdAdminGetWorldMoonPhase()
public CmdAdminGetWorldMoonPhase()
{
CodeGenericUtil.printInitClassToLog(this.getClass());
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,12 @@
/**
*
*/
public final class cmdAdminLaunchFireball extends CommandBase
public final class CmdAdminLaunchFireball extends CommandBase
{
/**
*
*/
public cmdAdminLaunchFireball()
public CmdAdminLaunchFireball()
{
CodeGenericUtil.printInitClassToLog(this.getClass());
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,12 @@
/**
*
*/
public final class cmdAdminScanEntities extends CommandBase
public final class CmdAdminScanEntities extends CommandBase
{
/**
*
*/
public cmdAdminScanEntities()
public CmdAdminScanEntities()
{
CodeGenericUtil.printInitClassToLog(this.getClass());
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,12 @@
/**
*
*/
public final class cmdAdminSwitchVanish extends CommandBase
public final class CmdAdminSwitchVanish extends CommandBase
{
/**
*
*/
public cmdAdminSwitchVanish()
public CmdAdminSwitchVanish()
{
CodeGenericUtil.printInitClassToLog(this.getClass());
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,12 @@
/**
*
*/
public final class cmdServerJsonScriptReload extends CommandBase
public final class CmdServerJsonScriptReload extends CommandBase
{
/**
*
*/
public cmdServerJsonScriptReload()
public CmdServerJsonScriptReload()
{
CodeGenericUtil.printInitClassToLog(this.getClass());
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,12 @@
/**
*
*/
public final class cmdServerMobsKiller extends CommandBase
public final class CmdServerMobsKiller extends CommandBase
{
/**
*
*/
public cmdServerMobsKiller()
public CmdServerMobsKiller()
{
CodeGenericUtil.printInitClassToLog(this.getClass());
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,12 @@
/**
*
*/
public final class cmdServerSingleScriptReload extends CommandBase
public final class CmdServerSingleScriptReload extends CommandBase
{
/**
*
*/
public cmdServerSingleScriptReload()
public CmdServerSingleScriptReload()
{
CodeGenericUtil.printInitClassToLog(this.getClass());
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ public OnUpdateTorchLogic()
* @param event
*/
@SubscribeEvent
public synchronized void onHit(LivingHurtEvent event)
public synchronized void onHit_0(LivingHurtEvent event)
{
if ((event.getSource().getDamageType().equalsIgnoreCase("mob") ||
event.getSource().getDamageType().equalsIgnoreCase("player")) && event.getSource().getTrueSource() != null)
Expand Down Expand Up @@ -95,7 +95,7 @@ else if (entityGetTrueSource instanceof EntitySkeleton)
* @param event
*/
@SubscribeEvent
public synchronized void onBreak(BlockEvent.BreakEvent event)
public synchronized void onBreak_1(BlockEvent.BreakEvent event)
{
EntityPlayerMP player = (EntityPlayerMP) event.getPlayer();

Expand All @@ -107,7 +107,9 @@ public synchronized void onBreak(BlockEvent.BreakEvent event)
if (block == Blocks.TNT)
{
event.setCanceled(true);
Explosion ex = new Explosion(player.world, player, blockPos.getX(), blockPos.getY(), blockPos.getZ(), 100.0F, true, true);
Explosion ex = new Explosion(player.world,
player, blockPos.getX(), blockPos.getY(), blockPos.getZ(), 100.0F, true, true);

event.getState().getBlock().onBlockExploded(player.world, blockPos, ex);

if (!player.capabilities.isCreativeMode)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
import org.imesense.dynamicspawncontrol.technical.config.gameworldtime.DataPluginWorldTime;

import java.math.BigDecimal;
import java.math.RoundingMode;
import java.util.Collections;

/**
Expand All @@ -23,12 +24,12 @@ public WorldTime()
/**
*
*/
private static final double day_multiplier = multiplier(DataPluginWorldTime.ConfigDataWorldTime.instance.getDayLengthMinutes());
private static final double DAY_MULTIPLIER = multiplier(DataPluginWorldTime.ConfigDataWorldTime.instance.getDayLengthMinutes());

/**
*
*/
private static final double night_multiplier = multiplier(DataPluginWorldTime.ConfigDataWorldTime.instance.getNightLengthMinutes());
private static final double NIGHT_MULTIPLIER = multiplier(DataPluginWorldTime.ConfigDataWorldTime.instance.getNightLengthMinutes());

/**
*
Expand All @@ -37,7 +38,7 @@ public WorldTime()
*/
public static double multiplier(long worldTime)
{
return isDaytime(worldTime) ? day_multiplier : night_multiplier;
return isDaytime(worldTime) ? DAY_MULTIPLIER : NIGHT_MULTIPLIER;
}

/**
Expand Down Expand Up @@ -83,6 +84,7 @@ public static long systemTime(int hour, int minute, int day)
{
hour = (hour - 6 + 24) % 24 * 1000;
minute = (int)Math.round((double)minute * 16.94D % 1000.0D);

return (long)(hour + minute) + (long)day * 24000L;
}

Expand All @@ -105,8 +107,8 @@ public static long day(long worldTime)
public static String progressString(long item, String addition)
{
item %= 12000L;
int percent = (int)(item * 100L / 12000L);
int division = 2;

int percent = (int)(item * 100L / 12000L), division = 2;

return String.join
("", Collections.nCopies(percent == 0 ? 2 : 2 - (int)Math.log10((double)percent), " "))
Expand All @@ -124,7 +126,7 @@ public static String progressString(long item, String addition)
*/
private static double multiplier(int length)
{
return (new BigDecimal(String.valueOf((double)length / 10.0D))).setScale(2, 6).doubleValue();
return (new BigDecimal(String.valueOf((double)length / 10.0D))).setScale(2, RoundingMode.HALF_EVEN).doubleValue();
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,8 @@ protected void onImpact(@Nonnull RayTraceResult result)
{
if (!this.world.isRemote)
{
this.world.createExplosion(this.shootingEntity, this.posX, this.posY, this.posZ, (float)this.explosionStrength, true);
this.world.createExplosion(this.shootingEntity,
this.posX, this.posY, this.posZ, (float)this.explosionStrength, true);

FireSpawnAction fireSpawnAction = (world, explosionPos, radius) ->
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,7 @@ public void generate(Random random, int chunkX, int chunkZ, World world, IChunkG
DataBlockWorldGenerator.InfoDataBlockBlockMonsterEgg.instance.getMinHeight(),
DataBlockWorldGenerator.InfoDataBlockBlockMonsterEgg.instance.getMaxHeight()
);

break;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,7 @@ public void generate(Random random, int chunkX, int chunkZ, World world, IChunkG
DataBlockWorldGenerator.InfoDataBlockMossyCobblestone.instance.getMinHeight(),
DataBlockWorldGenerator.InfoDataBlockMossyCobblestone.instance.getMaxHeight()
);

break;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,7 @@ public void generate(Random random, int chunkX, int chunkZ, World world, IChunkG
DataBlockWorldGenerator.InfoDataBlockNetherRack.instance.getMinHeight(),
DataBlockWorldGenerator.InfoDataBlockNetherRack.instance.getMaxHeight()
);

break;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -271,7 +271,6 @@ private static void updateLuminance(EntityRenderer renderer, float partialTicks,
WorldProvider dim = world.provider;
DimensionType dimType = dim.getDimensionType();

// Light to brightness float[16] conversion table.
float[] brightnessTable = dim.getLightBrightnessTable();

boolean dimDark = isDark(dim, dimType);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,9 @@ public abstract class CfgClassAbstract
*
* @param nameConfigFile
*/
public CfgClassAbstract(String nameConfigFile, final Boolean isConfigFolder)
public CfgClassAbstract(String nameConfigFile, final Boolean IS_CONFIG_FOLDER)
{
this.nameConfig = this.constructPathToDirectory(isConfigFolder) + nameConfigFile;
this.nameConfig = this.constructPathToDirectory(IS_CONFIG_FOLDER) + nameConfigFile;
}

/**
Expand All @@ -38,11 +38,11 @@ public CfgClassAbstract(String nameConfigFile, final Boolean isConfigFolder)
*
* @return
*/
protected String constructPathToDirectory(final Boolean isConfigFolder)
protected String constructPathToDirectory(final Boolean IS_CONFIG_FOLDER)
{
return DynamicSpawnControl.getGlobalPathToConfigs().getPath() + File.separator +
ProjectStructure.STRUCT_FILES_DIRS.NAME_DIRECTORY + File.separator +
(isConfigFolder ? ProjectStructure.STRUCT_FILES_DIRS.NAME_DIR_CONFIGS :
(IS_CONFIG_FOLDER ? ProjectStructure.STRUCT_FILES_DIRS.NAME_DIR_CONFIGS :
ProjectStructure.STRUCT_FILES_DIRS.NAME_DIR_PLUGINS) + File.separator;
}
}
Loading

0 comments on commit 6019df0

Please sign in to comment.