smallest fixes ever

This commit is contained in:
BallOfEnergy 2024-06-27 21:25:26 -05:00
parent 72e4cb42e0
commit 0a5c4271f4
2 changed files with 3 additions and 4 deletions

View File

@ -55,7 +55,7 @@ public class CompatHandler {
@Optional.Interface(iface = "li.cil.oc.api.network.Analyzable", modid = "OpenComputers"), @Optional.Interface(iface = "li.cil.oc.api.network.Analyzable", modid = "OpenComputers"),
@Optional.Interface(iface = "li.cil.oc.api.network.ManagedPeripheral", modid = "OpenComputers"), @Optional.Interface(iface = "li.cil.oc.api.network.ManagedPeripheral", modid = "OpenComputers"),
}) })
@SimpleComponent.SkipInjection @SimpleComponent.SkipInjection // make sure OC doesn't inject this shit into the interface and crash
public interface OCComponent extends SimpleComponent, SidedComponent, Analyzable, ManagedPeripheral { public interface OCComponent extends SimpleComponent, SidedComponent, Analyzable, ManagedPeripheral {
/** /**

View File

@ -978,12 +978,11 @@ public abstract class TileEntityTurretBaseNT extends TileEntityMachineBase imple
@Callback(direct = true, limit = 4) @Callback(direct = true, limit = 4)
@Optional.Method(modid = "OpenComputers") @Optional.Method(modid = "OpenComputers")
public Object[] setTargeting(Context context, Arguments args) { public Object[] setTargeting(Context context, Arguments args) {
Object[] oldTargeting = new Object[] {this.targetPlayers, this.targetAnimals, this.targetMobs, this.targetMachines};
this.targetPlayers = args.checkBoolean(0); this.targetPlayers = args.checkBoolean(0);
this.targetAnimals = args.checkBoolean(1); this.targetAnimals = args.checkBoolean(1);
this.targetMobs = args.checkBoolean(2); this.targetMobs = args.checkBoolean(2);
this.targetMachines = args.checkBoolean(3); this.targetMachines = args.checkBoolean(3);
return oldTargeting; return new Object[] {};
} }
@Callback(direct = true) @Callback(direct = true)
@ -1020,7 +1019,7 @@ public abstract class TileEntityTurretBaseNT extends TileEntityMachineBase imple
} }
@Override @Override
public String[] methods() { public String[] methods() { // :vomit:
return new String[] { return new String[] {
"setActive", "setActive",
"isActive", "isActive",