diff options
| author | Unknown <shekwancheung0528@gmail.com> | 2019-03-22 18:04:40 +0800 |
|---|---|---|
| committer | Unknown <shekwancheung0528@gmail.com> | 2019-03-22 18:04:40 +0800 |
| commit | 19349d7da7ac6bb0939f59066dec61f09d9c5e8c (patch) | |
| tree | 0948da627bcdc48ba75620c72a9f462e20b8a15f /src/main/java/me/shedaniel/rei/gui/RecipeViewingScreen.java | |
| parent | 246d9b218ed8dbdda42518109902ffe73b15bf57 (diff) | |
| download | RoughlyEnoughItems-19349d7da7ac6bb0939f59066dec61f09d9c5e8c.tar.gz RoughlyEnoughItems-19349d7da7ac6bb0939f59066dec61f09d9c5e8c.tar.bz2 RoughlyEnoughItems-19349d7da7ac6bb0939f59066dec61f09d9c5e8c.zip | |
Updated to 19w12b
Diffstat (limited to 'src/main/java/me/shedaniel/rei/gui/RecipeViewingScreen.java')
| -rw-r--r-- | src/main/java/me/shedaniel/rei/gui/RecipeViewingScreen.java | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/main/java/me/shedaniel/rei/gui/RecipeViewingScreen.java b/src/main/java/me/shedaniel/rei/gui/RecipeViewingScreen.java index 33638e17c..46271d5eb 100644 --- a/src/main/java/me/shedaniel/rei/gui/RecipeViewingScreen.java +++ b/src/main/java/me/shedaniel/rei/gui/RecipeViewingScreen.java @@ -17,6 +17,7 @@ import net.minecraft.client.render.GuiLighting; import net.minecraft.client.resource.language.I18n; import net.minecraft.client.util.Window; import net.minecraft.sound.SoundEvents; +import net.minecraft.text.StringTextComponent; import net.minecraft.text.TranslatableTextComponent; import net.minecraft.util.Identifier; import net.minecraft.util.math.MathHelper; @@ -49,6 +50,7 @@ public class RecipeViewingScreen extends Screen { private ButtonWidget recipeBack, recipeNext, categoryBack, categoryNext; public RecipeViewingScreen(Window window, Map<RecipeCategory, List<RecipeDisplay>> categoriesMap) { + super(new StringTextComponent("")); this.categoryPages = 0; this.window = window; this.widgets = Lists.newArrayList(); @@ -148,7 +150,7 @@ public class RecipeViewingScreen extends Screen { @Override public void onLabelClicked() { - MinecraftClient.getInstance().getSoundLoader().play(PositionedSoundInstance.master(SoundEvents.UI_BUTTON_CLICK, 1.0F)); + MinecraftClient.getInstance().getSoundManager().play(PositionedSoundInstance.master(SoundEvents.UI_BUTTON_CLICK, 1.0F)); ClientHelper.executeViewAllRecipesKeyBind(); } }); @@ -200,7 +202,7 @@ public class RecipeViewingScreen extends Screen { @Override public void onLabelClicked() { - MinecraftClient.getInstance().getSoundLoader().play(PositionedSoundInstance.master(SoundEvents.UI_BUTTON_CLICK, 1.0F)); + MinecraftClient.getInstance().getSoundManager().play(PositionedSoundInstance.master(SoundEvents.UI_BUTTON_CLICK, 1.0F)); RecipeViewingScreen.this.choosePageActivated = true; RecipeViewingScreen.this.onInitialized(); } @@ -231,7 +233,7 @@ public class RecipeViewingScreen extends Screen { @Override public boolean mouseClicked(double mouseX, double mouseY, int button) { if (getBounds().contains(mouseX, mouseY)) { - MinecraftClient.getInstance().getSoundLoader().play(PositionedSoundInstance.master(SoundEvents.UI_BUTTON_CLICK, 1.0F)); + MinecraftClient.getInstance().getSoundManager().play(PositionedSoundInstance.master(SoundEvents.UI_BUTTON_CLICK, 1.0F)); if (getId() + categoryPages * 6 == categories.indexOf(selectedCategory)) return false; selectedCategory = categories.get(getId() + categoryPages * 6); |
