Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rebrand to BlahajASM #236

Closed
wants to merge 6 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,4 @@
# LoliASM
The lolis are now preparing to bytecode manipulate your game.
# BlahajASM
The blahaj are now preparing to bytecode manipulate your game.

IKEA Shark Pixel Art by Budget Signs under [CC BY-NC 4.0](https://creativecommons.org/licenses/by-nc/4.0/).
6 changes: 3 additions & 3 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ minecraft {
mcVersion = '1.12.2'
def args = [
"-ea:${project.group}",
'-Dfml.coreMods.load=zone.rong.loliasm.core.LoliLoadingPlugin',
'-Dfml.coreMods.load=zone.rong.blahajasm.core.BlahajLoadingPlugin',
'-Dmixin.hotSwap=true',
'-Dmixin.checks.interfaces=true',
'-Dmixin.debug.export=true'
Expand Down Expand Up @@ -164,10 +164,10 @@ jar {
manifest {
attributes([
'FMLCorePluginContainsFMLMod': true,
'FMLCorePlugin': 'zone.rong.loliasm.core.LoliLoadingPlugin',
'FMLCorePlugin': 'zone.rong.blahajasm.core.BlahajLoadingPlugin',
'ForceLoadAsMod': project.gradle.startParameter.taskNames[0] == 'build',
'TweakClass': 'org.spongepowered.asm.launch.MixinTweaker',
'FMLAT': 'loliasm_at.cfg'
'FMLAT': 'blahajasm_at.cfg'
])
}
}
Expand Down
9 changes: 6 additions & 3 deletions changelog.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
# LoliASM Changelog
# BlahajASM Changelog

## 3.0
- Refactor and rebrand to BlahajASM.

## 2.6
- Separate out `mixins.modfixes.json` to separate jsons to accompany config values.
Expand All @@ -12,7 +15,7 @@
- Canonicalize strings by using Java's String#intern. This utilizes Java's own implementation and as of Java 7 through 8, it has gotten better. Where using it is probably better than a custom structure.
- Now uses Forge's own config, but because of earlier-loading, it is manually baked.
- Deprecated old json config system.
- More config options! Check your new configs: `loliasm.cfg`
- More config options! Check your new configs: `blahajasm.cfg`
- Launchwrapper optimizations into more specific configuration settings.
- Modfixes are now more specific too.
- NBTTagString objects now have their strings canonicalized.
Expand Down Expand Up @@ -75,4 +78,4 @@

## 1.0
- First release.
- Optimizations on BakedQuads, soft/hard patch variants.
- Optimizations on BakedQuads, soft/hard patch variants.
4 changes: 2 additions & 2 deletions gradle.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
org.gradle.jvmargs = -Xmx3G

# Mod Information
mod_version = 5.18
mod_version = 6.0
maven_group = zone.rong
archives_base_name = loliasm
archives_base_name = blahajasm
2 changes: 1 addition & 1 deletion settings.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,4 @@ plugins {
id 'org.gradle.toolchains.foojay-resolver-convention' version '0.4.0'
}

rootProject.name = 'LoliASM'
rootProject.name = 'BlahajASM'
Original file line number Diff line number Diff line change
@@ -1,33 +1,33 @@
package zone.rong.loliasm;
package zone.rong.blahajasm;

import codechicken.asm.ClassHierarchyManager;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.tileentity.TileEntity;
import net.minecraftforge.fml.common.Mod;
import net.minecraftforge.fml.common.SidedProxy;
import net.minecraftforge.fml.common.event.*;
import zone.rong.loliasm.api.mixins.RegistrySimpleExtender;
import zone.rong.loliasm.config.LoliConfig;
import zone.rong.loliasm.core.LoliLoadingPlugin;
import zone.rong.loliasm.proxy.CommonProxy;
import zone.rong.blahajasm.api.mixins.RegistrySimpleExtender;
import zone.rong.blahajasm.config.BlahajConfig;
import zone.rong.blahajasm.core.BlahajLoadingPlugin;
import zone.rong.blahajasm.proxy.CommonProxy;

import java.util.*;
import java.util.function.BiConsumer;

@Mod(modid = "loliasm", name = "LoliASM", version = LoliLoadingPlugin.VERSION, dependencies = "required-after:mixinbooter@[4.2,);after:jei;after:spark@[1.5.2]")
public class LoliASM {
@Mod(modid = "blahajasm", name = "BlahajASM", version = BlahajLoadingPlugin.VERSION, dependencies = "required-after:mixinbooter@[4.2,);after:jei;after:spark@[1.5.2]")
public class BlahajASM {

@SidedProxy(modId = "loliasm", clientSide = "zone.rong.loliasm.proxy.ClientProxy", serverSide = "zone.rong.loliasm.proxy.CommonProxy")
@SidedProxy(modId = "blahajasm", clientSide = "zone.rong.blahajasm.proxy.ClientProxy", serverSide = "zone.rong.blahajasm.proxy.CommonProxy")
public static CommonProxy proxy;

public static List<RegistrySimpleExtender> simpleRegistryInstances = new ArrayList<>();

public static BiConsumer<TileEntity, NBTTagCompound> customTileDataConsumer;

static {
if (LoliConfig.instance.cleanupChickenASMClassHierarchyManager && LoliReflector.doesClassExist("codechicken.asm.ClassHierarchyManager")) {
if (BlahajConfig.instance.cleanupChickenASMClassHierarchyManager && BlahajReflector.doesClassExist("codechicken.asm.ClassHierarchyManager")) {
// EXPERIMENTAL: As far as I know, this functionality of ChickenASM isn't actually used by any coremods that depends on ChickenASM
LoliLogger.instance.info("Replacing ClassHierarchyManager::superclasses with a dummy map.");
BlahajLogger.instance.info("Replacing ClassHierarchyManager::superclasses with a dummy map.");
ClassHierarchyManager.superclasses = new HashMap() {
@Override
public Object put(Object key, Object value) {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
package zone.rong.loliasm;
package zone.rong.blahajasm;

import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;

public class LoliLogger {
public class BlahajLogger {

public static final Logger instance = LogManager.getLogger("LoliASM");
public static final Logger instance = LogManager.getLogger("BlahajASM");

}
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
package zone.rong.loliasm;
package zone.rong.blahajasm;

import javax.annotation.Nullable;
import java.io.*;

public class LoliPrinter {
public class BlahajPrinter {

public static void prettyPrintClass(byte[] bytes, @Nullable File fileLocation) {
FileOutputStream stream = null;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
package zone.rong.loliasm;
package zone.rong.blahajasm;

import com.google.common.base.Preconditions;
import net.minecraft.launchwrapper.Launch;
import net.minecraft.launchwrapper.LaunchClassLoader;
import net.minecraftforge.fml.relauncher.ReflectionHelper;
import org.objectweb.asm.Type;
import zone.rong.loliasm.api.datastructures.CaptureSet;
import zone.rong.loliasm.api.datastructures.ResourceCache;
import zone.rong.loliasm.core.LoliLoadingPlugin;
import zone.rong.blahajasm.api.datastructures.CaptureSet;
import zone.rong.blahajasm.api.datastructures.ResourceCache;
import zone.rong.blahajasm.core.BlahajLoadingPlugin;

import java.io.InputStream;
import java.lang.invoke.MethodHandle;
Expand All @@ -21,7 +21,7 @@
/**
* Helper class for Reflection nonsense.
*/
public class LoliReflector {
public class BlahajReflector {

public static final MethodHandles.Lookup LOOKUP = MethodHandles.lookup();

Expand Down Expand Up @@ -142,7 +142,7 @@ public static MethodHandle resolveFieldGetter(Class<?> clazz, String fieldName)
try {
Field field = clazz.getDeclaredField(fieldName);
field.setAccessible(true);
if (LoliLoadingPlugin.isVMOpenJ9) {
if (BlahajLoadingPlugin.isVMOpenJ9) {
fixOpenJ9PrivateStaticFinalRestraint(field);
}
return LOOKUP.unreflectGetter(field);
Expand All @@ -156,7 +156,7 @@ public static MethodHandle resolveFieldSetter(Class<?> clazz, String fieldName)
try {
Field field = clazz.getDeclaredField(fieldName);
field.setAccessible(true);
if (LoliLoadingPlugin.isVMOpenJ9) {
if (BlahajLoadingPlugin.isVMOpenJ9) {
fixOpenJ9PrivateStaticFinalRestraint(field);
}
return LOOKUP.unreflectSetter(field);
Expand Down Expand Up @@ -188,7 +188,7 @@ public static Field getField(Class<?> clazz, String fieldName) {
try {
Field field = clazz.getDeclaredField(fieldName);
field.setAccessible(true);
if (LoliLoadingPlugin.isVMOpenJ9) {
if (BlahajLoadingPlugin.isVMOpenJ9) {
fixOpenJ9PrivateStaticFinalRestraint(field);
}
return field;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,26 +1,26 @@
package zone.rong.loliasm;
package zone.rong.blahajasm;

import io.netty.util.internal.shaded.org.jctools.util.UnsafeAccess;
import sun.misc.Unsafe;

import java.lang.reflect.Field;

public class UnsafeLolis {
public class UnsafeBlahaj {

private static final Unsafe $ = UnsafeAccess.UNSAFE;

public static void removeFMLSecurityManager() {
LoliLogger.instance.warn("Detaching FMLSecurityManager.");
Field out = LoliReflector.getField(System.class, "out");
Field err = LoliReflector.getField(System.class, "err");
BlahajLogger.instance.warn("Detaching FMLSecurityManager.");
Field out = BlahajReflector.getField(System.class, "out");
Field err = BlahajReflector.getField(System.class, "err");
long errOffset = $.staticFieldOffset(err);
long offset = errOffset + (errOffset - $.staticFieldOffset(out));
$.putObjectVolatile($.staticFieldBase(err), offset, null);
if (System.getSecurityManager() != null) {
LoliLogger.instance.warn("Failed to detach FMLSecurityManager.");
BlahajLogger.instance.warn("Failed to detach FMLSecurityManager.");
}
}

private UnsafeLolis() { }
private UnsafeBlahaj() { }

}
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package zone.rong.loliasm.api;
package zone.rong.blahajasm.api;

import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.core.LogEvent;
Expand All @@ -24,7 +24,7 @@ public static void install() {
}
// Create the RewriteAppender, which wraps the appenders
RewriteAppender rewriteAppender = RewriteAppender.createAppender(
"LoliDeobfuscatingAppender",
"BlahajDeobfuscatingAppender",
"true",
appenderRefs.toArray(new AppenderRef[0]),
rootLogger.getContext().getConfiguration(),
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package zone.rong.loliasm.api;
package zone.rong.blahajasm.api;

import it.unimi.dsi.fastutil.Hash;
import net.minecraft.client.renderer.block.model.ItemCameraTransforms;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package zone.rong.loliasm.api;
package zone.rong.blahajasm.api;

import com.google.gson.Gson;
import com.google.gson.JsonObject;
Expand All @@ -20,7 +20,7 @@ public static String uploadToHaste(String str) throws IOException {
HttpURLConnection connection = (HttpURLConnection) uploadURL.openConnection();
connection.setRequestMethod("POST");
connection.setRequestProperty("Content-Type", "application/x-www-form-urlencoded; charset=UTF-8");
connection.setRequestProperty("User-Agent", "LoliASM");
connection.setRequestProperty("User-Agent", "BlahajASM");
connection.setFixedLengthStreamingMode(bytes.length);
connection.setDoInput(true);
connection.setDoOutput(true);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package zone.rong.loliasm.api;
package zone.rong.blahajasm.api;

import net.minecraft.util.EnumFacing;
import net.minecraft.util.ResourceLocation;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
package zone.rong.loliasm.api;
package zone.rong.blahajasm.api;

/**
* {@link net.minecraft.item.ItemStack} implements this at runtime.
*
* This interface aids the delaying of capabilities initialization if {@link zone.rong.loliasm.config.LoliConfig#delayItemStackCapabilityInit} == true
* This interface aids the delaying of capabilities initialization if {@link zone.rong.blahajasm.config.BlahajConfig#delayItemStackCapabilityInit} == true
*/
public interface IItemStackCapabilityDelayer {

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package zone.rong.loliasm.api;
package zone.rong.blahajasm.api;

import net.minecraft.util.ResourceLocation;
import net.minecraftforge.common.capabilities.CapabilityDispatcher;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package zone.rong.loliasm.api;
package zone.rong.blahajasm.api;

import it.unimi.dsi.fastutil.ints.Int2ObjectArrayMap;
import it.unimi.dsi.fastutil.ints.Int2ObjectMap;
Expand All @@ -7,7 +7,7 @@
import net.minecraft.util.text.TextFormatting;
import net.minecraftforge.client.event.RenderGameOverlayEvent;
import net.minecraftforge.fml.common.eventhandler.SubscribeEvent;
import zone.rong.loliasm.LoliLogger;
import zone.rong.blahajasm.BlahajLogger;

import java.util.ArrayList;
import java.util.Locale;
Expand Down Expand Up @@ -106,7 +106,7 @@ public static void onDebugList(RenderGameOverlayEvent.Text event) {
}
int size = getSize();
long deduplicatedCount = getDeduplicatedCount();
list.add(String.format("%s%s%s: %s strings processed. %s unique, %s deduplicated.", TextFormatting.AQUA, "<LoliASM>", TextFormatting.RESET, deduplicatedCount, size, deduplicatedCount - size));
list.add(String.format("%s%s%s: %s strings processed. %s unique, %s deduplicated.", TextFormatting.AQUA, "<BlahajASM>", TextFormatting.RESET, deduplicatedCount, size, deduplicatedCount - size));
}
}

Expand All @@ -133,7 +133,7 @@ String addOrGet(String string) {

@Override
protected void finalize() {
LoliLogger.instance.warn("Clearing LoliStringPool {}", id);
BlahajLogger.instance.warn("Clearing BlahajStringPool {}", id);
}
}

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package zone.rong.loliasm.api;
package zone.rong.blahajasm.api;

import it.unimi.dsi.fastutil.objects.Object2ObjectOpenHashMap;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package zone.rong.loliasm.api.datastructures;
package zone.rong.blahajasm.api.datastructures;

import it.unimi.dsi.fastutil.objects.ObjectOpenHashSet;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package zone.rong.loliasm.api.datastructures;
package zone.rong.blahajasm.api.datastructures;

import it.unimi.dsi.fastutil.objects.ObjectIterators;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package zone.rong.loliasm.api.datastructures;
package zone.rong.blahajasm.api.datastructures;

import java.util.Collection;
import java.util.Collections;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package zone.rong.loliasm.api.datastructures;
package zone.rong.blahajasm.api.datastructures;

import com.google.common.collect.Iterators;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package zone.rong.loliasm.api.datastructures;
package zone.rong.blahajasm.api.datastructures;

import java.util.Iterator;
import java.util.function.Supplier;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package zone.rong.loliasm.api.datastructures;
package zone.rong.blahajasm.api.datastructures;

import it.unimi.dsi.fastutil.objects.Object2ObjectOpenHashMap;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package zone.rong.loliasm.api.datastructures.canonical;
package zone.rong.blahajasm.api.datastructures.canonical;

import it.unimi.dsi.fastutil.objects.Object2ObjectArrayMap;
import zone.rong.loliasm.api.LoliStringPool;
import zone.rong.blahajasm.api.LoliStringPool;

import java.util.Map;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package zone.rong.loliasm.api.datastructures.canonical;
package zone.rong.blahajasm.api.datastructures.canonical;

import it.unimi.dsi.fastutil.objects.ObjectOpenHashSet;
import zone.rong.loliasm.api.LoliStringPool;
import zone.rong.blahajasm.api.LoliStringPool;

import java.util.Set;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
package zone.rong.loliasm.api.datastructures.deobf;
package zone.rong.blahajasm.api.datastructures.deobf;

import it.unimi.dsi.fastutil.objects.Object2ObjectOpenHashMap;
import it.unimi.dsi.fastutil.objects.ObjectOpenHashSet;
import zone.rong.loliasm.api.datastructures.DummyMap;
import zone.rong.loliasm.api.datastructures.canonical.AutoCanonizingArrayMap;
import zone.rong.loliasm.api.LoliStringPool;
import zone.rong.blahajasm.api.datastructures.DummyMap;
import zone.rong.blahajasm.api.datastructures.canonical.AutoCanonizingArrayMap;
import zone.rong.blahajasm.api.LoliStringPool;

import java.util.Map;

Expand Down
Loading