mirror of
https://github.com/FabricMC/fabric.git
synced 2025-03-21 20:50:28 -04:00
Fix log spam for mods that are not datapacks. Also bump version for release
This commit is contained in:
parent
31d35604b1
commit
4e84b64f5c
4 changed files with 17 additions and 5 deletions
build.gradle
fabric-command-api-v1/src/main/java/net/fabricmc/fabric/mixin/command
fabric-resource-loader-v0
|
@ -12,7 +12,7 @@ plugins {
|
|||
def ENV = System.getenv()
|
||||
|
||||
class Globals {
|
||||
static def baseVersion = "0.11.6"
|
||||
static def baseVersion = "0.11.7"
|
||||
static def mcVersion = "1.16-pre2"
|
||||
static def yarnVersion = "+build.1"
|
||||
}
|
||||
|
|
|
@ -29,7 +29,7 @@ import net.fabricmc.fabric.api.command.v1.CommandRegistrationCallback;
|
|||
public abstract class MixinMinecraftDedicatedServer {
|
||||
@Inject(method = "setupServer", at = @At("HEAD"))
|
||||
private void setupServer(CallbackInfoReturnable<Boolean> info) {
|
||||
CommandRegistrationCallback.EVENT.invoker().register(((MinecraftDedicatedServer)(Object)this).getCommandManager().getDispatcher(), true);
|
||||
CommandRegistrationCallback.EVENT.invoker().register(((MinecraftDedicatedServer) (Object) this).getCommandManager().getDispatcher(), true);
|
||||
|
||||
//Possibly call findAmbiguities here
|
||||
}
|
||||
|
|
|
@ -1,2 +1,2 @@
|
|||
archivesBaseName = "fabric-resource-loader-v0"
|
||||
version = getSubprojectVersion(project, "0.2.3")
|
||||
version = getSubprojectVersion(project, "0.2.4")
|
||||
|
|
|
@ -16,6 +16,7 @@
|
|||
|
||||
package net.fabricmc.fabric.mixin.resource.loader;
|
||||
|
||||
import java.nio.file.Path;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
|
@ -28,9 +29,12 @@ import org.spongepowered.asm.mixin.injection.Inject;
|
|||
import org.spongepowered.asm.mixin.injection.callback.CallbackInfo;
|
||||
|
||||
import net.minecraft.class_5359;
|
||||
import net.minecraft.resource.ResourcePack;
|
||||
import net.minecraft.resource.ResourceType;
|
||||
|
||||
import net.fabricmc.loader.api.FabricLoader;
|
||||
import net.fabricmc.loader.api.ModContainer;
|
||||
import net.fabricmc.fabric.impl.resource.loader.ModNioResourcePack;
|
||||
|
||||
@Mixin(class_5359.class)
|
||||
public class MixinClass_5359 {
|
||||
|
@ -50,8 +54,16 @@ public class MixinClass_5359 {
|
|||
List<String> newEnabled = new ArrayList<>(enabled);
|
||||
|
||||
for (ModContainer container : FabricLoader.getInstance().getAllMods()) {
|
||||
if (!container.getMetadata().getType().equals("builtin")) {
|
||||
newEnabled.add("fabric/" + container.getMetadata().getId());
|
||||
if (container.getMetadata().getType().equals("builtin")) {
|
||||
continue;
|
||||
}
|
||||
|
||||
Path path = container.getRootPath();
|
||||
|
||||
try (ResourcePack pack = new ModNioResourcePack(container.getMetadata(), path, null)) {
|
||||
if (!pack.getNamespaces(ResourceType.SERVER_DATA).isEmpty()) {
|
||||
newEnabled.add("fabric/" + container.getMetadata().getId());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue