diff --git a/CHANGELOG b/CHANGELOG index 6d30463..f64eb24 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -32,7 +32,6 @@ This version focuses on QOL and bug fixes * Added Russian (ru_ru) and pre-reform Russian (ru_rpr) translations * Added missing warped, cherry and bamboo planks -* Added unique sounds for TV being turned on/off and broken. * Added many of the missing recipes * Removed ability to cut blocks back into original form on stone-cutter * Added button to open config file when using Mod Menu @@ -40,12 +39,9 @@ This version focuses on QOL and bug fixes * Minor bug fixes * Added some dedicated particle textures * Fixed issue with some blocks being non opaque - * Fixed TVs' hit-boxes + * Fixed TV's hit-box * Switches no longer emit redstone particle * Slightly improved cigarette's GUI model - * Light bulb lamp now makes a sound when repaired - * TV can now be repaired with a glass pane (breaking and re-placing still works for now) * Technical changes * Simplified recipe data generation - * Deleted various unused files - code, textures and models - * Bumped Fabric API, loader and mappings versions \ No newline at end of file + * Deleted various unused files - code, textures and models \ No newline at end of file diff --git a/gradle.properties b/gradle.properties index f6f628d..5faee0e 100644 --- a/gradle.properties +++ b/gradle.properties @@ -6,16 +6,16 @@ org.gradle.parallel=true # check these on https://fabricmc.net/develop minecraft_version=1.20.1 yarn_mappings=1.20.1+build.10 -loader_version=0.14.24 +loader_version=0.14.23 # Mod Properties mod_name=New Soviet Era -mod_version=0.3 +mod_version=0.2 maven_group=su.a71 mod_id=new_soviet # Dependencies -fabric_version=0.90.4+1.20.1 +fabric_version=0.90.0+1.20.1 modmenu_version=7.2.2 # Modrinth publishing diff --git a/src/main/java/su/a71/new_soviet/blocks/TVBlock.java b/src/main/java/su/a71/new_soviet/blocks/TVBlock.java index 63f963d..51c7bcd 100644 --- a/src/main/java/su/a71/new_soviet/blocks/TVBlock.java +++ b/src/main/java/su/a71/new_soviet/blocks/TVBlock.java @@ -11,7 +11,6 @@ import net.minecraft.item.ItemPlacementContext; import net.minecraft.server.world.ServerWorld; import net.minecraft.sound.BlockSoundGroup; import net.minecraft.sound.SoundCategory; -import net.minecraft.sound.SoundEvents; import net.minecraft.state.StateManager; import net.minecraft.state.property.BooleanProperty; import net.minecraft.state.property.Properties; @@ -27,9 +26,7 @@ import net.minecraft.world.BlockView; import net.minecraft.world.World; import net.minecraft.world.WorldAccess; -import su.a71.new_soviet.NewSoviet; import su.a71.new_soviet.entities.TVBlockEntity; -import su.a71.new_soviet.registration.NSE_Items; import su.a71.new_soviet.registration.NSE_Sounds; import su.a71.new_soviet.util.Shapes; @@ -90,29 +87,18 @@ public class TVBlock extends HorizontalFacingBlock implements BlockEntityProvide @Override public ActionResult onUse(BlockState state, World world, BlockPos pos, PlayerEntity player, Hand hand, BlockHitResult hit) { - if (state.get(BROKEN) && player.getInventory().getMainHandStack().getItem() == Blocks.GLASS_PANE.asItem()) { - if (!player.isCreative()) - player.getInventory().getMainHandStack().decrement(1); - world.playSound(null, pos.getX(), pos.getY(), pos.getZ(), SoundEvents.BLOCK_GLASS_PLACE, SoundCategory.BLOCKS, 0.8f, 1f); - world.setBlockState(pos, state.with(BROKEN, false)); - return ActionResult.SUCCESS; - } if (!world.isClient) { world.setBlockState(pos, state.cycle(INVERTED), 2); } - BlockState newState = world.getBlockState(pos); - if (newState.get(ON) != newState.get(INVERTED)) { - world.playSound(null, pos, NSE_Sounds.TV_ON_SOUND, SoundCategory.BLOCKS, 0.6f, 1f); - } else { - world.playSound(null, pos, NSE_Sounds.TV_OFF_SOUND, SoundCategory.BLOCKS, 0.6f, 1f); - } + float f = state.get(ON) ? 1f : 0.9f; + world.playSound(null, pos, NSE_Sounds.SWITCH_PRESS, SoundCategory.BLOCKS, 0.6f, f); return ActionResult.SUCCESS; } @Override public void onProjectileHit(World world, BlockState state, BlockHitResult hit, ProjectileEntity projectile) { if (!state.get(BROKEN)) { - world.playSound(null, hit.getBlockPos().getX(), hit.getBlockPos().getY(), hit.getBlockPos().getZ(), NSE_Sounds.TV_BREAK_SOUND, SoundCategory.BLOCKS, 0.8f, 1f); + world.playSound(null, hit.getBlockPos().getX(), hit.getBlockPos().getY(), hit.getBlockPos().getZ(), NSE_Sounds.LIGHT_BULB_BROKEN_SOUND, SoundCategory.BLOCKS, 0.8f, 1f); } world.setBlockState(hit.getBlockPos(), state.with(BROKEN, true), 2); super.onProjectileHit(world, state, hit, projectile); diff --git a/src/main/java/su/a71/new_soviet/blocks/lamps/LightBulbLampBlock.java b/src/main/java/su/a71/new_soviet/blocks/lamps/LightBulbLampBlock.java index 377ed41..ed0e319 100644 --- a/src/main/java/su/a71/new_soviet/blocks/lamps/LightBulbLampBlock.java +++ b/src/main/java/su/a71/new_soviet/blocks/lamps/LightBulbLampBlock.java @@ -1,7 +1,6 @@ package su.a71.new_soviet.blocks.lamps; import net.minecraft.block.*; -import net.minecraft.sound.SoundEvents; import net.minecraft.text.Text; import net.minecraft.entity.player.PlayerEntity; import net.minecraft.entity.projectile.ProjectileEntity; @@ -56,7 +55,6 @@ public class LightBulbLampBlock extends LampBlock { if (world.isReceivingRedstonePower(pos) == state.get(INVERTED) || (NewSoviet.RANDOM.nextBetween(1, 32) == 1)) { if (!player.isCreative()) player.getInventory().getMainHandStack().decrement(1); - world.playSound(null, pos.getX(), pos.getY(), pos.getZ(), SoundEvents.BLOCK_GLASS_PLACE, SoundCategory.BLOCKS, 0.8f, 1f); world.setBlockState(pos, state.with(BROKEN, false)); return ActionResult.SUCCESS; } else { diff --git a/src/main/java/su/a71/new_soviet/registration/NSE_Sounds.java b/src/main/java/su/a71/new_soviet/registration/NSE_Sounds.java index ce116fd..46d3c78 100644 --- a/src/main/java/su/a71/new_soviet/registration/NSE_Sounds.java +++ b/src/main/java/su/a71/new_soviet/registration/NSE_Sounds.java @@ -41,11 +41,9 @@ public class NSE_Sounds extends NSE_BaseRegistration { public static final SoundEvent WOOP_SIREN_SOUND = registerSoundEvent("woop_siren_sound"); public static final SoundEvent CLOISTER_SIREN_SOUND = registerSoundEvent("cloister_siren_sound"); + public static final SoundEvent ELECTRIC_HIT = SoundEvent.of(new Identifier(NewSoviet.MOD_ID, "electric_hit")); public static final SoundEvent LIGHT_BULB_BROKEN_SOUND = registerSoundEvent("light_bulb_broken_sound"); - public static final SoundEvent TV_ON_SOUND = registerSoundEvent("tv_on_sound"); - public static final SoundEvent TV_OFF_SOUND = registerSoundEvent("tv_off_sound"); - public static final SoundEvent TV_BREAK_SOUND = registerSoundEvent("tv_break_sound"); } \ No newline at end of file diff --git a/src/main/resources/assets/new_soviet/lang/en_us.json b/src/main/resources/assets/new_soviet/lang/en_us.json index bed62bb..6039731 100644 --- a/src/main/resources/assets/new_soviet/lang/en_us.json +++ b/src/main/resources/assets/new_soviet/lang/en_us.json @@ -484,9 +484,6 @@ "block.new_soviet.herringbone_bamboo_planks": "Herringbone Bamboo Planks", "block.new_soviet.herringbone_bamboo_planks_stairs": "Herringbone Bamboo Planks Stairs", "block.new_soviet.herringbone_bamboo_planks_slab": "Herringbone Bamboo Planks Slab", - "subtitles.new_soviet.tv_on": "TV turned on", - "subtitles.new_soviet.tv_off": "TV turned off", - "subtitles.new_soviet.tv_break": "TV screen shattered", "advancement.new_soviet.root.name": "A New Era", "advancement.new_soviet.root.desc": "Time to create something great", diff --git a/src/main/resources/assets/new_soviet/lang/rpr.json b/src/main/resources/assets/new_soviet/lang/rpr.json index 9e4ff32..fdeb78a 100644 --- a/src/main/resources/assets/new_soviet/lang/rpr.json +++ b/src/main/resources/assets/new_soviet/lang/rpr.json @@ -484,9 +484,6 @@ "block.new_soviet.herringbone_bamboo_planks": "Бамбуковый паркѣт «ёлочкой»", "block.new_soviet.herringbone_bamboo_planks_stairs": "Ступѣнi из бамбукового паркѣта «ёлочкой»", "block.new_soviet.herringbone_bamboo_planks_slab": "Плита из бамбукового паркѣта «ёлочкой»", - "subtitles.new_soviet.tv_on": "Включается тѣлѣвизоръ", - "subtitles.new_soviet.tv_off": "Выключается тѣлѣвизоръ", - "subtitles.new_soviet.tv_break": "Разбитъ экранъ тѣлѣвизора", "advancement.new_soviet.root.name": "Новыя эра!", "advancement.new_soviet.root.desc": "Врѣмя совѣршать вѣликое!", diff --git a/src/main/resources/assets/new_soviet/lang/ru_ru.json b/src/main/resources/assets/new_soviet/lang/ru_ru.json index 132ec19..09e78cf 100644 --- a/src/main/resources/assets/new_soviet/lang/ru_ru.json +++ b/src/main/resources/assets/new_soviet/lang/ru_ru.json @@ -484,9 +484,6 @@ "block.new_soviet.herringbone_bamboo_planks": "Бамбуковый паркет «ёлочкой»", "block.new_soviet.herringbone_bamboo_planks_stairs": "Ступени из бамбукового паркета «ёлочкой»", "block.new_soviet.herringbone_bamboo_planks_slab": "Плита из бамбукового паркета «ёлочкой»", - "subtitles.new_soviet.tv_on": "Включается телевизор", - "subtitles.new_soviet.tv_off": "Выключается телевизор", - "subtitles.new_soviet.tv_break": "Разбит экран телевизора", "advancement.new_soviet.root.name": "Новая эра!", "advancement.new_soviet.root.desc": "Время совершать великое!", diff --git a/src/main/resources/assets/new_soviet/sounds.json b/src/main/resources/assets/new_soviet/sounds.json index b09a48d..d7b115d 100644 --- a/src/main/resources/assets/new_soviet/sounds.json +++ b/src/main/resources/assets/new_soviet/sounds.json @@ -93,24 +93,6 @@ "sounds": [ "new_soviet:cigarette_pause" ] - }, - "tv_on_sound": { - "subtitle": "subtitles.new_soviet.tv_on", - "sounds": [ - "new_soviet:tv_on" - ] - }, - "tv_off_sound": { - "subtitle": "subtitles.new_soviet.tv_off", - "sounds": [ - "new_soviet:tv_off" - ] - }, - "tv_break_sound": { - "subtitle": "subtitles.new_soviet.tv_break", - "sounds": [ - "new_soviet:tv_break" - ] } } diff --git a/src/main/resources/assets/new_soviet/sounds/tv_break.ogg b/src/main/resources/assets/new_soviet/sounds/tv_break.ogg deleted file mode 100644 index b50eabe..0000000 Binary files a/src/main/resources/assets/new_soviet/sounds/tv_break.ogg and /dev/null differ diff --git a/src/main/resources/assets/new_soviet/sounds/tv_off.ogg b/src/main/resources/assets/new_soviet/sounds/tv_off.ogg deleted file mode 100644 index 840e1bd..0000000 Binary files a/src/main/resources/assets/new_soviet/sounds/tv_off.ogg and /dev/null differ diff --git a/src/main/resources/assets/new_soviet/sounds/tv_on.ogg b/src/main/resources/assets/new_soviet/sounds/tv_on.ogg deleted file mode 100644 index e7c28af..0000000 Binary files a/src/main/resources/assets/new_soviet/sounds/tv_on.ogg and /dev/null differ