mirror of
https://github.com/zaaarf/lillero.git
synced 2024-11-12 18:49:23 +01:00
chore: removed references to cube game from names and comments
This commit is contained in:
parent
9ec77a95e0
commit
52dbb847a4
4 changed files with 42 additions and 43 deletions
|
@ -22,18 +22,16 @@ public interface IInjector {
|
|||
default String reason() { return "No reason specified"; }
|
||||
|
||||
/**
|
||||
* This is used by the Launch Plugin to identify which classes should be
|
||||
* altered, and on which classes should this injector operate.
|
||||
* This is used to identify which classes should be altered, and on which class
|
||||
* should this injector operate.
|
||||
* Class name should be dot-separated, for example "net.minecraft.client.Minecraft".
|
||||
* @return class to transform
|
||||
*/
|
||||
String targetClass();
|
||||
|
||||
/**
|
||||
* This is used by the Launch Plugin to identify the method to transform within
|
||||
* the class. It should return the Searge name of target.
|
||||
* Example: "func_71407_l", which is "tick()" on "Minecraft" class in 1.16.5
|
||||
*
|
||||
* This is used to identify the method to transform within the class.
|
||||
* It should return the name of target.
|
||||
* @return method to transform
|
||||
*/
|
||||
String methodName();
|
||||
|
@ -55,10 +53,11 @@ public interface IInjector {
|
|||
String methodDesc();
|
||||
|
||||
/**
|
||||
* This method will be called once the Launch Plugin has identified the right class and
|
||||
* method to patch. Override this for the actual patching.
|
||||
* @param clazz class node currently being patched
|
||||
* @param method node of method currently being patched
|
||||
* This method is to be called by the launcher after identifying the right class and
|
||||
* method to patch. The overriding method should contain the logic for actually
|
||||
* pathing.
|
||||
* @param clazz the {@link ClassNode} currently being patched
|
||||
* @param method the {@link MethodNode} of method currently being patched
|
||||
*/
|
||||
void inject(ClassNode clazz, MethodNode method);
|
||||
}
|
||||
|
|
|
@ -8,9 +8,9 @@ package ftbsc.lll.proxies;
|
|||
public abstract class AbstractProxy {
|
||||
|
||||
/**
|
||||
* The SRG name of the corresponding class member.
|
||||
* The name of the corresponding class member.
|
||||
*/
|
||||
private final String srgName;
|
||||
private final String name;
|
||||
|
||||
/**
|
||||
* The fully qualified name (i.e. java.lang.String) of
|
||||
|
@ -25,10 +25,10 @@ public abstract class AbstractProxy {
|
|||
private final int modifiers;
|
||||
|
||||
/**
|
||||
* @return the SRG name of the item
|
||||
* @return the name of the item
|
||||
*/
|
||||
public String getSrgName() {
|
||||
return this.srgName;
|
||||
public String getname() {
|
||||
return this.name;
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -53,12 +53,12 @@ public abstract class AbstractProxy {
|
|||
|
||||
/**
|
||||
* The private constructor, should be called by all classes extending this in theirs.
|
||||
* @param srgName the SRG name of the member
|
||||
* @param name the name of the member
|
||||
* @param modifiers the modifiers, as a packed int
|
||||
* @param parent the FQN of the parent class
|
||||
*/
|
||||
protected AbstractProxy(String srgName, int modifiers, String parent) {
|
||||
this.srgName = srgName;
|
||||
protected AbstractProxy(String name, int modifiers, String parent) {
|
||||
this.name = name;
|
||||
this.modifiers = modifiers;
|
||||
this.parent = parent;
|
||||
}
|
||||
|
@ -70,9 +70,9 @@ public abstract class AbstractProxy {
|
|||
public abstract static class Builder<T extends AbstractProxy> {
|
||||
|
||||
/**
|
||||
* The SRG name of the member.
|
||||
* The name of the member.
|
||||
*/
|
||||
protected final String srgName;
|
||||
protected final String name;
|
||||
|
||||
/**
|
||||
* The modifiers of the member, as a packed int.
|
||||
|
@ -86,10 +86,10 @@ public abstract class AbstractProxy {
|
|||
|
||||
/**
|
||||
* The constructor.
|
||||
* @param srgName the SRG name of the member
|
||||
* @param name the name of the member
|
||||
*/
|
||||
protected Builder(String srgName) {
|
||||
this.srgName = srgName;
|
||||
protected Builder(String name) {
|
||||
this.name = name;
|
||||
this.modifiers = 0;
|
||||
}
|
||||
|
||||
|
|
|
@ -29,13 +29,13 @@ public class FieldProxy extends AbstractProxy {
|
|||
|
||||
/**
|
||||
* A protected constructor, called only from the builder.
|
||||
* @param srgName the SRG name of the field
|
||||
* @param name the name of the field
|
||||
* @param modifiers the modifiers of the field
|
||||
* @param parent the FQN of the parent class of the field
|
||||
* @param typeDescriptor the type descriptor of the field
|
||||
*/
|
||||
FieldProxy(String srgName, int modifiers, String parent, String typeDescriptor) {
|
||||
super(srgName, modifiers, parent);
|
||||
FieldProxy(String name, int modifiers, String parent, String typeDescriptor) {
|
||||
super(name, modifiers, parent);
|
||||
this.typeDescriptor = typeDescriptor;
|
||||
}
|
||||
|
||||
|
@ -49,11 +49,11 @@ public class FieldProxy extends AbstractProxy {
|
|||
|
||||
/**
|
||||
* Returns a new instance of {@link FieldProxy.Builder}.
|
||||
* @param srgName the SRG name of the field
|
||||
* @param name the name of the field
|
||||
* @return the builder object for field proxies
|
||||
*/
|
||||
public static Builder builder(String srgName) {
|
||||
return new Builder(srgName);
|
||||
public static Builder builder(String name) {
|
||||
return new Builder(name);
|
||||
}
|
||||
|
||||
public static class Builder extends AbstractProxy.Builder<FieldProxy> {
|
||||
|
@ -64,10 +64,10 @@ public class FieldProxy extends AbstractProxy {
|
|||
|
||||
/**
|
||||
* The constructor of the builder, used only internally.
|
||||
* @param srgName the SRG name of the field
|
||||
* @param name the name of the field
|
||||
*/
|
||||
Builder(String srgName) {
|
||||
super(srgName);
|
||||
Builder(String name) {
|
||||
super(name);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -107,7 +107,7 @@ public class FieldProxy extends AbstractProxy {
|
|||
*/
|
||||
@Override
|
||||
public FieldProxy build() {
|
||||
return new FieldProxy(this.srgName, this.modifiers, this.parent, this.typeDescriptor);
|
||||
return new FieldProxy(this.name, this.modifiers, this.parent, this.typeDescriptor);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -51,14 +51,14 @@ public class MethodProxy extends AbstractProxy {
|
|||
|
||||
/**
|
||||
* A protected constructor, called only from the builder.
|
||||
* @param srgName the SRG name of the method
|
||||
* @param name the name of the method
|
||||
* @param modifiers the modifiers of the method
|
||||
* @param parent the FQN of the parent class of the method
|
||||
* @param parameters the parameters of the method
|
||||
* @param returnType the return type of the method
|
||||
*/
|
||||
protected MethodProxy(String srgName, int modifiers, String parent, Object[] parameters, Object returnType) {
|
||||
super(srgName, modifiers, parent);
|
||||
protected MethodProxy(String name, int modifiers, String parent, Object[] parameters, Object returnType) {
|
||||
super(name, modifiers, parent);
|
||||
this.parameters = parameters;
|
||||
this.returnType = returnType;
|
||||
this.descriptorCache = null;
|
||||
|
@ -96,11 +96,11 @@ public class MethodProxy extends AbstractProxy {
|
|||
|
||||
/**
|
||||
* Returns a new instance of {@link MethodProxy.Builder}.
|
||||
* @param srgName the SRG name of the method
|
||||
* @param name the name of the method
|
||||
* @return the builder object for method proxies
|
||||
*/
|
||||
public static Builder builder(String srgName) {
|
||||
return new Builder(srgName);
|
||||
public static Builder builder(String name) {
|
||||
return new Builder(name);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -119,10 +119,10 @@ public class MethodProxy extends AbstractProxy {
|
|||
|
||||
/**
|
||||
* The constructor of the builder, used only internally.
|
||||
* @param srgName the SRG name of the method
|
||||
* @param name the name of the method
|
||||
*/
|
||||
Builder(String srgName) {
|
||||
super(srgName);
|
||||
Builder(String name) {
|
||||
super(name);
|
||||
this.parameters = new ArrayList<>();
|
||||
this.returnType = void.class;
|
||||
}
|
||||
|
@ -177,7 +177,7 @@ public class MethodProxy extends AbstractProxy {
|
|||
*/
|
||||
@Override
|
||||
public MethodProxy build() {
|
||||
return new MethodProxy(srgName, modifiers, parent, parameters.toArray(), returnType);
|
||||
return new MethodProxy(name, modifiers, parent, parameters.toArray(), returnType);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue