[Bug]: Crystalls are not perfectly alliighned after respawn.
KostromDan opened this issue ยท 3 comments
Describe the bug you're experiencing
You need add 0.5 to x and z to fix this..
Reproducability
play with mod
Mod up to date
- Before submitting this issue I updated to the newest version and reproduced it
Minecraft version
1.19
Modloader version
Forge
Logs
I tried to fix it with kubejs and I think I realized that you did it intentionally as a crutch solving the problem of the fake beginning of the dragon respawn. I looked at the source code, yes, you intentionally subtract 0.5. But this problem can be solved by copying all the metadata from the usual vanilla crystal on the tower. Here is the code that solved the problem for me.
EntityEvents.spawned(event => {
let entity = event.entity
if (entity.type == 'minecraft:end_crystal') {
if (Math.abs(entity.x % 1) <= 0.1) {
event.server.runCommand(`execute in minecraft:the_end run summon minecraft:end_crystal ${entity.x + 0.5} ${entity.y} ${entity.z + 0.5} {Motion: [0.0d, 0.0d, 0.0d], Invulnerable: 0b, Air: 300s, OnGround: 0b, PortalCooldown: 0, Rotation: [218.30145f, 0.0f], FallDistance: 0.0f, CanUpdate: 1b, Fire: -1s, ForgeCaps: {"minecraft:treechopchop_settings_capability": {isSynced: 0b, sneakBehavior: "INVERT_CHOPPING", treesMustHaveLeaves: 1b, chopInCreativeMode: 0b, choppingEnabled: 1b, fellingEnabled: 1b}}, ShowBottom: 1b}`)
event.cancel()
}
}
})
I hope you will remove this crutch from your code.
I would also like to see a setting to disable Anti-flight attacks.
I found a bug that sometimes lightning generated by the mod gets into crystals and destroys them.