Skip to content

Commit

Permalink
normalize Tags.java
Browse files Browse the repository at this point in the history
  • Loading branch information
FalsePattern committed Jul 11, 2024
1 parent cdeefd6 commit 80e0d69
Show file tree
Hide file tree
Showing 29 changed files with 38 additions and 44 deletions.
4 changes: 0 additions & 4 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,6 @@ minecraft_fp {

tokens {
tokenClass = "Tags"
modid = "MODID"
name = "MODNAME"
version = "VERSION"
rootPkg = "GROUPNAME"
}

publish {
Expand Down
12 changes: 6 additions & 6 deletions src/main/java/com/falsepattern/falsetweaks/FalseTweaks.java
Original file line number Diff line number Diff line change
Expand Up @@ -35,18 +35,18 @@
import cpw.mods.fml.common.event.FMLPostInitializationEvent;
import cpw.mods.fml.common.event.FMLPreInitializationEvent;

@Mod(modid = Tags.MODID,
version = Tags.VERSION,
name = Tags.MODNAME,
@Mod(modid = Tags.MOD_ID,
version = Tags.MOD_VERSION,
name = Tags.MOD_NAME,
acceptedMinecraftVersions = "[1.7.10]",
guiFactory = Tags.GROUPNAME + ".config.FalseTweaksGuiFactory",
guiFactory = Tags.ROOT_PKG + ".config.FalseTweaksGuiFactory",
acceptableRemoteVersions = "*",
dependencies = "required-after:falsepatternlib@[1.2.0,);" +
"after:neodymium@[0.3.2,);")
public class FalseTweaks {

@SidedProxy(clientSide = Tags.GROUPNAME + ".proxy.ClientProxy",
serverSide = Tags.GROUPNAME + ".proxy.ServerProxy")
@SidedProxy(clientSide = Tags.ROOT_PKG + ".proxy.ClientProxy",
serverSide = Tags.ROOT_PKG + ".proxy.ServerProxy")
private static CommonProxy proxy;

public FalseTweaks() {
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/com/falsepattern/falsetweaks/Share.java
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
import org.apache.logging.log4j.Logger;

public class Share {
public static final Logger log = LogManager.getLogger(Tags.MODNAME);
public static final Logger log = LogManager.getLogger(Tags.MOD_NAME);

public static boolean LEAKFIX_CLASS_INITIALIZED = false;
}
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@

import java.util.Map;

@IFMLLoadingPlugin.TransformerExclusions(Tags.GROUPNAME + ".asm")
@IFMLLoadingPlugin.TransformerExclusions(Tags.ROOT_PKG + ".asm")
public class CoreLoadingPlugin implements IFMLLoadingPlugin {
@Getter
private static boolean obfuscated;
Expand All @@ -57,7 +57,7 @@ public class CoreLoadingPlugin implements IFMLLoadingPlugin {

@Override
public String[] getASMTransformerClass() {
return new String[]{Tags.GROUPNAME + ".asm.FalseTweaksTransformer"};
return new String[]{Tags.ROOT_PKG + ".asm.FalseTweaksTransformer"};
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ public class RenderGlobalDeOptimizer implements TurboClassTransformer {

@Override
public String owner() {
return Tags.MODNAME;
return Tags.MOD_NAME;
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
public class Threading_RenderBlocksASM implements TurboClassTransformer {
@Override
public String owner() {
return Tags.MODNAME;
return Tags.MOD_NAME;
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ public class Threading_TessellatorUseReplacement implements TurboClassTransforme

@Override
public String owner() {
return Tags.MODNAME;
return Tags.MOD_NAME;
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ public class Threading_ThreadSafeBlockRendererInjector implements TurboClassTran

@Override
public String owner() {
return Tags.MODNAME;
return Tags.MOD_NAME;
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ public class Threading_BlockMinMax implements TurboClassTransformer {

@Override
public String owner() {
return Tags.MODNAME;
return Tags.MOD_NAME;
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ private boolean isBlockSubclass(String className) {

@Override
public String owner() {
return Tags.MODNAME;
return Tags.MOD_NAME;
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ public final class Threading_GameSettings implements TurboClassTransformer {

@Override
public String owner() {
return Tags.MODNAME;
return Tags.MOD_NAME;
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ public final class Threading_GameSettingsRedirector implements TurboClassTransfo

@Override
public String owner() {
return Tags.MODNAME;
return Tags.MOD_NAME;
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@

public class FalseTweaksGuiConfig extends SimpleGuiConfig {
public FalseTweaksGuiConfig(GuiScreen parent) throws ConfigException {
super(parent, Tags.MODID, Tags.MODNAME, fetchConfigClasses());
super(parent, Tags.MOD_ID, Tags.MOD_NAME, fetchConfigClasses());
}

private static Class<?>[] fetchConfigClasses() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
import com.falsepattern.lib.config.Config;
import com.falsepattern.lib.config.ConfigurationManager;

@Config(modid = Tags.MODID,
@Config(modid = Tags.MOD_ID,
category = "00_modules")
@Config.RequiresMcRestart
public class ModuleConfig {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@

import static com.falsepattern.falsetweaks.api.Constants.MaximumRenderDistance;

@Config(modid = Tags.MODID,
@Config(modid = Tags.MOD_ID,
category = "occlusion")
public class OcclusionConfig {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
import com.falsepattern.lib.config.Config;
import com.falsepattern.lib.config.ConfigurationManager;

@Config(modid = Tags.MODID,
@Config(modid = Tags.MOD_ID,
category = "profiler")
public class ProfilerConfig {
@Config.Comment("Enable this to dump the profiler data to a file when the F3 profiler is closed.")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
import com.falsepattern.lib.config.Config;
import com.falsepattern.lib.config.ConfigurationManager;

@Config(modid = Tags.MODID,
@Config(modid = Tags.MOD_ID,
category = "item_render_lists")
public class RenderListConfig {
@Config.Comment("The total amount of renderlists FalseTweaks may allocate for optimized item rendering.\n" +
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
import com.falsepattern.lib.config.Config;
import com.falsepattern.lib.config.ConfigurationManager;

@Config(modid = Tags.MODID,
@Config(modid = Tags.MOD_ID,
category = "threading")
public class ThreadingConfig {
@Config.Comment("The number of threads to use for chunk building.\n" +
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
import com.falsepattern.lib.config.Config;
import com.falsepattern.lib.config.ConfigurationManager;

@Config(modid = Tags.MODID,
@Config(modid = Tags.MOD_ID,
category = "translucent_block_layers_fix")
public class TranslucentBlockLayersConfig {
@Config.Comment("The \"epsilon\" value used when shifting translucent block geometry closer to the camera.\n" +
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
import com.falsepattern.lib.config.Config;
import com.falsepattern.lib.config.ConfigurationManager;

@Config(modid = Tags.MODID,
@Config(modid = Tags.MOD_ID,
category = "triangulator")
public class TriangulatorConfig {
@Config.Comment("Used to toggle the namesake feature of this mod: quad triangulation.\n" +
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
import java.util.HashSet;
import java.util.Set;

@Config(modid = Tags.MODID,
@Config(modid = Tags.MOD_ID,
category = "voxelizer")
@Config.RequiresMcRestart
public class VoxelizerConfig {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@

public class MixinPlugin implements IMixinPlugin {
@Getter
private final Logger logger = IMixinPlugin.createLogger(Tags.MODNAME + " Init");
private final Logger logger = IMixinPlugin.createLogger(Tags.MOD_NAME + " Init");

@Override
public ITargetedMod[] getTargetedModEnumValues() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@

public class MixinPlugin implements IMixinPlugin {
@Getter
private final Logger logger = IMixinPlugin.createLogger(Tags.MODNAME);
private final Logger logger = IMixinPlugin.createLogger(Tags.MOD_NAME);

@Override
public ITargetedMod[] getTargetedModEnumValues() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ public class DefaultAnimationUpdateBatcher implements IAnimationUpdateBatcher {
}
memory = GLAllocation.createDirectIntBuffer(size);
thread = new Thread(this::run);
thread.setName(Tags.MODNAME + " texture batching thread");
thread.setName(Tags.MOD_NAME + " texture batching thread");
thread.setDaemon(true);
thread.start();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,16 +29,16 @@

public class OcclusionHelpers {
public static final EnumFacing[] FACING_VALUES = EnumFacing.values();
public static final boolean DEBUG_ALWAYS_RUN_OCCLUSION = Boolean.parseBoolean(System.getProperty(Tags.MODID + ".debug.alwaysRunOcclusion", "false"));
public static final boolean DEBUG_PRINT_QUEUE_ITERATIONS = Boolean.parseBoolean(System.getProperty(Tags.MODID + ".debug.printQueueIterations", "false"));
public static final boolean DEBUG_ALWAYS_RUN_OCCLUSION = Boolean.parseBoolean(System.getProperty(Tags.MOD_ID + ".debug.alwaysRunOcclusion", "false"));
public static final boolean DEBUG_PRINT_QUEUE_ITERATIONS = Boolean.parseBoolean(System.getProperty(Tags.MOD_ID + ".debug.printQueueIterations", "false"));
/**
* Update up to 1 chunk per frame when the framerate is uncapped, vanilla-style.
*/
public static final boolean DEBUG_LAZY_CHUNK_UPDATES = Boolean.parseBoolean(System.getProperty(Tags.MODID + ".debug.lazyChunkUpdates", "false"));
public static final boolean DEBUG_LAZY_CHUNK_UPDATES = Boolean.parseBoolean(System.getProperty(Tags.MOD_ID + ".debug.lazyChunkUpdates", "false"));
/**
* Disable speeding up chunk updates when the camera is static.
*/
public static final boolean DEBUG_NO_UPDATE_ACCELERATION = Boolean.parseBoolean(System.getProperty(Tags.MODID + ".debug.noUpdateAcceleration", "false"));
public static final boolean DEBUG_NO_UPDATE_ACCELERATION = Boolean.parseBoolean(System.getProperty(Tags.MOD_ID + ".debug.noUpdateAcceleration", "false"));
public static OcclusionWorker worker;
public static OcclusionRenderer renderer;
public static long chunkUpdateDeadline;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@
public class ThreadedChunkUpdateHelper implements IRenderGlobalListener {
public static final boolean AGGRESSIVE_NEODYMIUM_THREADING = ThreadingConfig.AGGRESSIVE_NEODYMIUM_THREADING();
public static final RenderBlocksStack renderBlocksStack = new RenderBlocksStack();
private static final boolean DEBUG_THREADED_UPDATE_FINE_LOG = Boolean.parseBoolean(System.getProperty(Tags.MODID + ".debug.enableThreadedUpdateFineLog"));
private static final boolean DEBUG_THREADED_UPDATE_FINE_LOG = Boolean.parseBoolean(System.getProperty(Tags.MOD_ID + ".debug.enableThreadedUpdateFineLog"));
private static final int BIT_NextPass = 0b1;
private static final int BIT_RenderedSomething = 0b10;
private static final int BIT_StartedTessellator = 0b100;
Expand Down Expand Up @@ -328,7 +328,7 @@ public void spawnThreads(RenderGlobal rg) {

@SubscribeEvent
public void onConfigChangedEvent(ConfigChangedEvent.OnConfigChangedEvent e) {
if (!e.modID.equals(Tags.MODID)) {
if (!e.modID.equals(Tags.MOD_ID)) {
return;
}
Minecraft.getMinecraft().renderGlobal.loadRenderers();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
import com.falsepattern.lib.config.Config;
import com.falsepattern.lib.config.ConfigurationManager;

@Config(modid = Tags.MODID + "_userspecific",
@Config(modid = Tags.MOD_ID + "_userspecific",
category = "calibration")
public class CalibrationConfig {
@Config.Comment("Modifies the way ambient occlusion alignment is calculated. Used for compatibility purposes,\n" +
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ public class CalibrationGUI extends GuiScreen {
private static final int ID_DESCRIPTION = 0;
private static final int ID_TOGGLE = 1;
private static final int ID_APPLY = 2;
private final ResourceLocation reference = new ResourceLocation(Tags.MODID, "reference.png");
private final ResourceLocation reference = new ResourceLocation(Tags.MOD_ID, "reference.png");
protected List<GuiLabel> labelList = new ArrayList<>();
private boolean flip = false;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@
import com.falsepattern.falsetweaks.Compat;
import com.falsepattern.falsetweaks.Share;
import com.falsepattern.falsetweaks.Tags;
import com.falsepattern.falsetweaks.asm.FalseTweaksTransformer;
import com.falsepattern.falsetweaks.config.ModuleConfig;
import com.falsepattern.falsetweaks.config.OcclusionConfig;
import com.falsepattern.falsetweaks.modules.debug.Debug;
Expand All @@ -45,7 +44,6 @@
import net.minecraft.client.resources.IReloadableResourceManager;
import net.minecraft.client.settings.GameSettings;
import net.minecraftforge.client.ClientCommandHandler;
import cpw.mods.fml.client.FMLClientHandler;
import cpw.mods.fml.client.event.ConfigChangedEvent;
import cpw.mods.fml.common.FMLCommonHandler;
import cpw.mods.fml.common.ICrashCallable;
Expand Down Expand Up @@ -149,7 +147,7 @@ public void loadComplete(FMLLoadCompleteEvent e) {

@SubscribeEvent
public void onConfigChangedEvent(ConfigChangedEvent.OnConfigChangedEvent e) {
if (!e.modID.equals(Tags.MODID)) {
if (!e.modID.equals(Tags.MOD_ID)) {
return;
}

Expand Down

0 comments on commit 80e0d69

Please sign in to comment.