-
Notifications
You must be signed in to change notification settings - Fork 27
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
34 changed files
with
543 additions
and
73 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 2 additions & 2 deletions
4
src/generated/resources/.cache/c622617f6fabf890a00b9275cd5f643584a8a2c8
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
// 1.20.1 2024-02-23T16:56:41.871174276 Languages: en_us | ||
e539a84f64868a5c36f85e849eae8433b1241776 assets/railcraft/lang/en_us.json | ||
// 1.20.1 2024-03-13T13:11:54.703285 Languages: en_us | ||
05e8a7cd6ca20cd8f6103a563640bbf6779668a8 assets/railcraft/lang/en_us.json |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
29 changes: 29 additions & 0 deletions
29
src/main/java/mods/railcraft/integrations/jade/CouplerTrackComponent.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
package mods.railcraft.integrations.jade; | ||
|
||
import mods.railcraft.Translations; | ||
import mods.railcraft.api.core.RailcraftConstants; | ||
import mods.railcraft.world.level.block.track.outfitted.CouplerTrackBlock; | ||
import net.minecraft.ChatFormatting; | ||
import net.minecraft.network.chat.Component; | ||
import net.minecraft.resources.ResourceLocation; | ||
import snownee.jade.api.BlockAccessor; | ||
import snownee.jade.api.IBlockComponentProvider; | ||
import snownee.jade.api.ITooltip; | ||
import snownee.jade.api.config.IPluginConfig; | ||
|
||
class CouplerTrackComponent implements IBlockComponentProvider { | ||
|
||
@Override | ||
public void appendTooltip(ITooltip tooltip, BlockAccessor accessor, IPluginConfig config) { | ||
if (accessor.getBlock() instanceof CouplerTrackBlock) { | ||
var mode = CouplerTrackBlock.getMode(accessor.getBlockState()).getDisplayName(); | ||
tooltip.add(Component.translatable(Translations.Tips.CURRENT_MODE) | ||
.append(" ").append(mode.copy().withStyle(ChatFormatting.DARK_PURPLE))); | ||
} | ||
} | ||
|
||
@Override | ||
public ResourceLocation getUid() { | ||
return RailcraftConstants.rl("track_component"); | ||
} | ||
} |
27 changes: 27 additions & 0 deletions
27
src/main/java/mods/railcraft/integrations/jade/EmbarkingTrackComponent.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
package mods.railcraft.integrations.jade; | ||
|
||
import mods.railcraft.Translations; | ||
import mods.railcraft.api.core.RailcraftConstants; | ||
import mods.railcraft.world.level.block.track.outfitted.EmbarkingTrackBlock; | ||
import net.minecraft.network.chat.Component; | ||
import net.minecraft.resources.ResourceLocation; | ||
import snownee.jade.api.BlockAccessor; | ||
import snownee.jade.api.IBlockComponentProvider; | ||
import snownee.jade.api.ITooltip; | ||
import snownee.jade.api.config.IPluginConfig; | ||
|
||
class EmbarkingTrackComponent implements IBlockComponentProvider { | ||
|
||
@Override | ||
public void appendTooltip(ITooltip tooltip, BlockAccessor accessor, IPluginConfig config) { | ||
if (accessor.getBlock() instanceof EmbarkingTrackBlock) { | ||
var radius = EmbarkingTrackBlock.getRadius(accessor.getBlockState()); | ||
tooltip.add(Component.translatable(Translations.Screen.EMBARKING_TRACK_RADIUS, radius)); | ||
} | ||
} | ||
|
||
@Override | ||
public ResourceLocation getUid() { | ||
return RailcraftConstants.rl("track_component"); | ||
} | ||
} |
27 changes: 27 additions & 0 deletions
27
src/main/java/mods/railcraft/integrations/jade/LauncherTrackComponent.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
package mods.railcraft.integrations.jade; | ||
|
||
import mods.railcraft.Translations; | ||
import mods.railcraft.api.core.RailcraftConstants; | ||
import mods.railcraft.world.level.block.entity.track.LauncherTrackBlockEntity; | ||
import net.minecraft.network.chat.Component; | ||
import net.minecraft.resources.ResourceLocation; | ||
import snownee.jade.api.BlockAccessor; | ||
import snownee.jade.api.IBlockComponentProvider; | ||
import snownee.jade.api.ITooltip; | ||
import snownee.jade.api.config.IPluginConfig; | ||
|
||
class LauncherTrackComponent implements IBlockComponentProvider { | ||
|
||
@Override | ||
public void appendTooltip(ITooltip tooltip, BlockAccessor accessor, IPluginConfig config) { | ||
if (accessor.getBlockEntity() instanceof LauncherTrackBlockEntity launcherTrack) { | ||
var force = launcherTrack.getLaunchForce(); | ||
tooltip.add(Component.translatable(Translations.Screen.LAUNCHER_TRACK_LAUNCH_FORCE, force)); | ||
} | ||
} | ||
|
||
@Override | ||
public ResourceLocation getUid() { | ||
return RailcraftConstants.rl("track_component"); | ||
} | ||
} |
29 changes: 29 additions & 0 deletions
29
src/main/java/mods/railcraft/integrations/jade/LockingTrackComponent.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
package mods.railcraft.integrations.jade; | ||
|
||
import mods.railcraft.Translations; | ||
import mods.railcraft.api.core.RailcraftConstants; | ||
import mods.railcraft.world.level.block.track.outfitted.LockingTrackBlock; | ||
import net.minecraft.ChatFormatting; | ||
import net.minecraft.network.chat.Component; | ||
import net.minecraft.resources.ResourceLocation; | ||
import snownee.jade.api.BlockAccessor; | ||
import snownee.jade.api.IBlockComponentProvider; | ||
import snownee.jade.api.ITooltip; | ||
import snownee.jade.api.config.IPluginConfig; | ||
|
||
class LockingTrackComponent implements IBlockComponentProvider { | ||
|
||
@Override | ||
public void appendTooltip(ITooltip tooltip, BlockAccessor accessor, IPluginConfig config) { | ||
if (accessor.getBlock() instanceof LockingTrackBlock) { | ||
var mode = LockingTrackBlock.getLockingMode(accessor.getBlockState()).getDisplayName(); | ||
tooltip.add(Component.translatable(Translations.Tips.CURRENT_MODE) | ||
.append(" ").append(mode.copy().withStyle(ChatFormatting.DARK_PURPLE))); | ||
} | ||
} | ||
|
||
@Override | ||
public ResourceLocation getUid() { | ||
return RailcraftConstants.rl("track_component"); | ||
} | ||
} |
33 changes: 33 additions & 0 deletions
33
src/main/java/mods/railcraft/integrations/jade/LocomotiveComponent.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
package mods.railcraft.integrations.jade; | ||
|
||
import mods.railcraft.Translations; | ||
import mods.railcraft.api.core.RailcraftConstants; | ||
import mods.railcraft.world.entity.vehicle.locomotive.Locomotive; | ||
import net.minecraft.network.chat.Component; | ||
import net.minecraft.resources.ResourceLocation; | ||
import snownee.jade.api.EntityAccessor; | ||
import snownee.jade.api.IEntityComponentProvider; | ||
import snownee.jade.api.ITooltip; | ||
import snownee.jade.api.config.IPluginConfig; | ||
|
||
class LocomotiveComponent implements IEntityComponentProvider { | ||
|
||
@Override | ||
public void appendTooltip(ITooltip tooltip, EntityAccessor accessor, IPluginConfig config) { | ||
var entity = accessor.getEntity(); | ||
if (entity instanceof Locomotive locomotive) { | ||
tooltip.add(Component.translatable(Translations.LookingAt.MODE) | ||
.append(locomotive.getMode().getDisplayName())); | ||
tooltip.add( | ||
Component.translatable(Translations.LookingAt.SPEED, locomotive.getSpeed().getLevel())); | ||
var reverse = locomotive.isReverse() ? Translations.LookingAt.YES : Translations.LookingAt.NO; | ||
tooltip.add(Component.translatable(Translations.LookingAt.REVERSE) | ||
.append(Component.translatable(reverse))); | ||
} | ||
} | ||
|
||
@Override | ||
public ResourceLocation getUid() { | ||
return RailcraftConstants.rl("locomotive"); | ||
} | ||
} |
29 changes: 29 additions & 0 deletions
29
src/main/java/mods/railcraft/integrations/jade/LocomotiveTrackComponent.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
package mods.railcraft.integrations.jade; | ||
|
||
import mods.railcraft.Translations; | ||
import mods.railcraft.api.core.RailcraftConstants; | ||
import mods.railcraft.world.level.block.track.outfitted.LocomotiveTrackBlock; | ||
import net.minecraft.ChatFormatting; | ||
import net.minecraft.network.chat.Component; | ||
import net.minecraft.resources.ResourceLocation; | ||
import snownee.jade.api.BlockAccessor; | ||
import snownee.jade.api.IBlockComponentProvider; | ||
import snownee.jade.api.ITooltip; | ||
import snownee.jade.api.config.IPluginConfig; | ||
|
||
class LocomotiveTrackComponent implements IBlockComponentProvider { | ||
|
||
@Override | ||
public void appendTooltip(ITooltip tooltip, BlockAccessor accessor, IPluginConfig config) { | ||
if (accessor.getBlock() instanceof LocomotiveTrackBlock) { | ||
var mode = LocomotiveTrackBlock.getMode(accessor.getBlockState()).getDisplayName(); | ||
tooltip.add(Component.translatable(Translations.Tips.CURRENT_MODE) | ||
.append(" ").append(mode.copy().withStyle(ChatFormatting.DARK_PURPLE))); | ||
} | ||
} | ||
|
||
@Override | ||
public ResourceLocation getUid() { | ||
return RailcraftConstants.rl("track_component"); | ||
} | ||
} |
Oops, something went wrong.