mirror of
https://github.com/SquidDev-CC/CC-Tweaked
synced 2025-09-11 06:45:58 +00:00
Update build.gradle to more closely match CC:T's
- Adds cct-javadoc fun and renables checkstyle (yay?) - Fixes a few javadoc and formatting issues - Cherry pick the docs so illuaminate doesn't complain
This commit is contained in:
@@ -67,8 +67,6 @@ public interface IUpgradeBase
|
||||
* @param stack The stack to check. This is guaranteed to be non-empty and have the same item as
|
||||
* {@link #getCraftingItem()}.
|
||||
* @return If this stack may be used to equip this upgrade.
|
||||
* @see net.minecraftforge.common.crafting.NBTIngredient#test(ItemStack) For the implementation of the default
|
||||
* check.
|
||||
*/
|
||||
default boolean isItemSuitable( @Nonnull ItemStack stack )
|
||||
{
|
||||
|
@@ -10,6 +10,7 @@ import dan200.computercraft.api.peripheral.IPeripheral;
|
||||
import dan200.computercraft.api.peripheral.IPeripheralProvider;
|
||||
import dan200.computercraft.core.asm.LuaMethod;
|
||||
import net.minecraft.resources.ResourceLocation;
|
||||
import net.minecraft.world.Container;
|
||||
|
||||
import javax.annotation.Nonnull;
|
||||
|
||||
@@ -18,20 +19,19 @@ import javax.annotation.Nonnull;
|
||||
*
|
||||
* Unlike normal objects ({@link IDynamicLuaObject} or {@link IPeripheral}), methods do not target this object but
|
||||
* instead are defined as {@code static} and accept their target as the first parameter. This allows you to inject
|
||||
* methods onto objects you do not own, as well as declaring methods for a specific "trait" (for instance, a
|
||||
* {@link Capability}).
|
||||
* methods onto objects you do not own, as well as declaring methods for a specific "trait" (well, interface).
|
||||
*
|
||||
* Currently the "generic peripheral" system is incompatible with normal peripherals. Normal {@link IPeripheralProvider}
|
||||
* or {@link IPeripheral} implementations take priority. Tile entities which use this system are given a peripheral name
|
||||
* determined by their id, rather than any peripheral provider. This will hopefully change in the future, once a suitable
|
||||
* design has been established.
|
||||
*
|
||||
* For example, the main CC: Tweaked mod defines a generic source for inventories, which works on {@link IItemHandler}s:
|
||||
* For example, the main CC: Tweaked mod defines a generic source for inventories, which works on {@link Container}s:
|
||||
*
|
||||
* <pre>{@code
|
||||
* public class InventoryMethods implements GenericSource {
|
||||
* \@LuaFunction( mainThread = true )
|
||||
* public static int size(IItemHandler inventory) {
|
||||
* public static int size(Container inventory) {
|
||||
* return inventory.getSlots();
|
||||
* }
|
||||
*
|
||||
@@ -40,8 +40,6 @@ import javax.annotation.Nonnull;
|
||||
* }</pre>
|
||||
*
|
||||
* @see ComputerCraftAPI#registerGenericSource(GenericSource)
|
||||
* @see ComputerCraftAPI#registerGenericCapability(Capability) New capabilities (those not built into Forge) must be
|
||||
* explicitly given to the generic peripheral system, as there is no way to enumerate all capabilities.
|
||||
*/
|
||||
public interface GenericSource
|
||||
{
|
||||
|
@@ -63,11 +63,11 @@ public class BlockComputer extends BlockComputerBase<TileComputer>
|
||||
public BlockEntityType<? extends TileComputer> getTypeByFamily( ComputerFamily family )
|
||||
{
|
||||
return switch( family )
|
||||
{
|
||||
case COMMAND -> ComputerCraftRegistry.ModTiles.COMPUTER_COMMAND;
|
||||
case ADVANCED -> ComputerCraftRegistry.ModTiles.COMPUTER_ADVANCED;
|
||||
default -> ComputerCraftRegistry.ModTiles.COMPUTER_NORMAL;
|
||||
};
|
||||
{
|
||||
case COMMAND -> ComputerCraftRegistry.ModTiles.COMPUTER_COMMAND;
|
||||
case ADVANCED -> ComputerCraftRegistry.ModTiles.COMPUTER_ADVANCED;
|
||||
default -> ComputerCraftRegistry.ModTiles.COMPUTER_NORMAL;
|
||||
};
|
||||
}
|
||||
|
||||
@Nullable
|
||||
|
@@ -42,7 +42,7 @@ public class ModMenuIntegration implements ModMenuApi
|
||||
|
||||
client.addEntry( entryBuilder.startEnumSelector( new TextComponent( "Monitor Renderer" ), MonitorRenderer.class, ComputerCraft.monitorRenderer )
|
||||
.setDefaultValue( MonitorRenderer.BEST )
|
||||
.setSaveConsumer( renderer -> {Config.clientConfig.set( "monitor_renderer", renderer );} )
|
||||
.setSaveConsumer( renderer -> Config.clientConfig.set( "monitor_renderer", renderer ) )
|
||||
.setTooltip( Component.nullToEmpty( Config.clientConfig.getComment( "monitor_renderer" ) ) )
|
||||
.build() );
|
||||
|
||||
|
@@ -105,10 +105,10 @@ public class BlockWirelessModem extends BlockGeneric implements SimpleWaterlogge
|
||||
public BlockEntityType<? extends TileWirelessModem> getTypeByFamily( ComputerFamily family )
|
||||
{
|
||||
return switch( family )
|
||||
{
|
||||
case ADVANCED -> ComputerCraftRegistry.ModTiles.WIRELESS_MODEM_ADVANCED;
|
||||
default -> ComputerCraftRegistry.ModTiles.WIRELESS_MODEM_NORMAL;
|
||||
};
|
||||
{
|
||||
case ADVANCED -> ComputerCraftRegistry.ModTiles.WIRELESS_MODEM_ADVANCED;
|
||||
default -> ComputerCraftRegistry.ModTiles.WIRELESS_MODEM_NORMAL;
|
||||
};
|
||||
}
|
||||
|
||||
@Nullable
|
||||
|
@@ -18,6 +18,7 @@ import dan200.computercraft.core.apis.IAPIEnvironment;
|
||||
import dan200.computercraft.core.asm.TaskCallback;
|
||||
import dan200.computercraft.core.tracking.TrackingField;
|
||||
import dan200.computercraft.shared.peripheral.generic.data.ItemData;
|
||||
import dan200.computercraft.shared.peripheral.generic.methods.InventoryMethods;
|
||||
import dan200.computercraft.shared.turtle.core.*;
|
||||
import net.minecraft.world.item.ItemStack;
|
||||
|
||||
|
@@ -1,8 +1,4 @@
|
||||
accessWidener v1 named
|
||||
|
||||
accessible class net/minecraft/client/renderer/RenderType$CompositeState
|
||||
accessible class net/minecraft/client/renderer/RenderType$CompositeStateBuilder
|
||||
accessible method net/minecraft/client/renderer/RenderType create (Ljava/lang/String;Lcom/mojang/blaze3d/vertex/VertexFormat;Lcom/mojang/blaze3d/vertex/VertexFormat$Mode;IZZLnet/minecraft/client/renderer/RenderType$CompositeState;)Lnet/minecraft/client/renderer/RenderType$CompositeRenderType;
|
||||
|
||||
accessible class net/minecraft/client/render/RenderPhase$Shader
|
||||
accessible class net/minecraft/client/render/RenderPhase$Texture
|
||||
|
Reference in New Issue
Block a user