1
0
mirror of https://github.com/SquidDev-CC/CC-Tweaked synced 2025-10-25 02:47:39 +00:00

Various improvements to packaging

This fixes several issues I had with consuming multi-loader CC:T in
various upstream mods.

 - Include /all/ sources in the Forge/Fabric jar. Before it was just the
   common classes, and not the core or API.

 - Use some Gradle magic to remove superfluous dependencies from the POM
   file. Also make sure Cobalt and Netty are present as dependencies.

 - Start using minimize() in our shadow jar config again.
This commit is contained in:
Jonathan Coates
2022-11-17 09:26:57 +00:00
parent 8152f19b6e
commit 8d2e150f05
17 changed files with 227 additions and 86 deletions

View File

@@ -5,6 +5,7 @@
*/
package dan200.computercraft.client.sound;
import dan200.computercraft.annotations.FabricOverride;
import dan200.computercraft.annotations.ForgeOverride;
import dan200.computercraft.shared.peripheral.speaker.SpeakerPosition;
import net.minecraft.client.resources.sounds.AbstractSoundInstance;
@@ -64,7 +65,12 @@ public class SpeakerSound extends AbstractSoundInstance implements TickableSound
@ForgeOverride
public CompletableFuture<AudioStream> getStream(SoundBufferLibrary soundBuffers, Sound sound, boolean looping) {
return stream != null ? CompletableFuture.completedFuture(stream) : soundBuffers.getStream(sound.getPath(), looping);
return getAudioStream(soundBuffers, sound.getPath(), looping);
}
@FabricOverride
public CompletableFuture<AudioStream> getAudioStream(SoundBufferLibrary soundBuffers, ResourceLocation sound, boolean looping) {
return stream != null ? CompletableFuture.completedFuture(stream) : soundBuffers.getStream(sound, looping);
}
public @Nullable AudioStream getStream() {

View File

@@ -0,0 +1,17 @@
/*
* This file is part of ComputerCraft - http://www.computercraft.info
* Copyright Daniel Ratcliffe, 2011-2022. Do not distribute without permission.
* Send enquiries to dratcliffe@gmail.com
*/
package dan200.computercraft.annotations;
import java.lang.annotation.*;
/**
* Equivalent to {@link Override}, but for Fabric-specific methods.
*/
@Documented
@Retention(RetentionPolicy.SOURCE)
@Target(ElementType.METHOD)
public @interface FabricOverride {
}