
26
1
Список изменений
Walkthrough - Slenderman Pages Spawning Fix
I have successfully implemented the missing page spawning logic and resolved the build issues that were preventing the plugin from being updated.
Changes Made
1. Implemented spawnPage() Method
In Arena.java, I implemented the spawnPage() method which was previously empty.
- Logic: It selects a random location from the arena's configuration, drops a
PAPERitem, sets it to glow, and ensures it never despawns. - Visuals: Added
Particle.ENCHANT(the correct name for 1.21) and custom naming for the dropped item (e.g., "Page 1"). - Safety: Added null-checks for the world to ensure it works correctly with separate worlds.
2. Integrated Spawning into Gameplay
Verified that pages are spawned at the correct times:
- Game Start: The first page spawns immediately when the game transitions to the
RUNNINGstate. - On Pickup: When a survivor picks up a page, the current item is removed, the counter increments, and the next page is automatically spawned.
3. Build System Resolution
Fixed compilation issues:
- Dependency Map: Ensured
slender-apiis correctly installed in the local repository soslender-plugincan find it. - 1.21 Compatibility: Fixed a compilation error where
Particle.ENCHANTMENT_TABLEwas not recognized (it was renamed toParticle.ENCHANTin Minecraft 1.21).
Verification Results
- Compilation: Successfully ran
mvn clean installon the entire project. Both API and Plugin are now updated and built into JAR files. - Game Logic: Confirmed the sequence of events (Start -> Spawn -> Pickup -> Spawn) is correctly defined in the code.
You can now use the latest slender-plugin-1.5.0.jar from the target/ directory of the slender-plugin module.
Файлы
slender-plugin-1.5.0.jar(375.03 KiB)
ОсновнойМетаданные
Канал релиза
Release
Номер версии
1.5.0
Загрузчики
BukkitPaperSpigot
Версии игры
1.16–1.16.5
Загрузок
2
Дата публикации
2 нед. назад
