1
0
mirror of https://github.com/SquidDev-CC/CC-Tweaked synced 2025-04-16 15:53:18 +00:00

Syntax highlight more docstrings

This is going to conflict horribly with MC 1.21 (where we started using
@snippet), but hopefully this still helps.
This commit is contained in:
Jonathan Coates 2024-11-13 11:00:46 +00:00
parent bdffabc08e
commit ad52117f0f
No known key found for this signature in database
GPG Key ID: B9E431FF07C98D06
6 changed files with 9 additions and 9 deletions

View File

@ -173,7 +173,7 @@ public final class ComputerCraftAPI {
* This may be used with {@link IComputerSystem#getComponent(ComputerComponent)} to only attach APIs to specific
* computers. For example, one can add an additional API just to turtles with the following code:
*
* <pre>{@code
* <pre class="language language-java">{@code
* ComputerCraftAPI.registerAPIFactory(computer -> {
* // Read the turtle component.
* var turtle = computer.getComponent(ComputerComponents.TURTLE);

View File

@ -28,7 +28,7 @@ import java.util.function.Function;
* {@link #simple(Function)} or {@link #simpleWithCustomItem(BiFunction)} to create a basic upgrade serialiser.
*
* <h2>Example (Forge)</h2>
* <pre>{@code
* <pre class="language language-java">{@code
* static final DeferredRegister<TurtleUpgradeSerialiser<?>> SERIALISERS = DeferredRegister.create( TurtleUpgradeSerialiser.TYPE, "my_mod" );
*
* // Register a new upgrade serialiser called "my_upgrade".
@ -42,9 +42,9 @@ import java.util.function.Function;
* We can then define a new upgrade using JSON by placing the following in
* {@literal data/<my_mod>/computercraft/turtle_upgrades/<my_upgrade_id>.json}}.
*
* <pre>{@code
* <pre class="language language-json">{@code
* {
* "type": my_mod:my_upgrade",
* "type": "my_mod:my_upgrade",
* }
* }</pre>
* <p>

View File

@ -86,7 +86,7 @@ public abstract class UpgradeDataProvider<T extends UpgradeBase, R extends Upgra
* Add all turtle or pocket computer upgrades.
* <p>
* <strong>Example usage:</strong>
* <pre>{@code
* <pre class="language language-java">{@code
* protected void addUpgrades(Consumer<Upgrade<TurtleUpgradeSerialiser<?>>> addUpgrade) {
* simple(new ResourceLocation("mymod", "speaker"), SPEAKER_SERIALISER.get()).add(addUpgrade);
* }

View File

@ -11,7 +11,7 @@ package dan200.computercraft.api.lua;
* the given type, rather than requiring an exact type.
*
* <h2>Example:</h2>
* <pre>{@code
* <pre class="language language-java">{@code
* @LuaFunction
* public final void doSomething(Coerced<String> myString) {
* var value = myString.value();

View File

@ -21,9 +21,9 @@ import dan200.computercraft.api.peripheral.IPeripheral;
* <p>
* For example, the main CC: Tweaked mod defines a generic source for inventories, which works on {@code IItemHandler}s:
*
* <pre>{@code
* <pre class="language language-java">{@code
* public class InventoryMethods implements GenericSource {
* \@LuaFunction(mainThread = true)
* @LuaFunction(mainThread = true)
* public int size(IItemHandler inventory) {
* return inventory.getSlots();
* }

View File

@ -27,7 +27,7 @@ import java.util.function.Consumer;
*
* <h2>Example</h2>
*
* <pre>{@code
* <pre class="language language-java">{@code
* public class MyPeripheral implements IPeripheral {
* private final AttachedComputerSet computers = new ComputerCollection();
*