1.17-pre3
This commit is contained in:
1 parent
cef1dd4f8e
commit
4ccae7abe0
2 files changed
+6
-6
No files matched your search
@@ -3,7 +3,7 @@ package carpet.mixins;
|
||||
import java.util.function.Supplier;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
import net.minecraft.class_6396;
|
||||
import net.minecraft.util.SystemDetails;
|
||||
import org.spongepowered.asm.mixin.Mixin;
|
||||
import org.spongepowered.asm.mixin.Shadow;
|
||||
import org.spongepowered.asm.mixin.injection.At;
|
||||
@@ -12,15 +12,15 @@ import org.spongepowered.asm.mixin.injection.callback.CallbackInfo;
|
||||
|
||||
import carpet.CarpetServer;
|
||||
|
||||
@Mixin(class_6396.class)
|
||||
@Mixin(SystemDetails.class)
|
||||
public abstract class CrashReport_addScarpetAppsMixin
|
||||
{
|
||||
@Shadow public abstract void method_37123(String string, Supplier<String> supplier);
|
||||
@Shadow public abstract void addSection(String name, Supplier<String> valueSupplier);
|
||||
|
||||
@Inject(method = "<init>", at = @At("RETURN"))
|
||||
private void fillSystemDetails(CallbackInfo info) {
|
||||
if (CarpetServer.scriptServer == null || CarpetServer.scriptServer.modules.isEmpty()) return;
|
||||
method_37123("Loaded Scarpet Apps", () -> {
|
||||
addSection("Loaded Scarpet Apps", () -> {
|
||||
return CarpetServer.scriptServer.modules.keySet().stream().collect(Collectors.joining("\n\t\t", "\n\t\t", ""));
|
||||
});
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user