Pack Making JSON Poles - DonBruce64/MinecraftTransportSimulator GitHub Wiki
What's a city without road signs or traffic lights? A bland street, that's what! While you are by no means required to make pole-based items in your pack, you may do so if you chose by using some textures and a single JSON file. In fact, you may choose to release a pack consisting entirely of road equipment! Wouldn't be the first time someone made a thing for Minecraft that just has road stuff.
Inherited JSON
Poles inherit the following core JSON sections:
Pole
All poles, no matter what they do, contain a pole
section. This tells MTS what type of pole the pole is, and a few other core things. It contains the following parameters:
- type – The type of this pole. This defines its properties. Valid types are:
core
,traffic_signal
,street_light
, andsign
. They are defined in their own sections below. - radius – This parameter tells MTS how much to offset components put on this pole. This is because some poles may be larger than others, and making it so models always render at the same point would lead to clipping on large poles and floating on small ones. For all cases, you should set this to the offset from the center where all components should attach to your pole. Only valid on
core
pole types. - allowsDiagonals – Normally poles don't allow components to be placed diagonally on them. If you want this with your poles, set this to true. Only valid on
core
pole types.
Cores
The base of any pole system is the core
. This component has core
as the type and is the central structure that connects to other pole bits and allows placement of components on it. You cannot place components without placing one of these first.
That being said, cores are designed to mix and match from packs.
Traffic Signals
Perhaps the most standard of lights, traffic signals consist of a model with various lights. The lights you choose are wholly up to you. This may include making fewer or more bulbs than the standard 3-light signal. Say a 2-light unit for a crossing signal.
Street Lights
These are the simplest type of lights. Designed for street accents, these cannot be controlled by a signal controller.
Signs
Signs are the third pole component you can create, and perhaps one of the most overlooked pack-based things in MTS. Signs may have lights on them as well, and behave the same as street lights. If a sign has in its rendering section, then it will allow for editing that text via GUI. This allows for dynamic route and speed limit signs, among others.