Skip to content

Commit 7df31a0

Browse files
committed
Add missing world safety check
1 parent 0598985 commit 7df31a0

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ buildscript {
1818
apply plugin: 'net.minecraftforge.gradle.forge'
1919
apply plugin: 'org.spongepowered.mixin'
2020

21-
version = '1.12.2-1.3.0'
21+
version = '1.12.2-1.3.1'
2222
group = 'mod.acgaming.extrasounds'
2323
archivesBaseName = 'ExtraSounds'
2424

src/main/java/mod/acgaming/extrasounds/ExtraSounds.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ public class ExtraSounds
1717
{
1818
public static final String MODID = "extrasounds";
1919
public static final String NAME = "Extra Sounds";
20-
public static final String VERSION = "1.12.2-1.3.0";
20+
public static final String VERSION = "1.12.2-1.3.1";
2121
public static final String DEPENDENCIES = "required-after:mixinbooter;required-after:assetmover;after:jei;after:asmc;after:dsurround";
2222
public static final Logger LOGGER = LogManager.getLogger(NAME);
2323
public static boolean asmc = false;

src/main/java/mod/acgaming/extrasounds/sound/ESSoundManager.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -223,7 +223,7 @@ public static void playSoundWorld(SoundEvent soundEvent, BlockPos blockPos)
223223

224224
public static float randomOffset()
225225
{
226-
return Minecraft.getMinecraft().world.rand.nextFloat() * 0.2F;
226+
return Minecraft.getMinecraft().world != null ? Minecraft.getMinecraft().world.rand.nextFloat() * 0.2F : 0.1F;
227227
}
228228

229229
public static void playClickSound(ItemStack stackIn)

0 commit comments

Comments
 (0)