-
-
Notifications
You must be signed in to change notification settings - Fork 2.5k
Add methods for CreakingHeart #12095
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
- allow manage creaking attached - helper method for spawn creaking
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
some grammar in the jd needs to be fixed
...r/patches/sources/net/minecraft/world/level/block/entity/CreakingHeartBlockEntity.java.patch
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You should also handle unplaced block state properly
...r/patches/sources/net/minecraft/world/level/block/entity/CreakingHeartBlockEntity.java.patch
Outdated
Show resolved
Hide resolved
...r/patches/sources/net/minecraft/world/level/block/entity/CreakingHeartBlockEntity.java.patch
Outdated
Show resolved
Hide resolved
...r/patches/sources/net/minecraft/world/level/block/entity/CreakingHeartBlockEntity.java.patch
Outdated
Show resolved
Hide resolved
tag.putUUID("creaking", this.creakingInfo.map(Entity::getUUID, uuid -> (UUID)uuid)); | ||
} | ||
- } | ||
+ tag.putInt(PAPER_CREAKING_MAX_DISTANCE_TAG, this.distanceCreakingTooFar); // Paper - Custom max distance for Creaking |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A bit rough here if we wanna write.
We should keep the int but we'd ideal also want a way for the developer to fall back to vanillas value even if it changes across versions.
The current implementation would lock every creaking heart at the current vanilla value.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe just a
if (this.distanceCreakingTooFar != DISTANCE_CREAKING_TOO_FAR) tag.putInt(PAPER_CREAKING_MAX_DISTANCE_TAG, this.distanceCreakingTooFar); // Paper - Custom max distance for Creaking
?
* | ||
* @return the max distance | ||
*/ | ||
int getMaxDistanceForCreaking(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I do not like this method name.
Especially when we also might add API for the creaking spawn distance.
getProtectorSurvivalRange
setProtectorSurvivalRange
getProtectorSpawnRange
setProtectorSpawnRange
might work, more peoples input tho pls.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the lasts ones not like just becauuse that value its not for spawn.. its for limit the max distance where a creaking can "live"
maybe the first can work.. but not sure..
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The last ones were for the new API regarding the replacement for scaling, sorry xD
But yea, more people time chime in.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
getCreakingRemovalDistance?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
getCreakingRemovalDistance?
not sounds bad... maybe can use that then (based in not another comments xd)
paper-server/src/main/java/org/bukkit/craftbukkit/block/CraftCreakingHeart.java
Show resolved
Hide resolved
paper-server/src/main/java/org/bukkit/craftbukkit/block/CraftCreakingHeart.java
Show resolved
Hide resolved
...r/patches/sources/net/minecraft/world/level/block/entity/CreakingHeartBlockEntity.java.patch
Outdated
Show resolved
Hide resolved
...r/patches/sources/net/minecraft/world/level/block/entity/CreakingHeartBlockEntity.java.patch
Outdated
Show resolved
Hide resolved
There is a lot of stuff depending on the despawn distance being 34. e.g. Creaking roaming distance and follow distance, redstone output, player spawning range. When setting the despawn distance to anything lower it will cause semi weird behaivour as the creaking will willingly move outside its despawn distance and etc. So i think we should either scale that stuff, Math.min it or add extra api for it. though leaving it half broken like this feels bad |
ok for that then im wait for some more feedback about what do...
|
Draft because need test if call the correct things...