Some more kinetic blocks
This commit is contained in:
@@ -5,10 +5,10 @@ redstone, contraptions, trains, equipment, decoration and schematics. It aims to
|
||||
possible, and to stay fast on both the server and the client when a world has thousands of moving parts.
|
||||
|
||||
Built so far: the importer and Create's imported blocks and items, R1, R2, R3 (`transformed`, `rotating`, `fluid` and
|
||||
items), R4, R5, R8, S0, S4, S7, S12, stonecutting from S9, the start of P1's kinetics (shafts and cogwheels turned by a
|
||||
hand crank, creative motor or water wheel, with stress and overstress), Create's pressing recipes, and the mechanical
|
||||
press pressing items on the ground. Facts about Create come from reading `ports/create1.21.1` and `ports/create1.19.3`,
|
||||
and facts about bworld from its source.
|
||||
items), R4, R5, R8, S0, S4, S7, S12, stonecutting from S9, the start of P1's kinetics (shafts, cogwheels, gearboxes,
|
||||
encased shafts and cogs, clutches, gearshifts and chain drives turned by a hand crank, creative motor or water wheel,
|
||||
with stress and overstress), Create's pressing recipes, and the mechanical press pressing items on the ground. Facts
|
||||
about Create come from reading `ports/create1.21.1` and `ports/create1.19.3`, and facts about bworld from its source.
|
||||
|
||||
## Sources
|
||||
|
||||
@@ -529,6 +529,23 @@ says. It scores again a tick after a neighbour changes, and every second for flo
|
||||
it every 3 seconds), so a wheel ticks once a second. It can't be placed beside another wheel unless they share an axle,
|
||||
like `canSurvive`. The large water wheel isn't built, and neither is changing a wheel's planks.
|
||||
|
||||
**Transmission as built** (`connections.ts`, `chains.ts`). All of it is `create:kinetic` params, so the rules are data
|
||||
and one function, `speed_ratio`, which takes the table's gearbox and chain drive rows now. `gearbox` puts an axle on the
|
||||
4 sides around its axis, and `split` (`clutch` or `gearshift`) with `powered` names a 1 bit state. Both turn their axles
|
||||
by `axis_modifier`, from the side their speed comes from (`getAxisModifier`), which the server keeps in their `source`
|
||||
client data for their visuals' half shafts. A gearbox reverses what goes straight through it, like Create's. The clutch
|
||||
and gearshift are powered by verdigris through `bworld:verdigris_input`, and any change to a kinetic block's states that
|
||||
changes how it turns takes it out of its network and puts it back, like `areStatesKineticallyEquivalent` with
|
||||
`detachKinetics` (straight away rather than a tick later). The vertical gearbox is an item that `places` the gearbox,
|
||||
whose placing rule stands it on its side when `placement.item` is the vertical gearbox, and a loot table gives back the
|
||||
item it was. Encased shafts are the shaft's rule with a casing model. Encased cogs are cogs with `shaft_states`, the 1
|
||||
bit states for an axle out of each end. They have no item, like Create's: `create:encasable` on shafts and cogs turns
|
||||
one right clicked with a casing into the encased one, keeping its axis, with an axle toward each axle beside it, and
|
||||
both break into what was encased. Turning one back with a wrench waits for the wrench (P9). `chain` names a chain
|
||||
drive's `part` and `axis_along_first` states, which `chain_update` keeps up to date on placing and on neighbour changes,
|
||||
like `updateShape`. The adjustable chain gearshift also names a 4 bit `power` state, which the verdigris input fills
|
||||
with how much power goes into it, for `chain_ratio`. The metal girder encased shaft waits for girders (P10).
|
||||
|
||||
**Chunk borders.** Tile data keeps speeds across unloading. bworld keeps every tile in memory and reloads a chunk when a
|
||||
block in it is read, so the walk sees a whole network, and Create's separate count of unloaded members' stress
|
||||
(`KineticNetwork`'s unloaded stress) isn't needed.
|
||||
|
||||
Reference in New Issue
Block a user