mirror of
https://gitlab.bixilon.de/bixilon/minosoft.git
synced 2025-09-18 11:54:59 -04:00
particles: composter
, happy_villager
, mycelium
This commit is contained in:
parent
c81c7d7fd3
commit
1226b71e08
@ -33,7 +33,10 @@ import de.bixilon.minosoft.gui.rendering.particle.types.render.texture.simple.sl
|
||||
import de.bixilon.minosoft.gui.rendering.particle.types.render.texture.simple.spell.AmbientEntityEffectParticle
|
||||
import de.bixilon.minosoft.gui.rendering.particle.types.render.texture.simple.spell.EntityEffectParticle
|
||||
import de.bixilon.minosoft.gui.rendering.particle.types.render.texture.simple.spell.WitchParticle
|
||||
import de.bixilon.minosoft.gui.rendering.particle.types.render.texture.simple.suspend.ComposterParticle
|
||||
import de.bixilon.minosoft.gui.rendering.particle.types.render.texture.simple.suspend.DolphinParticle
|
||||
import de.bixilon.minosoft.gui.rendering.particle.types.render.texture.simple.suspend.HappyVillagerParticle
|
||||
import de.bixilon.minosoft.gui.rendering.particle.types.render.texture.simple.suspend.MyceliumParticle
|
||||
|
||||
object DefaultParticleFactory : DefaultFactory<ParticleFactory<out Particle>>(
|
||||
ExplosionEmitterParticle,
|
||||
@ -56,4 +59,7 @@ object DefaultParticleFactory : DefaultFactory<ParticleFactory<out Particle>>(
|
||||
SoulFireFlameParticle,
|
||||
CloudParticle,
|
||||
SneezeParticle,
|
||||
ComposterParticle,
|
||||
HappyVillagerParticle,
|
||||
MyceliumParticle,
|
||||
)
|
||||
|
@ -0,0 +1,38 @@
|
||||
/*
|
||||
* Minosoft
|
||||
* Copyright (C) 2021 Moritz Zwerger
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*
|
||||
* This software is not affiliated with Mojang AB, the original developer of Minecraft.
|
||||
*/
|
||||
|
||||
package de.bixilon.minosoft.gui.rendering.particle.types.render.texture.simple.suspend
|
||||
|
||||
import de.bixilon.minosoft.data.mappings.ResourceLocation
|
||||
import de.bixilon.minosoft.data.mappings.particle.data.ParticleData
|
||||
import de.bixilon.minosoft.data.text.ChatColors
|
||||
import de.bixilon.minosoft.gui.rendering.particle.ParticleFactory
|
||||
import de.bixilon.minosoft.protocol.network.connection.PlayConnection
|
||||
import de.bixilon.minosoft.util.KUtil.asResourceLocation
|
||||
import glm_.vec3.Vec3d
|
||||
|
||||
class ComposterParticle(connection: PlayConnection, position: Vec3d, velocity: Vec3d, data: ParticleData? = null) : SuspendParticle(connection, position, velocity, data) {
|
||||
|
||||
init {
|
||||
color = ChatColors.WHITE
|
||||
maxAge = (3 + random.nextInt(5))
|
||||
}
|
||||
|
||||
companion object : ParticleFactory<ComposterParticle> {
|
||||
override val RESOURCE_LOCATION: ResourceLocation = "minecraft:composter".asResourceLocation()
|
||||
|
||||
override fun build(connection: PlayConnection, position: Vec3d, velocity: Vec3d, data: ParticleData): ComposterParticle {
|
||||
return ComposterParticle(connection, position, velocity, data)
|
||||
}
|
||||
}
|
||||
}
|
@ -0,0 +1,37 @@
|
||||
/*
|
||||
* Minosoft
|
||||
* Copyright (C) 2021 Moritz Zwerger
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*
|
||||
* This software is not affiliated with Mojang AB, the original developer of Minecraft.
|
||||
*/
|
||||
|
||||
package de.bixilon.minosoft.gui.rendering.particle.types.render.texture.simple.suspend
|
||||
|
||||
import de.bixilon.minosoft.data.mappings.ResourceLocation
|
||||
import de.bixilon.minosoft.data.mappings.particle.data.ParticleData
|
||||
import de.bixilon.minosoft.data.text.ChatColors
|
||||
import de.bixilon.minosoft.gui.rendering.particle.ParticleFactory
|
||||
import de.bixilon.minosoft.protocol.network.connection.PlayConnection
|
||||
import de.bixilon.minosoft.util.KUtil.asResourceLocation
|
||||
import glm_.vec3.Vec3d
|
||||
|
||||
class HappyVillagerParticle(connection: PlayConnection, position: Vec3d, velocity: Vec3d, data: ParticleData? = null) : SuspendParticle(connection, position, velocity, data) {
|
||||
|
||||
init {
|
||||
color = ChatColors.WHITE
|
||||
}
|
||||
|
||||
companion object : ParticleFactory<HappyVillagerParticle> {
|
||||
override val RESOURCE_LOCATION: ResourceLocation = "minecraft:happy_villager".asResourceLocation()
|
||||
|
||||
override fun build(connection: PlayConnection, position: Vec3d, velocity: Vec3d, data: ParticleData): HappyVillagerParticle {
|
||||
return HappyVillagerParticle(connection, position, velocity, data)
|
||||
}
|
||||
}
|
||||
}
|
@ -0,0 +1,32 @@
|
||||
/*
|
||||
* Minosoft
|
||||
* Copyright (C) 2021 Moritz Zwerger
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*
|
||||
* This software is not affiliated with Mojang AB, the original developer of Minecraft.
|
||||
*/
|
||||
|
||||
package de.bixilon.minosoft.gui.rendering.particle.types.render.texture.simple.suspend
|
||||
|
||||
import de.bixilon.minosoft.data.mappings.ResourceLocation
|
||||
import de.bixilon.minosoft.data.mappings.particle.data.ParticleData
|
||||
import de.bixilon.minosoft.gui.rendering.particle.ParticleFactory
|
||||
import de.bixilon.minosoft.protocol.network.connection.PlayConnection
|
||||
import de.bixilon.minosoft.util.KUtil.asResourceLocation
|
||||
import glm_.vec3.Vec3d
|
||||
|
||||
class MyceliumParticle(connection: PlayConnection, position: Vec3d, velocity: Vec3d, data: ParticleData? = null) : SuspendParticle(connection, position, velocity, data) {
|
||||
|
||||
companion object : ParticleFactory<MyceliumParticle> {
|
||||
override val RESOURCE_LOCATION: ResourceLocation = "minecraft:mycelium".asResourceLocation()
|
||||
|
||||
override fun build(connection: PlayConnection, position: Vec3d, velocity: Vec3d, data: ParticleData): MyceliumParticle {
|
||||
return MyceliumParticle(connection, position, velocity, data)
|
||||
}
|
||||
}
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user