Skip to content
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

Folia #433

Merged
merged 53 commits into from
Oct 11, 2024
Merged

Folia #433

merged 53 commits into from
Oct 11, 2024

Conversation

CJCrafter
Copy link
Member

@CJCrafter CJCrafter commented Jun 12, 2024

Folia takes away Minecraft's dependence on a single thread. WeaponMechanics has it's own entity system for projectiles, and that system will need to be recoded to support Folia's regions. The expected region case will look like this (a more technical writeup is also available).

  • Use FoliaLib to schedule tasks
    • MechanicsCore
    • WeaponMechanics
      • Compatibility
      • Commands
      • Databases
      • Weapon Handlers
      • Explosions
  • Separate projectile ticker into a regionized projectile ticker, following the rules of Folia
  • Let Mechanics be scheduled independently, per-target
  • Contribute to repositories that WeaponMechanics depends on for Folia Support, if needed
    • XSeries?
    • bStats?
    • SpigotUpdateChecker

Testing tools:

Funded by justlead. Check out their server, "RPM ROLEPLAY". Join their discord and their MC server at mc.rpmserver.com

@CJCrafter
Copy link
Member Author

First contribution... Needed for our task chain classes to handle plugin reloading, weapon reloading, firearm actions, and a couple oddities: TechnicallyCoded/FoliaLib#16

@CJCrafter
Copy link
Member Author

Second contribution... Not exactly needed, but will be used for "fail fast" logic in projectile ticking. Will also be used by Mechanics to ensure we are acting only on entities and locations we're allowed to act on: TechnicallyCoded/FoliaLib#18

@CJCrafter
Copy link
Member Author

I got tired of existing schedule compatibility implementations not having the features of a proper scheduler, so I implemented our own: https://github.com/CJCrafter/FoliaScheduler

# Conflicts:
#	WeaponMechanics/src/main/java/me/deecaad/weaponmechanics/wrappers/EntityWrapper.java
#	gradle.properties
# Conflicts:
#	MechanicsCore/build.gradle.kts
#	WeaponMechanics/src/main/java/me/deecaad/weaponmechanics/listeners/trigger/TriggerPlayerListeners.java
#	WeaponMechanics/src/main/java/me/deecaad/weaponmechanics/weapon/damage/BlockDamageData.java
#	WeaponMechanics/src/main/java/me/deecaad/weaponmechanics/weapon/damage/DamageModifier.java
#	WeaponMechanics/src/main/java/me/deecaad/weaponmechanics/weapon/explode/Explosion.java
#	buildSrc/src/main/kotlin/Dependencies.kt
# Conflicts:
#	WeaponMechanics/src/main/java/me/deecaad/weaponmechanics/WeaponMechanics.java
#	buildSrc/src/main/kotlin/Dependencies.kt
@CJCrafter CJCrafter marked this pull request as ready for review September 24, 2024 02:53
@CJCrafter CJCrafter requested a review from DeeCaaD as a code owner September 24, 2024 02:53
@CJCrafter CJCrafter merged commit 0cd878d into master Oct 11, 2024
1 check passed
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.

1 participant