mirror of
https://github.com/FabricMC/fabric.git
synced 2025-04-20 19:04:44 -04:00
update to new mappings as workaround
This commit is contained in:
parent
9cb4776313
commit
a99b31a8fd
4 changed files with 16 additions and 16 deletions
|
@ -34,8 +34,8 @@ minecraft {
|
|||
|
||||
dependencies {
|
||||
minecraft "com.mojang:minecraft:18w49a"
|
||||
mappings "net.fabricmc:pomf:18w49a.19"
|
||||
modCompile "net.fabricmc:fabric-loader:0.2.0.53"
|
||||
mappings "net.fabricmc:yarn:18w49a.6"
|
||||
modCompile "net.fabricmc:fabric-loader:0.2.0.62"
|
||||
}
|
||||
|
||||
apply from: 'https://github.com/FabricMC/fabric-docs/raw/master/gradle/maven.gradle'
|
||||
|
|
|
@ -35,8 +35,8 @@ public class MixinMinecraftServer {
|
|||
@Shadow
|
||||
private class_3689 profiler;
|
||||
|
||||
@Inject(at = @At("RETURN"), method = "method_3813")
|
||||
protected void method_3813(BooleanSupplier var1, CallbackInfo info) {
|
||||
@Inject(at = @At("RETURN"), method = "tick")
|
||||
protected void tick(BooleanSupplier var1, CallbackInfo info) {
|
||||
TickEvent.tick(TickEvent.SERVER, (MinecraftServer) (Object) this, this.profiler);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -17,8 +17,8 @@
|
|||
package net.fabricmc.fabric.mixin.resources;
|
||||
|
||||
import net.fabricmc.fabric.resources.impl.ModDataPackSupplier;
|
||||
import net.minecraft.class_3283;
|
||||
import net.minecraft.class_3288;
|
||||
import net.minecraft.resource.ResourcePackContainer;
|
||||
import net.minecraft.resource.ResourcePackContainerManager;
|
||||
import net.minecraft.server.MinecraftServer;
|
||||
import net.minecraft.world.level.LevelProperties;
|
||||
import org.spongepowered.asm.mixin.Mixin;
|
||||
|
@ -32,10 +32,10 @@ import java.io.File;
|
|||
@Mixin(MinecraftServer.class)
|
||||
public class MixinMinecraftServer {
|
||||
@Shadow
|
||||
private class_3283<class_3288> field_4595;
|
||||
private ResourcePackContainerManager<ResourcePackContainer> field_4595;
|
||||
|
||||
@Inject(method = "method_3800", at = @At(value = "INVOKE", target = "Lnet/minecraft/class_3283;method_14443(Lnet/minecraft/class_3285;)V", ordinal = 1))
|
||||
@Inject(method = "method_3800", at = @At(value = "INVOKE", target = "Lnet/minecraft/resource/ResourcePackContainerManager;addCreator(Lnet/minecraft/resource/ResourcePackCreator;)V", ordinal = 1))
|
||||
public void method_3800(File file, LevelProperties properties, CallbackInfo info) {
|
||||
field_4595.method_14443(new ModDataPackSupplier());
|
||||
field_4595.addCreator(new ModDataPackSupplier());
|
||||
}
|
||||
}
|
||||
|
|
|
@ -17,18 +17,18 @@
|
|||
package net.fabricmc.fabric.resources.impl;
|
||||
|
||||
import net.fabricmc.fabric.resources.ModResourcePack;
|
||||
import net.minecraft.class_3285;
|
||||
import net.minecraft.class_3288;
|
||||
import net.minecraft.resource.ResourcePack;
|
||||
import net.minecraft.resource.ResourcePackContainer;
|
||||
import net.minecraft.resource.ResourcePackCreator;
|
||||
import net.minecraft.resource.ResourceType;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
public class ModDataPackSupplier implements class_3285 {
|
||||
public class ModDataPackSupplier implements ResourcePackCreator {
|
||||
@Override
|
||||
public <T extends class_3288> void method_14453(Map<String, T> map, class_3288.class_3290<T> class_3290) {
|
||||
public <T extends ResourcePackContainer> void registerContainer(Map<String, T> map, ResourcePackContainer.Factory<T> factory) {
|
||||
// TODO: "vanilla" does not emit a message; neither should a modded datapack
|
||||
List<ResourcePack> packs = new ArrayList<>();
|
||||
ModResourcePackUtil.appendModResourcePacks(packs, ResourceType.DATA);
|
||||
|
@ -37,11 +37,11 @@ public class ModDataPackSupplier implements class_3285 {
|
|||
throw new RuntimeException("Not a ModResourcePack!");
|
||||
}
|
||||
|
||||
T var3 = class_3288.method_14456("fabric/" + ((ModResourcePack) pack).getFabricModInfo().getId(),
|
||||
false, () -> pack, class_3290, class_3288.class_3289.BOTTOM);
|
||||
T var3 = ResourcePackContainer.of("fabric/" + ((ModResourcePack) pack).getFabricModInfo().getId(),
|
||||
false, () -> pack, factory, ResourcePackContainer.SortingDirection.BOTTOM);
|
||||
|
||||
if (var3 != null) {
|
||||
map.put(var3.method_14463(), var3);
|
||||
map.put(var3.getName(), var3);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue