CSX8600 / trafficcontrol

Other
13 stars 15 forks source link

trafficlights dont react to Mts cars #32

Closed Marci261001 closed 1 year ago

Marci261001 commented 3 years ago

I try to create my own town but ran in to a problem with your traffic lights they do not react to my mts cars i tried it with a pig and it worked but with the car it did not how do i fix this

ItsJustMiaouss commented 2 years ago

Hi, I think I found the problem.

In the mod configuration file (.minecraft/config/trafficcontrol.cfg), add to the S:sensorClasses list minecrafttransportsimulator.mcinterface.BuilderEntityExisting. Like this:

traffic_light {

    S:"sensorClasses" <
        minecrafttransportsimulator.mcinterface.BuilderEntityExisting
        ...
     >

    ...

}

This is the class of MTS vehicles.

Also, I suspect that there is a spelling error on this line. It's not minecraftransportsimulator but minecrafttransportsimulator

CSX8600 commented 1 year ago

@ItsJustMiaouss is correct - you have to update the config file. Since these classes can change, there is a built in tool called the Entity Class Display. You can turn it on in game by pressing ] and then looking at any entity in game to figure out what it's class inheritance is (appears at the top of the screen). You can use this information to update your config file accordingly.