renamed GiveParticleEmitter to GiveEmitterTool

This commit is contained in:
2024-11-21 16:40:54 +01:00
parent fbed935b70
commit 6c0b46f1e6
3 changed files with 5 additions and 12 deletions
+1 -1
View File
@@ -3,7 +3,7 @@
BDE_ParticleSys is a highly customizable **server-side** particle system that uses `Block Display Entities` (BDEs) as particles. It is meant to be used as a library for other mods, but can be used as a standalone mod too. BDE_ParticleSys is a highly customizable **server-side** particle system that uses `Block Display Entities` (BDEs) as particles. It is meant to be used as a library for other mods, but can be used as a standalone mod too.
<!-- change GiveParticleEmitter to GiveEmitterTool --> <!-- change GiveParticleEmitter to GiveEmitterTool -->
If BDE_ParticleSys is used as a standalone mod, you will only be able to use it with the custom in-game commands `/GiveParticleEmitter` and `/ManageEmitters`. Any particles made with those commands are **temporary** and get **removed** once the server shuts down. If BDE_ParticleSys is used as a standalone mod, you will only be able to use it with the custom in-game commands `/GiveEmitterTool` and `/ManageEmitters`. Any particles made with those commands are **temporary** and get **removed** once the server shuts down.
# Open-source - Copyright # Open-source - Copyright
@@ -1,6 +1,6 @@
package com.bytedice.bde_particles package com.bytedice.bde_particles
import com.bytedice.bde_particles.commands.GiveParticleEmitter import com.bytedice.bde_particles.commands.GiveEmitterTool
import com.bytedice.bde_particles.commands.ManageEmitters import com.bytedice.bde_particles.commands.ManageEmitters
import com.bytedice.bde_particles.items.getToolDetails import com.bytedice.bde_particles.items.getToolDetails
import com.bytedice.bde_particles.math.raycastFromPlayer import com.bytedice.bde_particles.math.raycastFromPlayer
@@ -29,13 +29,6 @@ import net.minecraft.world.World
var ALL_PARTICLE_EMITTERS: Array<ParticleEmitter> = emptyArray() var ALL_PARTICLE_EMITTERS: Array<ParticleEmitter> = emptyArray()
data class Config(
val cooldown: Int = 1
)
val cfg = Config()
class Bde_particles : ModInitializer { class Bde_particles : ModInitializer {
@@ -49,7 +42,7 @@ class Bde_particles : ModInitializer {
} }
CommandRegistrationCallback.EVENT.register { dispatcher, registryAccess, _ -> CommandRegistrationCallback.EVENT.register { dispatcher, registryAccess, _ ->
GiveParticleEmitter.register(dispatcher, registryAccess) GiveEmitterTool.register(dispatcher, registryAccess)
ManageEmitters .register(dispatcher) ManageEmitters .register(dispatcher)
} }
@@ -16,9 +16,9 @@ import net.minecraft.text.TextColor
import java.awt.Color import java.awt.Color
import java.util.concurrent.CompletableFuture import java.util.concurrent.CompletableFuture
object GiveParticleEmitter { object GiveEmitterTool {
fun register(dispatcher: CommandDispatcher<ServerCommandSource>, registryAccess: CommandRegistryAccess) { fun register(dispatcher: CommandDispatcher<ServerCommandSource>, registryAccess: CommandRegistryAccess) {
val command = CommandManager.literal("GiveParticleEmitter") val command = CommandManager.literal("GiveEmitterTool")
.requires { source -> source.hasPermissionLevel(4) } .requires { source -> source.hasPermissionLevel(4) }
val allEmitterIds = emitterIdRegister.keys val allEmitterIds = emitterIdRegister.keys