Improve dice, fix models and lang
This commit is contained in:
parent
9ba3a3cf76
commit
fc5097e354
6 changed files with 23 additions and 11 deletions
|
@ -4,6 +4,7 @@ import java.io.*;
|
||||||
|
|
||||||
public class Config {
|
public class Config {
|
||||||
private boolean invert_lamps = false;
|
private boolean invert_lamps = false;
|
||||||
|
private boolean announce_dice = false;
|
||||||
|
|
||||||
public static Config INSTANCE;
|
public static Config INSTANCE;
|
||||||
|
|
||||||
|
@ -14,9 +15,13 @@ public class Config {
|
||||||
public boolean shouldInvertLamps() {
|
public boolean shouldInvertLamps() {
|
||||||
return invert_lamps;
|
return invert_lamps;
|
||||||
}
|
}
|
||||||
|
public boolean shouldAnnounceDice() {
|
||||||
|
return announce_dice;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
private static void generateDefault() {
|
private static void generateDefault() {
|
||||||
|
NewSoviet.LOG.info("Generated config file at config/new_soviet.json");
|
||||||
File file = new File("config/new_soviet.json");
|
File file = new File("config/new_soviet.json");
|
||||||
if(!file.getParentFile().exists()) {
|
if(!file.getParentFile().exists()) {
|
||||||
file.getParentFile().mkdirs();
|
file.getParentFile().mkdirs();
|
||||||
|
|
|
@ -13,6 +13,8 @@ import net.minecraft.world.World;
|
||||||
|
|
||||||
import org.jetbrains.annotations.Nullable;
|
import org.jetbrains.annotations.Nullable;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
|
import su.a71.new_soviet.Config;
|
||||||
import su.a71.new_soviet.NewSoviet;
|
import su.a71.new_soviet.NewSoviet;
|
||||||
import su.a71.new_soviet.registration.NSE_Sounds;
|
import su.a71.new_soviet.registration.NSE_Sounds;
|
||||||
|
|
||||||
|
@ -35,7 +37,7 @@ public class DiceItem extends Item {
|
||||||
world.playSound((PlayerEntity)null, user.getX(), user.getY(), user.getZ(), NSE_Sounds.DICE_SOUND, SoundCategory.NEUTRAL, 0.5F, 0.4F / (world.getRandom().nextFloat() * 0.4F + 0.8F));
|
world.playSound((PlayerEntity)null, user.getX(), user.getY(), user.getZ(), NSE_Sounds.DICE_SOUND, SoundCategory.NEUTRAL, 0.5F, 0.4F / (world.getRandom().nextFloat() * 0.4F + 0.8F));
|
||||||
output.append(NewSoviet.RANDOM.nextBetween(1, this.getSides())).append(", ");
|
output.append(NewSoviet.RANDOM.nextBetween(1, this.getSides())).append(", ");
|
||||||
}
|
}
|
||||||
user.sendMessage(Text.translatable(itemStack.getCount() == 1 ? "item.new_soviet.dice.thrown" : "item.new_soviet.dice.thrown_multiple").append(" " + output.subSequence(0, output.length() - 2)));
|
user.sendMessage(Text.translatable(itemStack.getCount() == 1 ? "item.new_soviet.dice.thrown" : "item.new_soviet.dice.thrown_multiple").append(" " + output.subSequence(0, output.length() - 2)), Config.INSTANCE.shouldAnnounceDice());
|
||||||
}
|
}
|
||||||
|
|
||||||
user.increaseStat(Stats.USED.getOrCreateStat(this), itemStack.getCount());
|
user.increaseStat(Stats.USED.getOrCreateStat(this), itemStack.getCount());
|
||||||
|
|
|
@ -1,8 +0,0 @@
|
||||||
{
|
|
||||||
"variants": {
|
|
||||||
"facing=north": { "model": "new_soviet:block/radio", "uvlock": true },
|
|
||||||
"facing=east": { "model": "new_soviet:block/radio", "y": 90, "uvlock": false },
|
|
||||||
"facing=south": { "model": "new_soviet:block/radio", "y": 180, "uvlock": false },
|
|
||||||
"facing=west": { "model": "new_soviet:block/radio", "y": 270, "uvlock": false }
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -0,0 +1,8 @@
|
||||||
|
{
|
||||||
|
"variants": {
|
||||||
|
"facing=north": { "model": "new_soviet:block/radio_receiver", "uvlock": true },
|
||||||
|
"facing=east": { "model": "new_soviet:block/radio_receiver", "y": 90, "uvlock": false },
|
||||||
|
"facing=south": { "model": "new_soviet:block/radio_receiver", "y": 180, "uvlock": false },
|
||||||
|
"facing=west": { "model": "new_soviet:block/radio_receiver", "y": 270, "uvlock": false }
|
||||||
|
}
|
||||||
|
}
|
|
@ -146,7 +146,7 @@
|
||||||
"block.new_soviet.tv": "TV",
|
"block.new_soviet.tv": "TV",
|
||||||
"block.new_soviet.red_tv": "Red TV",
|
"block.new_soviet.red_tv": "Red TV",
|
||||||
"block.new_soviet.brown_tv": "Brown TV",
|
"block.new_soviet.brown_tv": "Brown TV",
|
||||||
"block.new_soviet.radio": "Radio",
|
"block.new_soviet.radio_receiver": "Radio",
|
||||||
"block.new_soviet.lamp": "Lamp",
|
"block.new_soviet.lamp": "Lamp",
|
||||||
"block.new_soviet.ceiling_fan": "Ceiling Fan",
|
"block.new_soviet.ceiling_fan": "Ceiling Fan",
|
||||||
"block.new_soviet.siren": "Siren",
|
"block.new_soviet.siren": "Siren",
|
||||||
|
@ -223,5 +223,10 @@
|
||||||
"block.new_soviet.black_queen": "Black Queen",
|
"block.new_soviet.black_queen": "Black Queen",
|
||||||
"block.new_soviet.black_pawn": "Black Pawn",
|
"block.new_soviet.black_pawn": "Black Pawn",
|
||||||
"block.new_soviet.handrail": "Handrail",
|
"block.new_soviet.handrail": "Handrail",
|
||||||
"subtitles.new_soviet.smoking": "Cigarette smoking"
|
"subtitles.new_soviet.smoking": "Cigarette smoking",
|
||||||
|
"block.new_soviet.small_white_tiles": "Small White Tiles",
|
||||||
|
"block.new_soviet.small_cracked_white_tiles": "Small Cracked White Tiles",
|
||||||
|
"block.new_soviet.glazed_white_tiles": "Glazed White Tiles",
|
||||||
|
"block.new_soviet.crackedglazed_white_tiles": "Cracked Glazed White Tiles"
|
||||||
|
|
||||||
}
|
}
|
Loading…
Reference in a new issue