add cave dust particle
calculate position inside blocks changed menu changed modid to cavedust change some default values fix bug where user got softlocked in the particle cycle in multiplayer
This commit is contained in:
@@ -1,9 +1,8 @@
|
|||||||
package net.lizistired.cavedust;
|
package net.lizistired.cavedust;
|
||||||
|
|
||||||
//minecraft imports
|
//minecraft imports
|
||||||
import net.minecraft.block.Blocks;
|
import net.fabricmc.fabric.api.client.particle.v1.ParticleFactoryRegistry;
|
||||||
import net.minecraft.client.MinecraftClient;
|
import net.minecraft.client.MinecraftClient;
|
||||||
import net.minecraft.particle.ParticleTypes;
|
|
||||||
import net.minecraft.registry.Registries;
|
import net.minecraft.registry.Registries;
|
||||||
import net.minecraft.text.Text;
|
import net.minecraft.text.Text;
|
||||||
import net.minecraft.util.math.BlockPos;
|
import net.minecraft.util.math.BlockPos;
|
||||||
@@ -40,10 +39,12 @@ public class CaveDust implements ClientModInitializer {
|
|||||||
return config;
|
return config;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static int WHITE_ASH_ID = Registries.PARTICLE_TYPE.getRawId(ParticleTypes.WHITE_ASH);
|
public static int WHITE_ASH_ID = Registries.PARTICLE_TYPE.getRawId(CaveDustServer.CAVE_DUST);
|
||||||
public static int PARTICLE_AMOUNT = 0;
|
public static int PARTICLE_AMOUNT = 0;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onInitializeClient() {
|
public void onInitializeClient() {
|
||||||
//config path and loading
|
//config path and loading
|
||||||
@@ -51,6 +52,7 @@ public class CaveDust implements ClientModInitializer {
|
|||||||
config = new CaveDustConfig(CaveDustFolder.getParent().resolve("cavedust.json"), this);
|
config = new CaveDustConfig(CaveDustFolder.getParent().resolve("cavedust.json"), this);
|
||||||
config.load();
|
config.load();
|
||||||
registerKeyBindings();
|
registerKeyBindings();
|
||||||
|
ParticleFactoryRegistry.getInstance().register(CaveDustServer.CAVE_DUST, CaveDustParticleFactory.Factory::new);
|
||||||
|
|
||||||
//register end client tick to create cave dust function, using end client tick for async
|
//register end client tick to create cave dust function, using end client tick for async
|
||||||
ClientTickEvents.END_CLIENT_TICK.register(this::createCaveDust);
|
ClientTickEvents.END_CLIENT_TICK.register(this::createCaveDust);
|
||||||
@@ -78,20 +80,23 @@ public class CaveDust implements ClientModInitializer {
|
|||||||
|
|
||||||
for (int i = 0; i < PARTICLE_AMOUNT; i++) {
|
for (int i = 0; i < PARTICLE_AMOUNT; i++) {
|
||||||
try {
|
try {
|
||||||
int x = (int) (client.player.getPos().getX() + (int) generateRandomDouble(config.getDimensionsX() * -1, config.getDimensionsX()));
|
int x = (int) (client.player.getPos().getX() + (int) generateRandomDouble(config.getDimensionWidth() *-1, config.getDimensionWidth()));
|
||||||
int y = (int) (client.player.getPos().getY() + (int) generateRandomDouble(config.getDimensionsY() * -1, config.getDimensionsY()));
|
int y = (int) (client.player.getEyePos().getY() + (int) generateRandomDouble(config.getDimensionHeight() *-1, config.getDimensionHeight()));
|
||||||
int z = (int) (client.player.getPos().getZ() + (int) generateRandomDouble(config.getDimensionsZ() * -1, config.getDimensionsZ()));
|
int z = (int) (client.player.getPos().getZ() + (int) generateRandomDouble(config.getDimensionWidth() *-1, config.getDimensionWidth()));
|
||||||
|
double miniX = (x + Math.random());
|
||||||
|
double miniY = (y + Math.random());
|
||||||
|
double miniZ = (z + Math.random());
|
||||||
BlockPos particlePos = new BlockPos(x, y, z);
|
BlockPos particlePos = new BlockPos(x, y, z);
|
||||||
|
|
||||||
if (shouldParticlesSpawn(client, config, particlePos)) {
|
if (shouldParticlesSpawn(client, config, particlePos)) {
|
||||||
if (client.world.getBlockState(particlePos).isAir()) {
|
if (client.world.getBlockState(particlePos).isAir()) {
|
||||||
world.addParticle(config.getParticle(), x, y, z, config.getVelocityRandomnessRandom(), config.getVelocityRandomnessRandom(), config.getVelocityRandomnessRandom());
|
world.addParticle(config.getParticle(), miniX, miniY, miniZ, config.getVelocityRandomnessRandom() * 0.01, config.getVelocityRandomnessRandom() * 0.01, config.getVelocityRandomnessRandom() * 0.01);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
catch (NullPointerException e) {
|
catch (NullPointerException e) {
|
||||||
LOGGER.error(String.valueOf(e));
|
LOGGER.error(String.valueOf(e));
|
||||||
getConfig().setParticleID(WHITE_ASH_ID);
|
//getConfig().setParticleID(WHITE_ASH_ID);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -16,10 +16,9 @@ public class CaveDustConfig extends JsonFile {
|
|||||||
private transient final net.lizistired.cavedust.CaveDust CaveDust;
|
private transient final net.lizistired.cavedust.CaveDust CaveDust;
|
||||||
|
|
||||||
|
|
||||||
private int dimensionX = 5;
|
private int width = 10;
|
||||||
private int dimensionY = 5;
|
private int height = 10;
|
||||||
private int dimensionZ = 5;
|
private int velocityRandomness = 0;
|
||||||
private int velocityRandomness = 1;
|
|
||||||
|
|
||||||
private boolean caveDustEnabled = true;
|
private boolean caveDustEnabled = true;
|
||||||
private boolean seaLevelCheck = true;
|
private boolean seaLevelCheck = true;
|
||||||
@@ -37,40 +36,28 @@ public class CaveDustConfig extends JsonFile {
|
|||||||
this.CaveDust = caveDust;
|
this.CaveDust = caveDust;
|
||||||
}
|
}
|
||||||
|
|
||||||
public float setDimensionsX(float size){
|
public float setDimensionWidth(float size){
|
||||||
if (this.dimensionX != size) {
|
if (this.width != size) {
|
||||||
this.dimensionX = (int)size;
|
this.width = (int)size;
|
||||||
save();
|
save();
|
||||||
}
|
}
|
||||||
return getDimensionsX();
|
return getDimensionWidth();
|
||||||
}
|
}
|
||||||
|
|
||||||
public float setDimensionsY(float size){
|
public float setDimensionHeight(float size){
|
||||||
if (this.dimensionY != size) {
|
if (this.height != size) {
|
||||||
this.dimensionY = (int)size;
|
this.height = (int)size;
|
||||||
save();
|
save();
|
||||||
}
|
}
|
||||||
return getDimensionsY();
|
return getDimensionHeight();
|
||||||
}
|
}
|
||||||
|
|
||||||
public float setDimensionsZ(float size){
|
public float getDimensionWidth(){
|
||||||
if (this.dimensionZ != size) {
|
return width;
|
||||||
this.dimensionZ = (int)size;
|
|
||||||
save();
|
|
||||||
}
|
|
||||||
return getDimensionsZ();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public float getDimensionsX(){
|
public float getDimensionHeight(){
|
||||||
return dimensionX;
|
return height;
|
||||||
}
|
|
||||||
|
|
||||||
public float getDimensionsY(){
|
|
||||||
return dimensionY;
|
|
||||||
}
|
|
||||||
|
|
||||||
public float getDimensionsZ(){
|
|
||||||
return dimensionZ;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public float setUpperLimit(float upperLimit){
|
public float setUpperLimit(float upperLimit){
|
||||||
@@ -145,10 +132,11 @@ public class CaveDustConfig extends JsonFile {
|
|||||||
try {
|
try {
|
||||||
return (ParticleEffect) Registries.PARTICLE_TYPE.get(new Identifier(Registries.PARTICLE_TYPE.getEntry(getParticleID()).get().getKey().get().getValue().toString().toLowerCase()));
|
return (ParticleEffect) Registries.PARTICLE_TYPE.get(new Identifier(Registries.PARTICLE_TYPE.getEntry(getParticleID()).get().getKey().get().getValue().toString().toLowerCase()));
|
||||||
} catch (ClassCastException e) {
|
} catch (ClassCastException e) {
|
||||||
MinecraftClient.getInstance().player.sendMessage(Text.literal("Issue loading particle, defaulting to white ash particle!"), false);
|
MinecraftClient.getInstance().player.sendMessage(Text.translatable("debug.cavedust.particleerror"), true);
|
||||||
setParticleID(WHITE_ASH_ID);
|
LOGGER.error("Cannot spawn particle, check config.");
|
||||||
|
iterateParticle();
|
||||||
save();
|
save();
|
||||||
return ParticleTypes.WHITE_ASH;
|
return getParticle();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -210,15 +198,15 @@ public class CaveDustConfig extends JsonFile {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public void resetConfig(){
|
public void resetConfig(){
|
||||||
dimensionX = 5;
|
width = 10;
|
||||||
dimensionY = 5;
|
height = 10;
|
||||||
dimensionZ = 5;
|
|
||||||
|
|
||||||
upperLimit = 64;
|
upperLimit = 64;
|
||||||
lowerLimit = -64;
|
lowerLimit = -64;
|
||||||
|
|
||||||
particleMultiplier = 1;
|
particleMultiplier = 1;
|
||||||
particleMultiplierMultiplier = 10;
|
particleMultiplierMultiplier = 10;
|
||||||
|
velocityRandomness = 0;
|
||||||
|
|
||||||
seaLevelCheck = true;
|
seaLevelCheck = true;
|
||||||
caveDustEnabled = true;
|
caveDustEnabled = true;
|
||||||
|
|||||||
@@ -0,0 +1,54 @@
|
|||||||
|
package net.lizistired.cavedust;
|
||||||
|
|
||||||
|
import net.fabricmc.api.EnvType;
|
||||||
|
import net.fabricmc.api.Environment;
|
||||||
|
import net.minecraft.client.particle.*;
|
||||||
|
import net.minecraft.client.world.ClientWorld;
|
||||||
|
import net.minecraft.particle.DefaultParticleType;
|
||||||
|
|
||||||
|
public class CaveDustParticleFactory extends SpriteBillboardParticle {
|
||||||
|
private final SpriteProvider spriteProvider;
|
||||||
|
CaveDustParticleFactory(ClientWorld clientWorld, double x, double y, double z, double velocityX, double velocityY, double velocityZ, SpriteProvider spriteProvider) {
|
||||||
|
super(clientWorld, x, y, z);
|
||||||
|
this.spriteProvider = spriteProvider; //Sets the sprite provider from above to the sprite provider in the constructor method
|
||||||
|
this.maxAge = 200; //20 ticks = 1 second
|
||||||
|
this.scale = 0.1f;
|
||||||
|
this.velocityX = velocityX; //The velX from the constructor parameters
|
||||||
|
this.velocityY = -0.007f; //Allows the particle to slowly fall
|
||||||
|
this.velocityZ = velocityZ;
|
||||||
|
this.x = x; //The x from the constructor parameters
|
||||||
|
this.y = y;
|
||||||
|
this.z = z;
|
||||||
|
this.collidesWithWorld = true;
|
||||||
|
this.alpha = 1.0f; //Setting the alpha to 1.0f means there will be no opacity change until the alpha value is changed
|
||||||
|
this.setSpriteForAge(spriteProvider); //Required
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void tick() {
|
||||||
|
super.tick();
|
||||||
|
if(this.alpha < 0.0f){
|
||||||
|
this.markDead();
|
||||||
|
}
|
||||||
|
this.alpha -= 0.005f;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public ParticleTextureSheet getType() {
|
||||||
|
return ParticleTextureSheet.PARTICLE_SHEET_TRANSLUCENT;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Environment(EnvType.CLIENT)
|
||||||
|
public static class Factory implements ParticleFactory<DefaultParticleType> {
|
||||||
|
private final SpriteProvider spriteProvider;
|
||||||
|
|
||||||
|
public Factory(SpriteProvider spriteProvider) {
|
||||||
|
this.spriteProvider = spriteProvider;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public Particle createParticle(DefaultParticleType type, ClientWorld world, double x, double y, double z, double velocityX, double velocityY, double velocityZ) {
|
||||||
|
return new CaveDustParticleFactory(world, x, y, z, velocityX, velocityY, velocityZ, this.spriteProvider);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
19
src/main/java/net/lizistired/cavedust/CaveDustServer.java
Normal file
19
src/main/java/net/lizistired/cavedust/CaveDustServer.java
Normal file
@@ -0,0 +1,19 @@
|
|||||||
|
package net.lizistired.cavedust;
|
||||||
|
|
||||||
|
import net.fabricmc.api.ModInitializer;
|
||||||
|
import net.fabricmc.fabric.api.particle.v1.FabricParticleTypes;
|
||||||
|
import net.minecraft.particle.DefaultParticleType;
|
||||||
|
import net.minecraft.registry.Registries;
|
||||||
|
import net.minecraft.registry.Registry;
|
||||||
|
import net.minecraft.util.Identifier;
|
||||||
|
|
||||||
|
public class CaveDustServer implements ModInitializer {
|
||||||
|
public static final DefaultParticleType CAVE_DUST = FabricParticleTypes.simple();
|
||||||
|
/**
|
||||||
|
* Runs the mod initializer.
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public void onInitialize() {
|
||||||
|
Registry.register(Registries.PARTICLE_TYPE, new Identifier("cavedust", "cave_dust"), CAVE_DUST);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -5,12 +5,12 @@ import com.minelittlepony.common.client.gui.element.*;
|
|||||||
import net.lizistired.cavedust.utils.TranslatableTextHelper;
|
import net.lizistired.cavedust.utils.TranslatableTextHelper;
|
||||||
import net.minecraft.client.gui.DrawContext;
|
import net.minecraft.client.gui.DrawContext;
|
||||||
import net.minecraft.client.gui.screen.Screen;
|
import net.minecraft.client.gui.screen.Screen;
|
||||||
import net.minecraft.client.util.math.MatrixStack;
|
|
||||||
import net.minecraft.particle.ParticleEffect;
|
|
||||||
import net.minecraft.registry.Registries;
|
import net.minecraft.registry.Registries;
|
||||||
import net.minecraft.text.Text;
|
import net.minecraft.text.Text;
|
||||||
import org.jetbrains.annotations.Nullable;
|
import org.jetbrains.annotations.Nullable;
|
||||||
|
|
||||||
|
import java.util.NoSuchElementException;
|
||||||
|
|
||||||
public class ModMenuConfigScreen extends GameGui {
|
public class ModMenuConfigScreen extends GameGui {
|
||||||
public ModMenuConfigScreen(@Nullable Screen parent) {
|
public ModMenuConfigScreen(@Nullable Screen parent) {
|
||||||
super(Text.translatable("menu.cavedust.title"), parent);
|
super(Text.translatable("menu.cavedust.title"), parent);
|
||||||
@@ -73,20 +73,15 @@ public class ModMenuConfigScreen extends GameGui {
|
|||||||
})).getStyle().setText("Particle: " + (getNameOfParticle()))
|
})).getStyle().setText("Particle: " + (getNameOfParticle()))
|
||||||
.setTooltip(Text.translatable("menu.cavedust.particle.tooltip"));
|
.setTooltip(Text.translatable("menu.cavedust.particle.tooltip"));
|
||||||
|
|
||||||
addButton(new Slider(left += 220, row -= 96, 1, 50, config.getDimensionsX()))
|
addButton(new Slider(left += 220, row -= 96, 1, 50, config.getDimensionWidth()))
|
||||||
.onChange(config::setDimensionsX)
|
.onChange(config::setDimensionWidth)
|
||||||
.setTextFormat(transText::formatMaxX)
|
.setTextFormat(transText::formatMaxWidth)
|
||||||
.getStyle().setTooltip(Text.translatable("menu.cavedust.X.tooltip"));
|
.getStyle().setTooltip(Text.translatable("menu.cavedust.width.tooltip"));
|
||||||
|
|
||||||
addButton(new Slider(left, row += 24, 1, 50, config.getDimensionsY()))
|
addButton(new Slider(left, row += 24, 1, 50, config.getDimensionHeight()))
|
||||||
.onChange(config::setDimensionsY)
|
.onChange(config::setDimensionHeight)
|
||||||
.setTextFormat(transText::formatMaxY)
|
.setTextFormat(transText::formatMaxHeight)
|
||||||
.getStyle().setTooltip(Text.translatable("menu.cavedust.Y.tooltip"));
|
.getStyle().setTooltip(Text.translatable("menu.cavedust.height.tooltip"));
|
||||||
|
|
||||||
addButton(new Slider(left, row += 24, 1, 50, config.getDimensionsZ()))
|
|
||||||
.onChange(config::setDimensionsZ)
|
|
||||||
.setTextFormat(transText::formatMaxZ)
|
|
||||||
.getStyle().setTooltip(Text.translatable("menu.cavedust.Z.tooltip"));
|
|
||||||
|
|
||||||
addButton(new Slider(left, row += 24, 0, 10, config.getVelocityRandomness()))
|
addButton(new Slider(left, row += 24, 0, 10, config.getVelocityRandomness()))
|
||||||
.onChange(config::setVelocityRandomness)
|
.onChange(config::setVelocityRandomness)
|
||||||
@@ -94,9 +89,10 @@ public class ModMenuConfigScreen extends GameGui {
|
|||||||
.getStyle().setTooltip(Text.translatable("menu.cavedust.velocityrandomness.tooltip"));
|
.getStyle().setTooltip(Text.translatable("menu.cavedust.velocityrandomness.tooltip"));
|
||||||
|
|
||||||
|
|
||||||
addButton(new Button(left -= 110, row += 60).onClick(sender -> {
|
addButton(new Button(left -= 110, row += 120).onClick(sender -> {
|
||||||
config.resetConfig();
|
config.resetConfig();
|
||||||
finish();
|
finish();
|
||||||
|
client.setScreen(new ModMenuConfigScreen(parent));
|
||||||
})).getStyle().setText(Text.translatable("menu.cavedust.reset")).setTooltip(Text.translatable("menu.cavedust.reset.tooltip"));
|
})).getStyle().setText(Text.translatable("menu.cavedust.reset")).setTooltip(Text.translatable("menu.cavedust.reset.tooltip"));
|
||||||
|
|
||||||
addButton(new Button(left, row += 24)
|
addButton(new Button(left, row += 24)
|
||||||
@@ -114,6 +110,10 @@ public class ModMenuConfigScreen extends GameGui {
|
|||||||
private String getNameOfParticle(){
|
private String getNameOfParticle(){
|
||||||
CaveDustConfig config = CaveDust.getInstance().getConfig();
|
CaveDustConfig config = CaveDust.getInstance().getConfig();
|
||||||
config.load();
|
config.load();
|
||||||
return Registries.PARTICLE_TYPE.getEntry(config.getParticleID()).get().getKey().get().getValue().toString();
|
try {
|
||||||
|
return Registries.PARTICLE_TYPE.getEntry(config.getParticleID()).get().getKey().get().getValue().toString();
|
||||||
|
} catch (NoSuchElementException e){
|
||||||
|
return "null";
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -14,7 +14,7 @@ import static net.lizistired.cavedust.utils.ParticleSpawnUtil.shouldParticlesSpa
|
|||||||
@Mixin(DebugHud.class)
|
@Mixin(DebugHud.class)
|
||||||
public abstract class MixinDebugScreenOverlay {
|
public abstract class MixinDebugScreenOverlay {
|
||||||
@Inject(method = "getRightText", at = @At("RETURN"))
|
@Inject(method = "getRightText", at = @At("RETURN"))
|
||||||
private void appendShaderPackText(CallbackInfoReturnable<List<String>> cir) {
|
private void appendDebugText(CallbackInfoReturnable<List<String>> cir) {
|
||||||
List<String> messages = cir.getReturnValue();
|
List<String> messages = cir.getReturnValue();
|
||||||
|
|
||||||
messages.add("");
|
messages.add("");
|
||||||
|
|||||||
@@ -35,6 +35,10 @@ public class MathHelper {
|
|||||||
* @return Random number (double)
|
* @return Random number (double)
|
||||||
*/
|
*/
|
||||||
public static double generateRandomDouble(double min, double max) {
|
public static double generateRandomDouble(double min, double max) {
|
||||||
return ThreadLocalRandom.current().nextDouble(min, max);
|
try {
|
||||||
|
return ThreadLocalRandom.current().nextDouble(min, max);
|
||||||
|
} catch (IllegalArgumentException e) {
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -14,6 +14,7 @@ public class ParticleSpawnUtil {
|
|||||||
private static float timer;
|
private static float timer;
|
||||||
public static boolean shouldParticlesSpawn;
|
public static boolean shouldParticlesSpawn;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns true if particles should spawn.
|
* Returns true if particles should spawn.
|
||||||
* @param client MinecraftClient
|
* @param client MinecraftClient
|
||||||
@@ -67,6 +68,7 @@ public class ParticleSpawnUtil {
|
|||||||
|| client.world == null
|
|| client.world == null
|
||||||
|| !client.world.getDimension().bedWorks()
|
|| !client.world.getDimension().bedWorks()
|
||||||
|| (client.world.getBottomY() > pos.getY())
|
|| (client.world.getBottomY() > pos.getY())
|
||||||
|
//|| client.world.getBiome(Objects.requireNonNull(pos)).matchesKey(LUSH_CAVES))
|
||||||
|| client.world.getBiome(Objects.requireNonNull(pos)).matchesKey(LUSH_CAVES))
|
|| client.world.getBiome(Objects.requireNonNull(pos)).matchesKey(LUSH_CAVES))
|
||||||
|
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -6,14 +6,11 @@ import net.minecraft.text.Text;
|
|||||||
import javax.swing.*;
|
import javax.swing.*;
|
||||||
|
|
||||||
public class TranslatableTextHelper {
|
public class TranslatableTextHelper {
|
||||||
public Text formatMaxX(AbstractSlider<Float> slider) {
|
public Text formatMaxWidth(AbstractSlider<Float> slider) {
|
||||||
return Text.translatable("menu.cavedust.X", (int)Math.floor(slider.getValue()));
|
return Text.translatable("menu.cavedust.width", (int)Math.floor(slider.getValue()));
|
||||||
}
|
}
|
||||||
public Text formatMaxY(AbstractSlider<Float> slider) {
|
public Text formatMaxHeight(AbstractSlider<Float> slider) {
|
||||||
return Text.translatable("menu.cavedust.Y", (int)Math.floor(slider.getValue()));
|
return Text.translatable("menu.cavedust.height", (int)Math.floor(slider.getValue()));
|
||||||
}
|
|
||||||
public Text formatMaxZ(AbstractSlider<Float> slider) {
|
|
||||||
return Text.translatable("menu.cavedust.Z", (int)Math.floor(slider.getValue()));
|
|
||||||
}
|
}
|
||||||
public Text formatUpperLimit(AbstractSlider<Float> slider) {
|
public Text formatUpperLimit(AbstractSlider<Float> slider) {
|
||||||
return Text.translatable("menu.cavedust.upperlimit", (int)Math.floor(slider.getValue()));
|
return Text.translatable("menu.cavedust.upperlimit", (int)Math.floor(slider.getValue()));
|
||||||
|
|||||||
|
Before Width: | Height: | Size: 116 KiB After Width: | Height: | Size: 116 KiB |
@@ -4,12 +4,10 @@
|
|||||||
"menu.cavedust.global.true": "Cave Dust: Enabled",
|
"menu.cavedust.global.true": "Cave Dust: Enabled",
|
||||||
"menu.cavedust.global.tooltip.false": "Enable cave dust particles?",
|
"menu.cavedust.global.tooltip.false": "Enable cave dust particles?",
|
||||||
"menu.cavedust.global.tooltip.true": "Disable cave dust particles?",
|
"menu.cavedust.global.tooltip.true": "Disable cave dust particles?",
|
||||||
"menu.cavedust.X": "X bounds: %s",
|
"menu.cavedust.width": "Width bounds: %s",
|
||||||
"menu.cavedust.Y": "Y bounds: %s",
|
"menu.cavedust.height": "Height bounds: %s",
|
||||||
"menu.cavedust.Z": "Z bounds: %s",
|
"menu.cavedust.width.tooltip": "Maximum width to spawn particle.",
|
||||||
"menu.cavedust.X.tooltip": "X axis bounds for particle spawning.",
|
"menu.cavedust.height.tooltip": "Maximum height to spawn particle.",
|
||||||
"menu.cavedust.Y.tooltip": "Y axis bounds for particle spawning.",
|
|
||||||
"menu.cavedust.Z.tooltip": "Z axis bounds for particle spawning.",
|
|
||||||
"menu.cavedust.upperlimit": "Upper limit height: %s",
|
"menu.cavedust.upperlimit": "Upper limit height: %s",
|
||||||
"menu.cavedust.lowerlimit": "Lower limit height: %s",
|
"menu.cavedust.lowerlimit": "Lower limit height: %s",
|
||||||
"menu.cavedust.upperlimit.tooltip": "The height where particles will fade out and stop spawning (uses player y).",
|
"menu.cavedust.upperlimit.tooltip": "The height where particles will fade out and stop spawning (uses player y).",
|
||||||
@@ -37,6 +35,7 @@
|
|||||||
|
|
||||||
"debug.cavedust.toggle.true": "(Cave Dust) Enabled particles",
|
"debug.cavedust.toggle.true": "(Cave Dust) Enabled particles",
|
||||||
"debug.cavedust.toggle.false": "(Cave Dust) Disabled particles",
|
"debug.cavedust.toggle.false": "(Cave Dust) Disabled particles",
|
||||||
"debug.cavedust.reload": "(Cave Dust) Reloaded config"
|
"debug.cavedust.reload": "(Cave Dust) Reloaded config",
|
||||||
|
"debug.cavedust.particleerror": "(Cave Dust) Error setting particle, skipping to next particle!"
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -0,0 +1,5 @@
|
|||||||
|
{
|
||||||
|
"textures": [
|
||||||
|
"minecraft:generic_0"
|
||||||
|
]
|
||||||
|
}
|
||||||
@@ -12,12 +12,14 @@
|
|||||||
"sources": "https://github.com/LizIsTired/dust"
|
"sources": "https://github.com/LizIsTired/dust"
|
||||||
},
|
},
|
||||||
"license": "MPL-2.0",
|
"license": "MPL-2.0",
|
||||||
"icon": "assets/modid/icon.png",
|
"icon": "assets/cavedust/icon.png",
|
||||||
"environment": "*",
|
"environment": "*",
|
||||||
"entrypoints": {
|
"entrypoints": {
|
||||||
"client": [
|
"client": [
|
||||||
"net.lizistired.cavedust.CaveDust"
|
"net.lizistired.cavedust.CaveDust"
|
||||||
],
|
],
|
||||||
|
"main": [
|
||||||
|
"net.lizistired.cavedust.CaveDustServer"],
|
||||||
"modmenu": [
|
"modmenu": [
|
||||||
"net.lizistired.cavedust.CaveDustModMenuFactory"
|
"net.lizistired.cavedust.CaveDustModMenuFactory"
|
||||||
]
|
]
|
||||||
|
|||||||
Reference in New Issue
Block a user