Skip to content

Commit d47b4e3

Browse files
authored
Update 0.6
Update 0.6
2 parents d5fcc0f + 8d73e27 commit d47b4e3

61 files changed

Lines changed: 2196 additions & 156 deletions

File tree

Some content is hidden

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

CHANGELOG.md

Lines changed: 16 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,19 @@
1-
# 0.5 The Performance Update
1+
# 0.6 The Tilting Update
22

3-
## **Now Supports Create 6!**
3+
**Now requires dragonlib > 3.0.14**
4+
**Always backup your save before updating!**
45

5-
## The Performance part
6-
- Improved rendering performance so no more fps drops
7-
- Massively improved ETCS server side perfomance.
8-
- Small performance improvements to compat code
6+
## New Features
97

10-
## The New Things Part
11-
- ETCS now treats end of track as a red signal
8+
- Added settings menu for trains.
9+
- Added tilt customization with options including None, Passive, Active, and Custom.
10+
- Enabled custom per train acceleration settings with None and Custom modes.
11+
12+
- Added train banking/tilting
13+
- Added "Time Of Day Realistic" Condition. Which enhances Time Of Day Condition by factoring in train delays.
14+
- language support
15+
16+
17+
## Bug Fixes
18+
- Fixed a bug where pressing shift would cause a crash.
19+
- Some other things i forgot to write down.

