Skip to content

ELEKTRIKITY#711

Draft
Seggan wants to merge 38 commits into
masterfrom
seggan/feature/elektrikity
Draft

ELEKTRIKITY#711
Seggan wants to merge 38 commits into
masterfrom
seggan/feature/elektrikity

Conversation

@Seggan
Copy link
Copy Markdown
Member

@Seggan Seggan commented Apr 23, 2026

The Rebar part is electricity is most done I think, so y'all can start reviewing it.

How it works:

Electric blocks and the electric system are completely disconnected. The only thing electric blocks are/do is hold "electric nodes" and the entities for them. The electric nodes are what the electric system actually operates on. Electric blocks just hold these nodes and interact with the electricity system by manipulating these nodes. There's 4 node types: producers, connectors, consumers, and acceptors. Producers make electricity, connectors connect nodes, consumers require a specific amount to work, and acceptors eat any surplus electricity that comes along. Electricity itself has 4 numbers: volts, amperes, joules, and watts, although the only ones that actually matter in practice are volts and watts. Amperes follow P=IV, and wires have current limits, so in order to push more watts through a wire, you need wither higher voltage or more wire capacity. Joules is just the static form of watts, ie watt = joule/tick. Machines have a specific voltage range they want, so you cant just run everything on the smallest wires at 15 megavolts or smth.

@Seggan Seggan requested a review from a team April 23, 2026 14:03
@Seggan Seggan marked this pull request as draft April 23, 2026 14:04
@balugaq
Copy link
Copy Markdown
Collaborator

balugaq commented May 3, 2026

needs to open the companion pylon pr at https://github.com/pylonmc/pylon/pulls

@Seggan
Copy link
Copy Markdown
Member Author

Seggan commented May 3, 2026

Yeah ik but that's ones in much less of a completed state

@balugaq
Copy link
Copy Markdown
Collaborator

balugaq commented May 3, 2026

QQ_1777821809957

Should be addPower

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

1-Gauge-Wire shouldn't be placed directly as string

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Server crashed.

Image

Hold a wire on main hand, 4 wire on off hand, and try to connect two pylons, server crashed.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

import io.github.pylonmc.rebar.recipe.FluidOrItem

@JvmRecord
data class FluidWithAmount(val fluid: RebarFluid, val amount: Double) {
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd prefer rename the parameter amount to amountMillibucket

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Image

In Fluid Water Page, missing arugment

Copy link
Copy Markdown
Collaborator

@balugaq balugaq May 3, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hold a wire and conenct one node then go through nether portal

[22:53:56 ERROR]: Could not pass event PlayerMoveEvent to Rebar v1.0.0-SNAPSHOT
java.lang.IllegalArgumentException: Cannot add Locations of differing worlds
at org.bukkit.Location.subtract(Location.java:450) ~[paper-api-1.21.11-R0.1-SNAPSHOT.jar:?]
at rebar-1.0.0-SNAPSHOT.jar//io.github.pylonmc.rebar.entity.display.transform.TransformUtil.getDisplacement(TransformUtil.kt:61) ~[?:?]
at rebar-1.0.0-SNAPSHOT.jar//io.github.pylonmc.rebar.entity.display.transform.TransformUtil.getDirection(TransformUtil.kt:71) ~[?:?]
at rebar-1.0.0-SNAPSHOT.jar//io.github.pylonmc.rebar.entity.display.transform.LookAlong.(LookAlong.kt:21) ~[?:?]
at rebar-1.0.0-SNAPSHOT.jar//io.github.pylonmc.rebar.entity.display.transform.TransformBuilder.lookAlong(TransformBuilder.kt:61) ~[?:?]
at rebar-1.0.0-SNAPSHOT.jar//io.github.pylonmc.rebar.electricity.WireConnectionService.getDisplayTransform(WireConnectionService.kt:312) ~[?:?]
at rebar-1.0.0-SNAPSHOT.jar//io.github.pylonmc.rebar.electricity.WireConnectionService.onPlayerMove(WireConnectionService.kt:249) ~[?:?]
at co.aikar.timings.TimedEventExecutor.execute(TimedEventExecutor.java:80) ~[paper-api-1.21.11-R0.1-SNAPSHOT.jar:?]
at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:71) ~[paper-api-1.21.11-R0.1-SNAPSHOT.jar:?]
at io.papermc.paper.plugin.manager.PaperEventManager.callEvent(PaperEventManager.java:54) ~[paper-1.21.11.jar:1.21.11-99-81b9122]
at io.papermc.paper.plugin.manager.PaperPluginManagerImpl.callEvent(PaperPluginManagerImpl.java:131) ~[paper-1.21.11.jar:1.21.11-99-81b9122]
at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:628) ~[paper-api-1.21.11-R0.1-SNAPSHOT.jar:?]
at net.minecraft.server.network.ServerGamePacketListenerImpl.handleMovePlayer(ServerGamePacketListenerImpl.java:1673) ~[paper-1.21.11.jar:1.21.11-99-81b9122]
at net.minecraft.network.protocol.game.ServerboundMovePlayerPacket.handle(ServerboundMovePlayerPacket.java:62) ~[paper-1.21.11.jar:1.21.11-99-81b9122]
at net.minecraft.network.protocol.game.ServerboundMovePlayerPacket$Pos.handle(ServerboundMovePlayerPacket.java:101) ~[paper-1.21.11.jar:1.21.11-99-81b9122]
at net.minecraft.network.PacketProcessor$ListenerAndPacket.handle(PacketProcessor.java:99) ~[paper-1.21.11.jar:1.21.11-99-81b9122]
at net.minecraft.network.PacketProcessor.executeSinglePacket(PacketProcessor.java:33) ~[paper-1.21.11.jar:1.21.11-99-81b9122]
at net.minecraft.server.MinecraftServer.pollTask(MinecraftServer.java:1504) ~[paper-1.21.11.jar:1.21.11-99-81b9122]
at net.minecraft.server.MinecraftServer.recordTaskExecutionTimeWhileWaiting(MinecraftServer.java:1230) ~[paper-1.21.11.jar:1.21.11-99-81b9122]
at net.minecraft.server.MinecraftServer.runServer(MinecraftServer.java:1346) ~[paper-1.21.11.jar:1.21.11-99-81b9122]
at net.minecraft.server.MinecraftServer.lambda$spin$2(MinecraftServer.java:388) ~[paper-1.21.11.jar:1.21.11-99-81b9122]
at java.base/java.lang.Thread.run(Thread.java:1575) ~[?:?]

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should electricity wires in fluid pipes be allowed? :D
Image

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Needs to add a distance limit of the wire, otherwise this is a 400 blocks wire:

