1
0
mirror of https://github.com/SquidDev-CC/CC-Tweaked synced 2025-11-18 22:25:12 +00:00

Initial pass of the API breaking changes for 1.19.3 (#1232)

- Remove deprecated API members in prep for 1.19.3. This allows us to
   remove the mc-stubs and forge-stubs projects.

 - Make several methods take a MinecraftServer instead of a Level (or
   nothing at all).

 - Remove I prefixes from a whole bunch of interfaces, making things a
   little more consistent with Java conventions.

   This avoids touching the "main" interfaces people consume for now. I
   want to do that another Minecraft version, to avoid making the update
   too painful.

 - Remove IFileSystem and associated getters. This has never worked very
   well and I don't think has got much (any?) usage.
This commit is contained in:
Jonathan Coates
2022-12-03 15:02:00 +00:00
committed by GitHub
parent 95c57e843d
commit 87c6d3aef6
157 changed files with 619 additions and 1272 deletions

View File

@@ -6,24 +6,24 @@
package dan200.computercraft.api.node.wired;
import dan200.computercraft.api.ComputerCraftAPI;
import dan200.computercraft.api.network.wired.IWiredElement;
import dan200.computercraft.api.network.wired.WiredElement;
import net.fabricmc.fabric.api.lookup.v1.block.BlockApiLookup;
import net.minecraft.core.Direction;
import net.minecraft.resources.ResourceLocation;
/**
* {@linkplain BlockApiLookup Block API lookup} for {@link IWiredElement}s. This should be used to query wired elements
* {@linkplain BlockApiLookup Block API lookup} for {@link WiredElement}s. This should be used to query wired elements
* from a block.
*/
public final class WiredElementLookup {
public static final ResourceLocation ID = new ResourceLocation(ComputerCraftAPI.MOD_ID, "wired_node");
private static final BlockApiLookup<IWiredElement, Direction> lookup = BlockApiLookup.get(ID, IWiredElement.class, Direction.class);
private static final BlockApiLookup<WiredElement, Direction> lookup = BlockApiLookup.get(ID, WiredElement.class, Direction.class);
private WiredElementLookup() {
}
public static BlockApiLookup<IWiredElement, Direction> get() {
public static BlockApiLookup<WiredElement, Direction> get() {
return lookup;
}
}