Skip to content

Commit 2a7943d

Browse files
committed
v1.6.0 (Fabric only)
* Updated to mc1.20.1 * Own Creative tab * Items now have expandable descriptions * Animatronic now can drive trains! * RedRouter's face glows like Computer screens now * Added config screen (accessable via ModMenu, which is optional) * Removed advancements because they are fucking cursed * Tweaked some textures * Animatronic now has a relative body rotation, based on face property of block * Code refactoring * Animatronic now doesnt use an Entity anymore * Adjusted Animatronic model * German translation * Fixed Iris rendering bug * Added configs
1 parent 7d927a5 commit 2a7943d

File tree

113 files changed

+1268
-1382
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

113 files changed

+1268
-1382
lines changed

fabric/build.gradle

Lines changed: 17 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
plugins {
2-
id 'fabric-loom' version '1.0.+'
2+
id 'fabric-loom' version '1.1.+'
33
id "io.github.p03w.machete" version "1.+"
44
id 'maven-publish'
55
}
@@ -16,13 +16,12 @@ repositories {
1616
mavenCentral()
1717

1818
maven { url = 'https://maven.parchmentmc.org' } // You guessed it.
19-
maven { url = "https://api.modrinth.com/maven" } // LazyDFU, Suggestion Tweaker, Iris
19+
maven { url = "https://api.modrinth.com/maven" } // LazyDFU, Suggestion Tweaker, Sodium, Iris
2020
maven { url = "https://maven.terraformersmc.com/releases/" } // Mod Menu, EMI
21-
maven { url = "https://maven.shedaniel.me/" } // Cloth Config, REI
21+
maven { url = "https://maven.shedaniel.me/" } // REI
2222

23-
// CC:R
24-
maven { url = "https://squiddev.cc/maven" } // Cobalt
25-
maven { url = "https://jitpack.io" } // CC:R (+ Mixin Extras, fabric ASM, fakeconfig)
23+
// CC:T
24+
maven { url = "https://squiddev.cc/maven" } // Goodbye CC:R...
2625

2726
// Create : Primary
2827
maven { url = "https://mvn.devos.one/snapshots/" } // Create, Porting Lib, Forge Tags, Milk Lib
@@ -31,6 +30,7 @@ repositories {
3130
maven { url = "https://maven.tterrag.com/" } // Registrate and Flywheel
3231
maven { url = "https://maven.jamieswhiteshirt.com/libs-release" } // Reach Entity Attributes
3332
maven { url = "https://cursemaven.com" } // Forge Config API Port
33+
maven { url = "https://jitpack.io" } // Mixin Extras, fabric ASM
3434
}
3535

3636
dependencies {
@@ -43,33 +43,36 @@ dependencies {
4343

4444
modImplementation "net.fabricmc:fabric-loader:${project.loader_version}"
4545

46-
// APIs (optional)
46+
// APIs
4747
modImplementation("net.fabricmc.fabric-api:fabric-api:${project.fabric_version}+${mc_version}")
48-
modApi("me.shedaniel.cloth:cloth-config-fabric:${cloth_config}") { exclude(group: "net.fabricmc.fabric-api") }
4948
modApi("com.terraformersmc:modmenu:${modmenu_version}")
5049

5150
// Create
5251
modImplementation("com.simibubi.create:create-fabric-${mc_version}:${create_version}+mc${mc_version}")
5352

54-
// CC:R
55-
modApi("com.github.cc-tweaked:cc-restitched:v${cc_mc_version}-${project.cc_version}-ccr")
53+
// CC:T
54+
modImplementation("cc.tweaked:cc-tweaked-${mc_version}-core:${project.cc_version}")
55+
modApi("cc.tweaked:cc-tweaked-${mc_version}-fabric-api:${project.cc_version}")
5656

5757
//////// Dev environment ////////
58+
modLocalRuntime("cc.tweaked:cc-tweaked-${mc_version}-fabric:${project.cc_version}")
5859

5960
modLocalRuntime("maven.modrinth:lazydfu:${lazydfu_version}")
6061
modLocalRuntime("com.terraformersmc:modmenu:${modmenu_version}")
6162

63+
// Rendering
64+
//if (sodium || iris)
65+
// modLocalRuntime("maven.modrinth:sodium:${sodium_version}")
66+
//if (iris)
67+
// modLocalRuntime("maven.modrinth:iris:${iris_version}")
68+
6269
// Recipe viewers: Load REI or EMI
6370
switch (recipe_viewer.toLowerCase(Locale.ROOT)) {
6471
case "rei": modLocalRuntime("me.shedaniel:RoughlyEnoughItems-fabric:${rei_version}"); break
6572
case "emi": modLocalRuntime("dev.emi:emi-fabric:${emi_version}"); break
6673
case "disabled": break
6774
default: println("Unknown recipe viewer specified: ${recipe_viewer}. Must be REI, EMI, or disabled.")
6875
}
69-
70-
// We don't have to load Sodium and such as Create already does that for us.
71-
if (iris)
72-
modLocalRuntime("maven.modrinth:iris:${iris_version}+${mc_version}")
7376
}
7477

7578
processResources {

fabric/gradle.properties

Lines changed: 13 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -12,28 +12,27 @@ license=Apache-2.0
1212
modloader=fabric
1313

1414
# Fabric Properties
15-
mc_version=1.19.2
16-
loader_version=0.14.8
17-
parchment_version=2022.08.10
15+
mc_version=1.20.1
16+
loader_version=0.14.21
17+
parchment_version=2023.07.16
1818

1919
# Dependencies
20-
fabric_version=0.73.0
21-
cc_mc_version=1.19.1
22-
cc_version=1.101.2
23-
create_version=0.5.1-b-build.1079
24-
create_version_production=0.5.1-b
25-
cloth_config=8.3.103
26-
night_config_version = 3.6.3
20+
fabric_version=0.86.0
21+
cc_version=1.106.1
22+
create_version=0.5.1-c-build.1113
23+
create_version_production=0.5.1-c
2724

2825
# Mod Menu - https://modrinth.com/mod/modmenu/versions
29-
modmenu_version=4.1.2
26+
modmenu_version=7.2.1
3027
# LazyDFU - https://modrinth.com/mod/lazydfu/versions
3128
lazydfu_version=0.1.3
3229

30+
sodium=false
3331
iris=false
34-
iris_version=1.6.4
32+
iris_version=1.6.4+1.20
33+
sodium_version=mc1.20-0.4.10
3534

3635
# Recipe viewer (set to 'REI', 'EMI' or 'disabled')
3736
recipe_viewer=emi
38-
rei_version=9.1.580
39-
emi_version=1.0.11+1.19.2
37+
rei_version=12.0.634
38+
emi_version=1.0.11+1.20.1

fabric/src/main/java/cc/tweaked_programs/cccbridge/Registries.java

Lines changed: 0 additions & 112 deletions
This file was deleted.

fabric/src/main/java/cc/tweaked_programs/cccbridge/assistance/Config.java

Lines changed: 0 additions & 9 deletions
This file was deleted.
Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
package cc.tweaked_programs.cccbridge.client;
2+
3+
import cc.tweaked_programs.cccbridge.client.minecraft.screen.ConfigScreen;
4+
import cc.tweaked_programs.cccbridge.common.modloader.CCCBridge;
5+
import net.fabricmc.api.EnvType;
6+
import net.fabricmc.api.Environment;
7+
import net.minecraft.client.gui.screens.Screen;
8+
import org.jetbrains.annotations.Nullable;
9+
10+
import java.io.*;
11+
import java.util.Properties;
12+
13+
@Environment(EnvType.CLIENT)
14+
public class CCConfig {
15+
private final Properties properties;
16+
public String config_dir;
17+
18+
public boolean FLICKERING;
19+
20+
public CCConfig(String config_dir) {
21+
this.config_dir = config_dir + "/" + CCCBridge.MOD_ID + ".properties";
22+
this.properties = new Properties();
23+
24+
// Defaults
25+
properties.putIfAbsent("flickering", Boolean.toString(true));
26+
27+
load();
28+
}
29+
30+
public void load() {
31+
try (Reader reader = new FileReader(config_dir)) {
32+
properties.load(reader);
33+
} catch (FileNotFoundException e) {
34+
CCCBridge.LOGGER.warn("No config found at '{}'. Creating new one with default values.", config_dir);
35+
save();
36+
} catch (IOException e) {
37+
CCCBridge.LOGGER.error("Error while loading config at '{}'. Reason: '{}'", config_dir, e);
38+
}
39+
40+
FLICKERING = (properties.get("flickering").toString().equals("true"));
41+
}
42+
43+
public void save() {
44+
properties.put("flickering", Boolean.toString(FLICKERING));
45+
46+
try (FileWriter writer = new FileWriter(config_dir)){
47+
properties.store(writer, "Client side configuration for CC:C Bridge");
48+
} catch(ClassCastException e) {
49+
CCCBridge.LOGGER.error("Error while casting value for key at config '{}'. Reason: '{}'", config_dir, e);
50+
} catch (IOException e) {
51+
CCCBridge.LOGGER.error("Error while saving config at '{}'. Reason: '{}'", config_dir, e);
52+
}
53+
}
54+
55+
public ConfigScreen newScreen(@Nullable Screen parent) {
56+
return new ConfigScreen(this, parent);
57+
}
58+
}

fabric/src/main/java/cc/tweaked_programs/cccbridge/assistance/misc/RustyMovement.java renamed to fabric/src/main/java/cc/tweaked_programs/cccbridge/client/RustyMovement.java

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
1-
package cc.tweaked_programs.cccbridge.assistance.misc;
1+
package cc.tweaked_programs.cccbridge.client;
22

3+
4+
import net.fabricmc.api.EnvType;
5+
import net.fabricmc.api.Environment;
6+
7+
@Environment(EnvType.CLIENT)
38
public class RustyMovement {
49
private static float easeOutBounce(float x) {
510
float n1 = 7.5625F;
@@ -21,10 +26,10 @@ private static float easeInOutBounce(float x) {
2126
: (1 + easeOutBounce(2 * x - 1)) / 2;
2227
}
2328

24-
public static float updateMovement(float start, float destination, double progress) {
29+
public static float updateMovement(float start, float destination, double progress, boolean lazyWay) {
2530
float interpolatedValue = easeInOutBounce((float)progress);
2631

27-
float newPos = (destination-start) * interpolatedValue;
28-
return start + newPos;
32+
float step = (destination-start) * interpolatedValue;
33+
return start + ((destination < start && lazyWay) ? (-step) : (+step));
2934
}
3035
}

0 commit comments

Comments
 (0)