build.gradle

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,12 @@ subprojects {
2626
maven { url = "https://maven.blamejared.com/" } // JEI
2727
maven { url = "https://maven.parchmentmc.org" } // Parchment mappings
2828
maven { url = "https://maven.quiltmc.org/repository/release" } // Quilt Mappings
29+
maven { url = "https://raw.githubusercontent.com/MisterJulsen/modsrepo/main/maven/" } // DragonLib
30+
maven { url = "https://cursemaven.com"
31+
content{
32+
includeGroup("curse.maven")
33+
}
34+
}
2935
maven { // Flywheel
3036
url = "https://maven.tterrag.com/"
3137
content {
@@ -83,6 +89,7 @@ allprojects {
8389
maven { url = "https://maven.terraformersmc.com/releases/" }
8490
maven { url = "https://raw.githubusercontent.com/Fuzss/modresources/main/maven/" }
8591
maven { url = "https://purplecreate.github.io/maven/"}
92+
maven { url = "https://maven.lounode.top/releases" }
8693

8794
}
8895

@@ -110,6 +117,8 @@ tasks.create("publishRealism") {
110117
dependsOn tasks.build, ":fabric:publishMods", ":forge:publishMods"
111118
break
112119
case "fabric":
120+
dependsOn "${platform}:build", "${platform}:publishMods"
121+
break
113122
case "forge":
114123
dependsOn "${platform}:build", "${platform}:publishMods"
115124
break

common/build.gradle

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,15 +8,14 @@ loom {
88

99
dependencies {
1010
modImplementation("net.fabricmc:fabric-loader:${fabric_loader_version}")
11-
modCompileOnly("com.simibubi.create:create-fabric-${minecraft_version}:${create_fabric_version}")
12-
11+
modCompileOnly("com.simibubi.create:create-fabric:${create_fabric_version}-mc${minecraft_version}")
1312
modImplementation "dev.architectury:architectury:$rootProject.architectury_api_version"
1413
implementation("javazoom:jlayer:${jlayer_version}")
1514

1615
annotationProcessor(implementation("io.github.llamalad7:mixinextras-common:${mixin_extras_version}"))
1716
modCompileOnly("purplecreate.tramways:tramways-common:$tramways_version-mc1.20.1-common")
1817
modRuntimeOnly("purplecreate.tramways:tramways-common:$tramways_version-mc1.20.1-common")
19-
18+
modImplementation("de.mrjulsen.mcdragonlib:dragonlib-fabric:${minecraft_version}-${dragonlib_version}")
2019
}
2120

2221
sourceSets {
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
package net.Realism;
2+
3+
import net.minecraft.server.level.ServerPlayer;
4+
5+
public class CommonEvents {
6+
public static void onPlayerJoin(ServerPlayer player) {
7+
RNetworking.onPlayerJoin(player);
8+
}
9+
10+
}
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
package net.Realism.Interfaces;
2+
3+
import java.util.UUID;
4+
5+
/**
6+
* Interface for adding banking (roll) functionality to OrientedContraptionEntity
7+
*/
8+
public interface IOrientedContraptionEntity {
9+
/**
10+
* Get the current roll angle
11+
*/
12+
float realism$getRoll();
13+
14+
/**
15+
* Set the current roll angle
16+
*/
17+
void realism$setRoll(float roll);
18+
19+
/**
20+
* Get the previous tick's roll angle (for interpolation)
21+
*/
22+
float realism$getPrevRoll();
23+
24+
/**
25+
* Set the previous tick's roll angle (for interpolation)
26+
*/
27+
void realism$setPrevRoll(float prevRoll);
28+
29+
/**
30+
* Get the interpolated roll angle for rendering
31+
* @param partialTicks The partial tick time
32+
* @return Interpolated roll angle
33+
*/
34+
float realism$getViewRoll(float partialTicks);
35+
36+
UUID getuid();
37+
}
38+
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
package net.Realism.Interfaces;
2+
3+
public interface IRealismScreens {
4+
void init(ITrainInterface Rtrain);
5+
}
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
package net.Realism.Interfaces;
2+
3+
public interface IScheduleRuntimeMixin {
4+
long getDepartureDate();
5+
long getExpectedArrivalDate();
6+
void setExpectedArrivalDate(long date);
7+
int getLastScheduledDepartureDate();
8+
void setLastScheduledDepartureDate(int date);
9+
boolean dontCheck();
10+
void setDontCheck(boolean dontCheck);
11+
}
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,12 @@
11
package net.Realism.Interfaces;
22

3+
import net.Realism.trains.TrainSettings;
34
import net.Realism.trains.etcs.ETCS;
45

56
public interface ITrainInterface{
67
ETCS realism$getETCS();
78
void realism$setETCS(ETCS etcs);
9+
TrainSettings realism$getSettings();
10+
void realism$setSettings(TrainSettings tiltSetting);
811

912
}
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
package net.Realism.NBT;
2+
3+
import net.minecraft.nbt.CompoundTag;
4+
5+
import java.util.List;
6+
import java.util.UUID;
7+
8+
public class RNBTHelper {
9+
public static CompoundTag writeUUIDList(List<UUID> list, String key) {
10+
int iter = 0;
11+
CompoundTag tag = new CompoundTag();
12+
for (UUID id : list) {
13+
tag.putUUID(String.join("_", key, String.valueOf(iter++)), id);
14+
}
15+
return tag;
16+
}
17+
18+
public static List<UUID> readUUIDList(CompoundTag tag, String key) {
19+
List<UUID> list = new java.util.ArrayList<>(List.of());
20+
for (int i = 0; i < tag.size(); i++) {
21+
list.add(tag.getUUID(String.join("_", key, String.valueOf(i))));
22+
}
23+
return list;
24+
}
25+
26+
27+
28+
29+
}
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
package net.Realism;
2+
3+
import com.simibubi.create.content.trains.schedule.condition.ScheduleWaitCondition;
4+
import com.simibubi.create.content.trains.schedule.destination.ScheduleInstruction;
5+
import net.Realism.trains.schedule.TimeOfDayRealistic;
6+
import net.createmod.catnip.data.Pair;
7+
8+
import java.util.function.Supplier;
9+
10+
import static com.simibubi.create.content.trains.schedule.Schedule.CONDITION_TYPES;
11+
import static com.simibubi.create.content.trains.schedule.Schedule.INSTRUCTION_TYPES;
12+
13+
public class RExtras {
14+
public static class Schedule {
15+
private static void registerInstruction(String path, Supplier<? extends ScheduleInstruction> factory) {
16+
INSTRUCTION_TYPES.add(Pair.of(RealismMod.id(path), factory));
17+
}
18+
private static void registerCondition(String path, Supplier<? extends ScheduleWaitCondition> clazz) {
19+
CONDITION_TYPES.add(Pair.of(RealismMod.id(path), clazz));
20+
}
21+
22+
public static void register() {
23+
registerCondition("time_of_day_realistic", TimeOfDayRealistic::new);
24+
}
25+
}
26+
}

0 commit comments

Comments
 (0)