Skip to content

Conversation

@Intybyte
Copy link
Member

@Intybyte Intybyte requested a review from LordIdra December 17, 2025 07:53
@Seggan Seggan changed the title Gravity aware bronze anvil [ref:vaan/api/falling-py-block] Gravity aware bronze anvil Dec 20, 2025
@Seggan
Copy link
Member

Seggan commented Dec 20, 2025

Dude please use [ref:xyz], I hate seeing red crosses 😭

Copy link
Member

@Seggan Seggan left a comment

Choose a reason for hiding this comment

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

Bug: placed items are not preserved

Also might wanna do this for the refractory mix

@Intybyte
Copy link
Member Author

Dude please use [ref:xyz], I hate seeing red crosses 😭

I don't understand when it triggers and when it does not ngl LOL, sometimes it doesn't whine

@Intybyte
Copy link
Member Author

Intybyte commented Dec 20, 2025

SMOOTH_RED_SANDSTONE doesn't fall, wdym

@Seggan
Copy link
Member

Seggan commented Dec 20, 2025

I don't understand when it triggers and when it does not ngl LOL, sometimes it doesn't whine

It triggers on every commit push

@Seggan
Copy link
Member

Seggan commented Dec 20, 2025

LOL I somehow edited your comment by accident lol

@Seggan
Copy link
Member

Seggan commented Dec 20, 2025

SMOOTH_RED_SANDSTONE doesn't fall, wdym

mb thought it was red sand

@LordIdra
Copy link
Contributor

Bronze anvil errors about 10 seconds after falling with:

[22:11:07 ERROR]: [PylonCore] Error when handling block(pylonbase:bronze_anvil, Location{world=CraftWorld{name=world},x=-382.0,y=75.0,z=-682.0,pitch=0.0,yaw=0.0}) ticking: Entity item does not exist or is not of type ItemDisplay
[22:11:07 WARN]: java.lang.IllegalArgumentException: Entity item does not exist or is not of type ItemDisplay
[22:11:07 WARN]:        at pylon-core-1.0.0-SNAPSHOT.jar//io.github.pylonmc.pylon.core.block.base.PylonEntityHolderBlock.getHeldEntityOrThrow(PylonEntityHolderBlock.kt:75)
[22:11:07 WARN]:        at pylon-base-1.0.0-SNAPSHOT.jar//io.github.pylonmc.pylon.base.content.machines.smelting.BronzeAnvil.getItemDisplay(BronzeAnvil.java:218)
[22:11:07 WARN]:        at pylon-base-1.0.0-SNAPSHOT.jar//io.github.pylonmc.pylon.base.content.machines.smelting.BronzeAnvil.tick(BronzeAnvil.java:180)
[22:11:07 WARN]:        at pylon-core-1.0.0-SNAPSHOT.jar//io.github.pylonmc.pylon.core.block.TickManager$startTicker$1.invokeSuspend(TickManager.kt:75)
[22:11:07 WARN]:        at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
[22:11:07 WARN]:        at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:100)
[22:11:07 WARN]:        at org.bukkit.craftbukkit.scheduler.CraftTask.run(CraftTask.java:78)
[22:11:07 WARN]:        at org.bukkit.craftbukkit.scheduler.CraftScheduler.mainThreadHeartbeat(CraftScheduler.java:474)
[22:11:07 WARN]:        at net.minecraft.server.MinecraftServer.tickChildren(MinecraftServer.java:1744)
[22:11:07 WARN]:        at net.minecraft.server.MinecraftServer.tickServer(MinecraftServer.java:1618)
[22:11:07 WARN]:        at net.minecraft.server.dedicated.DedicatedServer.tickServer(DedicatedServer.java:430)
[22:11:07 WARN]:        at net.minecraft.server.MinecraftServer.runServer(MinecraftServer.java:1338)
[22:11:07 WARN]:        at net.minecraft.server.MinecraftServer.lambda$spin$2(MinecraftServer.java:384)
[22:11:07 WARN]:        at java.base/java.lang.Thread.run(Thread.java:1583)

Also, the anvil drops an item as if it was broken when it stops falling

@Intybyte
Copy link
Member Author

Intybyte commented Dec 27, 2025

Bronze anvil errors about 10 seconds after falling with:

[22:11:07 ERROR]: [PylonCore] Error when handling block(pylonbase:bronze_anvil, Location{world=CraftWorld{name=world},x=-382.0,y=75.0,z=-682.0,pitch=0.0,yaw=0.0}) ticking: Entity item does not exist or is not of type ItemDisplay
[22:11:07 WARN]: java.lang.IllegalArgumentException: Entity item does not exist or is not of type ItemDisplay
[22:11:07 WARN]:        at pylon-core-1.0.0-SNAPSHOT.jar//io.github.pylonmc.pylon.core.block.base.PylonEntityHolderBlock.getHeldEntityOrThrow(PylonEntityHolderBlock.kt:75)
[22:11:07 WARN]:        at pylon-base-1.0.0-SNAPSHOT.jar//io.github.pylonmc.pylon.base.content.machines.smelting.BronzeAnvil.getItemDisplay(BronzeAnvil.java:218)
[22:11:07 WARN]:        at pylon-base-1.0.0-SNAPSHOT.jar//io.github.pylonmc.pylon.base.content.machines.smelting.BronzeAnvil.tick(BronzeAnvil.java:180)
[22:11:07 WARN]:        at pylon-core-1.0.0-SNAPSHOT.jar//io.github.pylonmc.pylon.core.block.TickManager$startTicker$1.invokeSuspend(TickManager.kt:75)
[22:11:07 WARN]:        at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
[22:11:07 WARN]:        at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:100)
[22:11:07 WARN]:        at org.bukkit.craftbukkit.scheduler.CraftTask.run(CraftTask.java:78)
[22:11:07 WARN]:        at org.bukkit.craftbukkit.scheduler.CraftScheduler.mainThreadHeartbeat(CraftScheduler.java:474)
[22:11:07 WARN]:        at net.minecraft.server.MinecraftServer.tickChildren(MinecraftServer.java:1744)
[22:11:07 WARN]:        at net.minecraft.server.MinecraftServer.tickServer(MinecraftServer.java:1618)
[22:11:07 WARN]:        at net.minecraft.server.dedicated.DedicatedServer.tickServer(DedicatedServer.java:430)
[22:11:07 WARN]:        at net.minecraft.server.MinecraftServer.runServer(MinecraftServer.java:1338)
[22:11:07 WARN]:        at net.minecraft.server.MinecraftServer.lambda$spin$2(MinecraftServer.java:384)
[22:11:07 WARN]:        at java.base/java.lang.Thread.run(Thread.java:1583)

Also, the anvil drops an item as if it was broken when it stops falling

Fixed, the problem was that onDeserialize of tickable blocks it ticks when the entity doesn't exist yet, because now the deserialization is called before the actual method, and at that time the entity wasn't created yet

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.

4 participants