mirror of
https://github.com/FabricMC/fabric.git
synced 2024-11-28 18:46:16 -05:00
Fix FabricWrappedVanillaResourcePack::getName
(#2998)
* Fix `FabricWrappedVanillaResourcePack::getName` * Remove unused import
This commit is contained in:
parent
e719b8579f
commit
1e1fb126cb
2 changed files with 3 additions and 6 deletions
|
@ -27,7 +27,6 @@ import net.minecraft.resource.AbstractFileResourcePack;
|
|||
import net.minecraft.resource.InputSupplier;
|
||||
import net.minecraft.resource.ResourceType;
|
||||
import net.minecraft.resource.metadata.ResourceMetadataReader;
|
||||
import net.minecraft.text.Text;
|
||||
import net.minecraft.util.Identifier;
|
||||
import net.minecraft.util.PathUtil;
|
||||
|
||||
|
@ -42,12 +41,10 @@ import net.fabricmc.fabric.impl.resource.loader.GroupResourcePack;
|
|||
*/
|
||||
public class FabricWrappedVanillaResourcePack extends GroupResourcePack {
|
||||
private final AbstractFileResourcePack originalResourcePack;
|
||||
private final Text displayName;
|
||||
|
||||
public FabricWrappedVanillaResourcePack(AbstractFileResourcePack originalResourcePack, Text displayName, List<ModResourcePack> modResourcePacks) {
|
||||
public FabricWrappedVanillaResourcePack(AbstractFileResourcePack originalResourcePack, List<ModResourcePack> modResourcePacks) {
|
||||
super(ResourceType.CLIENT_RESOURCES, modResourcePacks);
|
||||
this.originalResourcePack = originalResourcePack;
|
||||
this.displayName = displayName;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -90,7 +87,7 @@ public class FabricWrappedVanillaResourcePack extends GroupResourcePack {
|
|||
|
||||
@Override
|
||||
public String getName() {
|
||||
return displayName.getString();
|
||||
return this.originalResourcePack.getName();
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -51,7 +51,7 @@ public class DefaultClientResourcePackProviderMixin {
|
|||
)
|
||||
private ResourcePackProfile.PackFactory onCreateVanillaBuiltinResourcePack(String name, Text displayName, boolean alwaysEnabled,
|
||||
ResourcePackProfile.PackFactory packFactory, ResourceType type, ResourcePackProfile.InsertionPosition position, ResourcePackSource source) {
|
||||
return factory -> new FabricWrappedVanillaResourcePack((AbstractFileResourcePack) packFactory.open(name), displayName, getModResourcePacks(name));
|
||||
return factory -> new FabricWrappedVanillaResourcePack((AbstractFileResourcePack) packFactory.open(name), getModResourcePacks(name));
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in a new issue