Reset camera inventory when no longer spectating (fixes #546)
This commit is contained in:
@@ -9,6 +9,7 @@ import net.minecraft.client.world.ClientWorld;
|
||||
import net.minecraft.client.render.Tessellator;
|
||||
import net.minecraft.client.render.entity.EntityRenderDispatcher;
|
||||
import net.minecraft.client.sound.PositionedSoundInstance;
|
||||
import net.minecraft.entity.player.PlayerInventory;
|
||||
import net.minecraft.util.crash.CrashReportSection;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.entity.player.PlayerEntity;
|
||||
@@ -215,6 +216,15 @@ class Patterns {
|
||||
//#endif
|
||||
}
|
||||
|
||||
@Pattern
|
||||
private static PlayerInventory getInventory(PlayerEntity entity) {
|
||||
//#if MC>=11700
|
||||
//$$ return entity.getInventory();
|
||||
//#else
|
||||
return entity.inventory;
|
||||
//#endif
|
||||
}
|
||||
|
||||
@Pattern
|
||||
private static Iterable<Entity> loadedEntityList(ClientWorld world) {
|
||||
//#if MC>=11400
|
||||
|
||||
Reference in New Issue
Block a user