Skip to content

Commit

Permalink
chore: Use CC:T instead of CC:R
Browse files Browse the repository at this point in the history
  • Loading branch information
SquidDev committed Nov 11, 2022
1 parent 3a963c1 commit 15e3497
Show file tree
Hide file tree
Showing 58 changed files with 532 additions and 479 deletions.
17 changes: 14 additions & 3 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,13 @@ repositories {
}
}

maven("https://squiddev.cc/maven")
maven("https://jitpack.io") // CC:Restitched
maven("https://squiddev.cc/maven") {
content {
includeGroup("cc.tweaked")
includeModule("org.squiddev", "Cobalt")
includeModule("net.minecraftforge", "forgeconfigapiport-fabric")
}
}
maven("https://maven.shedaniel.me") // cloth-config
maven("https://maven.terraformersmc.com/releases") // Mod Menu
maven("https://maven.terraformersmc.com/") // Trinkets
Expand All @@ -73,9 +78,12 @@ dependencies {
modImplementation(include("pw.switchcraft", "sc-library", scLibraryVersion))

// CC: Restitched
modApi("com.github.cc-tweaked:cc-restitched:${ccVersion}") {
modApi("cc.tweaked:cc-tweaked-$minecraftVersion-fabric:$ccVersion") {
exclude("net.fabricmc.fabric-api", "fabric-gametest-api-v1")
}
// FIXME: bundled jars don't get unpacked in dev, so CC:T needs to find another way to publish things
runtimeOnly("org.squiddev:Cobalt:0.5.8")
runtimeOnly("io.netty:netty-codec-http:4.1.77.Final")

modImplementation("dev.emi:trinkets:${trinketsVersion}")

Expand Down Expand Up @@ -140,6 +148,9 @@ tasks {
}

runs {
configureEach {
property("fabric.debug.disableModShuffle") // Make sure Plethora loads after CC.
}
create("datagen") {
client()
name("Data Generation")
Expand Down
4 changes: 2 additions & 2 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ mavenGroup = pw.switchcraft
# check this on https://fabricmc.net/develop/
fabricVersion = 0.62.0+1.19.2

ccVersion = v1.19.1-1.101.2-ccr
ccTargetVersion = >=1.101.2
ccVersion = 1.101.1
ccTargetVersion = >=1.101.1

clothConfigVersion = 8.0.75
clothApiVersion = 4.0.65
Expand Down
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-7.3-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-7.5.1-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
10 changes: 5 additions & 5 deletions gradlew
100644 → 100755
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/bin/sh

#
# Copyright © 2015-2021 the original authors.
# Copyright © 2015-2021 the original authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -32,10 +32,10 @@
# Busybox and similar reduced shells will NOT work, because this script
# requires all of these POSIX shell features:
# * functions;
# * expansions «$var», «${var}», «${var:-default}», «${var+SET}»,
# «${var#prefix}», «${var%suffix}», and «$( cmd )»;
# * compound commands having a testable exit status, especially «case»;
# * various built-in commands including «command», «set», and «ulimit».
# * expansions «$var», «${var}», «${var:-default}», «${var+SET}»,
# «${var#prefix}», «${var%suffix}», and «$( cmd )»;
# * compound commands having a testable exit status, especially «case»;
# * various built-in commands including «command», «set», and «ulimit».
#
# Important for patching:
#
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
// 1.19.2 2022-11-11T00:13:45.944151499 Turtle Upgrades
55be9fa941681e064a87483071884ee739a00abd data/plethora/computercraft/turtle_upgrades/introspection.json
92a0397f656d942065072f3cd1ab62ce42cd4a12 data/plethora/computercraft/turtle_upgrades/laser.json
72fda019483640f8826703853cc8f9ec658d64ad data/plethora/computercraft/turtle_upgrades/sensor.json
1c1884efde8d5cc4c1670d3e9a47c41b4f8e029a data/plethora/computercraft/turtle_upgrades/kinetic.json
7681b93406f76e9f963f8d4a0a2190df64664801 data/plethora/computercraft/turtle_upgrades/scanner.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
// 1.19.2 2022-11-11T00:13:45.924101991 Pocket Computer Upgrades
72fda019483640f8826703853cc8f9ec658d64ad data/plethora/computercraft/pocket_upgrades/sensor.json
5a4536bed50e4fdd472ec6ddb9efd870a29945ab data/plethora/computercraft/pocket_upgrades/kinetic.json
81e33a822205ce35b7cb02c4f18d8d4fce27b125 data/plethora/computercraft/pocket_upgrades/keyboard.json
92a0397f656d942065072f3cd1ab62ce42cd4a12 data/plethora/computercraft/pocket_upgrades/laser.json
7681b93406f76e9f963f8d4a0a2190df64664801 data/plethora/computercraft/pocket_upgrades/scanner.json
55be9fa941681e064a87483071884ee739a00abd data/plethora/computercraft/pocket_upgrades/introspection.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
{
"parent": "minecraft:recipes/root",
"criteria": {
"has_items": {
"conditions": {
"items": [
{
"items": [
"computercraft:turtle_advanced"
]
},
{
"items": [
"plethora:module_kinetic"
]
}
]
},
"trigger": "minecraft:inventory_changed"
},
"has_the_recipe": {
"conditions": {
"recipe": "plethora:turtle_advanced/plethora/kinetic"
},
"trigger": "minecraft:recipe_unlocked"
}
},
"requirements": [
[
"has_items",
"has_the_recipe"
]
],
"rewards": {
"recipes": [
"plethora:turtle_advanced/plethora/kinetic"
]
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
{
"parent": "minecraft:recipes/root",
"criteria": {
"has_items": {
"conditions": {
"items": [
{
"items": [
"computercraft:turtle_normal"
]
},
{
"items": [
"plethora:module_kinetic"
]
}
]
},
"trigger": "minecraft:inventory_changed"
},
"has_the_recipe": {
"conditions": {
"recipe": "plethora:turtle_normal/plethora/kinetic"
},
"trigger": "minecraft:recipe_unlocked"
}
},
"requirements": [
[
"has_items",
"has_the_recipe"
]
],
"rewards": {
"recipes": [
"plethora:turtle_normal/plethora/kinetic"
]
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"type": "plethora:module",
"item": "plethora:module_introspection"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"type": "plethora:module",
"item": "plethora:module_keyboard"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"type": "plethora:module",
"item": "plethora:module_kinetic"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"type": "plethora:module",
"item": "plethora:module_laser"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"type": "plethora:module",
"item": "plethora:module_scanner"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"type": "plethora:module",
"item": "plethora:module_sensor"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"type": "plethora:module",
"item": "plethora:module_introspection"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"type": "plethora:kinetic",
"item": "plethora:module_kinetic"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"type": "plethora:module",
"item": "plethora:module_laser"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"type": "plethora:module",
"item": "plethora:module_scanner"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"type": "plethora:module",
"item": "plethora:module_sensor"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
{
"type": "computercraft:impostor_shaped",
"group": "plethora:turtle_advanced",
"key": {
"#": {
"item": "plethora:module_kinetic"
},
"T": {
"item": "computercraft:turtle_advanced"
}
},
"pattern": [
"#T"
],
"result": {
"item": "computercraft:turtle_advanced",
"nbt": "{RightUpgrade:\"plethora:kinetic\"}"
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
{
"type": "computercraft:impostor_shaped",
"group": "plethora:turtle_normal",
"key": {
"#": {
"item": "plethora:module_kinetic"
},
"T": {
"item": "computercraft:turtle_normal"
}
},
"pattern": [
"#T"
],
"result": {
"item": "computercraft:turtle_normal",
"nbt": "{RightUpgrade:\"plethora:kinetic\"}"
}
}
Original file line number Diff line number Diff line change
@@ -1,82 +1,18 @@
package pw.switchcraft.plethora.api.module;

import dan200.computercraft.api.pocket.IPocketUpgrade;
import dan200.computercraft.api.turtle.ITurtleUpgrade;
import net.minecraft.item.ItemStack;
import pw.switchcraft.plethora.api.vehicle.IVehicleUpgradeHandler;

import javax.annotation.Nonnull;
import java.util.List;

/**
* Various helper methods for modules.
*/
public interface IModuleRegistry {
/**
* Register a turtle upgrade.
*
* This will use the stack's module handler and the item name + ".adjective" for its adjective.
*
* @param stack The stack containing the module.
*/
void registerTurtleUpgrade(@Nonnull ItemStack stack);

/**
* Register a turtle upgrade.
*
* This will use the stack's module handler.
*
* @param stack The stack containing the module.
* @param adjective The module's adjective.
*/
void registerTurtleUpgrade(@Nonnull ItemStack stack, @Nonnull String adjective);

/**
* Register a turtle upgrade.
*
* @param stack The stack containing the module.
* @param handler The module handler.
* @param adjective The module's adjective.
*/
void registerTurtleUpgrade(@Nonnull ItemStack stack, @Nonnull IModuleHandler handler, @Nonnull String adjective);

/**
* Register a pocket upgrade.
*
* This will use the stack's module handler and the item name + ".adjective" for its adjective.
*
* @param stack The stack containing the module.
*/
void registerPocketUpgrade(@Nonnull ItemStack stack);

/**
* Register a pocket upgrade.
*
* This will use the stack's module handler.
*
* @param stack The stack containing the module.
* @param adjective The module's adjective.
*/
void registerPocketUpgrade(@Nonnull ItemStack stack, @Nonnull String adjective);

/**
* Register a pocket upgrade.
*
* @param stack The stack containing the module.
* @param handler The module handler.
* @param adjective The module's adjective.
*/
void registerPocketUpgrade(@Nonnull ItemStack stack, @Nonnull IModuleHandler handler, @Nonnull String adjective);

/**
* Convert a module handler to a vehicle upgrade handler.
*
* @param handler The module handler to convert.
* @return The resulting vehicle upgrade handler.
*/
IVehicleUpgradeHandler toVehicleUpgrade(@Nonnull IModuleHandler handler);

List<IPocketUpgrade> getPocketUpgrades();

List<ITurtleUpgrade> getTurtleUpgrades();
}
Loading

0 comments on commit 15e3497

Please sign in to comment.