use of net.minecraft.server.packs.repository.PackRepository in project SpongeCommon by SpongePowered.
the class PackRepositoryMixin_Vanilla method vanilla$addPluginRepository.
@SuppressWarnings("rawtypes")
@Redirect(method = "<init>*", at = @At(value = "INVOKE", target = "Lcom/google/common/collect/ImmutableSet;copyOf([Ljava/lang/Object;)Lcom/google/common/collect/ImmutableSet;"))
private ImmutableSet vanilla$addPluginRepository(final Object[] elements) {
final Object[] copied = Arrays.copyOf(elements, elements.length + 1);
copied[elements.length] = new PluginRepositorySource((PackRepository) (Object) this);
return ImmutableSet.copyOf(copied);
}
Aggregations