Dragon Survival [Forge]

Dragon Survival [Forge]

685k Downloads

[1.19.2 Forge Bug]: saveAllAbilities

Fedricknun opened this issue · 25 comments

commented

■ Your Discord ID or other contacts

Federico4#0254

■ Dragon Survival version and Modpack version (if have)

DragonSurvival 1.5.47 - 1.19.2

■ Single game or server?

Local network (LAN, Hamachi, etc.)

■ Do you delete old configs before writing a bug report?

I always delete configs

■ Bug Description and Reproduce

#Whether to save passives skills when changing dragon type
saveAllAbilities = true [Not working lan trying with 4 people]

#Should the growth stage of a dragon be saved even when you change. Does not affect the saving progress of magic (use saveAllAbilities). The author does not approve of weredragons, but if you insist...
saveGrowthStage = true [Not working too even with patch fixes lan]

■ Expected behavior

SaveAllAbilities = Saving abilities after getting back as human.

saveGrowthStage = saving the size of the dragon after getting back as human.

■ Crash Report File and Logs

Nothing only fps drops but no crash.

commented

Thanks for your submission, can you elaborate on what happens when saveAllAbilities is turned on?

commented

I'm going to bed, I'll fix it tomorrow

commented

saveAllAbilities = Not working on single player and lan too losing all abilities after getting back as human even saveGrowthStage = going back all GrowthStage when switch to human.

commented

Saving growth is currently not implemented:

Seems to have moved here:

But did not work for me either (singeplayer)
(Saving abilities does work though)

Saved size might get overwritten by this though:

commented

Weird for me is not working Saving abilities?
and for Saving growth sad is not implemented.

commented

I haven't audited saveGrowthStage yet, but SaveAllAbilities has been fixed. If there are still problems, the repair is incomplete.

commented

maybe so

commented

Did you switch to human, leave the world and then join back?
NBT data for the dragon currently only gets saved if... you're a dragon

Meaning if you switch to human and leave the world it's gone
image

(On read you'd also need to read the ability and size entries even if you're not a dragon I guess)

commented

You create a lot of DragonStateHandlers
Most of them have size 0.0, seem to be empty / unused

image

There are two different DragonStateHandlers which interact with setSize e. g. though (and have an up-to-date value)
(All on Singeplayer)

commented

你创建了很多 DragonStateHandlers 其中大部分的大小为 0.0,似乎是空的/未使用的

图像

有两个不同的 DragonStateHandlers 与setSizeeg 交互(并且具有最新值) (全部在 Singeplayer 上)

Yes, #300 did emergency mitigations, but still need to continue to optimize

commented

This issue has been fixed, as for saveGrowthStage, it needs to be put on hold for a while, because there are other fixes in progress

commented

yes, that's the question

commented

You're attaching capabilities to mobs and Item Entities:
image

In Capabilities - attachCapabilities you should maybe check if event.getObject() returns a Player

commented

You also seem to create new DragonStateHandlers for entities in MagicHandler just to use the fields lastAfflicted (to get the player who afflicted a debuff I guess?) and lastPos

DragonUtils.getHandler gets called a lot and always returns a new DragonStateHandler (if it does not exist yet)

In DragonUtils it might be better to add this part to isDragon and isDragonType

if (!(entity instanceof Player)) {
	return false;
}

to avoid a getHandler call for entities that are not Players

commented

It has many calling sources
I can't make sure that changing all of them to if(has)+get will not cause new problems, so I use lazy loading to alleviate it temporarily.

commented

I'm also new to this project, so I'd better make major changes after I fully understand

commented

At least it used to return null instead of new
image

commented

Not sure what you mean with that, the warning is there because it never returns null

return entity != null ? DragonStateProvider.getCap(entity).orElse(new DragonStateHandler()) : new DragonStateHandler();

or do you mean how it was in a previous version?


Could maybe introduce a smaller state with just lastPos and lastAfflicted for entities which are not Players


