[fix] stuff
This commit is contained in:
parent
f19ea5c876
commit
6a85ecabc3
3 changed files with 17 additions and 9 deletions
|
@ -3,6 +3,8 @@ package net.saltymc.eaa;
|
||||||
import net.fabricmc.api.ModInitializer;
|
import net.fabricmc.api.ModInitializer;
|
||||||
import net.saltymc.eaa.handler.CommandHandler;
|
import net.saltymc.eaa.handler.CommandHandler;
|
||||||
import net.saltymc.eaa.handler.HandlerInterface;
|
import net.saltymc.eaa.handler.HandlerInterface;
|
||||||
|
import net.saltymc.eaa.mixin.ExampleMixin;
|
||||||
|
import net.saltymc.eaa.mixin.MixinInterface;
|
||||||
import net.saltymc.eaa.util.ResponseEntity;
|
import net.saltymc.eaa.util.ResponseEntity;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
|
@ -11,9 +13,11 @@ import java.util.List;
|
||||||
public class EaaMod implements ModInitializer {
|
public class EaaMod implements ModInitializer {
|
||||||
|
|
||||||
private final List<HandlerInterface> handler;
|
private final List<HandlerInterface> handler;
|
||||||
|
private final List<MixinInterface> mixins;
|
||||||
|
|
||||||
public EaaMod(){
|
public EaaMod(){
|
||||||
handler = new ArrayList<>();
|
handler = new ArrayList<>();
|
||||||
|
mixins = new ArrayList<>();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -24,6 +28,10 @@ public class EaaMod implements ModInitializer {
|
||||||
|
|
||||||
System.out.println("EAA Mod initializing...");
|
System.out.println("EAA Mod initializing...");
|
||||||
|
|
||||||
|
//init Mixin
|
||||||
|
mixins.add(new ExampleMixin().init(this));
|
||||||
|
|
||||||
|
|
||||||
//Init CommandHandler
|
//Init CommandHandler
|
||||||
handler.add(new CommandHandler());
|
handler.add(new CommandHandler());
|
||||||
|
|
||||||
|
|
|
@ -18,10 +18,14 @@ public class ExampleMixin {
|
||||||
}
|
}
|
||||||
*/
|
*/
|
||||||
@Mixin(ClientPlayerEntity.class)
|
@Mixin(ClientPlayerEntity.class)
|
||||||
public class ExampleMixin extends MixinInterface { //ClientPlayerEntityMixin
|
public class ExampleMixin implements MixinInterface { //ClientPlayerEntityMixin
|
||||||
|
|
||||||
public ExampleMixin(final EaaMod eaaMod){
|
private EaaMod eaaMod;
|
||||||
super(eaaMod);
|
|
||||||
|
public MixinInterface init(final EaaMod eaaMod){
|
||||||
|
this.eaaMod = eaaMod;
|
||||||
|
|
||||||
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -2,12 +2,8 @@ package net.saltymc.eaa.mixin;
|
||||||
|
|
||||||
import net.saltymc.eaa.EaaMod;
|
import net.saltymc.eaa.EaaMod;
|
||||||
|
|
||||||
public abstract class MixinInterface {
|
public interface MixinInterface {
|
||||||
|
|
||||||
protected final EaaMod eaaMod;
|
MixinInterface init(final EaaMod eaaMod);
|
||||||
|
|
||||||
MixinInterface(EaaMod eaaMod){
|
|
||||||
this.eaaMod = eaaMod;
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue