Skip to content

feat: add marker void(non-functional) #428

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jan 5, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions src/main/java/jp/ngt/rtm/RTMBlock.java
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ public final class RTMBlock {
public static BlockMarker marker;
public static BlockMarker markerSwitch;
public static BlockMarker markerStraight;
public static BlockMarker markerVoid;

public static Block fluorescent;
public static Block ironPillar;
Expand Down Expand Up @@ -111,6 +112,7 @@ public static void init() {
marker = (BlockMarker) (new BlockMarker(0)).setBlockName("rtm:marker").setBlockTextureName("rtm:marker_0").setHardness(1.0F).setResistance(5.0F).setCreativeTab(CreativeTabRTM.tabRailway);
markerSwitch = (BlockMarker) (new BlockMarker(1)).setBlockName("rtm:markerSwitch").setBlockTextureName("rtm:marker_0").setHardness(1.0F).setResistance(5.0F).setCreativeTab(CreativeTabRTM.tabRailway);
markerStraight = (BlockMarker) (new BlockMarker(10)).setBlockName("rtm:markerStraight").setBlockTextureName("rtm:marker_0").setHardness(1.0F).setResistance(5.0F).setCreativeTab(CreativeTabRTM.tabRailway);
markerVoid = (BlockMarker) (new BlockMarker(11)).setBlockName("rtm:markerVoid").setBlockTextureName("rtm:marker_0").setHardness(1.0F).setResistance(5.0F).setCreativeTab(CreativeTabRTM.tabRailway);

fluorescent = (new BlockFluorescent()).setBlockName("rtm:fluorescent");
ironPillar = (new BlockIronPillar()).setBlockName("rtm:ironPillar").setBlockTextureName("rtm:ironPillar").setCreativeTab(CreativeTabRTM.tabRailway);
Expand Down Expand Up @@ -167,6 +169,7 @@ public static void init() {
RTMCore.registerRtmPrefixed(marker, ItemBlockCustomColor.class, "rtm:marker");
RTMCore.registerRtmPrefixed(markerSwitch, ItemBlockCustomColor.class, "rtm:markerSwitch");
RTMCore.registerRtmPrefixed(markerStraight, ItemBlockCustomColor.class, "rtm:markerStraight");
RTMCore.registerRtmPrefixed(markerVoid, ItemBlockCustomColor.class, "rtm:markerVoid");

RTMCore.registerRtmPrefixed(fluorescent, "rtm:fluorescent");
RTMCore.registerRtmPrefixed(ironPillar, "rtm:ironPillar");
Expand Down
8 changes: 5 additions & 3 deletions src/main/java/jp/ngt/rtm/rail/BlockMarker.java
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@

public class BlockMarker extends BlockContainer {
/**
* 0:normal, 1:switch, 10:straight
* 0:normal, 1:switch, 10:straight, 11: void
*/
public final int markerType;
@SideOnly(Side.CLIENT)
Expand Down Expand Up @@ -387,7 +387,7 @@ public RailProperty hasRail(EntityPlayer player, boolean par2) {
@Override
@SideOnly(Side.CLIENT)
public void getSubBlocks(Item par1, CreativeTabs tab, List list) {
if (this.markerType == 0 || this.markerType == 1 || this.markerType == 10) {
if (this.markerType == 0 || this.markerType == 1 || this.markerType == 10 || this.markerType == 11) {
list.add(new ItemStack(par1, 1, 0));
}
}
Expand All @@ -400,7 +400,7 @@ public String getItemIconName() {
@Override
@SideOnly(Side.CLIENT)
public IIcon getIcon(int par1, int par2) {
int i = ((this.markerType == 0 || this.markerType == 1 || this.markerType == 10) ? 7 : 3);
int i = ((this.markerType == 0 || this.markerType == 1 || this.markerType == 10 || this.markerType == 11) ? 7 : 3);
return this.icons[par2 & i];
}

Expand Down Expand Up @@ -439,6 +439,8 @@ public int getRenderColor(int par1) {
}
case 10:
return 0xEC008C;
case 11:
return 0xFFFFFF;
default:
return 16777215;
}
Expand Down
1 change: 1 addition & 0 deletions src/main/resources/assets/rtm/lang/en_US.lang
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ tile.rtm:ironPillar.name=Iron Pillar
tile.rtm:marker.name=Marker
tile.rtm:markerSwitch.name=Marker Switch
tile.rtm:markerStraight.name=Marker Straight
tile.rtm:markerVoid.name=Marker Void
tile.rtm:powerUnit.name=PowerUnit
tile.rtm:trainWorkBench.0.name=RTM Workbench
tile.rtm:trainWorkBench.1.name=Rail Workbench
Expand Down
1 change: 1 addition & 0 deletions src/main/resources/assets/rtm/lang/ja_JP.lang
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ tile.rtm:ironPillar.name=鉄柱
tile.rtm:marker.name=マーカー
tile.rtm:markerSwitch.name=分岐用マーカー
tile.rtm:markerStraight.name=直線用マーカー
tile.rtm:markerVoid.name=虚無マーカー
tile.rtm:powerUnit.name=電源装置
tile.rtm:trainWorkBench.0.name=RTM専用作業台
tile.rtm:trainWorkBench.1.name=レール用作業台
Expand Down