DragonStateProvider.getCap(this).ifPresent(dragonStateHandler -> {

DragonStateProvider.getCap(this).ifPresent(dragonStateHandler -> {

DragonStateProvider.getCap(this).ifPresent(dragonStateHandler -> {

DragonStateProvider.getCap(this).ifPresent(dragonStateHandler -> {

DragonStateProvider.getCap(this).ifPresent(dragonStateHandler -> {

You could check for players here first to avoid the call to the capability, since they are only relevant for Dragons

commented

I guess it used to return null, but for some reason, it has now become new, and I dare not go back directly, because I don't know why it was changed to this at the time.

commented

I can only do some fixes that I'm sure won't produce problems

commented

Not sure what you mean with that, the warning is there because it never returns null

return entity != null ? DragonStateProvider.getCap(entity).orElse(new DragonStateHandler()) : new DragonStateHandler();

or do you mean how it was in a previous version?

Could maybe introduce a smaller state with just lastPos and lastAfflicted for entities which are not Players

DragonStateProvider.getCap(this).ifPresent(dragonStateHandler -> {

DragonStateProvider.getCap(this).ifPresent(dragonStateHandler -> {

DragonStateProvider.getCap(this).ifPresent(dragonStateHandler -> {

DragonStateProvider.getCap(this).ifPresent(dragonStateHandler -> {

DragonStateProvider.getCap(this).ifPresent(dragonStateHandler -> {

You could check for players here first to avoid the call to the capability, since they are only relevant for Dragons

I will fix these first

commented

Thanks for your willingness to spend time on this

commented

DeepL to help if you don't understand Russian.
Для тех кто не понимает что происходит: автор этого багрепорта хотел устроить драму на моём сервере, связанную с каким-то рандомным разработчиком малоизвестного мода, чтобы привлечь к нему внимание. Он был забанен у меня на сервере за этот акт рекламы, но начал писать спам на других площадках, в том числе и тут.

image

Зачем вы удалили ваши замечательные сообщения? Давайте обсудим это, если вы не понимаете за что вас забанили.

  1. Любые публичные заявления о другом человеке без пруффов это клевета. Я ненавижу клевету. Вы опубликовали своё сообщение на нескольких серверах и не удосужились объяснить это. Только после того как вас забанили, вы связались по какой-то причине не со мной, а со случайными людьми на моём сервере.

image

  1. Ваши отношения с Stabx guns не имеет к нашему сообществу никакого отношения. Вы рандомный человек, который оставил рандомное заявление о другом рандомном человеке, которого даже нет на нашем сервере. Этого мода также нет на нашем сервере и мы без понятия о ком вы кричали. Другие пользователи проверили ваше заявление и это было правдой, но почему они должны сами искать доказательства ваших слов и беспокоиться об этом? Вот скриншот из сервера Stabx guns, в котором говорится об Анти-ЛГБТ. Dragon Survival и я не имеем в этому никакого отношения.

image

  1. Ваше сообщение больше похоже на черный пиар или культуру отмены. Мой сервер не место для такого дешевого развлечения. Stabx guns это маленький мод от маленького разработчика, до которого никому нет дела, но своими криками вы привлекаете ему аудиторию и рекламируете его. Это то чего вы хотели добиться? Если да, то ваш бан у меня заслуженный, а если нет, то вы просто глупец, но это простительно.

  2. Я проверил другие общие сервера на которых вы писали (вас везде забанили теперь?). Другие люди также сказали вам прекратить этот пустой спам.

image

  1. Какое отношение этот багрепорт имеет к той драме, которую вы пытаетесь сейчас создать? Вам нужно публичное внимание? Вы могли просто написать мне в личные сообщения с объяснениями (мои сообщения открыты).
commented

And yes I read all of it on your discord with a VPN the only method to see what happened, I apologize for all of it, Maybe i read wrong yesterday, but there was something about me hate Russia? If not I'm on medical recovery with some medicine making my brain feel unstable.

Thanks for the answer I wish there was another method to avoid all of this.

commented

ачем вы удалили ваши замечательные сообщения? Давайте обсудим это, если вы не понимаете за что вас забанили.
I Wanted to express better my msg of all of this stuff im not very good at english.

Ваши отношения с Stabx guns не имеет к нашему сообществу никакого отношения. Вы рандомный человек, который оставил рандомное заявление о другом рандомном человеке, которого даже нет на нашем сервере. Этого мода также нет на нашем сервере и мы без понятия о ком вы кричали. Другие пользователи проверили ваше заявление и это было правдой, но почему они должны сами искать доказательства ваших слов и беспокоиться об этом? Вот скриншот из сервера Stabx guns, в котором говорится об Анти-ЛГБТ. Dragon Survival и я не имеем в этому никакого отношения

Yes I know I was wrong about sending the text on your server with the name of the mod was only to get a lot of people to avoid the discord of that mod who are like me feel insulted.

Ваше сообщение больше похоже на черный пиар или культуру отмены. Мой сервер не место для такого дешевого развлечения. Stabx guns это маленький мод от маленького разработчика, до которого никому нет дела, но своими криками вы привлекаете ему аудиторию и рекламируете его. Это то чего вы хотели добиться? Если да, то ваш бан у меня заслуженный, а если нет, то вы просто глупец, но это простительно.

I Don't wanted To publish Stab Guns it was not my intention human's do sometimes mistake and yes mine is a real big one

Я проверил другие общие сервера на которых вы писали (вас везде забанили теперь?). Другие люди также сказали вам прекратить этот пустой спам.

No, the servers i just sent msg was only three where I explained the mistake of saying the mod name i had really good intention, Not banned Some servers U think I spammed was only to give some bugs report and fixes of course not these three ones.

Какое отношение этот багрепорт имеет к той драме, которую вы пытаетесь сейчас создать? Вам нужно публичное внимание? Вы могли просто написать мне в личные сообщения с объяснениями (мои сообщения открыты).

I Can't send msg to u on discord if I am not on the same server I was trying to contact u maybe u setting for chat exclusive only for friends and server.