Image

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

im fine with this tbh

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Though wires cannot be placed if any blocks in the way, I placed the wires first and then place blocks:
Image

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Breaking the wire-connected Pylon should drop wires at the pylon.

@Seggan
Copy link
Copy Markdown
Member Author

Seggan commented May 3, 2026

QQ_1777821809957

Should be addPower

no, cause power production is a constant thing. watts == joules / second, so im just updating current output instead of adding to a buffer or smth. its constantly producing without a buffer, unlike slimefun

@balugaq
Copy link
Copy Markdown
Collaborator

balugaq commented May 3, 2026

Wooden casing shouldn't store or transfer steam:
(I can't reproduce it at another place without Boiler, not sure if it is a problem caused by /rb finishmultiblock)

926bc2ca18c351999d8963be5b258abf e6f26c87abbe20ffec0224e6517ee458 afd8f58e0454b016736ae52779414bd3

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A bug:

In Creative Power Source, enter manual-input mode and type "abab", the check will fail and then type 1234, PlayerInput is still received the number but it does not change the Power

Seggan added 4 commits May 4, 2026 13:31
# Conflicts:
#	nms/src/main/kotlin/io/github/pylonmc/rebar/i18n/packet/PlayerPacketHandler.kt
#	rebar/src/main/kotlin/io/github/pylonmc/rebar/Rebar.kt
#	rebar/src/main/kotlin/io/github/pylonmc/rebar/block/base/RebarSimpleMultiblock.kt
#	rebar/src/main/kotlin/io/github/pylonmc/rebar/command/RebarCommand.kt
#	rebar/src/main/kotlin/io/github/pylonmc/rebar/config/RebarConfig.kt
#	rebar/src/main/kotlin/io/github/pylonmc/rebar/content/fluid/FluidPipeDisplay.kt
#	rebar/src/main/kotlin/io/github/pylonmc/rebar/fluid/placement/FluidPipePlacementService.kt
#	rebar/src/main/kotlin/io/github/pylonmc/rebar/item/RebarItem.kt
#	rebar/src/main/kotlin/io/github/pylonmc/rebar/item/RebarItemSchema.kt
#	rebar/src/main/kotlin/io/github/pylonmc/rebar/item/research/Research.kt
#	rebar/src/main/kotlin/io/github/pylonmc/rebar/recipe/IngredientCalculator.kt
#	rebar/src/main/kotlin/io/github/pylonmc/rebar/recipe/RecipeListener.kt
#	rebar/src/main/kotlin/io/github/pylonmc/rebar/resourcepack/armor/ArmorTextureEngine.kt
#	rebar/src/main/kotlin/io/github/pylonmc/rebar/util/RebarUtils.kt
#	rebar/src/main/kotlin/io/github/pylonmc/rebar/util/position/BlockPosition.kt
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants