[Bug] resummoning ender dragon doesnt work
nickademas opened this issue · 5 comments
What happened?
A bug happened!
BetterEnd
4.30.1
BCLib
3.30.1
Fabric API
0.92.0
Fabric Loader
0.15.3
Minecraft
1.20.4
Relevant log output
No response
Other Mods
ViaFabricPlus (https://modrinth.com/mod/rIC2XJV4)
Better Taskbar (https://modrinth.com/mod/gPEcet33)
Ksyxis (https://modrinth.com/mod/2ecVyZ49)
Amecs (https://modrinth.com/mod/rcLriA4v)
AppleSkin (https://modrinth.com/mod/EsAfCjCV)
Seamless (https://modrinth.com/mod/rhyHyQke)
ImmediatelyFast (https://modrinth.com/mod/5ZwdcRci)
BactroMod (https://modrinth.com/mod/2Ok6dkOD)
Mouse Tweaks (https://modrinth.com/mod/aC3cM3Vq)
Croptopia (https://www.curseforge.com/projects/415438)
Broken Lead Warner (https://modrinth.com/mod/29RFArLV)
Mod Menu (https://modrinth.com/mod/mOgUt4GM)
Ding (https://modrinth.com/mod/UEtTD3gP)
Cloth Config API (Fabric/Forge/NeoForge) (https://www.curseforge.com/projects/348521)
Kirin UI (https://modrinth.com/mod/9aNz8Zqn)
CompleteConfig (https://modrinth.com/mod/GtqG8z1h)
FerriteCore (https://modrinth.com/mod/uXXizFIs)
Nvidium (https://modrinth.com/mod/SfMw2IZN)
MoreChatHistory (https://modrinth.com/mod/8qkXwOnk)
Fabric Language Kotlin (https://modrinth.com/mod/Ha28R6CL)
Inventory Profiles Next (https://modrinth.com/mod/O7RBXm3n)
Reese's Sodium Options (https://modrinth.com/mod/Bh37bMuy)
MaLiLib (https://www.curseforge.com/projects/303119)
Smooth Scroll (https://modrinth.com/mod/CllP7wW0)
Roughly Enough Items (https://www.curseforge.com/projects/310111)
Projectile Ding (https://modrinth.com/mod/INLXGXFI)
Visuality (https://modrinth.com/mod/rI0hvYcd)
libIPN (https://modrinth.com/mod/onSQdWhM)
Krypton (https://modrinth.com/mod/fQEb0iXm)
Zoomify (https://modrinth.com/mod/w7ThoJFB)
LazyDFU (https://modrinth.com/mod/hvFnDODi)
No Chat Reports (https://modrinth.com/mod/qQyHxfxd)
No More Useless Keys (https://modrinth.com/mod/YCcdA1Lp)
Sodium Extra (https://modrinth.com/mod/PtjYWJkn)
Concurrent Chunk Management Engine (https://modrinth.com/mod/VSNURh3q)
Forge Config API Port (https://modrinth.com/mod/ohNO6lps)
StutterFix (https://modrinth.com/mod/FimwF33K)
Perspective Mod Redux (https://www.curseforge.com/projects/280647)
Dark Loading Screen (https://modrinth.com/mod/h3XWIuzM)
Xaero's Minimap (https://modrinth.com/mod/1bokaNcj)
ModernFix (https://modrinth.com/mod/nmDcB62a)
Status Effect Bars (https://modrinth.com/mod/x02cBj9Y)
Entity Texture Features (https://modrinth.com/mod/BVzZfTc1)
YetAnotherConfigLib (https://modrinth.com/mod/1eAoo2KR)
Architectury API (Fabric/Forge/NeoForge) (https://www.curseforge.com/projects/419699)
JoinAutoSprintMod (https://modrinth.com/mod/TNVjaBGX)
Centered Crosshair (https://modrinth.com/mod/xUTHly0N)
EpheroLib (https://www.curseforge.com/projects/885449)
Puzzle (https://modrinth.com/mod/3IuO68q1)
Entity Model Features (https://modrinth.com/mod/4I1XuqiY)
Xaero's World Map (https://modrinth.com/mod/NcUtCpym)
MidnightLib (https://modrinth.com/mod/codAaoxh)
Presence Footsteps (https://modrinth.com/mod/rcTfTZr3)
Fabric API (https://modrinth.com/mod/P7dR8mSH)
Bounced (https://modrinth.com/mod/2mlOZXZr)
Sodium (https://modrinth.com/mod/AANobbMI)
Real Arrow Tip (https://modrinth.com/mod/vgVfk0m2)
Better Mount HUD (https://modrinth.com/mod/kqJFAPU9)
Tweakeroo (https://www.curseforge.com/projects/297344)
Dynamic FPS (https://modrinth.com/mod/LQ3K71Q1)
Bedrodium (https://modrinth.com/mod/5roWs6VO)
Fabric API (https://www.curseforge.com/projects/306612)
TweakerMore (https://modrinth.com/mod/GBeCx05I)
I also have this issue though my mod list is much smaller.
Fabric
Fabric API
CustomPlayerModels
Carpet
Carpet extra
Just enough Items
Sodium
Nvidium
Cloth Config
Bobby (render distance unlocker)
And of course, Better End as well as BClibrary
Everything is updated to their most recent versions as of Jan/29/2024
Confirming this issue as well on Minecraft 1.20.4
Mods:
[✔] bclib-3.30.1
[✔] better-end-4.30.1
[✔] bobby-5.1.0+mc1.20.4
[✔] citresewn-1.1.4-dicedpixels+1.20.4
[✔] cloth-config-13.0.121-fabric
[✔] continuity-3.0.0-beta.4+1.20.2
[✔] do-a-barrel-roll-3.3.8+1.20.4-fabric
[✘] enhancedblockentities-0.9.1+1.20.2.jar (disabled)
[✔] entity_model_features_fabric_1.20.4-1.2.3
[✔] entity_texture_features_fabric_1.20.4-5.2.2
[✔] entityculling-fabric-1.6.3.1-mc1.20.4
[✔] EuphoriaPatcher-0.3.0-fabric
[✔] fabric-api-0.95.4+1.20.4
[✔] fabrishot-1.12.1
[✔] fox-nap-0.1.1-0-1.20.0
[✔] ImmediatelyFast-Fabric-1.2.8+1.20.4
[✔] indium-1.0.29-dev.4207c7e+mc1.20.4
[✔] indypets-1.3.2-1.20.1
[✔] iris-mc1.20.4-1.6.15
[✔] litematica-fabric-1.20.4-0.17.0
[✔] lithium-fabric-mc1.20.4-0.12.1
[✔] logical_zoom-0.0.22
[✔] malilib-fabric-1.20.4-0.18.0
[✔] modmenu-9.0.0
[✔] peek-fabric-1.20.4-1.1.12
[✔] record-vault-0.1.0-0-1.20.1
[✔] replaymod-1.20.4-2.6.14
[✔] shriekier-shriekers-0.1.0-1.20.1
[✔] sodium-fabric-0.5.7+mc1.20.3
[✔] sound-physics-remastered-fabric-1.20.4-1.3.1
[✔] starlight-1.1.3+fabric.f5dcd1a
[✔] worldedit-mod-7.3.0-beta-03-dist
[✔] yet-another-config-lib-fabric-3.3.2+1.20.4
So by adding some logger lines, I've identified the issue--it's looking for the crystals in the wrong locations:
Original message with wrong conclusions
Checking from (-1.0, -255.0, -3.0) to (-1.0, 255.0, -3.0)
Checking from (-1.0, -255.0, -3.0) to (-1.0, 255.0, -3.0)
Checking from (-1.0, -255.0, -3.0) to (-1.0, 255.0, -3.0)
Checking from (-1.0, -255.0, -3.0) to (-1.0, 255.0, -3.0)
(that is, it doesn't seem to be actually changing directions).
That would suggest an issue with BlockHelper.HORIZONTAL
but I really don't see how that could be the case.
update: this is wrong--it's only checking one direction before returning (L94). The reason it shows up four times is that it runs the check any time I place down a crystal.
[08:40:30] [Server thread/INFO]: Portal is at (0.5, 73.5, 1.5)
[08:40:30] [Server thread/INFO]: Looking to the north
[08:40:30] [Server thread/INFO]: Checking from (0.5, 73.5, -2.5) to (0.5, 328.5, -2.5)
[08:40:30] [Server thread/INFO]: Found 0 crystals
Yep, simply hard-coding:
List<EndCrystal> crystals = Lists.newArrayList();
Vec3[] coords = new Vec3[]{
new Vec3(0, 0, 4),
new Vec3(0, 0, -4),
new Vec3(4, 0, 0),
new Vec3(-4, 0, 0)
};
for (Vec3 coord : coords) {
LOGGER.info("Checking from {} to {}",
coord,
coord.relative(Direction.UP, 255)
);
List<EndCrystal> crystalList = level.getEntitiesOfClass(
EndCrystal.class,
new AABB(
coord,
coord.relative(Direction.UP, 255)
)
);
int count = crystalList.size();
LOGGER.info("Found {} crystals", count);
for (int n = 0; n < count; n++) {
EndCrystal crystal = crystalList.get(n);
if (!level.getBlockState(crystal.blockPosition().below()).is(Blocks.BEDROCK)) {
crystalList.remove(n);
count--;
n--;
}
}
fixed the issue:
[21:20:24] [Server thread/INFO]: Checking from (0.0, 0.0, 4.0) to (0.0, 255.0, 4.0)
[21:20:24] [Server thread/INFO]: Found 1 crystals
[21:20:24] [Server thread/INFO]: Checking from (0.0, 0.0, -4.0) to (0.0, 255.0, -4.0)
[21:20:24] [Server thread/INFO]: Found 0 crystals
[21:20:26] [Server thread/INFO]: Checking from (0.0, 0.0, 4.0) to (0.0, 255.0, 4.0)
[21:20:26] [Server thread/INFO]: Found 1 crystals
[21:20:26] [Server thread/INFO]: Checking from (0.0, 0.0, -4.0) to (0.0, 255.0, -4.0)
[21:20:26] [Server thread/INFO]: Found 0 crystals
[21:20:28] [Server thread/INFO]: Checking from (0.0, 0.0, 4.0) to (0.0, 255.0, 4.0)
[21:20:28] [Server thread/INFO]: Found 1 crystals
[21:20:28] [Server thread/INFO]: Checking from (0.0, 0.0, -4.0) to (0.0, 255.0, -4.0)
[21:20:28] [Server thread/INFO]: Found 1 crystals
[21:20:28] [Server thread/INFO]: Checking from (4.0, 0.0, 0.0) to (4.0, 255.0, 0.0)
[21:20:28] [Server thread/INFO]: Found 1 crystals
[21:20:28] [Server thread/INFO]: Checking from (-4.0, 0.0, 0.0) to (-4.0, 255.0, 0.0)
[21:20:28] [Server thread/INFO]: Found 0 crystals
[21:20:30] [Server thread/INFO]: Checking from (0.0, 0.0, 4.0) to (0.0, 255.0, 4.0)
[21:20:30] [Server thread/INFO]: Found 1 crystals
[21:20:30] [Server thread/INFO]: Checking from (0.0, 0.0, -4.0) to (0.0, 255.0, -4.0)
[21:20:30] [Server thread/INFO]: Found 1 crystals
[21:20:30] [Server thread/INFO]: Checking from (4.0, 0.0, 0.0) to (4.0, 255.0, 0.0)
[21:20:30] [Server thread/INFO]: Found 1 crystals
[21:20:30] [Server thread/INFO]: Checking from (-4.0, 0.0, 0.0) to (-4.0, 255.0, 0.0)
[21:20:30] [Server thread/INFO]: Found 1 crystals
and respawned the dragon. I'll open a PR for the fix in the coming days, time permitting, unless @quiqueck or another maintainer has a better fix in mind.