Fix syncing of everything

This commit is contained in:
Electroblob77
2020-04-12 18:35:30 +01:00
parent 6254020024
commit c622158818
9 changed files with 124 additions and 36 deletions
@@ -2,9 +2,11 @@ package electroblob.wizardry.client;
import electroblob.wizardry.CommonProxy;
import electroblob.wizardry.Wizardry;
import electroblob.wizardry.block.BlockBookshelf;
import electroblob.wizardry.client.audio.MovingSoundEntity;
import electroblob.wizardry.client.audio.SoundLoop;
import electroblob.wizardry.client.audio.SoundLoopSpell;
import electroblob.wizardry.client.gui.GuiLectern;
import electroblob.wizardry.client.gui.GuiSpellDisplay;
import electroblob.wizardry.client.gui.config.NamedBooleanEntry;
import electroblob.wizardry.client.gui.config.SpellHUDSkinChooserEntry;
@@ -202,6 +204,20 @@ public class ClientProxy extends CommonProxy {
return GuiSpellDisplay.getSkinKeys();
}
@Override
public void notifyBookshelfChange(World world, BlockPos pos){
super.notifyBookshelfChange(world, pos);
EntityPlayer player = Minecraft.getMinecraft().player;
if(player.getDistanceSq(pos) < BlockBookshelf.PLAYER_NOTIFY_RANGE * BlockBookshelf.PLAYER_NOTIFY_RANGE){
if(Minecraft.getMinecraft().currentScreen instanceof GuiLectern){
((GuiLectern)Minecraft.getMinecraft().currentScreen).refreshAvailableSpells();
}
}
}
// SECTION Items
// ===============================================================================================================